SoapClientFormatterSinkProvider.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // created on 20/05/2003 at 12:33
  2. using System.Collections;
  3. using System.Runtime.Remoting.Messaging;
  4. namespace System.Runtime.Remoting.Channels {
  5. public class SoapClientFormatterSinkProvider: IClientFormatterSinkProvider,
  6. IClientChannelSinkProvider
  7. {
  8. private IClientChannelSinkProvider _nextClientChannelSinkProvider;
  9. SoapCore _soapCore;
  10. static string[] allowedProperties = new string [] { "includeVersions", "strictBinding" };
  11. public SoapClientFormatterSinkProvider()
  12. {
  13. _soapCore = SoapCore.DefaultInstance;
  14. }
  15. public SoapClientFormatterSinkProvider(IDictionary properties,
  16. ICollection providerData)
  17. {
  18. _soapCore = new SoapCore (this, properties, allowedProperties);
  19. }
  20. public virtual IClientChannelSinkProvider Next
  21. {
  22. get { return _nextClientChannelSinkProvider;}
  23. set { _nextClientChannelSinkProvider = value;}
  24. }
  25. public virtual IClientChannelSink CreateSink( IChannelSender channel,
  26. string url,
  27. object remoteChannelData)
  28. {
  29. IClientChannelSink _nextSink = _nextClientChannelSinkProvider.CreateSink(channel, url, remoteChannelData);
  30. SoapClientFormatterSink scfs = new SoapClientFormatterSink(_nextSink);
  31. scfs.SoapCore = _soapCore;
  32. return scfs;
  33. }
  34. }
  35. }