BinaryClientFormatterSinkProvider.cs 1.4 KB

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