Sage.Project.GetType C# (CSharp) Method

GetType() public static method

Gets the type with the specified typeName, searching in all RelevantAssemblies.
public static GetType ( string typeName ) : Type
typeName string The name of the type to get.
return System.Type
        public static Type GetType(string typeName)
        {
            Contract.Requires<ArgumentNullException>(typeName != null);

            Type result = Type.GetType(typeName, false);
            if (result != null)
                return result;

            foreach (Assembly asm in Sage.Project.RelevantAssemblies)
            {
                result = asm.GetType(typeName, false);
                if (result != null)
                    break;
            }

            if (typeName.IndexOf(",", StringComparison.Ordinal) != -1)
            {
                return Project.GetType(typeName.ReplaceAll(@",.*$", string.Empty));
            }

            return result;
        }