private QuartzminOptions CreateQuartzminOptions() { var options = new QuartzminOptions() { Scheduler = _scheduler, }; if (!string.IsNullOrEmpty(DefaultDateFormat)) { options.DefaultDateFormat = DefaultDateFormat; } if (!string.IsNullOrEmpty(DefaultTimeFormat)) { options.DefaultTimeFormat = DefaultTimeFormat; } if (!string.IsNullOrEmpty(Logo)) { options.Logo = Logo; } if (!string.IsNullOrEmpty(ProductName)) { options.ProductName = ProductName; } if (!string.IsNullOrEmpty(VirtualPathRoot)) { options.VirtualPathRoot = VirtualPathRoot; } return(options); }
public void ConfigureServices(IServiceCollection services) { services.AddSingleton <Quartzmin.Services>(provider => { var isEmpty = string.IsNullOrEmpty(_routePrefix); var options = new QuartzminOptions { Scheduler = _scheduler, VirtualPathRoot = isEmpty ? string.Empty : _routePrefix }; return(Quartzmin.Services.Create(options)); }); services.AddScoped <QuartzminFilter>(); services.AddControllers(opts => opts.Conventions.Add(new QuartzminConvention())) .AddNewtonsoftJson(); }
private QuartzminOptions CreateQuartzminOptions() { var options = new QuartzminOptions() { Scheduler = _scheduler, }; if (!string.IsNullOrEmpty(DefaultDateFormat)) { options.DefaultDateFormat = DefaultDateFormat; } if (!string.IsNullOrEmpty(DefaultTimeFormat)) { options.DefaultTimeFormat = DefaultTimeFormat; } return(options); }