We need you! We're working hard on the next version of Developer Fusion -
Let us know what you think we should be up to!
-
Expand
Microsoft.Win32
-
Expand
Microsoft.Win32.SafeHandles
-
Expand
System
-
Expand
System.Runtime.Hosting
-
Expand
System.Runtime.InteropServices
-
Expand
System.Runtime.CompilerServices
-
Expand
System.Collections
-
Expand
System.Collections.Generic
-
Expand
System.Collections.ObjectModel
-
Expand
System.Configuration.Assemblies
-
Expand
System.Diagnostics
-
Expand
System.Diagnostics.CodeAnalysis
-
Expand
System.Diagnostics.SymbolStore
-
Expand
System.Globalization
-
Expand
System.IO
-
Expand
System.IO.IsolatedStorage
-
Expand
System.Reflection
-
Expand
System.Reflection.Cache
-
Expand
System.Reflection.Emit
-
Expand
System.Resources
-
Expand
System.Runtime
-
Expand
System.Runtime.InteropServices.Expando
-
Expand
System.Runtime.ConstrainedExecution
-
Expand
System.Runtime.Remoting.Activation
-
Expand
System.Runtime.Remoting.Messaging
-
Expand
System.Runtime.Remoting.Channels
-
Expand
ADAsyncWorkItem
-
Expand
AggregateDictionary
-
Expand
AsyncCopyStreamResult
-
Expand
AsyncMessageHelper
-
Expand
AsyncWorkItem
-
Expand
BaseChannelObjectWithProperties
-
Expand
BaseChannelSinkWithProperties
-
Expand
BaseChannelWithProperties
-
Expand
BaseTransportHeaders
-
Expand
BaseTransportHeadersEnumerator
-
Expand
BasicAsyncResult
-
Expand
BinaryClientFormatterSink
-
Expand
BinaryClientFormatterSinkProvider
-
Expand
BinaryServerFormatterSink
-
Expand
BinaryServerFormatterSinkProvider
-
Expand
CachedSocket
-
Expand
CachedSocketList
-
Expand
ChannelDataStore
-
Expand
ChannelServices
-
AsyncDispatchMessage(IMessage, IMessageSink)
-
ChannelServices()
-
CheckDisconnectedOrCreateWellKnownObject(IMessage)
-
CollectChannelDataFromChannels()
-
CreateMessageSink(object)
-
CreateMessageSink(string, object, string)
-
CreateServerChannelSinkChain(IServerChannelSinkProvider, IChannelReceiver)
-
CurrentChannelData()
-
DispatchMessage(IServerChannelSinkStack, IMessage, IMessage)
-
DumpRegisteredChannels()
-
FindFirstHttpUrlForObject(string)
-
GetChannel(string)
-
GetChannelSinkForProxy(object)
-
GetChannelSinkProperties(object)
-
GetCrossContextChannelSink()
-
GetNumberOfRemoteCalls()
-
GetPrivateContextsPerfCounters()
-
GetUrlsForObject(MarshalByRefObject)
-
IncrementRemoteCalls()
-
IncrementRemoteCalls(long)
-
IsMethodReallyPublic(MethodInfo)
-
NotifyProfiler(IMessage, RemotingProfilerEvent)
-
RefreshChannelData()
-
RegisterChannel(IChannel)
-
RegisterChannel(IChannel, bool)
-
RegisterChannelInternal(IChannel, bool)
-
RegisteredChannels()
-
remoteCalls()
-
StopListeningOnAllChannels()
-
SyncDispatchMessage(IMessage)
-
UnloadHandler(object, EventArgs)
-
UnregisterChannel(IChannel)
-
Expand
ChannelServicesData
-
Expand
ChunkedMemoryStream
-
Expand
ClientChannelSinkStack
-
Expand
CommonTransportKeys
-
Expand
CoreChannel
-
Expand
CrossAppDomainChannel
-
Expand
CrossAppDomainData
-
Expand
CrossAppDomainSerializer
-
Expand
CrossAppDomainSink
-
Expand
CrossContextChannel
-
Expand
DictionaryEnumeratorByKeys
-
Expand
DispatchChannelSink
-
Expand
DispatchChannelSinkProvider
-
Expand
ExclusiveTcpListener
-
Expand
IAuthorizeRemotingConnection
-
Expand
IChannel
-
Expand
IChannelDataStore
-
Expand
IChannelReceiver
-
Expand
IChannelReceiverHook
-
Expand
IChannelSender
-
Expand
IChannelSinkBase
-
Expand
IClientChannelSink
-
Expand
IClientChannelSinkProvider
-
Expand
IClientChannelSinkStack
-
Expand
IClientFormatterSink
-
Expand
IClientFormatterSinkProvider
-
Expand
IClientResponseChannelSinkStack
-
Expand
ISecurableChannel
-
Expand
IServerChannelSink
-
Expand
IServerChannelSinkProvider
-
Expand
IServerChannelSinkStack
-
Expand
IServerFormatterSinkProvider
-
Expand
IServerResponseChannelSinkStack
-
Expand
ITransportHeaders
-
Expand
MemoryChunk
-
Expand
NativeMethods
-
Expand
Perf_Contexts
-
Expand
Protocol
-
Expand
Protocol
-
Expand
RegisteredChannel
-
Expand
RegisteredChannelList
-
Expand
RemoteConnection
-
Expand
RemotingProfilerEvent
-
Expand
RequestQueue
-
Expand
ServerAsyncReplyTerminatorSink
-
Expand
ServerChannelSinkStack
-
Expand
ServerProcessing
-
Expand
SinkChannelProtocol
-
Expand
SinkProviderData
-
Expand
SinkStack
-
Expand
SinkStack
-
Expand
SoapClientFormatterSink
-
Expand
SoapClientFormatterSinkProvider
-
Expand
SoapServerFormatterSink
-
Expand
SoapServerFormatterSinkProvider
-
Expand
SocketCache
-
Expand
SocketCachePolicy
-
Expand
SocketHandler
-
Expand
SocketStream
-
Expand
StreamHelper
-
Expand
StringHelper
-
Expand
TokenInformationClass
-
Expand
TransportHeaders
-
Expand
UriHeaderHandler
-
Expand
System.Runtime.Remoting.Lifetime
-
Expand
System.Runtime.Remoting
-
Expand
System.Runtime.Remoting.Contexts
-
Expand
System.Runtime.Remoting.Proxies
-
Expand
System.Runtime.Remoting.Metadata
-
Expand
System.Runtime.Remoting.Metadata.W3cXsd2001
-
Expand
System.Runtime.Remoting.Services
-
Expand
System.Runtime.Serialization
-
Expand
System.Runtime.Serialization.Formatters
-
Expand
System.Runtime.Serialization.Formatters.Binary
-
Expand
System.Runtime.Versioning
-
Expand
System.Security
-
Expand
System.Security.Cryptography
-
Expand
System.Security.Cryptography.X509Certificates
-
Expand
System.Security.Permissions
-
Expand
System.Security.Policy
-
Expand
System.Security.Principal
-
Expand
System.Security.Util
-
Expand
System.Text
-
Expand
System.Threading
-
Expand
System.Runtime.Remoting.Channels.Http
-
Expand
System.Runtime.Remoting.Channels.Tcp
-
Expand
System.Runtime.Remoting.MetadataServices
-
Expand
System.Runtime.Serialization.Formatters.Soap.Xml
-
Expand
System.Runtime.Serialization.Formatters.Soap
-
Expand
Microsoft.Tools.Caspol
-
Expand
Microsoft.Tools.Build
-
Expand
Microsoft.CSharp
-
Expand
System.CodeDom
-
Expand
System.CodeDom.Compiler
-
Expand
System.Collections.Specialized
-
Expand
System.ComponentModel
-
Expand
System.ComponentModel.Design
-
Expand
System.ComponentModel.Design.Serialization
-
Expand
System.Configuration
-
Expand
System.Web
-
Expand
System.Configuration.Provider
-
Expand
System.Configuration.Internal
-
Expand
System.Internal
-
Expand
System.Windows.Forms
-
Expand
System.Net
-
Expand
System.Net.Sockets
-
Expand
System.Net.NetworkInformation
-
Expand
System.Net.ComImports
-
Expand
System.Net.Security
-
Expand
System.Net.Cache
-
Expand
System.Net.Configuration
-
Expand
System.Text.RegularExpressions
-
Expand
System.Tools
-
Expand
System.IO.Compression
-
Expand
System.IO.Ports
-
Expand
System.Security.AccessControl
-
Expand
System.Xml
-
Expand
System.Xml.XPath.DataBinding
-
Expand
System.Xml.Schema
-
Expand
System.Xml.Serialization
-
Expand
System.Xml.Serialization.Advanced
-
Expand
System.Xml.Serialization.Configuration
-
Expand
System.Xml.XPath
-
Expand
System.Xml.Xsl
-
Expand
System.Xml.Xsl.IlGen
-
Expand
System.Xml.Xsl.Qil
-
Expand
System.Xml.Xsl.Runtime
-
Expand
System.Xml.Xsl.XPath
-
Expand
System.Xml.Xsl.Xslt
-
Expand
System.Xml.Xsl.XsltOld
-
Expand
System.Xml.Xsl.XsltOld.Debugger
-
Expand
Microsoft.JScript
-
Expand
Microsoft.Vsa
-
Expand
Microsoft.JScript.Vsa
- namespace System.Runtime.Remoting.Channels
- {
- using System;
- using System.Collections;
- using System.IO;
- using System.Reflection;
- using System.Runtime.CompilerServices;
- using System.Runtime.InteropServices;
- using System.Runtime.Remoting;
- using System.Runtime.Remoting.Activation;
- using System.Runtime.Remoting.Messaging;
- using System.Runtime.Remoting.Metadata;
- using System.Runtime.Remoting.Proxies;
- using System.Threading;
- using System.Security.Permissions;
- using System.Globalization;
-
-
-
- [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
- internal struct Perf_Contexts
- {
- internal int cRemoteCalls;
- internal int cChannels;
- }
-
- [System.Runtime.InteropServices.ComVisible(true)]
- public sealed class ChannelServices
- {
-
- private static object[] s_currentChannelData = null;
-
- static internal object[] CurrentChannelData {
- get {
- if (s_currentChannelData == null)
- RefreshChannelData();
-
- return s_currentChannelData;
- }
- }
-
-
-
- private ChannelServices()
- {
- }
-
-
- private static object s_channelLock = new object();
- private static RegisteredChannelList s_registeredChannels = new RegisteredChannelList();
-
-
-
-
-
-
-
- private static long remoteCalls {
- get { return Thread.GetDomain().RemotingData.ChannelServicesData.remoteCalls; }
- set { Thread.GetDomain().RemotingData.ChannelServicesData.remoteCalls = value; }
- }
-
- private static IMessageSink xCtxChannel;
-
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- unsafe static extern Perf_Contexts* GetPrivateContextsPerfCounters();
-
- unsafe private static Perf_Contexts* perf_Contexts = GetPrivateContextsPerfCounters();
-
-
- [SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.RemotingConfiguration)]
- public static void RegisterChannel(IChannel chnl, bool ensureSecurity)
- {
- RegisterChannelInternal(chnl, ensureSecurity);
- }
-
- [SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.RemotingConfiguration)]
- [Obsolete("Use System.Runtime.Remoting.ChannelServices.RegisterChannel(IChannel chnl, bool ensureSecurity) instead.", false)]
- public static void RegisterChannel(IChannel chnl)
- {
- RegisterChannelInternal(chnl, false);
- }
-
-
- static bool unloadHandlerRegistered = false;
- unsafe static internal void RegisterChannelInternal(IChannel chnl, bool ensureSecurity)
- {
-
- if (null == chnl) {
- throw new ArgumentNullException("chnl");
- }
-
- bool fLocked = false;
- RuntimeHelpers.PrepareConstrainedRegions();
- try {
- Monitor.ReliableEnter(s_channelLock, ref fLocked);
- string chnlName = chnl.ChannelName;
-
- RegisteredChannelList regChnlList = s_registeredChannels;
-
-
- if ((chnlName == null) || (chnlName.Length == 0) || (-1 == regChnlList.FindChannelIndex(chnl.ChannelName))) {
- if (ensureSecurity) {
- ISecurableChannel securableChannel = chnl as ISecurableChannel;
- if (securableChannel != null)
- securableChannel.IsSecured = ensureSecurity;
- else
- throw new RemotingException(String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_Channel_CannotBeSecured"), chnl.ChannelName ?? chnl.ToString()));
-
- }
- RegisteredChannel[] oldList = regChnlList.RegisteredChannels;
- RegisteredChannel[] newList = null;
- if (oldList == null) {
- newList = new RegisteredChannel[1];
- }
- else
- newList = new RegisteredChannel[oldList.Length + 1];
-
- if (!unloadHandlerRegistered && !(chnl is CrossAppDomainChannel)) {
-
-
-
- AppDomain.CurrentDomain.DomainUnload += new EventHandler(UnloadHandler);
- unloadHandlerRegistered = true;
- }
-
-
- int priority = chnl.ChannelPriority;
- int current = 0;
-
-
- while (current < oldList.Length) {
- RegisteredChannel oldChannel = oldList[current];
- if (priority > oldChannel.Channel.ChannelPriority) {
- newList[current] = new RegisteredChannel(chnl);
- break;
- }
- else {
- newList[current] = oldChannel;
- current++;
- }
- }
-
- if (current == oldList.Length) {
-
-
- newList[oldList.Length] = new RegisteredChannel(chnl);
- }
- else {
-
- while (current < oldList.Length) {
- newList[current + 1] = oldList[current];
- current++;
- }
- }
-
- if (perf_Contexts != null) {
- perf_Contexts->cChannels++;
- }
-
- s_registeredChannels = new RegisteredChannelList(newList);
- }
- else {
- throw new RemotingException(String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_ChannelNameAlreadyRegistered"), chnl.ChannelName));
- }
-
- RefreshChannelData();
- }
-
- finally {
- if (fLocked) {
- Monitor.Exit(s_channelLock);
- }
- }
- }
-
-
- [SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.RemotingConfiguration)]
- unsafe public static void UnregisterChannel(IChannel chnl)
- {
-
-
-
- bool fLocked = false;
- RuntimeHelpers.PrepareConstrainedRegions();
- try {
- Monitor.ReliableEnter(s_channelLock, ref fLocked);
- if (chnl != null) {
- RegisteredChannelList regChnlList = s_registeredChannels;
-
-
- int matchingIdx = regChnlList.FindChannelIndex(chnl);
- if (-1 == matchingIdx) {
- throw new RemotingException(String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_ChannelNotRegistered"), chnl.ChannelName));
- }
-
- RegisteredChannel[] oldList = regChnlList.RegisteredChannels;
- RegisteredChannel[] newList = null;
- BCLDebug.Assert((oldList != null) && (oldList.Length != 0), "channel list should not be empty");
-
- newList = new RegisteredChannel[oldList.Length - 1];
-
-
- IChannelReceiver srvChannel = chnl as IChannelReceiver;
- if (srvChannel != null)
- srvChannel.StopListening(null);
-
- int current = 0;
- int oldPos = 0;
- while (oldPos < oldList.Length) {
- if (oldPos == matchingIdx) {
- oldPos++;
- }
- else {
- newList[current] = oldList[oldPos];
- current++;
- oldPos++;
- }
- }
-
- if (perf_Contexts != null) {
- perf_Contexts->cChannels--;
- }
-
- s_registeredChannels = new RegisteredChannelList(newList);
- }
-
- RefreshChannelData();
- }
-
- finally {
- if (fLocked) {
- Monitor.Exit(s_channelLock);
- }
- }
- }
-
-
- public static IChannel[] RegisteredChannels {
- [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
- get {
- RegisteredChannelList regChnlList = s_registeredChannels;
- int count = regChnlList.Count;
-
- if (0 == count) {
- return new IChannel[0];
- }
- else {
-
-
- int visibleChannels = count - 1;
-
-
-
- int co = 0;
- IChannel[] temp = new IChannel[visibleChannels];
- for (int i = 0; i < count; i++) {
- IChannel channel = regChnlList.GetChannel(i);
-
- if (!(channel is CrossAppDomainChannel))
- temp[co++] = channel;
- }
- return temp;
- }
- }
- }
-
- static internal IMessageSink CreateMessageSink(string url, object data, out string objectURI)
- {
- BCLDebug.Trace("REMOTE", "ChannelServices::CreateMessageSink for url " + url + "\n");
- IMessageSink msgSink = null;
- objectURI = null;
-
- RegisteredChannelList regChnlList = s_registeredChannels;
- int count = regChnlList.Count;
-
- for (int i = 0; i < count; i++) {
- if (regChnlList.IsSender(i)) {
- IChannelSender chnl = (IChannelSender)regChnlList.GetChannel(i);
- msgSink = chnl.CreateMessageSink(url, data, out objectURI);
-
- if (msgSink != null)
- break;
- }
- }
-
-
-
- if (null == objectURI) {
- objectURI = url;
- }
-
- return msgSink;
- }
-
- static internal IMessageSink CreateMessageSink(object data)
- {
- string objectUri;
- return CreateMessageSink(null, data, out objectUri);
- }
-
-
- [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
- public static IChannel GetChannel(string name)
- {
- RegisteredChannelList regChnlList = s_registeredChannels;
-
- int matchingIdx = regChnlList.FindChannelIndex(name);
- if (0 <= matchingIdx) {
- IChannel channel = regChnlList.GetChannel(matchingIdx);
- if ((channel is CrossAppDomainChannel) || (channel is CrossContextChannel))
- return null;
- else
- return channel;
- }
- else {
- return null;
- }
- }
-
-
- [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
- public static string[] GetUrlsForObject(MarshalByRefObject obj)
- {
- if (null == obj) {
- return null;
- }
-
- RegisteredChannelList regChnlList = s_registeredChannels;
- int count = regChnlList.Count;
-
- Hashtable table = new Hashtable();
- bool fServer;
- Identity id = MarshalByRefObject.GetIdentity(obj, out fServer);
-
- if (null != id) {
- string uri = id.ObjURI;
-
- if (null != uri) {
- for (int i = 0; i < count; i++) {
- if (regChnlList.IsReceiver(i)) {
- try {
- string[] urls = ((IChannelReceiver)regChnlList.GetChannel(i)).GetUrlsForUri(uri);
-
- for (int j = 0; j < urls.Length; j++) {
- table.Add(urls[j], urls[j]);
- }
- }
- catch (NotSupportedException) {
-
-
- }
- }
- }
- }
- }
-
-
- ICollection keys = table.Keys;
- string[] urlList = new string[keys.Count];
- int co = 0;
- foreach (string key in keys) {
- urlList[co++] = key;
- }
- return urlList;
- }
-
-
- static internal IMessageSink GetChannelSinkForProxy(object obj)
- {
- IMessageSink sink = null;
- if (RemotingServices.IsTransparentProxy(obj)) {
- RealProxy rp = RemotingServices.GetRealProxy(obj);
- RemotingProxy remProxy = rp as RemotingProxy;
- if (null != remProxy) {
- Identity idObj = remProxy.IdentityObject;
- BCLDebug.Assert(null != idObj, "null != idObj");
- sink = idObj.ChannelSink;
- }
- }
-
- return sink;
- }
-
-
-
-
- [SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.RemotingConfiguration)]
- public static IDictionary GetChannelSinkProperties(object obj)
- {
- IMessageSink sink = GetChannelSinkForProxy(obj);
- IClientChannelSink chnlSink = sink as IClientChannelSink;
- if (null != chnlSink) {
-
-
- ArrayList dictionaries = new ArrayList();
-
- do {
- IDictionary dict = chnlSink.Properties;
- if (dict != null)
- dictionaries.Add(dict);
-
- chnlSink = chnlSink.NextChannelSink;
- }
- while (chnlSink != null);
-
- return new AggregateDictionary(dictionaries);
- }
- else {
- IDictionary dict = sink as IDictionary;
- if (null != dict) {
- return dict;
- }
- else {
- return null;
- }
- }
- }
-
-
- static internal IMessageSink GetCrossContextChannelSink()
- {
- if (null == xCtxChannel) {
- xCtxChannel = CrossContextChannel.MessageSink;
- }
-
- return xCtxChannel;
- }
-
-
- #if DEBUG
-
-
- static internal long GetNumberOfRemoteCalls()
- {
- return remoteCalls;
- }
-
- #endif //DEBUG
- unsafe static internal void IncrementRemoteCalls(long cCalls)
- {
- remoteCalls += cCalls;
- if (perf_Contexts != null)
- perf_Contexts->cRemoteCalls += (int)cCalls;
- }
-
- static internal void IncrementRemoteCalls()
- {
- IncrementRemoteCalls(1);
- }
-
-
- static internal void RefreshChannelData()
- {
- bool fLocked = false;
- RuntimeHelpers.PrepareConstrainedRegions();
- try {
- Monitor.ReliableEnter(s_channelLock, ref fLocked);
- s_currentChannelData = CollectChannelDataFromChannels();
- }
- finally {
- if (fLocked) {
- Monitor.Exit(s_channelLock);
- }
- }
- }
-
- private static object[] CollectChannelDataFromChannels()
- {
-
-
- RemotingServices.RegisterWellKnownChannels();
-
- RegisteredChannelList regChnlList = s_registeredChannels;
- int count = regChnlList.Count;
-
-
- int numChnls = regChnlList.ReceiverCount;
-
-
- object[] data = new object[numChnls];
-
-
- int nonNullDataCount = 0;
-
-
- for (int i = 0int j = 0; i < count; i++) {
-
- IChannel chnl = regChnlList.GetChannel(i);
-
- if (null == chnl) {
- throw new RemotingException(String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_ChannelNotRegistered"), ""));
- }
-
- if (regChnlList.IsReceiver(i)) {
- BCLDebug.Trace("REMOTE", "Setting info for receiver " + j + "\n");
-
- object channelData = ((IChannelReceiver)chnl).ChannelData;
- data[j] = channelData;
- if (channelData != null)
- nonNullDataCount++;
-
-
- j++;
- }
- }
-
- if (nonNullDataCount != numChnls) {
-
- object[] nonNullData = new object[nonNullDataCount];
- int nonNullCounter = 0;
- for (int co = 0; co < numChnls; co++) {
- object channelData = data[co];
- if (channelData != null)
- nonNullData[nonNullCounter++] = channelData;
- }
-
- data = nonNullData;
- }
-
- return data;
- }
-
-
- static bool IsMethodReallyPublic(MethodInfo mi)
- {
- if (!mi.IsPublic || mi.IsStatic)
- return false;
-
- if (!mi.IsGenericMethod)
- return true;
-
- foreach (Type t in mi.GetGenericArguments())
- if (!t.IsVisible)
- return false;
-
- return true;
- }
-
-
-
-
-
- [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
- public static ServerProcessing DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, out IMessage replyMsg)
- {
- ServerProcessing processing = ServerProcessing.Complete;
- replyMsg = null;
-
- try {
- if (null == msg) {
- throw new ArgumentNullException("msg");
- }
-
- BCLDebug.Trace("REMOTE", "Dispatching for URI " + InternalSink.GetURI(msg));
-
-
-
-
-
-
-
- IncrementRemoteCalls();
-
-
-
- ServerIdentity srvId = CheckDisconnectedOrCreateWellKnownObject(msg);
-
-
-
-
- if (srvId.ServerType == typeof(System.AppDomain)) {
- throw new RemotingException(Environment.GetResourceString("Remoting_AppDomainsCantBeCalledRemotely"));
- }
-
-
- IMethodCallMessage mcm = msg as IMethodCallMessage;
-
- if (mcm == null) {
-
-
-
- if (!typeof(IMessageSink).IsAssignableFrom(srvId.ServerType)) {
- throw new RemotingException(Environment.GetResourceString("Remoting_AppDomainsCantBeCalledRemotely"));
- }
-
- processing = ServerProcessing.Complete;
- replyMsg = ChannelServices.GetCrossContextChannelSink().SyncProcessMessage(msg);
- }
- else {
-
-
-
-
- MethodInfo method = (MethodInfo)mcm.MethodBase;
-
-
-
-
- if (!IsMethodReallyPublic(method) && !RemotingServices.IsMethodAllowedRemotely(method)) {
- throw new RemotingException(Environment.GetResourceString("Remoting_NonPublicOrStaticCantBeCalledRemotely"));
- }
-
- RemotingMethodCachedData cache = (RemotingMethodCachedData)InternalRemotingServices.GetReflectionCachedData(method);
-
-
-
- if (RemotingServices.IsOneWay(method)) {
- processing = ServerProcessing.OneWay;
- ChannelServices.GetCrossContextChannelSink().AsyncProcessMessage(msg, null);
- }
- else {
-
- processing = ServerProcessing.Complete;
- if (!srvId.ServerType.IsContextful) {
- object[] args = new object[] {msg, srvId.ServerContext};
- &nbs