public static Type FindTypeByFullName( string fullName, bool ignoreCase ) { Type type = null; for( int i = 0; type == null && i < m_Assemblies.Length; ++i ) type = GetTypeCache( m_Assemblies[i] ).GetTypeByFullName( fullName, ignoreCase ); if( type == null ) type = GetTypeCache( Core.Assembly ).GetTypeByFullName( fullName, ignoreCase ); return type; }
public static Type ReadType(this GenericReader reader) { if (!reader.ReadBool()) { return(null); } bool full = reader.ReadBool(); string name = reader.ReadString(); if (String.IsNullOrWhiteSpace(name)) { return(null); } Type type = Type.GetType(name, false) ?? (full ? ScriptCompiler.FindTypeByFullName(name) : ScriptCompiler.FindTypeByName(name)); return(type); }