Exemple #1
0
        } // GetChannelData

        /// <include file='doc\SoapFormatterSinks.uex' path='docs/doc[@for="SoapServerFormatterSinkProvider.CreateSink"]/*' />
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            if (null == channel)
            {
                throw new ArgumentNullException("channel");
            }

            IServerChannelSink nextSink = null;

            if (_next != null)
            {
                nextSink = _next.CreateSink(channel);
            }

            SoapServerFormatterSink.Protocol protocol =
                SoapServerFormatterSink.Protocol.Other;

            // see if this is an http channel
            String uri = channel.GetUrlsForUri("")[0];

            if (String.Compare("http", 0, uri, 0, 4, true, CultureInfo.InvariantCulture) == 0)
            {
                protocol = SoapServerFormatterSink.Protocol.Http;
            }

            SoapServerFormatterSink sink = new SoapServerFormatterSink(protocol, nextSink, channel);

            sink.IncludeVersioning = _includeVersioning;
            sink.StrictBinding     = _strictBinding;
            return(sink);
        }
Exemple #2
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            if (null == channel)
            {
                throw new ArgumentNullException("channel");
            }

            IServerChannelSink nextSink = null;

            if (_next != null)
            {
                nextSink = _next.CreateSink(channel);
            }

            SoapServerFormatterSink.Protocol protocol =
                SoapServerFormatterSink.Protocol.Other;

            // see if this is an http channel
            String uri = channel.GetUrlsForUri("")[0];

            if (String.Compare("http", 0, uri, 0, 4, StringComparison.OrdinalIgnoreCase) == 0)
            {
                protocol = SoapServerFormatterSink.Protocol.Http;
            }

            SoapServerFormatterSink sink = new SoapServerFormatterSink(protocol, nextSink, channel);

            sink.IncludeVersioning = _includeVersioning;
            sink.StrictBinding     = _strictBinding;
            sink.TypeFilterLevel   = _formatterSecurityLevel;
            return(sink);
        }
 public SoapServerFormatterSink(SoapServerFormatterSink.Protocol protocol,
                                IServerChannelSink nextSink,
                                IChannelReceiver receiver)
 {
     this.next_sink = nextSink;
     _receiver      = receiver;
 }
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            if (channel == null)
            {
                throw new ArgumentNullException("channel");
            }
            IServerChannelSink nextSink = null;

            if (this._next != null)
            {
                nextSink = this._next.CreateSink(channel);
            }
            SoapServerFormatterSink.Protocol other = SoapServerFormatterSink.Protocol.Other;
            string strB = channel.GetUrlsForUri("")[0];

            if (string.Compare("http", 0, strB, 0, 4, StringComparison.OrdinalIgnoreCase) == 0)
            {
                other = SoapServerFormatterSink.Protocol.Http;
            }
            return(new SoapServerFormatterSink(other, nextSink, channel)
            {
                IncludeVersioning = this._includeVersioning, StrictBinding = this._strictBinding, TypeFilterLevel = this._formatterSecurityLevel
            });
        }