Ejemplo n.º 1
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();
            }

            var scheduler = CreateScheduler();

            app.UseCrystalQuartz(
                () => scheduler,
                new CrystalQuartzOptions
            {
                JobDataMapInputTypes = CrystalQuartzOptions
                                       .CreateDefaultJobDataMapInputTypes()
                                       .Concat(new []
                {
                    new RegisteredInputType(
                        new InputType("user", "User"),
                        null,
                        new FixedInputVariantsProvider(
                            new InputVariant("john_smith", "John Smith"),
                            new InputVariant("bob_doe", "Bob Doe"))),
                })
                                       .ToArray()
            });

            app.UseStaticFiles();
            app.UseMvc();
        }
Ejemplo n.º 2
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();
                app.UseBrowserLink();
            }
            else
            {
                app.UseExceptionHandler("/Error");
            }

            app.UseStaticFiles();

            var scheduler = CreateScheduler();

            app.UseCrystalQuartz(
                () => scheduler,
                new CrystalQuartzOptions
            {
                JobDataMapInputTypes = CrystalQuartzOptions
                                       .CreateDefaultJobDataMapInputTypes()
                                       .Concat(new []
                {
                    new RegisteredInputType(
                        new InputType("user", "User"),
                        null,
                        new FixedInputVariantsProvider(
                            new InputVariant("john_smith", "John Smith"),
                            new InputVariant("bob_doe", "Bob Doe"))),
                })
                                       .ToArray()
            });

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