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)
        {
            var connectionString   = _configuration["ItaBankConnectionString"];
            var dependencyInjector = new DependencyInjector(connectionString);

            dependencyInjector.Configure(services);

            services.AddControllers();
        }
Exemplo n.º 2
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)
        {
            var openNotifyApiBaseUrl = _configuration["OpenNotifyApiBaseUrl"];
            var dependencyInjector   = new DependencyInjector(openNotifyApiBaseUrl);

            dependencyInjector.Configure(services);

            services.AddControllers();
        }
Exemplo n.º 3
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            DependencyInjector bootstrapper = new DependencyInjector();
            IContainer         container    = bootstrapper.Configure();

            MainWindow mainWindow = container.Resolve <MainWindow>();

            mainWindow.Show();
        }
Exemplo n.º 4
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)
        {
            var serviceBusConnectionString = "Endpoint=sb://itacinemastaging.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=Kesd97aHDX+mbqwXLsOWcLM92axn2T+3hHXxV7L2N6I=";

            var dependencyInjector = new DependencyInjector(serviceBusConnectionString);

            dependencyInjector.Configure(services);

            services.AddControllers();
        }
Exemplo n.º 5
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)
        {
            var mongoConnectionString = _configuration["MongoConnectionString"];
            var dependencyInjector    = new DependencyInjector(mongoConnectionString);

            dependencyInjector.Configure(services);

            services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
            .AddJwtBearer(opt => {
                opt.Audience  = _configuration["ResourceId"];
                opt.Authority = $"{_configuration["Instance"]}/{_configuration["TenantId"]}";
            });

            services.AddControllers();
        }
Exemplo n.º 6
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);

            DependencyInjector.Configure(services);
        }
 public static void ConfigureDependencyInjector(this IServiceCollection services)
 {
     DependencyInjector.Configure(services);
 }
Exemplo n.º 8
0
 public App()
 {
     DependencyInjector.Configure();
     MainWindow = DependencyInjector.Retrieve <Home>();
     MainWindow.Show();
 }