System.Runtime.Remoting.RemotingServices.CreateDataForDomainCallback C# (CSharp) Méthode

CreateDataForDomainCallback() static private méthode

static private CreateDataForDomainCallback ( Object args ) : Object
args Object
Résultat Object
        internal static Object CreateDataForDomainCallback(Object[] args)
        {
            // Ensure that the well known channels are registered in this domain too
            RegisterWellKnownChannels();            
            
            // Marshal the app domain object
            ObjRef objref = MarshalInternal(
                           Thread.CurrentContext.AppDomain,
                            null,
                            null,
                            false);

            ServerIdentity si = (ServerIdentity)MarshalByRefObject.GetIdentity(Thread.CurrentContext.AppDomain);
            si.SetHandle();
            objref.SetServerIdentity(si.GetHandle());
            objref.SetDomainID(AppDomain.CurrentDomain.GetId());
            return objref;
        }
RemotingServices