public TipViewModel(IMvxNavigationService navigationService, ICalculationService calculationService, IMonkeyService monkeyService) { _calculationService = calculationService; CommandShowList = new MvxAsyncCommand(asyc => CommandShowListFunction()); _navigationService = navigationService; _monkeyService = monkeyService; }
public GameController( ISessionService sessionService, ICalculationService calculationService) { this.sessionService = sessionService; this.calculationService = calculationService; }
public void Dispose() { priceService = null; scanService = null; totalcalculationService = null; calculationService = null; }
public SecondTabViewModel(ICalculationService calculationService) { _calculationService = calculationService; _subTotal = 100; _generosity = 10; Recalcuate(); }
public ViewModule(IOptions <AppConfig> config, IExternalService externalService, ICalculationService calculationService) { _config = config.Value; _externalService = externalService; _calculationService = calculationService; Get("/", args => View["Index", new IndexModel()]); Get("/getAirports", async(x, ct) => { var indexModel = new IndexModel(Request.Query as DynamicDictionary); var request = this.Bind <GetAirportsRequest>(); var errors = request.Validate(); if (errors.Any()) { indexModel.Errors = errors; } else { await BuildIndexModel(indexModel, request); } return(View["Index", indexModel]); }); }
public CyclicDependencyValidator( IDomainItemLocator domainItemLocator, ICalculationService calculationService) { m_domainItemLocator = domainItemLocator; m_calculationService = calculationService; }
public TipViewModel(ICalculationService calculationService, IMvxNavigationService mvxNavigationService) { _calculationService = calculationService; _mvxNavigationService = mvxNavigationService; MoveToNextPageCommand = new MvxAsyncCommand(() => MoveToNextPage()); ShowTipDetailsCommand = new MvxAsyncCommand <ITipDetails>(ShowTipDetails); }
public FirstViewModel(ICalculationService calculationService) { _calculationService = calculationService; _generosity = 20; _subTotal = 100; Recalc(); }
public PayrollSystemHomePageViewModel(IProcessor processor, ICalculationService calculationService) { _processor = processor; _calculationService = calculationService; OpenFileCommand = new RelayCommand(OpenFile); EmployeeList = new List <Employee>(); }
static void Main(string[] args) { // Strong Type Service Locator ILoggingService loggingService = ServiceLocator.SetLocation(new LoggingService()); loggingService.ExecuteService(); ICalculationService calculationService = ServiceLocator.SetLocation(new CalculationService()); var array = new int[] { 14, 45, 43, 43, 3, 4, 1, 98, 39 }; var sum = calculationService.CalculateSumOfArray(array); System.Console.WriteLine($"Sum: {sum}"); var str = "Hello this is Service Locator Disign Pattern example"; var reversedStr = calculationService.ReverseString(str); System.Console.WriteLine($"Reversed string: {reversedStr}"); System.Console.WriteLine(); System.Console.WriteLine("----------------------------------------------------"); System.Console.WriteLine(); // Generic Type Service Locator GenericServiceLocator genericServiceLocator = new GenericServiceLocator(); IServiceA aService = genericServiceLocator.GetService <IServiceA>(); aService.Execute(); IServiceB bService = genericServiceLocator.GetService <IServiceB>(); bService.Execute(); }
public CalculationServiceTests() { ISettingsService settingsService = new SettingsService(); IParserService parserService = new ParserService(settingsService); CalculationService = new CalculationService(settingsService, parserService); }
public CalculatorViewModel(ICalculationService calculationService) { _calculationService = calculationService; LoanAmount = 10000; MonthlyInstallment = 1000; InterestRate = 4; }
public DatasetDefinitionFieldChangesProcessor( IFeatureToggle featureToggle, IDatasetsApiClient datasetsApiClient, ICalcsResiliencePolicies resiliencePolicies, ILogger logger, ICalculationService calculationService, ICalculationsRepository calculationsRepository, IMapper mapper) { Guard.ArgumentNotNull(featureToggle, nameof(featureToggle)); Guard.ArgumentNotNull(datasetsApiClient, nameof(datasetsApiClient)); Guard.ArgumentNotNull(resiliencePolicies, nameof(resiliencePolicies)); Guard.ArgumentNotNull(logger, nameof(logger)); Guard.ArgumentNotNull(calculationService, nameof(calculationService)); Guard.ArgumentNotNull(calculationsRepository, nameof(calculationsRepository)); Guard.ArgumentNotNull(resiliencePolicies?.CalculationsRepository, nameof(resiliencePolicies.CalculationsRepository)); Guard.ArgumentNotNull(resiliencePolicies?.DatasetsApiClient, nameof(resiliencePolicies.DatasetsApiClient)); Guard.ArgumentNotNull(mapper, nameof(mapper)); _featureToggle = featureToggle; _datasetsApiClient = datasetsApiClient; _datasetsApiClientPolicy = resiliencePolicies.DatasetsApiClient; _logger = logger; _calculationService = calculationService; _calculationsRepository = calculationsRepository; _calculationsRepositoryPolicy = resiliencePolicies.CalculationsRepository; _mapper = mapper; _typeIdentifierGenerator = new VisualBasicTypeIdentifierGenerator(); }
public CalculationsController( ICalculationService calcsService, ICalculationsSearchService calcsSearchService, IPreviewService previewService, IBuildProjectsService buildProjectsService, IQueueReIndexSpecificationCalculationRelationships calculationRelationships, ICalculationFundingLineQueryService calculationFundingLineQueryService, ICodeContextCache codeContextCache) { Guard.ArgumentNotNull(calcsService, nameof(calcsService)); Guard.ArgumentNotNull(calcsSearchService, nameof(calcsSearchService)); Guard.ArgumentNotNull(previewService, nameof(previewService)); Guard.ArgumentNotNull(buildProjectsService, nameof(buildProjectsService)); Guard.ArgumentNotNull(calculationRelationships, nameof(calculationRelationships)); Guard.ArgumentNotNull(calculationFundingLineQueryService, nameof(calculationFundingLineQueryService)); Guard.ArgumentNotNull(codeContextCache, nameof(codeContextCache)); _calcsService = calcsService; _previewService = previewService; _calcsSearchService = calcsSearchService; _buildProjectsService = buildProjectsService; _calculationRelationships = calculationRelationships; _calculationFundingLineQueryService = calculationFundingLineQueryService; _codeContextCache = codeContextCache; }
/// <summary> /// Creates a new instance of <see cref="TypedSearchItemViewModelFactory"/> class. /// </summary> /// <param name="calculationService">Service for price calculations.</param> /// <param name="pageUrlRetriever">Retriever for page URLs.</param> /// <param name="homeRepository">Repository representing home page sections.</param> /// <param name="aboutUsRepository">Repository representing about us stories.</param> public TypedSearchItemViewModelFactory(ICalculationService calculationService, IPageUrlRetriever pageUrlRetriever, HomeRepository homeRepository, AboutUsRepository aboutUsRepository) { this.calculationService = calculationService; this.pageUrlRetriever = pageUrlRetriever; this.homeRepository = homeRepository; this.aboutUsRepository = aboutUsRepository; }
public ShoppingCartService(ICalculationService CalculationService) { ShoppingCart = new ShoppingCartItems(); ShoppingCart.Id = Guid.NewGuid(); ShoppingCart.Items = new List <CartItem>(); _calculationService = CalculationService; }
public TipCalViewModel(ICalculationService calculationService) { this._calculationService = calculationService; _generosity = 20; _subTotal = 100; ReCalc(); }
public IntegrationTest() { priceService = new PriceService(); scanService = new ScanService(); calculationService = new CalculationService(); totalcalculationService = new TotalCalculatorService(calculationService); }
public decimal PayBill(DateTime paymentTime, BasePlate[] plates = null) { CalculationStrategy calculationStrategy = this.calculationStrategySelector.GetCalculationStrategy(this.clock.Now, plates); ICalculationService billCalculatorService = this.calculationStrategySelector.GetBillCalculatorStrategy(calculationStrategy); return(billCalculatorService.CalculateTotalPrice(plates)); }
public TipViewModel(ICalculationService calculationService, IMvxNavigationService navigationService) { _calculationService = calculationService; _navigationService = navigationService; ViewSummaryCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <TipSummaryViewModel, TipSummaryNavigationParameters>(new TipSummaryNavigationParameters { SubTotal = SubTotal })); }
public MainWindow() { InitializeComponent(); AddClickEventToButtons(); _calculationService = new CalculationService(); _validatorService = new ValidatorService(); _fileService = new FileService(_validatorService, _calculationService); }
public TipViewModel(ICalculationService calculationService, IMvxNavigationService mvxNavigationService, IDialogService dialogService) : base(mvxNavigationService) { _calculationService = calculationService; _dialogService = dialogService; }
public IndexModel( ILogger <IndexModel> logger, ICalculationService calculationService ) { _logger = logger; _calculationService = calculationService; }
public ChartViewModel(ICalculationService calculationService) { this.calculationService = calculationService; SendDataCommand = new DelegateCommand <StackPanel>(sendDataAction); CalculateDelayCommand = new DelegateCommand <StackPanel>(calculateDelay); IsBusy = false; Delay = new ObservableCollection <DataPoint>(); }
public TipViewModel(ICalculationService calculation) { _calculation = calculation; _subTotal = 100; _generosity = 10; Recalcuate(); }
public BonusPoolService(IEmployeeService employeeService, ICalculationService calculationService, IMappingService mappingService) { _employeeService = employeeService; _calculationService = calculationService; _mappingService = mappingService; }
public ProductController(ICalculationService calculationService, IProductRepository productRepository, IVariantRepository variantRepository, TypedProductViewModelFactory typedProductViewModelFactory) { mCalculationService = calculationService; mProductRepository = productRepository; mVariantRepository = variantRepository; mTypedProductViewModelFactory = typedProductViewModelFactory; }
public CalculationServiceWithBalace( ICalculationService service, ICalculationRepository calculations, IClientBalance balance) { _service = service; _calculations = calculations; _balance = balance; }
static void Main(string[] args) { INodeEndpointProtocolFactory protocolFactory = new NamedPipeProtocolFactory(); ICalculationService client = protocolFactory.WaitForClient <ICalculationService>("localhost/GuardedServiceTest", "CalculationService"); Console.WriteLine("ICalculationService.Add(1, 2) == " + client.Add(1, 2).ToString()); client.Dispose(); Console.ReadLine(); }
public CalculationServiceWithEvent( ICalculationService service, IEventFacade events, ICalculationRepository calculations) { _service = service; _events = events; _calculations = calculations; }
public CalculationController( IAwbUpdateManager awbUpdater, IAdminCalculationPresenter presenter, ICalculationService calculation, IIdentityService identity, IAdminApplicationManager applications, IClientBalanceRepository balances) { _awbUpdater = awbUpdater; _presenter = presenter; _calculation = calculation; _identity = identity; _applications = applications; _balances = balances; }
public TipViewModel(ICalculationService calculationService) { this.calculationService = calculationService; }
public void Setup() { _service = new CalculationService(); }
public MainPageViewModel() { _calculationService = new CalculationService(); }
public TipViewModel(ICalculationService calculation) { _calculation = calculation; }
public MainPageViewModel(ICalculationService calculationService) { _calculationService = calculationService; }
public Presenter(ICalculationService calculationService, IStorageService storageService) { this.calculationService = calculationService; this.storageService = storageService; }
public TipViewModel(ICalculationService calculationService, Acr.MvvmCross.Plugins.Settings.ISettingsService settingsService) { _calculationService = calculationService; _settingsService = settingsService; }