/// <summary> /// factory method that create the concrete corresponding client sink object /// </summary> /// <param name="channel">channel object</param> /// <param name="url">destination's uri</param> /// <param name="remoteChannelData"></param> /// <returns>newly created CyrptoRemotingClientSink object </returns> public IClientChannelSink CreateSink(System.Runtime.Remoting.Channels.IChannelSender channel, string url, object remoteChannelData) { IClientChannelSink nextSink; //create the next sink that is located after the new CryptoRemotingClientSink object nextSink = next.CreateSink(channel, url, remoteChannelData); //create and return the new CyrptoRemotingClientSink object return(new CryptoRemotingClientSink(nextSink, url)); }
public System.Runtime.Remoting.Channels.IClientChannelSink CreateSink(System.Runtime.Remoting.Channels.IChannelSender channel, string url, object remoteChannelData) { IClientChannelSink nextSink = null; if (_next != null) { if ((nextSink = _next.CreateSink(channel, url, remoteChannelData)) == null) { return(null); } } return(new SecureClientChannelSink(nextSink, _algorithm, _maxAttempts, _customerID, _ExtensionNumber, _password)); }
/// <summary>Creates a sink chain.</summary> /// <param name="channel">Channel for which the current sink chain is being constructed.</param> /// <param name="url">The URL of the object to connect to.</param> /// <param name="remoteChannelData">A channel data object describing a channel on the remote server.</param> /// <returns>A reference to the new sink, or null if it could not be created.</returns> public System.Runtime.Remoting.Channels.IClientChannelSink CreateSink(System.Runtime.Remoting.Channels.IChannelSender channel, string url, object remoteChannelData) { IClientChannelSink nextSink = null; if (_next != null) { // Call CreateSink on the next sink provier in the chain. This will return // to us the actual next sink object. If the next sink is null, uh oh! if ((nextSink = _next.CreateSink(channel, url, remoteChannelData)) == null) { return(null); } } // Create this sink, passing to it the previous sink in the chain so that it knows // to whom messages should be passed. return(new SecureClientChannelSink(nextSink, _algorithm, _oaep, _maxAttempts)); }