SoapServerFormatterSinkProvider.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider.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 SoapServerFormatterSinkProvider :
  12. IServerFormatterSinkProvider, IServerChannelSinkProvider
  13. {
  14. private IServerChannelSinkProvider _next;
  15. SoapCore _soapCore;
  16. public SoapServerFormatterSinkProvider ()
  17. {
  18. _soapCore = SoapCore.DefaultInstance;
  19. }
  20. public SoapServerFormatterSinkProvider (IDictionary properties,
  21. ICollection providerData)
  22. {
  23. _soapCore = new SoapCore (this, properties);
  24. }
  25. public IServerChannelSinkProvider Next
  26. {
  27. get { return _next; }
  28. set { _next = value; }
  29. }
  30. public IServerChannelSink CreateSink (IChannelReceiver channel)
  31. {
  32. IServerChannelSink chain = _next.CreateSink(channel);
  33. SoapServerFormatterSink sinkFormatter = new SoapServerFormatterSink(SoapServerFormatterSink.Protocol.Http, chain, channel);
  34. sinkFormatter.SoapCore = _soapCore;
  35. return sinkFormatter;
  36. }
  37. public void GetChannelData (IChannelDataStore channelData)
  38. {
  39. if(_next != null)
  40. _next.GetChannelData(channelData);
  41. }
  42. }
  43. }