Esempio n. 1
0
        public void Initialize(string username, string[] servers, ILoggerFactory loggerFactory = null, string authToken = null) 
        {
            _loggerFactory = loggerFactory ?? new DebugLoggerFactory();
            _log = _loggerFactory.Create(typeof(ReactiveTrader));
            _connectionProvider = new ConnectionProvider(username, servers, _loggerFactory);

            var referenceDataServiceClient = new ReferenceDataServiceClient(_connectionProvider, _loggerFactory);
            var executionServiceClient = new ExecutionServiceClient(_connectionProvider);
            var blotterServiceClient = new BlotterServiceClient(_connectionProvider, _loggerFactory);
            var pricingServiceClient = new PricingServiceClient(_connectionProvider, _loggerFactory);
            PricingServiceClient = pricingServiceClient;

            if (authToken != null)
            {
                var controlServiceClient = new ControlServiceClient(new AuthTokenProvider(authToken), _connectionProvider, _loggerFactory);
                _controlRepository = new ControlRepository(controlServiceClient);
            }

            PriceLatencyRecorder = new PriceLatencyRecorder();
            var concurrencyService = new ConcurrencyService();

            var tradeFactory = new TradeFactory();
            var executionRepository = new ExecutionRepository(executionServiceClient, tradeFactory, concurrencyService);
            var priceFactory = new PriceFactory(executionRepository, PriceLatencyRecorder);
            var priceRepository = new PriceRepository(pricingServiceClient, priceFactory, _loggerFactory);
            var currencyPairUpdateFactory = new CurrencyPairUpdateFactory(priceRepository);
            TradeRepository = new TradeRepository(blotterServiceClient, tradeFactory);
            ReferenceData = new ReferenceDataRepository(referenceDataServiceClient, currencyPairUpdateFactory);
        }
        public void Initialize(string username, string[] servers, ILoggerFactory loggerFactory = null, string authToken = null)
        {
            _loggerFactory      = loggerFactory ?? new DebugLoggerFactory();
            _log                = _loggerFactory.Create(typeof(ReactiveTrader));
            _connectionProvider = new ConnectionProvider(username, servers, _loggerFactory);

            var referenceDataServiceClient = new ReferenceDataServiceClient(_connectionProvider, _loggerFactory);
            var executionServiceClient     = new ExecutionServiceClient(_connectionProvider);
            var blotterServiceClient       = new BlotterServiceClient(_connectionProvider, _loggerFactory);
            var pricingServiceClient       = new PricingServiceClient(_connectionProvider, _loggerFactory);

            if (authToken != null)
            {
                var controlServiceClient = new ControlServiceClient(new AuthTokenProvider(authToken), _connectionProvider, _loggerFactory);
                _controlRepository = new ControlRepository(controlServiceClient);
            }

            PriceLatencyRecorder = new PriceLatencyRecorder();
            var concurrencyService = new ConcurrencyService();

            var tradeFactory              = new TradeFactory();
            var executionRepository       = new ExecutionRepository(executionServiceClient, tradeFactory, concurrencyService);
            var priceFactory              = new PriceFactory(executionRepository, PriceLatencyRecorder);
            var priceRepository           = new PriceRepository(pricingServiceClient, priceFactory, _loggerFactory);
            var currencyPairUpdateFactory = new CurrencyPairUpdateFactory(priceRepository);

            TradeRepository = new TradeRepository(blotterServiceClient, tradeFactory);
            ReferenceData   = new ReferenceDataRepository(referenceDataServiceClient, currencyPairUpdateFactory);
        }
Esempio n. 3
0
 public AccessService(IAccessRepository accessRepository, IAccessLogRepository accessLogRepository, IDeviceRepository deviceRepository, IControlRepository controlRepository, IUnitOfWork unitOfWork)
 {
     this._accessLogRepository = accessLogRepository;
     this._accessRepository    = accessRepository;
     this._deviceRepository    = deviceRepository;
     this._controlRepository   = controlRepository;
     this._unitOfWork          = unitOfWork;
 }
Esempio n. 4
0
 public HomeService(IGlobalSettingRepository globalSettingRepository, ITestDataRepository testDataRepository, IControlRepository controlRepository)
 {
     this.GlobalSettingRepository = globalSettingRepository;
     this.TestDataRepository      = testDataRepository;
     this.ControlRepository       = controlRepository;
     this.AddDisposableObject(globalSettingRepository);
     this.AddDisposableObject(testDataRepository);
     this.AddDisposableObject(controlRepository);
 }
Esempio n. 5
0
 public HomeService(IGlobalSettingRepository globalSettingRepository, ITestDataRepository testDataRepository, IControlRepository controlRepository)
 {
     this.GlobalSettingRepository = globalSettingRepository;
     this.TestDataRepository = testDataRepository;
     this.ControlRepository = controlRepository;
     this.AddDisposableObject(globalSettingRepository);
     this.AddDisposableObject(testDataRepository);
     this.AddDisposableObject(controlRepository);
 }
Esempio n. 6
0
 public ControlService(IControlRepository controlRepository, 
                       IControlTypeRepository controlTypeRepository,
                       IControlPropertyRepository controlPropertyRepository)
 {
     this.ControlRepository = controlRepository;
     this.ControlTypeRepository = controlTypeRepository;
     this.ControlPropertyRepository = controlPropertyRepository;
     this.AddDisposableObject(controlRepository);
     this.AddDisposableObject(ControlTypeRepository);
     this.AddDisposableObject(ControlPropertyRepository);
 }
Esempio n. 7
0
 public ControlService(IControlRepository controlRepository,
                       IControlTypeRepository controlTypeRepository,
                       IControlPropertyRepository controlPropertyRepository)
 {
     this.ControlRepository         = controlRepository;
     this.ControlTypeRepository     = controlTypeRepository;
     this.ControlPropertyRepository = controlPropertyRepository;
     this.AddDisposableObject(controlRepository);
     this.AddDisposableObject(ControlTypeRepository);
     this.AddDisposableObject(ControlPropertyRepository);
 }
Esempio n. 8
0
 public ControlBL(IControlRepository _controlRepository)
 {
     this._controlRepository = _controlRepository;
 }
 public UserPermissionPartialController(IUserPermissionRepository userPermissionRepository,
                                        IControlRepository controlRepository)
 {
     this.userPermissionRepository = userPermissionRepository;
     this.controlRepository        = controlRepository;
 }
 public UserPermissionPartialController()
 {
     this.userPermissionRepository = new UserPremissionRepository();
     this.controlRepository        = new ControlRepository();
 }
Esempio n. 11
0
 public ControlService(IControlRepository repository)
 {
     this._repository = repository;
 }
 public ControlPartialController(IControlRepository controlRepository)
 {
     this.controlRepository = controlRepository;
 }
 public ControlPartialController()
 {
     this.controlRepository = new ControlRepository();
 }
Esempio n. 14
0
 public ControlService(IControlRepository controlRepository, IUnitOfWork unitOfWork)
 {
     this._controlRepository = controlRepository;
     this._unitOfWork        = unitOfWork;
 }
 public ControlManager(IControlRepository _controlRepository)
 {
     this._controlRepository = _controlRepository;
 }