BinaryClientFormatterSinkProvider.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider.cs
  3. //
  4. // Author: Rodrigo Moya ([email protected])
  5. //
  6. // 2002 (C) Copyright, Ximian, Inc.
  7. //
  8. using System.Collections;
  9. namespace System.Runtime.Remoting.Channels
  10. {
  11. public class BinaryClientFormatterSinkProvider :
  12. IClientFormatterSinkProvider, IClientChannelSinkProvider
  13. {
  14. IClientChannelSinkProvider next = null;
  15. BinaryCore _binaryCore;
  16. public BinaryClientFormatterSinkProvider ()
  17. {
  18. _binaryCore = BinaryCore.DefaultInstance;
  19. }
  20. public BinaryClientFormatterSinkProvider (IDictionary properties,
  21. ICollection providerData)
  22. {
  23. _binaryCore = new BinaryCore (this, properties);
  24. }
  25. public IClientChannelSinkProvider Next
  26. {
  27. get {
  28. return next;
  29. }
  30. set {
  31. next = value;
  32. }
  33. }
  34. public IClientChannelSink CreateSink (IChannelSender channel,
  35. string url,
  36. object remoteChannelData)
  37. {
  38. IClientChannelSink next_sink = null;
  39. BinaryClientFormatterSink result;
  40. if (next != null)
  41. next_sink = next.CreateSink (channel, url, remoteChannelData);
  42. result = new BinaryClientFormatterSink (next_sink);
  43. result.BinaryCore = _binaryCore;
  44. return result;
  45. }
  46. }
  47. }