SimpleClientFormatterSinkProvider.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // System.Runtime.Remoting.Channels.Simple.SimpleClientFormatterSinkProvider.cs
  3. //
  4. // Author: Dietmar Maurer ([email protected])
  5. //
  6. // 2002 (C) Copyright, Ximian, Inc.
  7. //
  8. using System.Collections;
  9. namespace System.Runtime.Remoting.Channels.Simple
  10. {
  11. public class SimpleClientFormatterSinkProvider :
  12. IClientFormatterSinkProvider, IClientChannelSinkProvider
  13. {
  14. IClientChannelSinkProvider next = null;
  15. // add any sink properties here (private fields)
  16. public SimpleClientFormatterSinkProvider ()
  17. {
  18. // nothing to do
  19. }
  20. public SimpleClientFormatterSinkProvider (IDictionary properties,
  21. ICollection providerData)
  22. {
  23. // copy the contained properties to private fields
  24. // add a check that there is no providerData
  25. }
  26. public IClientChannelSinkProvider Next
  27. {
  28. get {
  29. return next;
  30. }
  31. set {
  32. next = value;
  33. }
  34. }
  35. public IClientChannelSink CreateSink (IChannelSender channel,
  36. string url,
  37. object remoteChannelData)
  38. {
  39. IClientChannelSink next_sink = null;
  40. SimpleClientFormatterSink result;
  41. if (next != null)
  42. next_sink = next.CreateSink (channel, url, remoteChannelData);
  43. result = new SimpleClientFormatterSink (next_sink);
  44. // set properties on the newly creates sink
  45. return result;
  46. }
  47. }
  48. }