public sealed class ChannelServices
|
Channels must expose the IChannel interface, which provides informational properties such as the IChannel.ChannelName and IChannel.ChannelPriority. Channels are registered using the ChannelServices.RegisterChannel method. Channels can also be loaded from the remoting configuration. (See for details.)
On the client side, messages are handed off to the client channel sink chain after they traverse the client Context chain. The first channel sink is typically an IClientFormatterSink, which serializes the message into a stream that is passed down the channel sink chain to the client transport sink. The client transport sink then writes this stream out to the wire.
On the server side, the server transport sink reads requests off the wire and passes the request stream to the server channel sink chain. The server formatter sink at the end of this chain will deserialize the request into a message. It will then hand this message off to the Remoting infrastructure, which will dispatch it to the server Context chain.
RegisteredChannels | Read-only Gets or sets a list of currently registered channels. |
AsyncDispatchMessage | Asynchronously dispatches the given message to the server-side chain(s) based on the URI embedded in the message. |
CreateServerChannelSinkChain | Creates a channel sink chain for the specified channel. |
DispatchMessage | Dispatches incoming remote calls. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetChannel | Returns a registered channel with the specified name. |
GetChannelSinkProperties | Returns an IDictionary of properties for a given proxy. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
GetUrlsForObject | Returns an array of all the URLs that can be used to reach the specified object. |
RegisterChannel | Registers a channel with the channel services. |
SyncDispatchMessage | Synchronously dispatches the incoming message to the server-side chain(s) based on the URI embedded in the message. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
UnregisterChannel | Unregisters a particular channel from the registered channels list. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public static IChannel[] RegisteredChannels {get;}
|
public static IMessageCtrl AsyncDispatchMessage( |
msg
replySink
Exception Type | Condition |
---|---|
ArgumentNullException | The msg parameter is null. |
public static IServerChannelSink CreateServerChannelSinkChain( |
provider
channel
public static ServerProcessing DispatchMessage( |
sinkStack
msg
replyMsg
Exception Type | Condition |
---|---|
ArgumentNullException | The msg parameter is null. |
~ChannelServices(); |
name
public static IDictionary GetChannelSinkProperties( |
obj
public virtual int GetHashCode(); |
public Type GetType(); |
public static string[] GetUrlsForObject( |
obj
protected object MemberwiseClone(); |
public static void RegisterChannel( |
chnl
Exception Type | Condition |
---|---|
ArgumentNullException | The chnl parameter is null. |
RemotingException | The channel has already been registered. |
For more information on channel configuration properties, see HttpChannel, and .
HttpChannel channel = new HttpChannel(9000); ChannelServices.RegisterChannel(channel); RemotingConfiguration.RegisterWellKnownServiceType( typeof(SampleService), "MySampleService/SampleService.soap", WellKnownObjectMode.Singleton); Console.WriteLine("** Press enter to end the server process. **"); Console.ReadLine();
msg
Exception Type | Condition |
---|---|
ArgumentNullException | The msg parameter is null. |
public virtual string ToString(); |
public static void UnregisterChannel( |
chnl
Exception Type | Condition |
---|---|
ArgumentNullException | The chnl parameter is null. |
RemotingException | The channel is not registered. |