Beispiel #1
0
        /// <summary>
        /// Configures the application pipeline and pre-startup operations
        /// </summary>
        /// <param name="app">For configuring the application pipeline</param>
        /// <param name="context"></param>
        /// <param name="logger"></param>
        /// <param name="applicationLifetime"></param>
        /// <param name="userManager"></param>
        public void Configure(IApplicationBuilder app, GoldenTicketContext context, ILogger <Startup> logger, IApplicationLifetime applicationLifetime, UserManager <Technician> userManager)
        {
            if (_hostingEnvironment.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseForwardedHeaders(new ForwardedHeadersOptions
                {
                    ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
                });
            }

            app.UseStaticFiles();

            app.UseAuthentication();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Tickets}/{action=All}/{id?}");
            });
        }
 /// <summary>
 /// Initializes this controller
 /// </summary>
 /// <param name="context">context of the technician</param>
 public ReportsController(GoldenTicketContext context)
 {
     _context = context;
 }
 /// <summary>
 /// Initializes private variable _context
 /// </summary>
 /// <param name="context">context of current ticket</param>
 /// <param name="userManager">The user manager</param>
 public TicketsController(GoldenTicketContext context, UserManager <Technician> userManager)
 {
     _context     = context;
     _userManager = userManager;
 }
 /// <summary>
 /// Initializes _context
 /// </summary>
 /// <param name="context">context of client</param>
 public ClientsController(GoldenTicketContext context)
 {
     _context = context;
 }