static async Task Main() { var builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("AppSetting.json"); var configuration = builder.Build(); DomainRecordOptions domainRecordOptions = new DomainRecordOptions(); configuration.GetSection("DomainRecordOptions").Bind(domainRecordOptions); DomainRecord domainRecord = new DomainRecord(domainRecordOptions); while (true) { await domainRecord.CheckAndModify(); Thread.Sleep(30000); } }
public DomainRecord(DomainRecordOptions options) { Options = options; Init(); logger.LogInformation("DomainRecord init..."); }