public static ManagementOptions GetInstance(IConfiguration config) { if (_instance == null) { _instance = new ManagementOptions(config); } return(_instance); }
public static ManagementOptions GetInstance() { if (_instance == null) { _instance = new ManagementOptions(); } return(_instance); }
public AbstractOptions(string sectionName, IConfiguration config) { if (sectionName == null) { throw new ArgumentNullException(nameof(sectionName)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } Global = ManagementOptions.GetInstance(config); Global.EndpointOptions.Add(this); var section = config.GetSection(sectionName); if (section != null) { section.Bind(this); } }
public static void Reset() { _instance = null; }
public static void SetInstance(ManagementOptions mgmtOptions) { _instance = mgmtOptions; }
public AbstractOptions() { Global = ManagementOptions.GetInstance(); Global.EndpointOptions.Add(this); }