public SwagWindowSettingService(SwagContext context, SwagWindowSettingsGroupRepository swagWindowSettingGroupRepository,
                                 SwagSettingGroupRepository swagSettingGroupRepository)
 {
     _context = context;
     _swagWindowSettingsGroupRepository = swagWindowSettingGroupRepository;
     _swagSettingGroupRepository        = swagSettingGroupRepository;
 }
예제 #2
0
        private static void ConfigureServices()
        {
            var services = new ServiceCollection();

            //services.AddDbContext<SwagWPFContext>(options => SwagContext.SetSqliteOptions(options));
            services.AddDbContext <SwagContext, SwagWPFContext>(options => SwagContext.SetSqliteOptions(options));
            //services.AddDbContext<SwagContext>(options => SwagContext.SetSqlServerOptions(options));
            services.AddTransient <SwagWindowSettingsGroupRepository>();
            services.AddTransient <SwagSettingGroupRepository>();
            services.AddSingleton <SwagWindowSettingService>();
            services.AddTransient <ISwagDataRepository, SwagDataRepository>();
            services.AddTransient <SwagDataService>();
            services.AddSingleton <IJsonConverterProviderService, JsonConverterProviderServiceWPF>();
            services.AddSingleton <IJObjectToIconEnumService, JObjectToIconEnumServiceWPF>();
            _serviceProvider = services.BuildServiceProvider();
        }
예제 #3
0
 public SwagDataService(SwagContext context, ISwagDataRepository swagDataRepository)
 {
     _context            = context;
     _swagDataRepository = swagDataRepository;
 }