/// <summary>Clears the complete internal list</summary> /// <param name="SaveConfigs">DOLATER FILL IN</param> public static void Clear(Boolean SaveConfigs = false) { if (SaveConfigs) { ConfigMapper.SaveAll(); } ConfigMapper._Configs.Clear(); }
/// <summary>Looks through the given assembly looking for config objects and load them into memory. Creating files if they are not present.</summary> /// <param name="assembly">The assembly to preload</param> /// <exception cref="AmbiguousMatchException" /> /// <exception cref="ArgumentException" /> /// <exception cref="ArgumentNullException" /> /// <exception cref="FileNotFoundException" /> /// <exception cref="NotSupportedException" /> /// <exception cref="OverflowException" /> /// <exception cref="TypeLoadException" /> public static void Preload(Assembly assembly) { try { Type[] Types = assembly.GetExportedTypes(); //Loop through types looking for the config for (Int32 I = 0; I < Types.Length; I++) { if (Types[I].GetCustomAttribute(typeof(ConfigAttribute)) != null && Types[I].IsClass) { ConfigMapper.Get(Types[I]); } } } catch (Exception ex) { Console.WriteLine(ex.Message); } }