public static void RegisterWellKnownClientType(WellKnownClientTypeEntry entry)
        {
            RemotingConfigHandler.RegisterWellKnownClientType(entry);

            // all registrations for wellknown client types will come through here
            RemotingServices.InternalSetRemoteActivationConfigured();
        } // RegisterWellKnownClientType
Ejemplo n.º 2
0
        [System.Security.SecurityCritical]  // auto-generated
        internal static Identity CasualResolveIdentity(String uri)
        {
            if (uri == null)
            {
                return(null);
            }

            Identity id = CasualResolveReference(URITable[MakeURIKeyNoLower(uri)]);

            if (id == null)
            {
                id = CasualResolveReference(URITable[MakeURIKey(uri)]);

                // DevDiv 720951 and 911924:
                // CreateWellKnownObject inserts the Identity into the URITable before
                // it is fully initialized.  This can cause a race condition if another
                // concurrent operation re-enters this code and attempts to use it.
                // If we discover this situation, behave as if it is not in the URITable.
                // This falls into the code below to call CreateWellKnownObject again.
                // That method operates under a lock and will not return until it
                // has been fully initialized.  It will not create or initialize twice.
                if (id == null || id.IsInitializing)
                {
                    // Check if this a well-known object which needs to be faulted in
                    id = RemotingConfigHandler.CreateWellKnownObject(uri);
                }
            }

            return(id);
        } // CasualResolveIdentity
Ejemplo n.º 3
0
 public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
 {
     RemotingConfigHandler.RegisterActivatedServiceType(entry);
     if (!RemotingConfiguration.s_ListeningForActivationRequests)
     {
         RemotingConfiguration.s_ListeningForActivationRequests = true;
         ActivationServices.StartListeningForRemoteRequests();
     }
 }
        public static void Configure(String filename)
        {
            RemotingConfigHandler.DoConfiguration(filename);

            // Set a flag in the VM to mark that remoting is configured
            // This will enable us to decide if activation for MBR
            // objects should go through the managed codepath
            RemotingServices.InternalSetRemoteActivationConfigured();
        } // Configure
Ejemplo n.º 5
0
        public static bool IsActivationAllowed(Type svrType)
        {
            RuntimeType runtimeType = svrType as RuntimeType;

            if (svrType != null && runtimeType == null)
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeType"));
            }
            return(RemotingConfigHandler.IsActivationAllowed(runtimeType));
        }
 internal void StoreWellKnownExports(RemotingXmlConfigFileData configData)
 {
     foreach (RemotingXmlConfigFileData.ServerWellKnownEntry entry in configData.ServerWellKnownEntries)
     {
         WellKnownServiceTypeEntry entry2 = new WellKnownServiceTypeEntry(entry.TypeName, entry.AssemblyName, entry.ObjectURI, entry.ObjectMode)
         {
             ContextAttributes = null
         };
         RemotingConfigHandler.RegisterWellKnownServiceType(entry2);
     }
 }
        public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
        {
            RemotingConfigHandler.RegisterActivatedServiceType(entry);

            // make sure we're listening for activation requests
            //  (all registrations for activated service types will come through here)
            if (!s_ListeningForActivationRequests)
            {
                s_ListeningForActivationRequests = true;
                ActivationServices.StartListeningForRemoteRequests();
            }
        } // RegisterActivatedServiceType
Ejemplo n.º 8
0
        public static WellKnownClientTypeEntry IsWellKnownClientType(Type svrType)
        {
            if (svrType == null)
            {
                throw new ArgumentNullException("svrType");
            }
            RuntimeType runtimeType = svrType as RuntimeType;

            if (runtimeType == null)
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeType"));
            }
            return(RemotingConfigHandler.IsWellKnownClientType(runtimeType));
        }
Ejemplo n.º 9
0
        public static WellKnownClientTypeEntry IsWellKnownClientType(Type svrType)
        {
            if (svrType == (Type)null)
            {
                throw new ArgumentNullException("svrType");
            }
            RuntimeType svrType1 = svrType as RuntimeType;
            // ISSUE: variable of the null type
            __Null local = null;

            if (svrType1 == (RuntimeType)local)
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeType"));
            }
            return(RemotingConfigHandler.IsWellKnownClientType(svrType1));
        }
Ejemplo n.º 10
0
        } // ResolveIdentity

        // If the identity isn't found, this version will just return
        //   null instead of asserting (this version doesn't need to
        //   take a lock).
        internal static Identity CasualResolveIdentity(String uri)
        {
            if (uri == null)
            {
                return(null);
            }

            Identity id = CasualResolveReference(URITable[MakeURIKey(uri)]);

            if (id == null)
            {
                // Check if this a well-known object which needs to be faulted in
                id = RemotingConfigHandler.CreateWellKnownObject(uri);
            }

            return(id);
        } // CasualResolveIdentity
        internal static Identity CasualResolveIdentity(string uri)
        {
            if (uri == null)
            {
                return(null);
            }
            Identity identity = CasualResolveReference(URITable[MakeURIKeyNoLower(uri)]);

            if (identity == null)
            {
                identity = CasualResolveReference(URITable[MakeURIKey(uri)]);
                if (identity == null)
                {
                    identity = RemotingConfigHandler.CreateWellKnownObject(uri);
                }
            }
            return(identity);
        }
Ejemplo n.º 12
0
        internal static Identity CasualResolveIdentity(string uri)
        {
            if (uri == null)
            {
                return((Identity)null);
            }
            Identity identity = IdentityHolder.CasualResolveReference(IdentityHolder.URITable[(object)IdentityHolder.MakeURIKeyNoLower(uri)]);

            if (identity == null)
            {
                identity = IdentityHolder.CasualResolveReference(IdentityHolder.URITable[(object)IdentityHolder.MakeURIKey(uri)]);
                if (identity == null || identity.IsInitializing)
                {
                    identity = (Identity)RemotingConfigHandler.CreateWellKnownObject(uri);
                }
            }
            return(identity);
        }
Ejemplo n.º 13
0
 public static void RegisterWellKnownServiceType(WellKnownServiceTypeEntry entry)
 {
     RemotingConfigHandler.RegisterWellKnownServiceType(entry);
 }
 public static ActivatedClientTypeEntry IsRemotelyActivatedClientType(Type svrType)
 {
     return(RemotingConfigHandler.IsRemotelyActivatedClientType(svrType));
 }
Ejemplo n.º 15
0
 public static WellKnownClientTypeEntry IsWellKnownClientType(string typeName, string assemblyName)
 {
     return(RemotingConfigHandler.IsWellKnownClientType(typeName, assemblyName));
 }
Ejemplo n.º 16
0
 public static ActivatedClientTypeEntry IsRemotelyActivatedClientType(string typeName, string assemblyName)
 {
     return(RemotingConfigHandler.IsRemotelyActivatedClientType(typeName, assemblyName));
 }
Ejemplo n.º 17
0
 public static void Configure(string filename, bool ensureSecurity)
 {
     RemotingConfigHandler.DoConfiguration(filename, ensureSecurity);
     RemotingServices.InternalSetRemoteActivationConfigured();
 }
Ejemplo n.º 18
0
 public static WellKnownClientTypeEntry[] GetRegisteredWellKnownClientTypes()
 {
     return(RemotingConfigHandler.GetRegisteredWellKnownClientTypes());
 }
Ejemplo n.º 19
0
 public static ActivatedClientTypeEntry[] GetRegisteredActivatedClientTypes()
 {
     return(RemotingConfigHandler.GetRegisteredActivatedClientTypes());
 }
Ejemplo n.º 20
0
 public static void RegisterWellKnownClientType(WellKnownClientTypeEntry entry)
 {
     RemotingConfigHandler.RegisterWellKnownClientType(entry);
     RemotingServices.InternalSetRemoteActivationConfigured();
 }
 public static WellKnownClientTypeEntry IsWellKnownClientType(Type svrType)
 {
     return(RemotingConfigHandler.IsWellKnownClientType(svrType));
 }
 public static bool IsActivationAllowed(Type svrType)
 {
     return(RemotingConfigHandler.IsActivationAllowed(svrType));
 }