Inheritance: IServerChannelSink, IChannelSinkBase
コード例 #1
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            if (null == channel)
            {
                throw new ArgumentNullException("channel");
            }

            IServerChannelSink nextSink = null;

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

            BinaryServerFormatterSink.Protocol protocol =
                BinaryServerFormatterSink.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 = BinaryServerFormatterSink.Protocol.Http;
            }

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

            sink.TypeFilterLevel   = _formatterSecurityLevel;
            sink.IncludeVersioning = _includeVersioning;
            sink.StrictBinding     = _strictBinding;
            return(sink);
        } // CreateSink
コード例 #2
0
		public BinaryServerFormatterSink (BinaryServerFormatterSink.Protocol protocol,
						  IServerChannelSink nextSink,
						  IChannelReceiver receiver)
		{
			this.protocol = protocol;
			this.next_sink = nextSink;
			this.receiver = receiver;
		}
コード例 #3
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink        next_sink = null;
            BinaryServerFormatterSink result;

            if (next != null)
            {
                next_sink = next.CreateSink(channel);
            }

            result = new BinaryServerFormatterSink(BinaryServerFormatterSink.Protocol.Other,
                                                   next_sink, channel);

            result.BinaryCore = _binaryCore;
            return(result);
        }
コード例 #4
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            if(null == channel)
            {
                throw new ArgumentNullException("channel");               
            }

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

            BinaryServerFormatterSink.Protocol protocol = 
                BinaryServerFormatterSink.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 = BinaryServerFormatterSink.Protocol.Http;            

            BinaryServerFormatterSink sink = new BinaryServerFormatterSink(protocol, nextSink, channel);
            sink.TypeFilterLevel = _formatterSecurityLevel;
            sink.IncludeVersioning = _includeVersioning;
            sink.StrictBinding = _strictBinding;
            return sink;
        } // CreateSink
コード例 #5
0
		public IServerChannelSink CreateSink (IChannelReceiver channel)
		{
			IServerChannelSink next_sink = null;
			BinaryServerFormatterSink result;
			
			if (next != null)
				next_sink = next.CreateSink (channel);
			
			result = new BinaryServerFormatterSink (BinaryServerFormatterSink.Protocol.Other,
								next_sink, channel);

			result.BinaryCore = _binaryCore;
			return result;
		}