Beispiel #1
0
        public static void Register(IServiceCollection serviceCollection)
        {
            serviceCollection.AddSingleton <IRedisSettingsService, RedisSettingsService>();
            serviceCollection.AddScoped <IVehiclePlotFactory, VehiclePlotFactory>();
            serviceCollection.AddScoped <IVehiclePlotRepository, VehiclePlotRepository>();
            serviceCollection.AddScoped <IVehiclePlotService, VehiclePlotService>();
            serviceCollection.AddScoped <IVehiclePlotDao, VehiclePlotDao>();

            serviceCollection.AddSingleton <IConnectionMultiplexer>(x =>
                                                                    ConnectionMultiplexer.Connect(x.GetRequiredService <IRedisSettingsService>().RedisConnectionString));

            CommonDependencyInjection.Register(serviceCollection);
        }
Beispiel #2
0
 public static void Register(IServiceCollection serviceCollection)
 {
     serviceCollection.AddScoped <IVehiclePlotService, VehiclePlotService>();
     serviceCollection.AddScoped <IMessagingService, MessagingService>();
     CommonDependencyInjection.Register(serviceCollection);
 }