private static string _filename = ""; // There will be one instance of this per type #pragma warning restore RECS0108 // Warns about static fields in generic types /// <summary> /// Load config file /// </summary> /// <param name="filename">Path to file</param> /// <returns>Returns true if default config was used</returns> public bool Load(string filename) { _filename = filename; var result = FileInteractor.Load <T>(filename); config = result.Value; return(result.Key); }
/// <summary> /// Reload config file /// </summary> public void Reload() { config = FileInteractor.Load <T>(_filename).Value; }