System.Runtime.Remoting.RemotingConfigHandler.IsActivationAllowed C# (CSharp) Méthode

IsActivationAllowed() static private méthode

static private IsActivationAllowed ( String TypeName ) : bool
TypeName String
Résultat bool
        internal static bool IsActivationAllowed(String TypeName)
        {
            String svrTypeName = RemotingServices.InternalGetTypeNameFromQualifiedTypeName(TypeName);
            if (svrTypeName == null)
            {
                return false;
            }
            String typeName;
            String asmName;

            ParseType(svrTypeName, out typeName, out asmName);
            if (asmName == null)
                return false;
        
            int index = asmName.IndexOf(',');
            if (index != -1)
            {
                // strip off the version info
                asmName = asmName.Substring(0,index);
            }
            return Info.ActivationAllowed(typeName, asmName);
        }

Same methods

RemotingConfigHandler::IsActivationAllowed ( Type svrType ) : bool

Usage Example

Exemple #1
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));
        }
All Usage Examples Of System.Runtime.Remoting.RemotingConfigHandler::IsActivationAllowed