public void ReadConfigFromFile() { EnsurePathAndFile(); string json = File.ReadAllText(this.fullPath); this.Pas = JsonConvert.DeserializeObject <PreAndSign>(json); if (this.Pas == null) { this.Pas = new PreAndSign(); } }
public PreAndSignConfig() { this.fullPath = Path.Combine(Directory.GetCurrentDirectory(), dir, fileName); this.Pas = new PreAndSign(); ReadConfigFromFile(); }