示例#1
0
 /// <summary>
 /// Mathematical calculator constructor with dependency injection
 /// </summary>
 /// <param name="parser">Parser of mathematical expression string</param>
 /// <param name="notationConverter">Converter for different mathematical notation</param>
 /// <param name="mathProcessor">Processor for performing mathematical operations</param>
 /// <param name="mathOperationsContainer">Mathematical operations</param>
 public MathCalculator(IParser parser, INotationConverter notationConverter, IMathProcessor mathProcessor, IMathOperationsContainer mathOperationsContainer)
 {
     _parser                  = parser;
     _notationConverter       = notationConverter;
     _mathProcessor           = mathProcessor;
     _mathOperationsContainer = mathOperationsContainer;
 }
示例#2
0
 public App(ITestService testService, ILogger <App> logger, IOptions <AppSettings> config, IMathProcessor math, IWebServiceTest webServiceTest)
 {
     _testService    = testService;
     _logger         = logger;
     _config         = config.Value;
     _math           = math;
     _webServiceTest = webServiceTest;
 }
 public ComputerPerson(IMathProcessor mathProcessor, ITextBuilder textBuilder, IMemoryProcessor memoryProcessor)
 {
     _MathProcessor = mathProcessor;
     _TextBuilder = textBuilder;
     _MemoryProcessor = memoryProcessor;
 }
 public TestService(ILogger <TestService> logger, IOptions <AppSettings> config, IMathProcessor math)
 {
     _logger = logger;
     _config = config.Value;
     _math   = math;
 }
示例#5
0
        //public App(IOptions<AppSettings> appSettings, ILogger<App> logger, MathProcessor math)
        //{
        //    _logger = logger ?? throw new ArgumentNullException(nameof(logger));
        //    _appSettings = appSettings?.Value ?? throw new ArgumentNullException(nameof(appSettings));
        //    _math = math;
        //}

        public App(IMathProcessor math, ILogger <App> logger /*, IContainer configuration*/)
        {
            _math   = math;
            _logger = logger;
            //_appSettings = configuration;
        }