System.Runtime.Remoting.Activation.RemotingXmlConfigFileData.TryToLoadTypeIfApplicable C# (CSharp) Method

TryToLoadTypeIfApplicable() private method

private TryToLoadTypeIfApplicable ( String typeName, String assemblyName ) : void
typeName String
assemblyName String
return void
        private void TryToLoadTypeIfApplicable(String typeName, String assemblyName)
        {
            if (!LoadTypes)
                return;
        
            Assembly asm = Assembly.Load(assemblyName);
            if (asm == null)
            {
                throw new RemotingException(
                    String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_AssemblyLoadFailed"),
                    assemblyName));                    
            }

            Type type = asm.GetType(typeName, false, false);
            if (type == null)
            {
                throw new RemotingException(
                    String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_BadType"),
                    typeName));     
            }
        }