// Token: 0x06000166 RID: 358 RVA: 0x00006518 File Offset: 0x00004718
        protected void LoadDetailSchemaMappings(MasterSchemaMappingEntry masterSchemaMappingEntry)
        {
            ExTraceGlobals.SchemaManagerTracer.Information <string>((long)this.GetHashCode(), "SchemaManager::LoadDetailSchemaMappings - retrieving info from detail schema mapping XML file {0}.", (masterSchemaMappingEntry == null) ? "null" : masterSchemaMappingEntry.SchemaFileName);
            string schemaFileName = masterSchemaMappingEntry.SchemaFileName;

            this.schemaMappingEntryArray = (SchemaMappingEntry[])SchemaManager.schemaMappingEntryArrayHashTable[schemaFileName];
            if (this.schemaMappingEntryArray == null)
            {
                lock (typeof(SchemaManager))
                {
                    string   dataSourceManagerAssemblyName = masterSchemaMappingEntry.DataSourceManagerAssemblyName;
                    Assembly assembly = (Assembly)SchemaManager.dsmAssemblyHashTable[dataSourceManagerAssemblyName];
                    if (null == assembly)
                    {
                        string assemblyString = dataSourceManagerAssemblyName;
                        if (Path.GetExtension(dataSourceManagerAssemblyName).ToLower() == ".dll")
                        {
                            assemblyString = Path.GetFileNameWithoutExtension(dataSourceManagerAssemblyName);
                        }
                        try
                        {
                            assembly = Assembly.Load(assemblyString);
                        }
                        catch (FileNotFoundException)
                        {
                        }
                        if (assembly == null)
                        {
                            string assemblyFile = Path.Combine(ConfigurationContext.Setup.BinPath, dataSourceManagerAssemblyName);
                            assembly = Assembly.LoadFrom(assemblyFile);
                        }
                        SchemaManager.dsmAssemblyHashTable[dataSourceManagerAssemblyName] = assembly;
                    }
                    List <Type> list = new List <Type>();
                    foreach (Type type in assembly.GetTypes())
                    {
                        if (type.IsSubclassOf(typeof(SchemaMappingEntry)))
                        {
                            list.Add(type);
                        }
                    }
                    Assembly executingAssembly = Assembly.GetExecutingAssembly();
                    foreach (Type type2 in executingAssembly.GetTypes())
                    {
                        if (type2.IsSubclassOf(typeof(SchemaMappingEntry)))
                        {
                            list.Add(type2);
                        }
                    }
                    Type[]            extraTypes        = list.ToArray();
                    SafeXmlSerializer safeXmlSerializer = new SafeXmlSerializer(typeof(SchemaMappingEntry[]), extraTypes);
                    Stream            schemaXmlDocument = SchemaManager.GetSchemaXmlDocument(masterSchemaMappingEntry.SchemaFileName);
                    using (schemaXmlDocument)
                    {
                        this.schemaMappingEntryArray = (SchemaMappingEntry[])safeXmlSerializer.Deserialize(schemaXmlDocument);
                        SchemaManager.schemaMappingEntryArrayHashTable[masterSchemaMappingEntry.SchemaFileName] = this.schemaMappingEntryArray;
                    }
                }
            }
        }
        // Token: 0x06000167 RID: 359 RVA: 0x0000674C File Offset: 0x0000494C
        protected void LoadDataSourceManager(MasterSchemaMappingEntry masterSchemaMappingEntry)
        {
            ExTraceGlobals.SchemaManagerTracer.Information <string>((long)this.GetHashCode(), "SchemaManager::LoadDataSourceManager - retrieving info from DataSourceManager assembly {0}.", (masterSchemaMappingEntry == null) ? "null" : masterSchemaMappingEntry.DataSourceManagerAssemblyName);
            DataSourceManagerDelegate dataSourceManagerDelegate = (DataSourceManagerDelegate)SchemaManager.dsmDelegateHashTable[masterSchemaMappingEntry.DataSourceManagerAssemblyName];

            if (dataSourceManagerDelegate == null)
            {
                Assembly assembly = (Assembly)SchemaManager.dsmAssemblyHashTable[masterSchemaMappingEntry.DataSourceManagerAssemblyName];
                lock (typeof(SchemaManager))
                {
                    Type[] types = assembly.GetTypes();
                    int    i     = 0;
                    while (i < types.Length)
                    {
                        Type type = types[i];
                        if (type.IsSubclassOf(typeof(DataSourceManager)))
                        {
                            MethodInfo method = type.GetMethod("CreateInstance", BindingFlags.Static | BindingFlags.Public);
                            if (null == method)
                            {
                                throw new SchemaMappingException(Strings.ExceptionMissingCreateInstance(type, assembly.CodeBase));
                            }
                            dataSourceManagerDelegate = (DataSourceManagerDelegate)Delegate.CreateDelegate(typeof(DataSourceManagerDelegate), method);
                            string dataSourceManagerAssemblyName = masterSchemaMappingEntry.DataSourceManagerAssemblyName;
                            SchemaManager.dsmDelegateHashTable[dataSourceManagerAssemblyName] = dataSourceManagerDelegate;
                            break;
                        }
                        else
                        {
                            i++;
                        }
                    }
                }
                if (dataSourceManagerDelegate == null)
                {
                    throw new SchemaMappingException(Strings.ExceptionMissingDataSourceManager(assembly.CodeBase));
                }
            }
            this.dataSourceManager = dataSourceManagerDelegate(this, masterSchemaMappingEntry.DataSourceInfoPath);
        }
 // Token: 0x06000165 RID: 357 RVA: 0x000064C4 File Offset: 0x000046C4
 protected void LoadDetailSchemaInfo(MasterSchemaMappingEntry masterSchemaMappingEntry)
 {
     ExTraceGlobals.SchemaManagerTracer.Information <string, string>((long)this.GetHashCode(), "SchemaManager::LoadDetailSchemaInfo - retrieving info from detail schema file {0} and DataSourceManager assembly {1}.", (masterSchemaMappingEntry == null) ? "null" : masterSchemaMappingEntry.SchemaFileName, (masterSchemaMappingEntry == null) ? "null" : masterSchemaMappingEntry.DataSourceManagerAssemblyName);
     this.LoadDetailSchemaMappings(masterSchemaMappingEntry);
     this.LoadDataSourceManager(masterSchemaMappingEntry);
 }
 // Token: 0x06000152 RID: 338 RVA: 0x00005C73 File Offset: 0x00003E73
 internal SchemaManager(Type persistableType, MasterSchemaMappingEntry masterSchemaMappingEntry)
 {
     ExTraceGlobals.SchemaManagerTracer.Information <string>((long)this.GetHashCode(), "SchemaManager::SchemaManager - creating a schema manager for class type {0}", masterSchemaMappingEntry.ClassName);
     this.persistableType = persistableType;
     this.LoadDetailSchemaInfo(masterSchemaMappingEntry);
 }