/// <summary> /// Load data from file path /// </summary> /// <param name="filePath">File path</param> public void Load(string filePath) { FilePath = filePath; var content = string.Empty; using (var sr = new StreamReader(filePath)) { content = sr.ReadToEnd(); sr.Close(); } Data = JsonConvert.DeserializeObject <SqlGeneratorArchiveData>(content); }
/// <summary> /// CTOR /// </summary> /// <param name="filePath">File path</param> /// <param name="content">Data to save</param> public SqlGeneratorArchive(string filePath, SqlGeneratorArchiveData content) { FilePath = filePath; Data = content; }
/// <summary> /// /// </summary> /// <param name="content"></param> public SqlGeneratorArchive(SqlGeneratorArchiveData content) { Data = content; }
/// <summary> /// CTOR /// </summary> public SqlGeneratorArchive() { Data = new SqlGeneratorArchiveData(); }