Server.ScriptCompiler.GetTypeCache C# (CSharp) Méthode

GetTypeCache() public static méthode

public static GetTypeCache ( Assembly asm ) : TypeCache
asm System.Reflection.Assembly
Résultat TypeCache
		public static TypeCache GetTypeCache( Assembly asm )
		{
			if( asm == null )
			{
				if( m_NullCache == null )
					m_NullCache = new TypeCache( null );

				return m_NullCache;
			}

			TypeCache c = null;
			m_TypeCaches.TryGetValue( asm, out c );

			if( c == null )
				m_TypeCaches[asm] = c = new TypeCache( asm );

			return c;
		}

Usage Example

Exemple #1
0
        public static Type FindTypeByName(string name, bool ignoreCase)
        {
            int  num1;
            Type type1 = null;

            for (num1 = 0; ((type1 == null) && (num1 < ScriptCompiler.m_Assemblies.Length)); ++num1)
            {
                type1 = ScriptCompiler.GetTypeCache(ScriptCompiler.m_Assemblies[num1]).GetTypeByName(name, ignoreCase);
            }
            if (type1 == null)
            {
                type1 = ScriptCompiler.GetTypeCache(Core.Assembly).GetTypeByName(name, ignoreCase);
            }
            return(type1);
        }