public static PaypalContext GetConfig() { lock (Config) { if (!isSetup && File.Exists(path)) { string text = File.ReadAllText(path); Config = JsonConvert.DeserializeObject <PaypalContext>(text); } else { throw new InvalidOperationException("Create setting.json fail"); } } return(Config); }
public void Setup() { config = Settings.GetConfig(); }