private void PriceUpdateHandler(IPriceService sender, uint instrumentID, IPrices prices) { Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, (Action) delegate() { Instruments[(int)instrumentID].UpdatePrices(prices); }); }
public PriceCalculator(IPriceService priceService, IDiscountsService discountsService, IEnumerable <ItemId> oldItemsIds) { _priceService = priceService; _discountsService = discountsService; _oldItems = oldItemsIds.ToList(); }
public NotificationFacade(IPriceService priceService, IHouseService houseService, IUserService userService, IEmailService emailService) { _priceService = priceService; _houseService = houseService; _userService = userService; _emailSerice = emailSerice; }
public void SetUp() { _host = new Host <TradeServiceStartup>(); _app = _host.Build(); _app.Start(); _configuration = AppCore.Instance.Get <IServiceConfiguration>(); var jsonSettings = new AppJsonSerializer(); var jsonSerializer = JsonSerializer.Create(jsonSettings); AppCore.Instance.ObjectProvider.Configure(conf => conf.For <JsonSerializerSettings>().Use(jsonSettings)); AppCore.Instance.ObjectProvider.Configure(conf => conf.For <JsonSerializer>().Use(jsonSerializer)); _traderToken = ApiServiceBuilder <IUserService> .Build("http://localhost:8080") .Create() .Login(new Credentials() { Username = "******", Password = "******" }).Result; _tradeClient = ApiServiceBuilder <ITradeService> .Build("http://localhost:8080") .AddAuthorizationHeader(() => _traderToken.Digest) .Create(); _priceClient = AppCore.Instance.GetService <IPriceService>(); Task.Delay(1000); var publisher = AppCore.Instance.Get <IPublisher>(); publisher.Stop().Wait(); }
public ProductController( IPromotionService promotionService, IContentLoader contentLoader, IPriceService priceService, ICurrentMarket currentMarket, CurrencyService currencyservice, IRelationRepository relationRepository, AppContextFacade appContext, UrlResolver urlResolver, FilterPublished filterPublished, LanguageResolver languageResolver, IsInEditModeAccessor isInEditModeAccessor) { _promotionService = promotionService; _contentLoader = contentLoader; _priceService = priceService; _currentMarket = currentMarket; _currencyservice = currencyservice; _relationRepository = relationRepository; _appContext = appContext; _urlResolver = urlResolver; _languageResolver = languageResolver; _isInEditMode = isInEditModeAccessor(); _filterPublished = filterPublished; }
public ProductController( IPromotionEntryService promotionEntryService, IContentLoader contentLoader, IPriceService priceService, ICurrentMarket currentMarket, CurrencyService currencyservice, IRelationRepository relationRepository, AppContextFacade appContext, UrlResolver urlResolver, FilterPublished filterPublished, Func <CultureInfo> preferredCulture, Func <bool> isInEditMode) { _promotionEntryService = promotionEntryService; _contentLoader = contentLoader; _priceService = priceService; _currentMarket = currentMarket; _currencyservice = currencyservice; _relationRepository = relationRepository; _appContext = appContext; _urlResolver = urlResolver; _preferredCulture = preferredCulture(); _isInEditMode = isInEditMode(); _filterPublished = filterPublished; }
public CommerceSearchService(ICurrentMarket currentMarket, ICurrencyService currencyService, LanguageResolver languageResolver, IClient findClient, IFacetRegistry facetRegistry, IFindUIConfiguration findUIConfiguration, ReferenceConverter referenceConverter, IContentRepository contentRepository, IPriceService priceService, IPromotionService promotionService, ICurrencyService currencyservice, IContentLoader contentLoader ) { _currentMarket = currentMarket; _currencyService = currencyService; _languageResolver = languageResolver; _findClient = findClient; _facetRegistry = facetRegistry; _findUIConfiguration = findUIConfiguration; //_findClient.Personalization().Refresh(); _referenceConverter = referenceConverter; _contentRepository = contentRepository; _priceService = priceService; _promotionService = promotionService; _currencyservice = currencyservice; _contentLoader = contentLoader; }
public OrderValidatorService( ILogService log, IDbFactory dbFactory, IEmailService emailService, ISettingsService settings, IOrderHistoryService orderHistory, ISystemActionService actionService, IPriceService priceService, IHtmlScraperService htmlScraper, IAddressService addressService, AddressDTO returnAddress, IShipmentApi stampsRateApi, ITime time, CompanyDTO company) { _log = log; _dbFactory = dbFactory; _time = time; _emailService = emailService; _settings = settings; _orderHistory = orderHistory; _actionService = actionService; _priceService = priceService; _htmlScraper = htmlScraper; _addressService = addressService; _returnAddress = returnAddress; _stampsRateApi = stampsRateApi; _company = company; }
public CalculatePriceCommand(ICalculatePriceViewModel viewModel, IPriceService priceService) { _viewModel = viewModel; _priceService = priceService; _viewModel.PropertyChanged += ViewModel_PropertyChanged; }
public CartService( IOrderRepository orderRepository, IOrderGroupFactory orderGroupFactory, IPriceService priceService, IOrderGroupCalculator orderGroupCalculator, UrlResolver urlResolver) { if (orderRepository == null) { throw new ArgumentNullException(nameof(orderRepository)); } if (orderGroupFactory == null) { throw new ArgumentNullException(nameof(orderGroupFactory)); } if (priceService == null) { throw new ArgumentNullException(nameof(priceService)); } if (orderGroupCalculator == null) { throw new ArgumentNullException(nameof(orderGroupCalculator)); } if (urlResolver == null) { throw new ArgumentNullException(nameof(urlResolver)); } this._orderRepository = orderRepository; this._orderGroupFactory = orderGroupFactory; this._priceService = priceService; this._orderGroupCalculator = orderGroupCalculator; this._urlResolver = urlResolver; }
public SaveManualSecurityPriceCommand( SystemSecurityPricesViewModel sysSecurityPricesVM, IPriceService priceService) { _sysSecurityPricesVM = sysSecurityPricesVM; _priceService = priceService; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IPriceService priceService) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseSwagger(); app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "CryptoService v1")); } app.UseCors(CorsPolicy); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); // This is not the best place or the best way to update the list of valid coins. // This resulted from (incorrectly) assuming only three types of coins should be supported // during the design stage. Going forward with this now due to time constraints. CoinStore.AddCoinsToStore(priceService.GetAllValidCoins().GetAwaiter().GetResult()); }
public PricePublisher(IPriceService priceService, PriceServiceConfiguration configuration) { _rand = new Random(); _priceService = priceService; _configuration = configuration; var accessTokenRetrieverFactory = new AccessTokenRetrieverFactory(); var tokenRetriever = accessTokenRetrieverFactory.GetToken( "internal", "idkfa", _configuration.Identity, AzurePlaygroundConstants.Auth.ClientReferenceToken, AzurePlaygroundConstants.Api.Trade, _configuration.Key ); _priceHubService = SignalRServiceBuilder <Price, PriceRequest> .Create() .Build(new PriceRequest((p) => true), (opts) => { opts.AccessTokenProvider = () => Task.FromResult(tokenRetriever()); }); _priceHubService.Connect(Scheduler.Default, 2000); _cleanUp = new CompositeDisposable(); }
public CatalogEntryViewModelFactory( IPromotionService promotionService, IContentLoader contentLoader, IPriceService priceService, ICurrentMarket currentMarket, CurrencyService currencyservice, IRelationRepository relationRepository, UrlResolver urlResolver, FilterPublished filterPublished, LanguageResolver languageResolver, IStoreService storeService, IProductService productService, IQuickOrderService quickOrderService, IInventoryService inventoryService, IWarehouseRepository warehouseRepository, IDatabaseMode databaseMode) { _promotionService = promotionService; _contentLoader = contentLoader; _priceService = priceService; _currentMarket = currentMarket; _currencyservice = currencyservice; _relationRepository = relationRepository; _urlResolver = urlResolver; _filterPublished = filterPublished; _languageResolver = languageResolver; _storeService = storeService; _productService = productService; _quickOrderService = quickOrderService; _inventoryService = inventoryService; _warehouseRepository = warehouseRepository; _databaseMode = databaseMode; }
public PricelistService() { dataService = new DataService(); optionService = new OptionService(); priceService = new PriceService(dataService); dataService.DataBaseContext.Database.CommandTimeout = 120; }
public ProductController( ILogger <FlatController> logger, IPriceService priceService) { _logger = logger; _priceService = priceService; }
public ProductController( IPromotionService promotionService, IContentLoader contentLoader, IPriceService priceService, ICurrentMarket currentMarket, CurrencyService currencyservice, IRelationRepository relationRepository, AppContextFacade appContext, UrlResolver urlResolver, FilterPublished filterPublished, PreferredCultureAccessor preferredCultureAccessor, IsInEditModeAccessor isInEditModeAccessor, IQuickOrderService quickOrderService) { _promotionService = promotionService; _contentLoader = contentLoader; _priceService = priceService; _currentMarket = currentMarket; _currencyservice = currencyservice; _relationRepository = relationRepository; _appContext = appContext; _urlResolver = urlResolver; _preferredCulture = preferredCultureAccessor(); _isInEditMode = isInEditModeAccessor(); _filterPublished = filterPublished; _quickOrderService = quickOrderService; }
public PriceController( IPriceService priceService, IMapper mapper) { _priceService = priceService; _mapper = mapper; }
/// <summary> /// Creates a new instance of <see cref="SimulationService"/> /// </summary> /// <param name="strategyService"></param> /// <param name="indicatorsService"></param> /// <param name="companyService"></param> /// <param name="priceService"></param> public SimulationService(IStrategyService strategyService, IIndicatorsService indicatorsService, ICompanyService companyService, IPriceService priceService) { _strategyService = strategyService; _indicatorsService = indicatorsService; _companyService = companyService; _priceService = priceService; }
public void Dispose() { priceService = null; scanService = null; totalcalculationService = null; calculationService = null; }
public SystemSecurityPricesViewModel(IPriceService priceService, IStaticReferences staticReferences) { _priceService = priceService; _staticReferences = staticReferences; SaveSecurityPriceCommand = new SaveSecurityPriceCommand(this, priceService); SaveManualSecurityPriceCommand = new SaveManualSecurityPriceCommand(this, priceService); AssetSelectionChangedCommand = new ActionCommand(ChangeAssetClassCommand); SecurityPriceLineChartYAxis = new ChartValues <decimal>(); SecurityPriceLineChartXAxis = new string[1]; _cmbAssetClasses = _staticReferences.GetAllAssetClasses().Where(ac => ac.Name != "Cash" && ac.Name != "FXForward").Select(ac => ac.Name).ToList(); _allSecuritiesList = _staticReferences.GetAllSecurities(includeRates: true); if (_cmbAssetClasses.Count != 0) { AssetClass = _cmbAssetClasses[0]; _securitiesList = _allSecuritiesList.Where(s => s.AssetClass.Name == AssetClass).ToList(); if (_securitiesList.Count != 0) { _SelectedSecurity = _securitiesList[0]; Load(); } } }
public SheetMusicVariantRepository( IContentLoader contentLoader, IRelationRepository relationRepository, IPriceService priceService, UrlResolver urlResolver) { if (contentLoader == null) { throw new ArgumentNullException(nameof(contentLoader)); } if (relationRepository == null) { throw new ArgumentNullException(nameof(relationRepository)); } if (priceService == null) { throw new ArgumentNullException(nameof(priceService)); } if (urlResolver == null) { throw new ArgumentNullException(nameof(urlResolver)); } this._contentLoader = contentLoader; this._relationRepository = relationRepository; this._priceService = priceService; this._urlResolver = urlResolver; }
// ToDo: move to .ctor //Injected<ICatalogSystem> _cat; // just to demo //Injected<ReferenceConverter> _refConv; //Injected<PricingLoader> _priceLoader; public VariationController( IContentLoader contentLoader , UrlResolver urlResolver , AssetUrlResolver assetUrlResolver , ThumbnailUrlResolver thumbnailUrlResolver // use this in node listing instead , IPriceService priceService , IPriceDetailService pricedetailService , ICurrentMarket currentMarket , IPromotionEngine promotionEngine , IOrderRepository orderRepository , IOrderGroupFactory orderGroupFactory , ILineItemCalculator lineItemCalculator , ILineItemValidator lineItemValidator , IPlacedPriceProcessor placedPriceProcessor , ICurrentMarket currentMarketService , IInventoryService inventoryService , IWarehouseRepository warehouseRepository , MyPriceCalculator myPriceCalculator ) : base(contentLoader, urlResolver, assetUrlResolver, thumbnailUrlResolver, currentMarket) { _priceService = priceService; _priceDetailService = pricedetailService; //_currentMarket2 = currentMarket; _promotionEngine = promotionEngine; _orderRepository = orderRepository; _orderGroupFactory = orderGroupFactory; _lineItemCalculator = lineItemCalculator; _lineItemValidator = lineItemValidator; _placedPriceProcessor = placedPriceProcessor; _currentMarketService = currentMarketService; _inventoryService = inventoryService; _warehouseRepository = warehouseRepository; _myPriceCalculator = myPriceCalculator; }
public ConsumerServicesBackgroundProcessor( IAccountService accountService, IRefundClaimant refundClaimant, IDepositConfirmationService depositConfirmationService, IGasPriceService gasPriceService, IBlockProcessor blockProcessor, IDepositDetailsRepository depositRepository, IConsumerNotifier consumerNotifier, ILogManager logManager, IPriceService priceService, bool useDepositTimer = false, IEthJsonRpcClientProxy?ethJsonRpcClientProxy = null, uint depositTimer = 10000) { _accountService = accountService; _refundClaimant = refundClaimant; _depositConfirmationService = depositConfirmationService; _gasPriceService = gasPriceService; _blockProcessor = blockProcessor; _consumerNotifier = consumerNotifier; _priceService = priceService; _depositRepository = depositRepository; _useDepositTimer = useDepositTimer; _ethJsonRpcClientProxy = ethJsonRpcClientProxy; _depositTimerPeriod = depositTimer; _logger = logManager.GetClassLogger(); _gasPriceService.UpdateGasPriceAsync(); _priceService.UpdateAsync(_currencies); }
public ProductAvailabletyTest(IProductService productService, IPriceService priceService, IStockService stockService, IUserService userService) { _productService = productService; _priceService = priceService; _stockService = stockService; _userService = userService; }
public OrderService(IUnitOfWork unitOfWork, IMyLogger logger, ICache cache, IPriceService priceController) { _unitOfWork = unitOfWork; this.logger = logger; this.cache = cache; this.priceController = priceController; }
public IntegrationTest() { priceService = new PriceService(); scanService = new ScanService(); calculationService = new CalculationService(); totalcalculationService = new TotalCalculatorService(calculationService); }
public PricingService(IPriceService priceService, ICurrentMarket currentMarket, ICurrencyService currencyService) { _priceService = priceService; _currentMarket = currentMarket; _currencyService = currencyService; }
public AppointmentController(IAppointmentService appointmentService, IUserService userService, IPriceService priceService, IPatientService patientService) { _appointmentService = appointmentService; _userService = userService; _priceService = priceService; _patientService = patientService; }
/// <summary> /// Creates a new instance of <see cref="DashboardController"/> /// </summary> /// <param name="transactionsService"></param> /// <param name="walletService"></param> /// <param name="indicatorsService"></param> /// <param name="priceService"></param> public DashboardController(ITransactionsService transactionsService, IWalletService walletService, IIndicatorsService indicatorsService, IPriceService priceService) { _transactionsService = transactionsService; _walletService = walletService; _indicatorsService = indicatorsService; _priceService = priceService; }
public ProjectController(IProjectService projectService, IUnitOfWorkAsync unitOfWork, IAreaService areaService, IProjectTypeService projectTypeService, IPriceService priceService) { _projectService = projectService; _unitOfWork = unitOfWork; _AreaService = areaService; _ProjectTypeService = projectTypeService; _PriceService = priceService; }
public PricingService(IPriceService priceService, ICurrentMarket currentMarket, ICurrencyService currencyService, AppContextFacade appContext) { _priceService = priceService; _currentMarket = currentMarket; _currencyService = currencyService; _appContext = appContext; }
public CatalogIndexer() { _priceService = ServiceLocator.Current.GetInstance<IPriceService>(); _contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>(); _promotionService = ServiceLocator.Current.GetInstance<IPromotionService>(); _referenceConverter = ServiceLocator.Current.GetInstance<ReferenceConverter>(); _assetUrlResolver = ServiceLocator.Current.GetInstance<AssetUrlResolver>(); _relationRepository = ServiceLocator.Current.GetInstance<IRelationRepository>(); _appContext = ServiceLocator.Current.GetInstance<AppContextFacade>(); _log = LogManager.GetLogger(typeof(CatalogIndexer)); }
public OrdersController(IUnitOfWork uow, IFormService formService, IFieldService fieldService, IValueService valueService, IOrderService orderService, IPriceService priceService,IProductService productService) { _uow = uow; _formService = formService; _fieldService = fieldService; _valueService = valueService; _orderService = orderService; _priceService = priceService; _productService = productService; }
public PriceUpdateViewModel(IPriceService priceService) { _priceUpdateService = priceService; _uiUpdateTimer = new Timer(); _dispatcher = Dispatcher.CurrentDispatcher; _bgWorkerTask = Task.Factory.StartNew(()=> { }); StartCommand = new DelegatedCommand<object>(StartCommand_Executed, StartCommand_CanExecuted); StopCommand = new DelegatedCommand<object>(StopCommand_Executed, StopCommand_CanExecuted); PricesUI = new ObservableCollection<Price>(); _lastestPrices = new ConcurrentDictionary<uint, Price>(); }
public EntryImporter(IContentRepository contentRepository, ReferenceConverter referenceConverter, IContentTypeRepository typeRepository, ILogger logger, UrlResolver urlResolver, IWarehouseRepository warehouseRepository, IWarehouseInventoryService inventoryService, IPriceService priceService) : base(contentRepository, referenceConverter, typeRepository, logger) { _urlResolver = urlResolver; _warehouseRepository = warehouseRepository; _inventoryService = inventoryService; _priceService = priceService; }
/// <summary> /// used to receive updates /// </summary> private void _priceUpdateService_NewPricesArrived(IPriceService sender, uint instrumentID, IPrices prices) { var price = new Price() { AskPx = prices.AskPx, AskQty = prices.AskQty, BidPx = prices.BidPx, BidQty = prices.BidQty, Volume = prices.Volume, LastUpdatedDate = DateTime.Now, InstrumentID = instrumentID }; _bgWorkerTask.ContinueWith(new Action<Task>((t)=>UpdateToLastPrice(price)), TaskContinuationOptions.PreferFairness); }
public SearchDocumentController(IPriceService priceService, IPromotionService promotionService, IContentLoader contentLoader, ReferenceConverter referenceConverter, AssetUrlResolver assetUrlResolver, IRelationRepository relationRepository, AppContextFacade appContext) { _priceService = priceService; _promotionService = promotionService; _contentLoader = contentLoader; _referenceConverter = referenceConverter; _assetUrlResolver = assetUrlResolver; _relationRepository = relationRepository; _appContext = appContext; }
public CatalogIndexer(ICatalogSystem catalogSystem, IPriceService priceService, IInventoryService inventoryService, MetaDataContext metaDataContext, IContentLoader contentLoader, IPromotionService promotionService, ReferenceConverter referenceConverter, AssetUrlResolver assetUrlResolver, IRelationRepository relationRepository, AppContextFacade appContext, ILogger logger) : base(catalogSystem, priceService, inventoryService, metaDataContext) { _priceService = priceService; _contentLoader = contentLoader; _promotionService = promotionService; _referenceConverter = referenceConverter; _assetUrlResolver = assetUrlResolver; _relationRepository = relationRepository; _appContext = appContext; _log = logger; }
public PriceController(ISystemService systemService, IPriceService service) { _systemService = systemService; _service = service; }
protected void Page_Load(object sender, EventArgs e) { this._marketRepository = ServiceLocator.Current.GetInstance<IMarketService>(); this._priceService = ServiceLocator.Current.GetInstance<IPriceService>(); ErrorPanel.Visible = false; if (!IsPostBack) { BindMarkets(); BindPriceTypes(); } }
static void PriceUpdateHandler(IPriceService sender, uint instrumentID, IPrices prices) { Console.WriteLine("{0}: BidPx: {1:#.##}, AskPx: {2:#.##}, BidQty: {3}, AskQty: {4}, Vol: {5}", instrumentID, prices.BidPx, prices.AskPx, prices.BidQty, prices.AskQty, prices.Volume); }
public PriceController(IPriceService priceService, IUnitOfWorkAsync unitOfWork) { _PriceService = priceService; _unitOfWork = unitOfWork; }
public CatalogService(IVirtoCommerceClient apiClient, IPriceService priceService) { _apiClient = apiClient; _priceService = priceService; }
/// <summary> /// Changes the content of our collection of Instruments /// This handler is invoked 20 times a second /// </summary> /// <param name="sender"></param> /// <param name="instrumentID"></param> /// <param name="prices"></param> void PriceUpdateHandler(IPriceService sender, uint instrumentID, IPrices prices) { int instruId = (int)instrumentID; Prices newPrices = (Prices)prices; if (tradeItems.ContainsKey(instruId)) { tradeItemsCollection[instruId].AskPx = newPrices.AskPx; tradeItemsCollection[instruId].AskQty = newPrices.AskQty; tradeItemsCollection[instruId].BidPx = newPrices.BidPx; tradeItemsCollection[instruId].BidQty = newPrices.BidQty; tradeItemsCollection[instruId].Volume = newPrices.Volume; // Also set dirty flag to true tradeItemsCollection[instruId].IsBidPxDirty = true; tradeItemsCollection[instruId].IsAskPxDirty = true; } else { tradeItems.Add((int)instrumentID, (Prices)prices); } }