ContextOutputSessionChannel.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.ServiceModel.Channels
  5. {
  6. using System;
  7. using System.Collections.Generic;
  8. using System.ServiceModel;
  9. class ContextOutputSessionChannel : ContextOutputChannelBase<IOutputSessionChannel>, IOutputSessionChannel
  10. {
  11. ClientContextProtocol contextProtocol;
  12. public ContextOutputSessionChannel(ChannelManagerBase channelManager, IOutputSessionChannel innerChannel,
  13. ContextExchangeMechanism contextExchangeMechanism, Uri callbackAddress, bool contextManagementEnabled)
  14. : base(channelManager, innerChannel)
  15. {
  16. this.contextProtocol = new ClientContextProtocol(contextExchangeMechanism, this.InnerChannel.Via, this, callbackAddress, contextManagementEnabled);
  17. }
  18. public IOutputSession Session
  19. {
  20. get { return this.InnerChannel.Session; }
  21. }
  22. protected override ContextProtocol ContextProtocol
  23. {
  24. get { return this.contextProtocol; }
  25. }
  26. protected override bool IsClient
  27. {
  28. get { return true; }
  29. }
  30. }
  31. }