SoapServerFormatterSinkProvider.cs 1.5 KB

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