Exemplo n.º 1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddSignalR();
            services.AddControllersWithViews();
            services.AddRazorPages();
            services.AddResponseCompression(opts =>
            {
                opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(
                    new[] { "application/octet-stream" });
            });

            //
            // rbrands: Add standard services with dependency injection
            //
            services.Configure <MeetUpFunctionsConfig>(Configuration.GetSection("MeetUpFunctionsConfig"));
            MeetUpFunctionsConfig functionsConfig = Configuration.GetSection("MeetUpFunctionsConfig").Get <MeetUpFunctionsConfig>();
            MeetUpFunctions       meetUpFunctions = new MeetUpFunctions(functionsConfig);

            services.AddSingleton(meetUpFunctions);
        }
Exemplo n.º 2
0
 public UtilController(ILogger <UtilController> logger, MeetUpFunctions meetUpFunctions)
 {
     _meetUpFunctions = meetUpFunctions;
     this.logger      = logger;
 }
Exemplo n.º 3
0
 public CalendarController(ILogger <CalendarController> logger, MeetUpFunctions meetUpFunctions)
 {
     _meetUpFunctions = meetUpFunctions;
     this.logger      = logger;
 }