Example #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
            }
            var scheduler = DemoScheduler.Create().Result;

            app.UseStaticFiles();
            app.UseRouting();
            app.UseAuthorization();
            app.UseQuartzmin(new QuartzminOptions()
            {
                Scheduler = scheduler, VirtualPathRoot = "/", UseLocalTime = true, DefaultDateFormat = "yyyy-MM-dd", DefaultTimeFormat = "HH:mm:ss \"GMT\"zzz"
            });
            app.UseEndpoints(endpoints =>
            {
                endpoints.MapDefaultControllerRoute();
                endpoints.MapRazorPages();
            });
        }
Example #2
0
 public void Configure(IApplicationBuilder app)
 {
     app.UseQuartzmin(new QuartzminOptions()
     {
         Scheduler = DemoScheduler.Create().Result,
     });
 }
Example #3
0
 public void Configure(IApplicationBuilder app)
 {
     app.UseQuartzmin(new QuartzminOptions()
     {
         UseLocalTime    = true,
         Scheduler       = DemoScheduler.Create().Result,
         VirtualPathRoot = "/test",
     });
 }
Example #4
0
        public void Configuration(IAppBuilder app)
        {
            app.UseQuartzmin(new QuartzminOptions()
            {
                Scheduler = DemoScheduler.Create().Result,

                DefaultDateFormat = "dd.MM.yyyy",
                VirtualPathRoot   = "/test",
            });
        }
Example #5
0
        static void Main(string[] args)
        {
            var scheduler = DemoScheduler.Create().Result;

            scheduler.Start();

            while (!scheduler.IsShutdown)
            {
                Thread.Sleep(500);
            }
        }
Example #6
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseSpaStaticFiles();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller}/{action=Index}/{id?}");
            });

            app.UseSpa(spa =>
            {
                // To learn more about options for serving an Angular SPA from ASP.NET Core,
                // see https://go.microsoft.com/fwlink/?linkid=864501

                spa.Options.SourcePath = "ClientApp";

                if (env.IsDevelopment())
                {
                    //spa.UseAngularCliServer(npmScript: "start");
                }
            });

            app.UseQuartzmin(new QuartzminOptions()
            {
                Scheduler = DemoScheduler.Create().Result,
            });
        }
Example #7
0
        public static void Main(string[] args)
        {
            var scheduler = DemoScheduler.Create().Result;

            var host = WebHost.CreateDefaultBuilder(args).Configure(app =>
            {
                app.UseQuartzmin(new QuartzminOptions()
                {
                    Scheduler = scheduler
                });
            }).ConfigureServices(services =>
            {
                services.AddQuartzmin();
            })
                       .Build();

            host.Start();

            while (!scheduler.IsShutdown)
            {
                Thread.Sleep(250);
            }
        }
Example #8
0
 void CreateScheduler()
 {
     scheduler = DemoScheduler.Create(start: false).Result;
 }