Example #1
0
 public MarketController(
     IMarketRepository marketRepository,
     IRestaurantRepository restaurantRepository)
 {
     _marketRepository     = marketRepository;
     _restaurantRepository = restaurantRepository;
 }
Example #2
0
 public OrderController(
     IOrderRepository orderRepository,
     IRestaurantRepository restaurantRepository,
     IAreaRepository areaRepository,
     IMarketRepository marketRepository,
     ITableRepository tableRepository,
     IOrderRecordRepository orderRecordRepository,
     IExtendItemRepository extendItemRepository,
     ICustomerRepository customerRepository,
     IUserRepository_Old oldUserRepository,
     IOrderPayRecordRepository payRecordRepository,
     ITableService tableHandlerSers,
     IOrderService orderService,
     IPrinterRepository printerRepository)
 {
     _orderRepository       = orderRepository;
     _restaurantRepository  = restaurantRepository;
     _areaRepository        = areaRepository;
     _marketRep             = marketRepository;
     _tableRep              = tableRepository;
     _orderRecordRepository = orderRecordRepository;
     _extendItemRepository  = extendItemRepository;
     _oldCustRepository     = customerRepository;
     _oldUserRepository     = oldUserRepository;
     _payRep            = payRecordRepository;
     _tableHandlerSers  = tableHandlerSers;
     _orderService      = orderService;
     _printerRepository = printerRepository;
 }
Example #3
0
 public LiveRoundtripExitOrderSubmittedIntegrationEventHandler(IExchangeAccessIntegrationEventService exchangeAccessIntegrationEventService, IMarketRepository marketRepository, IBalanceRepository balanceRepository, IExchangeAccessService exchangeAccessService)
 {
     _exchangeAccessIntegrationEventService = exchangeAccessIntegrationEventService ?? throw new ArgumentNullException(nameof(exchangeAccessIntegrationEventService));
     _marketRepository      = marketRepository ?? throw new ArgumentNullException(nameof(marketRepository));
     _balanceRepository     = balanceRepository ?? throw new ArgumentNullException(nameof(balanceRepository));
     _exchangeAccessService = exchangeAccessService ?? throw new ArgumentNullException(nameof(exchangeAccessService));
 }
Example #4
0
 public PeopleController(WorkersInMotionDB context)
 {
     this._IPlaceRepository       = new PlaceRepository(context);
     this._IPeopleRepository      = new PeopleRepository(context);
     this._IMarketRepository      = new MarketRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
 }
Example #5
0
 public DataCommonService(IAssetRepository assetRepository, IMarketRepository marketRepository, IPriceRepository priceRepository, IConnector binanceConnector)
 {
     AssetRepository  = assetRepository;
     MarketRepository = marketRepository;
     PriceRepository  = priceRepository;
     BinanceConnector = binanceConnector;
 }
        public void GetMarketRepository_alwaysReturnsSingletonInstance()
        {
            IMarketRepository repository  = RepositoryFactory.GetMarketRepository();
            IMarketRepository repository2 = RepositoryFactory.GetMarketRepository();

            Assert.AreSame(repository, repository2);
        }
 public PlaceController(WorkersInMotionDB context)
 {
     this._IPlaceRepository = new PlaceRepository(context);
     this._IPeopleRepository = new PeopleRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
 }
 public TerritoryController(WorkersInMotionDB context)
 {
     this._IRegionRepository = new RegionRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IGlobalUserRepository = new GlobalUserRepository(context);
 }
Example #9
0
 public TerritoryController(WorkersInMotionDB context)
 {
     this._IRegionRepository     = new RegionRepository(context);
     this._IMarketRepository     = new MarketRepository(context);
     this._ITerritoryRepository  = new TerritoryRepository(context);
     this._IGlobalUserRepository = new GlobalUserRepository(context);
 }
Example #10
0
 public ExchangeTradeProvider(
     IStorageTransactionFactory <HistorianDbContext> storageTransactionFactory,
     IMarketRepository marketRepository)
 {
     StorageTransactionFactory = storageTransactionFactory;
     MarketRepository          = marketRepository;
 }
 public PeopleController()
 {
     this._IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
     this._IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
     this._IPeopleRepository = new PeopleRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
 }
Example #12
0
 static RepositoryFactory()
 {
     CompanyRepository = new EFCompanyRepository();
     MarketRepository  = new EFMarketRepository();
     DataRepository    = new EFDataRepository();
     FxRepository      = new EFFxRepository();
 }
Example #13
0
 public PlaceController()
 {
     this._IPlaceRepository       = new PlaceRepository(new WorkersInMotionDB());
     this._IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
     this._IPeopleRepository      = new PeopleRepository(new WorkersInMotionDB());
     this._IMarketRepository      = new MarketRepository(new WorkersInMotionDB());
 }
Example #14
0
 public HomeController(IOrderRepository _OrderRepository, ICategoryRepository _CategoryRepository, ITableRepository _TableRepository, IMarketRepository _MarketRepository, IAreaRepository _AreaRepository)
 {
     OrderRepository    = _OrderRepository;
     TableRepository    = _TableRepository;
     MarketRepository   = _MarketRepository;
     CategoryRepository = _CategoryRepository;
     AreaRepository     = _AreaRepository;
 }
 public CatalogController()
 {
     superCategoryRepo    = new SuperCategoryRepository(new GainBargainContext());
     categoryRepo         = new Repository <Category>(new GainBargainContext());
     productRepo          = new ProductsCacheRepository(new GainBargainContext());
     marketRepo           = new MarketRepository(new GainBargainContext());
     favProductRepository = new FavoriteProductRepository();
 }
Example #16
0
 public DiscountController(IDiscountRepository _DiscountRepository, IRestaurantRepository _RestaurantRepository, IAreaRepository _AreaRepository, ICategoryRepository _CategoryRepository, IMarketRepository _MarketRepository)
 {
     DiscountRepository   = _DiscountRepository;
     RestaurantRepository = _RestaurantRepository;
     AreaRepository       = _AreaRepository;
     CategoryRepository   = _CategoryRepository;
     MarketRepository     = _MarketRepository;
 }
Example #17
0
        // GET: MAccount

        public MAccountController(IUserService userService,
                                  IMarketRepository marketRepository,
                                  IExtendItemRepository extendItemRepository
                                  )
        {
            _userService          = userService;
            _marketRepository     = marketRepository;
            _extendItemRepository = extendItemRepository;
        }
 public JobController(WorkersInMotionDB context)
 {
     this._IPlaceRepository = new PlaceRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._IRegionRepository = new RegionRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IJobRepository = new JobRepository(context);
     this._IJobSchemaRepository = new JobSchemaRepository(context);
 }
Example #19
0
 public MarketsController(
     IMarketRepository marketRepository,
     IConvertService convertService,
     IEventSender eventSender)
 {
     _marketRepository = marketRepository;
     _convertService   = convertService;
     _eventSender      = eventSender;
 }
 public ServicePointController(WorkersInMotionDB context)
 {
     this._IPlaceRepository = new PlaceRepository(context);
     this._IPeopleRepository = new PeopleRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IRegionRepository = new RegionRepository(context);
 }
 public JobRepository(WorkersInMotionDB context)
 {
     this.context = context;
     this.contextWIM = new WorkersInMotionDB();
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
     this._IOrganizationRepository = new OrganizationRepository(new WorkersInMotionDB());
     this._IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
     this._IPORepository = new PORepository(new WorkersInMotionDB());
 }
 public POController()
 {
     this._IPORepository = new PORepository(new WorkersInMotionDB());
     this._IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
     this._IJobRepository = new JobRepository(new WorkersInMotionDB());
     this._ITerritoryRepository = new TerritoryRepository(new WorkersInMotionDB());
     this._IRegionRepository = new RegionRepository(new WorkersInMotionDB());
 }
 public ServicePointController(WorkersInMotionDB context)
 {
     this._IPlaceRepository       = new PlaceRepository(context);
     this._IPeopleRepository      = new PeopleRepository(context);
     this._IMarketRepository      = new MarketRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
     this._ITerritoryRepository   = new TerritoryRepository(context);
     this._IRegionRepository      = new RegionRepository(context);
 }
Example #24
0
 public POController(WorkersInMotionDB context)
 {
     this._IJobRepository       = new JobRepository(context);
     this._IPORepository        = new PORepository(context);
     this._IPlaceRepository     = new PlaceRepository(context);
     this._IMarketRepository    = new MarketRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IRegionRepository    = new RegionRepository(context);
 }
Example #25
0
 public StoreVistController()
 {
     this._IPlaceRepository       = new PlaceRepository(new WorkersInMotionDB());
     this._IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
     this._IPeopleRepository      = new PeopleRepository(new WorkersInMotionDB());
     this._IMarketRepository      = new MarketRepository(new WorkersInMotionDB());
     this._IRegionRepository      = new RegionRepository(new WorkersInMotionDB());
     this._ITerritoryRepository   = new TerritoryRepository(new WorkersInMotionDB());
     this._IJobRepository         = new JobRepository(new WorkersInMotionDB());
 }
 public JobDetailsController()
 {
     this._IJobRepository = new JobRepository(new WorkersInMotionDB());
     this._IJobSchemaRepository = new JobSchemaRepository(new WorkersInMotionDB());
     this._IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
     this._IRegionRepository = new RegionRepository(new WorkersInMotionDB());
     this._ITerritoryRepository = new TerritoryRepository(new WorkersInMotionDB());
     this._IUserRepository = new UserRepository(new WorkersInMotionDB());
 }
 public StoreVistController()
 {
     this._IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
     this._IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
     this._IPeopleRepository = new PeopleRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
     this._IRegionRepository = new RegionRepository(new WorkersInMotionDB());
     this._ITerritoryRepository = new TerritoryRepository(new WorkersInMotionDB());
     this._IJobRepository = new JobRepository(new WorkersInMotionDB());
 }
        public WorkerFactory(ServiceProvider sp)
        {
            _sp = sp;
            _sp.CreateScope();

            _animalRepo = _sp.GetService <IAnimalRepository>();
            _eggRepo    = _sp.GetService <IEggRepository>();
            _itemRepo   = _sp.GetService <IItemRepository>();
            _marketRepo = _sp.GetService <IMarketRepository>();
        }
Example #29
0
 public JobDetailsController(WorkersInMotionDB context)
 {
     this._IPlaceRepository     = new PlaceRepository(context);
     this._IMarketRepository    = new MarketRepository(context);
     this._IRegionRepository    = new RegionRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IJobRepository       = new JobRepository(context);
     this._IJobSchemaRepository = new JobSchemaRepository(context);
     this._IUserRepository      = new UserRepository(context);
 }
 public MarketController()
 {
     this._IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
     this._IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
     this._IPeopleRepository = new PeopleRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
     this._IRegionRepository = new RegionRepository(new WorkersInMotionDB());
     this._ITerritoryRepository = new TerritoryRepository(new WorkersInMotionDB());
     this._IUserRepository = new UserRepository(new WorkersInMotionDB());
     this._IGlobalUserRepository = new GlobalUserRepository(new WorkersInMotionDB());
 }
 public AssignJobController(WorkersInMotionDB context)
 {
     this._IGlobalUserRepository = new GlobalUserRepository(context);
     this._IPlaceRepository = new PlaceRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._IRegionRepository = new RegionRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IJobRepository = new JobRepository(context);
     this._IJobSchemaRepository = new JobSchemaRepository(context);
     // this._IGroupRepository = new GroupRepository(context);
 }
Example #32
0
 public MarketHub(
     IPlayerRepository playerRepository,
     IEntityRepository entityRepository,
     IMarketRepository repo,
     IEventStore eventStore)
 {
     _playerRepo       = playerRepository;
     _entityRepository = entityRepository;
     _repo             = repo;
     _eventStore       = eventStore;
 }
Example #33
0
 public AssignJobController(WorkersInMotionDB context)
 {
     this._IGlobalUserRepository = new GlobalUserRepository(context);
     this._IPlaceRepository      = new PlaceRepository(context);
     this._IMarketRepository     = new MarketRepository(context);
     this._IRegionRepository     = new RegionRepository(context);
     this._ITerritoryRepository  = new TerritoryRepository(context);
     this._IJobRepository        = new JobRepository(context);
     this._IJobSchemaRepository  = new JobSchemaRepository(context);
     // this._IGroupRepository = new GroupRepository(context);
 }
Example #34
0
 public ExchangeTradeStatWorker(
     ILoggerFactory loggerFactory,
     ISymbolFactory symbolFactory,
     IStorageTransactionFactory <HistorianDbContext> storageTransactionFactory,
     IMarketRepository marketRepository)
 {
     LoggerFactory             = loggerFactory;
     SymbolFactory             = symbolFactory;
     StorageTransactionFactory = storageTransactionFactory;
     MarketRepository          = marketRepository;
 }
Example #35
0
 public JobStatusController(WorkersInMotionDB context)
 {
     this._IGlobalUserRepository  = new GlobalUserRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
     this._IPlaceRepository       = new PlaceRepository(context);
     this._IMarketRepository      = new MarketRepository(context);
     this._ITerritoryRepository   = new TerritoryRepository(context);
     this._IRegionRepository      = new RegionRepository(context);
     this._IUserRepository        = new UserRepository(context);
     this._IJobRepository         = new JobRepository(context);
     this._IPORepository          = new PORepository(context);
 }
 public JobStatusController(WorkersInMotionDB context)
 {
     this._IGlobalUserRepository = new GlobalUserRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
     this._IPlaceRepository = new PlaceRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IRegionRepository = new RegionRepository(context);
     this._IUserRepository = new UserRepository(context);
     this._IJobRepository = new JobRepository(context);
     this._IPORepository = new PORepository(context);
 }
Example #37
0
        public FinancialInstrumentGraphType(IMarketRepository marketRepository, IDataLoaderContextAccessor dataLoader)
        {
            this.AuthorizeWith(PolicyManifest.UserPolicy);

            this.Field(i => i.Id).Description("Financial Instrument Identifier");

            this.Field <ListGraphType <MarketGraphType> >(
                "market",
                "Market associated with the instrument",
                resolve: context =>
            {
                IQueryable <IMarket> IdQuery(IQueryable <IMarket> i)
                {
                    return(i.Where(x => x.Id == context.Source.MarketId));
                }

                var loader = dataLoader.Context.GetOrAddLoader(
                    $"GetMarketById-{context.Source.MarketId}",
                    () => marketRepository.Query(IdQuery));

                return(loader.LoadAsync());
            });

            this.Field(i => i.ClientIdentifier, true)
            .Description("The client identifier for the instrument in question");
            this.Field(i => i.Sedol, true).Description("Sedol for the instrument");
            this.Field(i => i.Isin, true).Description("Isin for the instrument");
            this.Field(i => i.Figi, true).Description("Figi for the instrument");
            this.Field(i => i.Cusip, true).Description("Cusip for the instrument");
            this.Field(i => i.Lei, true).Description("Lei for the instrument");
            this.Field(i => i.ExchangeSymbol, true).Description("Exchange symbol for the instrument");
            this.Field(i => i.BloombergTicker, true).Description("Bloomberg Ticker for the instrument");
            this.Field(i => i.SecurityName).Description("Security name for the instrument");
            this.Field(i => i.Cfi, true).Description("Classification for Financial Instruments");
            this.Field(i => i.IssuerIdentifier, true).Description("Issuer identifier");
            this.Field(i => i.SecurityCurrency, true).Description("The currency the security is traded in");
            this.Field(i => i.ReddeerId, true).Description("The reddeer id (security master list) for the instrument");
            this.Field(i => i.Enrichment, true).Type(new DateTimeGraphType()).Description(
                "The date the security was enriched on in UTC and in UK time format");

            this.Field <InstrumentTypeGraphType>("instrumentType", "The type of the instrument");

            this.Field(i => i.UnderlyingCfi, true).Description("CFI code for the underlying");
            this.Field(i => i.UnderlyingName, true).Description("Name of the underlying instrument");
            this.Field(i => i.UnderlyingSedol, true).Description("Sedol of the underlying");
            this.Field(i => i.UnderlyingIsin, true).Description("Isin of the underlying");
            this.Field(i => i.UnderlyingFigi, true).Description("Figi of the underlying");
            this.Field(i => i.UnderlyingCusip, true).Description("Cusip of the underlying");
            this.Field(i => i.UnderlyingLei, true).Description("Lei of the underlying");
            this.Field(i => i.UnderlyingExchangeSymbol, true).Description("Exchange symbol of the underlying");
            this.Field(i => i.UnderlyingBloombergTicker, true).Description("Bloomberg ticker of the underlying");
            this.Field(i => i.UnderlyingClientIdentifier, true).Description("Client Identifier of the underlying");
        }
Example #38
0
 static RepositoryFactory()
 {
     marketRepository     = new EFMarketRepository();
     currencyRepository   = new EFCurrencyRepository();
     assetRepository      = new EFAssetRepository();
     timeframeRepository  = new EFTimeframeRepository();
     quotationRepository  = new EFQuotationRepository();
     priceRepository      = new EFPriceRepository();
     simulationRepository = new EFSimulationRepository();
     analysisRepository   = new EFAnalysisRepository();
     trendlineRepository  = new EFTrendlineRepository();
 }
 public UserActivitiesController()
 {
     this._IOrganizationRepository = new OrganizationRepository(new WorkersInMotionDB());
     this._IJobRepository = new JobRepository(new WorkersInMotionDB());
     this._IGlobalUserRepository = new GlobalUserRepository(new WorkersInMotionDB());
     this._IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
     this._IPlaceRepository = new PlaceRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
     this._ITerritoryRepository = new TerritoryRepository(new WorkersInMotionDB());
     this._IRegionRepository = new RegionRepository(new WorkersInMotionDB());
     this._IUserRepository = new UserRepository(new WorkersInMotionDB());
     this._IPORepository = new PORepository(new WorkersInMotionDB());
 }
Example #40
0
 public MyCompanyController(WorkersInMotionDB context)
 {
     this._IUserProfileRepository = new UserProfileRepository(context);
     //  this._IGroupRepository = new GroupRepository(context);
     this._IRegionRepository     = new RegionRepository(context);
     this._ITerritoryRepository  = new TerritoryRepository(context);
     this._IUserRepository       = new UserRepository(context);
     this._IGlobalUserRepository = new GlobalUserRepository(context);
     this._IOrganizationSubscriptionRepository = new OrganizationSubscriptionRepository(context);
     this._IOrganizationRepository             = new OrganizationRepository(context);
     this._IUserSubscriptionRepository         = new UserSubscriptionRepository(context);
     this._IMarketRepository = new MarketRepository(context);
 }
 public OrganizationController(WorkersInMotionDB context)
 {
     this._IOrganizationRepository = new OrganizationRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
     this._IUserRepository = new UserRepository(context);
     this._IGlobalUserRepository = new GlobalUserRepository(context);
     this._IRegionRepository = new RegionRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     //  this._IGroupRepository = new GroupRepository(context);
     this._IOrganizationSubscriptionRepository = new OrganizationSubscriptionRepository(context);
     this._IUserSubscriptionRepository = new UserSubscriptionRepository(context);
     this._IMarketRepository = new MarketRepository(context);
 }
Example #42
0
 public DiscountController(
     IDiscountRepository discountRepository,
     IRestaurantRepository restaurantRepository,
     IAreaRepository areaRepository,
     ICategoryRepository categoryRepository,
     IMarketRepository marketRepository)
 {
     _discountRepository   = discountRepository;
     _restaurantRepository = restaurantRepository;
     _areaRepository       = areaRepository;
     _categoryRepository   = categoryRepository;
     _marketRepository     = marketRepository;
 }
Example #43
0
 // GET: Api
 public ApiController(IDiscountRepository _DiscountRepository, IRestaurantRepository _RestaurantRepository, IAreaRepository _AreaRepository, ICategoryRepository _CategoryRepository, IMarketRepository _MarketRepository, IBoxRepository _BoxRepository, IProjectRepository _ProjectRepository, ITableRepository _TableRepository, IOrderRepository _OrderRepository, IExtendRepository _ExtendRepository)
 {
     DiscountRepository   = _DiscountRepository;
     RestaurantRepository = _RestaurantRepository;
     AreaRepository       = _AreaRepository;
     CategoryRepository   = _CategoryRepository;
     MarketRepository     = _MarketRepository;
     BoxRepository        = _BoxRepository;
     ProjectRepository    = _ProjectRepository;
     TableRepository      = _TableRepository;
     OrderRepository      = _OrderRepository;
     ExtendRepository     = _ExtendRepository;
 }
 public AdminController(IExchangeRepository repo,
                        IMarketRepository marketRepository,
                        ICurrencyRepository currencyRepository,
                        IExchangeCurrencyRepository exchangeCurrencyRepository,
                        IExchangeMarketRepository exchangeMarketRepository)
 {
     _repo                       = repo;
     _marketRepository           = marketRepository;
     _currencyRepository         = currencyRepository;
     _exchangeCurrencyRepository = exchangeCurrencyRepository;
     _exchangeMarketRepository   = exchangeMarketRepository;
     _httpClient                 = new HttpClient();
 }
 public CustomerViewController(WorkersInMotionDB context)
 {
     this._IOrganizationRepository = new OrganizationRepository(context);
     this._IUserRepository = new UserRepository(context);
     this._IOrganizationSubscriptionRepository = new OrganizationSubscriptionRepository(context);
     this._IUserSubscriptionRepository = new UserSubscriptionRepository(context);
     this._IPlaceRepository = new PlaceRepository(context);
     this._IPeopleRepository = new PeopleRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
     this._IRegionRepository = new RegionRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IGlobalUserRepository = new GlobalUserRepository(context);
 }
 public MyCompanyController()
 {
     this._IUserProfileRepository = new UserProfileRepository(new WorkersInMotionDB());
     //  this._IGroupRepository = new GroupRepository(new WorkersInMotionContext());
     this._IRegionRepository = new RegionRepository(new WorkersInMotionDB());
     this._ITerritoryRepository = new TerritoryRepository(new WorkersInMotionDB());
     this._IUserRepository = new UserRepository(new WorkersInMotionDB());
     this._IGlobalUserRepository = new GlobalUserRepository(new WorkersInMotionDB());
     this._IOrganizationSubscriptionRepository = new OrganizationSubscriptionRepository(new WorkersInMotionDB());
     this._IOrganizationRepository = new OrganizationRepository(new WorkersInMotionDB());
     this._IUserSubscriptionRepository = new UserSubscriptionRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
     this._IJobRepository = new JobRepository(new WorkersInMotionDB());
 }
 public StoreVisitController(WorkersInMotionDB context)
 {
     this._IOrganizationRepository = new OrganizationRepository(context);
     this._IPlaceRepository = new PlaceRepository(context);
     this._IPeopleRepository = new PeopleRepository(context);
     this._IMarketRepository = new MarketRepository(context);
     this._IUserProfileRepository = new UserProfileRepository(context);
     this._IRegionRepository = new RegionRepository(context);
     this._ITerritoryRepository = new TerritoryRepository(context);
     this._IJobRepository = new JobRepository(context);
     this._IUserRepository = new UserRepository(context);
     this._IGlobalUserRepository = new GlobalUserRepository(context);
     this._IPORepository = new PORepository(context);
 }
 public RegionController()
 {
     this._IRegionRepository = new RegionRepository(new WorkersInMotionDB());
     this._ITerritoryRepository = new TerritoryRepository(new WorkersInMotionDB());
     this._IMarketRepository = new MarketRepository(new WorkersInMotionDB());
 }
Example #49
0
        //public void Analyze(string symbol, bool fromScratch)
        //{
        //    analysis = new Analysis(symbol, Type);
        //    /* Prepare instance. */
        //    if (!DebugMode)
        //    {
        //        EnsureRepositories();
        //        LoadParameters(symbol);
        //    };
        //    /* Fetch the proper data items and start index.
        //     * The range of data to be analyzed depends on the [fromScratch] parameter
        //     * and the dates of last quotation and last analysis item.
        //     */
        //    var startIndex = 0;
        //    if (fromScratch)
        //    {
        //        LoadDataSets(symbol);
        //    }
        //    else
        //    {
        //        var lastDates = _dataService.GetSymbolLastItems(symbol, Type.TableName());
        //        //Check if analysis is up-to-date. If it is true, leave this method and run it again for the next symbol.
        //        if (lastDates.IsUpToDate()) return;
        //        if (lastDates.LastAnalysisItem == null)
        //        {
        //            LoadDataSets(symbol);
        //        }
        //        else
        //        {
        //            LoadDataSets(symbol, (DateTime)lastDates.LastAnalysisItem, Slow + 1);
        //            startIndex = FindIndex((DateTime)lastDates.LastAnalysisItem);
        //        }
        //    }
        //    //Set previous Macd (it is used to speed up calculation and need to be
        //    //set here to avoid NullException for the first item).
        //    if (startIndex > 0) previousMacd = Items[startIndex - 1].Macd;
        //    //Save info about this analysis.
        //    analysis.FirstItemDate = Items[startIndex].Date;
        //    analysis.LastItemDate = Items[Items.Length - 1].Date;
        //    analysis.AnalyzedItems = Items.Length - startIndex + 1;
        //    //Iterate through all items and calculate Macd;
        //    for (var i = startIndex; i < Items.Length; i++)
        //    {
        //        AnalyzeMacd(i, fromScratch);
        //    }
        //    //Insert info about this analysis to the database.
        //    analysis.AnalysisEnd = DateTime.Now;
        //    _dataService.AddAnalysisInfo(analysis);
        //}
        public void EnsureRepositories()
        {
            //Check if DateRepository is appended.
            if (_dataService == null)
            {
                _dataService = AnalysisDataServiceFactory.Instance().GetService();
            }

            //Check if FXRepository is appended.
            if (_marketRepository == null)
            {
                _marketRepository = RepositoryFactory.GetMarketRepository();
            }
        }
Example #50
0
 static RepositoryFactory()
 {
     MarketRepository = new EFMarketRepository();
     DataRepository = new EFDataRepository();
 }
Example #51
0
 private MarketService(IMarketRepository repository)
 {
     _repository = repository;
 }
Example #52
0
 public void injectRepository(IMarketRepository repository)
 {
     _repository = repository;
 }
Example #53
0
 public MarketController(IMarketRepository marketRepository, IETagGenerator etagGenerator)
 {
     _marketRepository = marketRepository;
 }