System.Reflection.Assembly.GetType C# (CSharp) Method

GetType() private method

private GetType ( string name ) : Type
name string
return Type
        public extern Type GetType(string name);

Usage Example

Esempio n. 1
1
        public Test Build(string assemblyName, string testName, bool autoSuites)
        {
            if (testName == null || testName == string.Empty)
                return Build(assemblyName, autoSuites);

            // Change currentDirectory in case assembly references unmanaged dlls
            // and so that any addins are able to access the directory easily.
            using (new DirectorySwapper(Path.GetDirectoryName(assemblyName)))
            {
                this.assembly = Load(assemblyName);
                if (assembly == null) return null;

                // If provided test name is actually the name of
                // a type, we handle it specially
                Type testType = assembly.GetType(testName);
                if (testType != null)
                    return Build(assemblyName, testType, autoSuites);

                // Assume that testName is a namespace and get all fixtures in it
                IList fixtures = GetFixtures(assembly, testName);
                if (fixtures.Count > 0)
                    return BuildTestAssembly(assemblyName, fixtures, autoSuites);

                return null;
            }
        }
All Usage Examples Of System.Reflection.Assembly::GetType