상속: IServerChannelSink, IChannelSinkBase
        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
		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;
		}