Exemplo n.º 1
0
        public EventsService(
            IRepository <Account> repositoryAccount,
            IRepository <AccountSet> repositoryAccountSet,
            IRepository <EventRelationType> repositoryEventRelationType,
            IRepository <CurrencyType> repositoryCurrencyType,
            IRepository <AlgorithmType> repositoryAlgorithmType,
            IRepository <Event> repositoryEvent,
            IRepository <EventCondition> repositoryEventCondition,
            IEventsFactory eventsFactory,
            IAccountingService accountingService,
            IBetsService betsService,
            IFactory <IScopeable <IUnitOfWork> > scopeableFactory)
        {
            this._repositoryAccount           = repositoryAccount;
            this._repositoryAccountSet        = repositoryAccountSet;
            this._repositoryEventRelationType = repositoryEventRelationType;
            this._repositoryCurrencyType      = repositoryCurrencyType;
            this._repositoryAlgorithmType     = repositoryAlgorithmType;
            this._repositoryEvent             = repositoryEvent;
            this._repositoryEventCondition    = repositoryEventCondition;

            this._eventsFactory = eventsFactory;

            this._accountingService = accountingService;
            this._betsService       = betsService;

            this._scopeableFactory = scopeableFactory;
        }
Exemplo n.º 2
0
 public void TestInitialize()
 {
     this.betsRepository = TestObjectFactoryRepositories.GetBetsRepository();
     this.betsService    = new BetsService(this.betsRepository);
     this.bet            = new Bet()
     {
         Name = "Bet to add"
     };
 }
Exemplo n.º 3
0
        public DataManager(IXmlParserService xmlParserService, IMatchesService matchesService, IBetsService betsService, IOddsService oddsService)
        {
            Guard.WhenArgument(xmlParserService, nameof(xmlParserService)).IsNull().Throw();
            Guard.WhenArgument(matchesService, nameof(matchesService)).IsNull().Throw();
            Guard.WhenArgument(betsService, nameof(betsService)).IsNull().Throw();
            Guard.WhenArgument(oddsService, nameof(oddsService)).IsNull().Throw();

            this.xmlParserService = xmlParserService;
            this.matchesService   = matchesService;
            this.betsService      = betsService;
            this.oddsService      = oddsService;

            this.xmlMatches       = this.xmlParserService.GetMatches(Constants.BaseUrl).ToList();
            this.existMatchXmlIds = this.GetExistMatchXmlIds(this.xmlMatches);
        }
Exemplo n.º 4
0
        public BetsController()
        {
            var account = CloudConfiguration.GetStorageAccount("DataConnectionString");

            this._betsService = new BetsService(
                new AzureRepository <AzureBet, Bet>(account),
                new AzureRepository <AzureAccount, Account>(account),
                new AzureRepository <AzureEvent, Event>(account),
                new AzureRepository <AzureOutcomesType, OutcomesType>(account),
                new AzureRepository <AzureCurrencyType, CurrencyType>(account),
                new AzureRepository <AzureEventBetCondition, EventBetCondition>(account),
                new AzureRepository <AzureBetRateAlgorithm, BetRateAlgorithm>(account),
                new BetsFactory(
                    new AzureRepository <AzureBet, Bet>(account),
                    new AzureRepository <AzureEventBetCondition, EventBetCondition>(account),
                    new AzureRepository <AzureEventRelationType, EventRelationType>(account),
                    new AzureRepository <AzureCurrencyType, CurrencyType>(account),
                    new AzureRepository <AzureAlgorithmType, AlgorithmType>(account),
                    new AzureRepository <AzureAccountSetAccounts, AccountSetAccounts>(account),
                    new AzureRepository <AzureBetRateAlgorithm, BetRateAlgorithm>(account),
                    new AzureScopeableUnitOfWorkFactory()));

            this._userManager = Startup.UserManagerFactory();
        }
Exemplo n.º 5
0
 public BetsController(IBetsService betsService)
 {
     _betsService = betsService;
 }