/// <summary>
        /// factory method that create the concrete corresponding server sink object
        /// </summary>
        /// <param name="channel">The channel for which to create the channel sink chain. </param>
        /// <returns>newly created CryptoRemotingServerSink object</returns>
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink nextSink;

            nextSink = next.CreateSink(channel);
            return(new CryptoRemotingServerSink(nextSink));
        }
Example #2
0
        IServerChannelSink IServerChannelSinkProvider.CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink nextSink = nextProvider.CreateSink(channel);
            IServerChannelSink thisSink = new InvokeOnSTAServerChannelSink(nextSink);

            return(thisSink);
        }
        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
Example #4
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink    chain = next.CreateSink(channel);
            GuiDispatchServerSink sink  = new GuiDispatchServerSink(chain, channel);

            return(sink);
        }
Example #5
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);
        }
Example #6
0
        /// <summary>
        /// Creates the sink.
        /// </summary>
        /// <param name="channel">The channel.</param>
        /// <returns></returns>
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            //create other sinks in the chain
            IServerChannelSink nextSink = nextProvider.CreateSink(channel);

            return(new ClientIPInjectorSink(nextSink));
        }
Example #7
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            // create other sinks in the chain
            IServerChannelSink next = _nextProvider.CreateSink(channel);

            // put our sink on top of the chain and return it
            return(new CompressionServerSink(next));
        }
Example #8
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            // create other sinks in the chain
            IServerChannelSink next = _nextProvider.CreateSink(channel);

            // put our sink on top of the chain and return it
            return(new EncryptionServerSink(next,
                                            _encryptionKey, _encryptionAlgorithm));
        }
Example #9
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            if (channel == null)
            {
                throw new ArgumentNullException("channel");
            }

            return(new CustomBinaryServerFormatterSink(nextProvider.CreateSink(channel), channel));
        }
Example #10
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink      chain         = _next.CreateSink(channel);
            SoapServerFormatterSink sinkFormatter = new SoapServerFormatterSink(SoapServerFormatterSink.Protocol.Http, chain, channel);

            sinkFormatter.SoapCore = _soapCore;

            return(sinkFormatter);
        }
        /// <summary>
        /// create a sink, hard coded with our encryption sink
        /// </summary>
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            // create other sinks in the chain
            IServerChannelSink next = FNextProvider.CreateSink(channel);

            // put our sink on top of the chain and return it
            return(new EncryptionServerSink(next,
                                            FPrivateKey));
        }
        public IServerChannelSink CreateSink(IChannelReceiver myChannelReceiverData)
        {
            IServerChannelSink myServerChannelSinkNextSink = null;

            if (myServerChannelSinkProviderNext != null)
            {
                myServerChannelSinkNextSink = myServerChannelSinkProviderNext.CreateSink(myChannelReceiverData);
            }
            return(new LoggingServerChannelSink(myServerChannelSinkNextSink));
        }
Example #13
0
        /// <include file='doc\SdlChannelSink.uex' path='docs/doc[@for="SdlChannelSinkProvider.CreateSink"]/*' />
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink nextSink = null;

            if (_next != null)
            {
                nextSink = _next.CreateSink(channel);
            }
            return(new SdlChannelSink(channel, nextSink));
        }
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink nextSink = null;

            if (_nextProvider != null)
            {
                nextSink = _nextProvider.CreateSink(channel);
            }
            return(new ClientAddressServerChannelSink(nextSink));
        }
Example #15
0
    public IServerChannelSink CreateSink(IChannelReceiver channel1)
    {
        IServerChannelSink localNextSink = null;

        if (next2 != null)
        {
            localNextSink = next2.CreateSink(channel1);
        }
        return(new LoggingServerChannelSink(localNextSink));
    }
Example #16
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink nextSink = null;

            if (nextProvider != null)
            {
                nextSink = nextProvider.CreateSink(channel);
            }
            return(new ServerEncryptionSink(nextSink));
        }
    public IServerChannelSink CreateSink(IChannelReceiver channel)
    {
        Console.WriteLine("Creating ServerSink");

        // Create the next sink in the chain.
        IServerChannelSink nextSink = nextProvider.CreateSink(channel);

        // Hook our sink up to it.
        return(new ServerSink(nextSink));
    }
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink nextSink = null;

            if (nextProvider != null)
            {
                nextSink = nextProvider.CreateSink(channel);
            }
            return(new ServerAuthenticationSink(nextSink, secMgr, contexts));
        }
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink nextSink = null;

            if (_nextProvider != null)
            {
                nextSink = _nextProvider.CreateSink(channel);
            }
            return(new IpFixServerChannelSink(nextSink, _eventLink));
        }
Example #20
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink nextSink = null;

            if (next != null)
            {
                nextSink = next.CreateSink(channel);
            }
            return(new ClientIPServerSink(nextSink));
        }
        /// <summary>Creates a channel sink chain for the specified channel.</summary>
        /// <returns>A new channel sink chain for the specified channel.</returns>
        /// <param name="provider">The first provider in the chain of sink providers that will create the channel sink chain. </param>
        /// <param name="channel">The <see cref="T:System.Runtime.Remoting.Channels.IChannelReceiver" /> for which to create the channel sink chain. </param>
        /// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
        /// <PermissionSet>
        ///   <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
        /// </PermissionSet>
        public static IServerChannelSink CreateServerChannelSinkChain(IServerChannelSinkProvider provider, IChannelReceiver channel)
        {
            IServerChannelSinkProvider serverChannelSinkProvider = provider;

            while (serverChannelSinkProvider.Next != null)
            {
                serverChannelSinkProvider = serverChannelSinkProvider.Next;
            }
            serverChannelSinkProvider.Next = new ServerDispatchSinkProvider();
            return(provider.CreateSink(channel));
        }
Example #22
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink nextSink = null;

            if (_next != null)
            {
                nextSink = _next.CreateSink(channel);
                //			if (nextSink == null)
                //				return null;
            }
            return(new CompressServerChannelSink(nextSink));
        }
Example #23
0
        public static IServerChannelSink CreateServerChannelSinkChain(
            IServerChannelSinkProvider provider, IChannelReceiver channel)
        {
            IServerChannelSinkProvider tmp = provider;

            while (tmp.Next != null)
            {
                tmp = tmp.Next;
            }
            tmp.Next = new ServerDispatchSinkProvider();

            // Every provider has to call CreateSink() of its next provider
            return(provider.CreateSink(channel));
        }
Example #24
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink     nextSink = null;
            IceServerFormatterSink result;

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

            result = new IceServerFormatterSink(nextSink);

            return(result);
        }
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink nextSink = null;

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

            SdlChannelSink channelSink = new SdlChannelSink(channel, nextSink);

            channelSink.RemoteApplicationMetadataEnabled = _bRemoteApplicationMetadataEnabled;
            channelSink.MetadataEnabled = _bMetadataEnabled;
            return(channelSink);
        }
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink            next_sink = null;
            UnixBinaryServerFormatterSink result;

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

            result = new UnixBinaryServerFormatterSink(next_sink, channel);

            result.BinaryCore = _binaryCore;
            return(result);
        }
        public IServerChannelSink CreateSink(IChannelReceiver myChannel)
        {
            IServerChannelSink myIServerChannelSink_nextSink = null;

            if (myIServerChannelSinkProviderNew != null)
            {
                myIServerChannelSink_nextSink = myIServerChannelSinkProviderNew.CreateSink(myChannel);
            }
            MyIPFilterChannelSink mySink = new MyIPFilterChannelSink(myAcceptMode,
                                                                     myIServerChannelSink_nextSink);
            // Create and initialize a new ArrayList.
            ArrayList myArrayList = new ArrayList();

            // Add filters.
            foreach (SinkProviderData mySinkData in myCollectionData)
            {
                // The SinkProviderData properties are added to the ArrayList.
                myArrayList.Add(mySinkData.Children);
                myArrayList.Add(mySinkData.Name);

                String myMaskString    = (String)mySinkData.Properties["mask"];
                String myIPString      = (String)mySinkData.Properties["ip"];
                String myMachineString = (String)mySinkData.Properties["machine"];

                IPAddress mask = null;
                IPAddress ip   = null;

                if (myIPString != null)
                {
                    mask = IPAddress.Parse(myMaskString);
                    ip   = IPAddress.Parse(myIPString);
                }
                else
                {
                    mask = IPAddress.Parse("255.255.255.255");
                    ip   = Dns.Resolve(myMachineString).AddressList[0];
                }

                mySink.AddFilter(mask, ip);
            }
            Console.WriteLine("The Count of the ArrayList is  :" + myArrayList.Count);
            Console.WriteLine("The values in the SinkProviderData collection are:");

            // Call the PrintValues function to enumerate and print values to the console.
            PrintValues(myArrayList);

            return(mySink);
        }
    public IServerChannelSink CreateSink(IChannelReceiver channel)
    {
// <Snippet3>
        IServerChannelSink nextSink = null;

        if (nextProvider != null)
        {
            Console.WriteLine("The next server provider is:"
                              + nextProvider);
            // Create a sink chain calling the 'SaopServerFormatterProvider'
            // 'CreateSink' method.
            nextSink = nextProvider.CreateSink(channel);
        }
        return(new MyServerChannelSink(nextSink));
// </Snippet3>
    }
Example #29
0
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink            next_sink = null;
            SafeBinaryServerFormatterSink result;

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

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

            result.BinaryCore = _binaryCore;
            return(result);
        }
        public IServerChannelSink CreateSink(IChannelReceiver channel)
        {
            IServerChannelSink       next_sink = null;
            CORBAServerFormatterSink result;

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

            result = new CORBAServerFormatterSink(next_sink);

            // set properties on result

            return(result);
        }
        [System.Security.SecurityCritical]  // auto-generated_required
        public static IServerChannelSink CreateServerChannelSinkChain( 
            IServerChannelSinkProvider provider, IChannelReceiver channel)
        {
            if (provider == null)
                return new DispatchChannelSink(); 

            // add dispatch provider to end (first find last provider) 
            IServerChannelSinkProvider lastProvider = provider; 
            while (lastProvider.Next != null)
                lastProvider = lastProvider.Next; 
            lastProvider.Next = new DispatchChannelSinkProvider();

            IServerChannelSink sinkChain = provider.CreateSink(channel);
 
            // remove dispatch provider from end
            lastProvider.Next = null; 
 
            return sinkChain;
        } // CreateServerChannelSinkChain 
		public static IServerChannelSink CreateServerChannelSinkChain (
			IServerChannelSinkProvider provider, IChannelReceiver channel)
	    {
			IServerChannelSinkProvider tmp = provider;
			while (tmp.Next != null) tmp = tmp.Next;
			tmp.Next = new ServerDispatchSinkProvider ();

			// Every provider has to call CreateSink() of its next provider
			return  provider.CreateSink (channel);
		}
 public static IServerChannelSink CreateServerChannelSinkChain(IServerChannelSinkProvider provider, IChannelReceiver channel)
 {
     if (provider == null)
     {
         return new DispatchChannelSink();
     }
     IServerChannelSinkProvider next = provider;
     while (next.Next != null)
     {
         next = next.Next;
     }
     next.Next = new DispatchChannelSinkProvider();
     IServerChannelSink sink = provider.CreateSink(channel);
     next.Next = null;
     return sink;
 }