Ejemplo n.º 1
0
 public GameService(DataContextFactory dataContextFactory, GameStateService gameState, CurrentMatchProvider currentMatchProvider, GameEventPublisher eventPublisher, OverridableSettings settings)
 {
     _dataContextFactory = dataContextFactory;
     _gameState = gameState;
     _currentMatchProvider = currentMatchProvider;
     _eventPublisher = eventPublisher;
     _settings = settings;
 }
Ejemplo n.º 2
0
        public void Given()
        {
            _container = RestApiApplication.CreateContainer();

            _dataContextFactory = _container.Resolve<DataContextFactory>();

            _dataContextFactory.DeleteAllData();

            TimeService.ResetToRealTime();
            _excelWriter = new ExcelWriter();
        }
Ejemplo n.º 3
0
 public AdminController(GameStateService gameStateService, OverridableSettings appSettings, TilgangsKontroll tilgangsKontroll, PosisjonsService posisjonsService, ExcelImport excelImport, KmlToExcelPoster kmlToExcelPoster, ExcelWriter excelWriter, ExcelExport excelExport, DataContextFactory dataContextFactory, CurrentMatchProvider matchProvider)
 {
     _gameStateService = gameStateService;
     _appSettings = appSettings;
     _tilgangsKontroll = tilgangsKontroll;
     _posisjonsService = posisjonsService;
     _excelImport = excelImport;
     _kmlToExcelPoster = kmlToExcelPoster;
     _excelWriter = excelWriter;
     _excelExport = excelExport;
     _dataContextFactory = dataContextFactory;
     _matchProvider = matchProvider;
 }
Ejemplo n.º 4
0
        public void Given()
        {
            _container = RestApiApplication.CreateContainer();
            _gitt = new Gitt(_container);
            _dataContextFactory = _container.Resolve<DataContextFactory>();
            TimeService.ResetToRealTime();

            // Slett alle meldinger (blir rullet tilbake i transaksjon uansett)
            using (var context = _dataContextFactory.Create())
            {
                context.Meldinger.Clear();
                context.SaveChanges();
            }
        }
Ejemplo n.º 5
0
 public LagImport(DataContextFactory dataContextFactory)
 {
     _dataContextFactory = dataContextFactory;
 }
Ejemplo n.º 6
0
 public PosisjonsService(DataContextFactory dataContextFactory, OverridableSettings appSettings)
 {
     _dataContextFactory = dataContextFactory;
     _appSettings = appSettings;
 }
Ejemplo n.º 7
0
 public LagOppstillingService(DataContextFactory dataContextFactory, GameStateService gameStateService, TilgangsKontroll tilgangsKontroll)
 {
     _dataContextFactory = dataContextFactory;
     _gameStateService = gameStateService;
     _tilgangsKontroll = tilgangsKontroll;
 }
Ejemplo n.º 8
0
 public DeltakerImport(DataContextFactory dataContextFactory)
 {
     _dataContextFactory = dataContextFactory;
 }
Ejemplo n.º 9
0
 public PostImport(DataContextFactory dataContextFactory)
 {
     _dataContextFactory = dataContextFactory;
 }
Ejemplo n.º 10
0
 public CurrentMatchProvider(DataContextFactory dataContextFactory)
 {
     _dataContextFactory = dataContextFactory;
 }
Ejemplo n.º 11
0
 public KmlExport(DataContextFactory dataContextFactory, CurrentMatchProvider currentMatchProvider)
 {
     _dataContextFactory = dataContextFactory;
     _currentMatchProvider = currentMatchProvider;
 }
Ejemplo n.º 12
0
 public MeldingService(DataContextFactory dataContextFactory, TilgangsKontroll tilgangsKontroll)
 {
     _dataContextFactory = dataContextFactory;
     _tilgangsKontroll = tilgangsKontroll;
 }
Ejemplo n.º 13
0
 public GameStateService(DataContextFactory dataContextFactory, CurrentMatchProvider currentMatchProvider)
 {
     _dataContextFactory = dataContextFactory;
     _currentMatchProvider = currentMatchProvider;
 }
Ejemplo n.º 14
0
 public void Setup()
 {
     _dataContextFactory = _container.Resolve<DataContextFactory>();
 }
 public NoDbPosisjonsService(DataContextFactory dataContextFactory, OverridableSettings appSettings)
     : base(dataContextFactory, appSettings)
 {
 }
Ejemplo n.º 16
0
 public TilgangsKontroll(DataContextFactory dataContextFactory)
 {
     _dataContextFactory = dataContextFactory;
 }
Ejemplo n.º 17
0
 public ExcelExport(DataContextFactory dataContextFactory, ExcelWriter excelWriter)
 {
     _dataContextFactory = dataContextFactory;
     _excelWriter = excelWriter;
 }
Ejemplo n.º 18
0
 public MatchImport(DataContextFactory dataContextFactory)
 {
     _dataContextFactory = dataContextFactory;
 }
Ejemplo n.º 19
0
        public void Given()
        {
            _container = RestApiApplication.CreateContainer();

            _appSettings = new OverridableSettings();
            _container.Register(Component.For<OverridableSettings>().Instance(_appSettings).IsDefault().Named(Guid.NewGuid().ToString()));

            _gitt = new Gitt(_container);
            _dataContextFactory = _container.Resolve<DataContextFactory>();
            TimeService.ResetToRealTime();

            // Slett alle posisjoner (blir rullet tilbake i transaksjon uansett)
            using (var context = _dataContextFactory.Create())
            {
                context.DeltakerPosisjoner.Clear();
                context.SaveChanges();
            }
        }