Catel.Reflection.TypeCache.InitializeType C# (CSharp) 메소드

InitializeType() 개인적인 정적인 메소드

private static InitializeType ( Assembly assembly, Type type ) : void
assembly System.Reflection.Assembly
type System.Type
리턴 void
        private static void InitializeType(Assembly assembly, Type type)
        {
            if (ShouldIgnoreType(assembly, type))
            {
                return;
            }

            var newAssemblyName = TypeHelper.GetAssemblyNameWithoutOverhead(assembly.FullName);
            var newFullType = TypeHelper.FormatType(newAssemblyName, type.FullName);

            Dictionary<string, Type> typesByAssembly;
            if (!_typesByAssembly.TryGetValue(newAssemblyName, out typesByAssembly))
            {
                typesByAssembly = new Dictionary<string, Type>();
                _typesByAssembly[newAssemblyName] = typesByAssembly;
            }

            if (!typesByAssembly.ContainsKey(newFullType))
            {
                typesByAssembly[newFullType] = type;

                _typesWithAssembly[newFullType] = type;
                _typesWithAssemblyLowerCase[newFullType] = type;

                var typeNameWithoutAssembly = TypeHelper.GetTypeName(newFullType);
                _typesWithoutAssembly[typeNameWithoutAssembly] = newFullType;
                _typesWithoutAssemblyLowerCase[typeNameWithoutAssembly] = newFullType;
            }
        }