/// <summary> /// Initializes a new instance of the ExtensionInfoBuilder class for the given assembly. /// </summary> /// <param name="fileName">The file name and path to the assembly to check.</param> public ExtensionInfoBuilder(string fileName) { ExtensionInfo ei; Type[] types; resultExtensions = new ExtensionInfoCollection(); Type ropt = typeof(Extension); sourceAssembly = Assembly.ReflectionOnlyLoadFrom(fileName); ropt = ReflectionOnlyTypeFromAssembly(sourceAssembly, ropt); try { types = sourceAssembly.GetExportedTypes(); foreach (Type t in types) { try { if (t.IsSubclassOf(ropt) && !t.IsAbstract) { ei = new ExtensionInfo(t); resultExtensions.Add(ei); } } catch (ArgumentOutOfRangeException) { ei = null; } } } catch (ReflectionTypeLoadException) { return; } }
/// <summary> /// Initializes a new instance of the Settings class. /// </summary> public Settings() { settingDirectorys = new DirectoryCollection(); extensionDirectorys = new DirectoryCollection(); loadedExtensions = new ExtensionInfoCollection(); logSettings = new LogHandlerSettingCollection(); }