Example #1
0
 public MainWindow(ICalculateService calculateService,
                   ISingleton singleton)
 {
     _calculateService = calculateService;
     this.singleton    = singleton;
     InitializeComponent();
 }
Example #2
0
 public CalculatorController(ICalculateService calculateService,
                             IValidationService validationService,
                             IParser parser)
 {
     _calculateService  = calculateService;
     _validationService = validationService;
     _parser            = parser;
 }
Example #3
0
 public TaskService(IUnityContainer container)
 {
     _container        = container;
     _calculateService = container.Resolve <ICalculateService>();
     _controlService   = container.Resolve <IControlService>();
     _cacheService     = container.Resolve <ICacheService>();
     _eventAggregator  = container.Resolve <IEventAggregator>();
 }
Example #4
0
        /* private void DisplayLocalizationResult(TagInfo tagInfo)
         * {
         *    //   tbxDisplay.AppendText("Round " + tagInfo.TotalTagCount + ": " + tagInfo.EPC + " (" + SARParameter.PredictedX + "," + SARParameter.PredictedY+ ","+SARParameter.PredictedZ+ ")" + "\r\n");
         *    this.BeginInvoke(method: new Action(() =>
         *    {
         *        tbxDisplay.SelectionStart = tbxDisplay.Text.Length;
         *        tbxDisplay.ScrollToCaret();
         *    }));
         * }*/

        /// <summary>
        /// Clear all components created by this form before inventroring
        /// </summary>
        public void Clear()
        {
            tbxDisplay.Clear();
            string            algorithmType     = tssbtnAlgorithms.Text.Trim();
            CalculateType     calculateType     = getTypeByStr(algorithmType);
            ICalculateService iCalculateService = ServiceManager.getCalculateService(calculateType);

            iCalculateService.clearAll();
            ServiceManager.closeService(iCalculateService);
        }
Example #5
0
        public Calculator_Tests()
        {
            IConfiguration configuration = new ConfigurationBuilder()
                                           .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
                                           .AddEnvironmentVariables()
                                           .Build();

            _parser            = new Parser();
            _calculateService  = new CalculateService(configuration);
            _validationService = new ValidationService();
        }
Example #6
0
 public OperationService
 (
     ICalculateService calculateService,
     IRoverService roverService,
     IPlateauService plateauService,
     ILogger <OperationService> logger
 )
 {
     _calculateService = calculateService;
     _roverService     = roverService;
     _plateauService   = plateauService;
     _logger           = logger;
 }
Example #7
0
        //从队列中去除一个TagPos
        public void SAR(TagPos tagPos)
        {
            TagInfo           tagInfo           = tagPos.tagInfo;
            string            algorithmType     = tssbtnAlgorithms.Text.Trim();
            CalculateType     calculateType     = getTypeByStr(algorithmType);
            ICalculateService iCalculateService = ServiceManager.getCalculateService(calculateType);

            if (!SARParameter.epcSet.Contains(tagInfo.EPC))
            {
                iCalculateService.init(tagInfo.EPC, SARParameter.confParam);
                SARParameter.epcSet.Add(tagInfo.EPC);
            }
            Tuple <double, double, double> position = tagPos.pos;

            iCalculateService.calculate(tagInfo.EPC, position.Item1, position.Item2, position.Item3, tagInfo.Frequency, tagInfo.AcutalPhaseInRadian);
            ServiceManager.closeService(iCalculateService);
        }
Example #8
0
        public void SAR(TagInfo tagInfo)
        {
            Tuple <double, double, double> position;

            if (SARParameter.Trajectory.TryDequeue(out position))
            {
                string            algorithmType     = tssbtnAlgorithms.Text.Trim();
                CalculateType     calculateType     = getTypeByStr(algorithmType);
                ICalculateService iCalculateService = ServiceManager.getCalculateService(calculateType);
                if (!SARParameter.epcSet.Contains(tagInfo.EPC))
                {
                    iCalculateService.init(tagInfo.EPC, SARParameter.confParam);
                    SARParameter.epcSet.Add(tagInfo.EPC);
                }
                CalculateServiceClient client = (CalculateServiceClient)iCalculateService;
                iCalculateService.calculate(tagInfo.EPC, position.Item1, position.Item2, position.Item3, tagInfo.Frequency, tagInfo.AcutalPhaseInRadian);
                ServiceManager.closeService(iCalculateService);
                //DisplayLocalizationResult(tagInfo);
            }
        }
 public GamePlayService(ICalculateService calculateService, IFigureService figureService)
 {
     this.calculateService = calculateService;
     this.figureService    = figureService;
 }
Example #10
0
 public CalculatePiNumberTest()
 {
     calculateService = new CalculateService();
 }
Example #11
0
 public ApiController(ICalculateService serv)
 {
     _serv = serv;
 }
Example #12
0
 public Calculator(IDelimiterService deliService, IParseService parseService, ICalculateService calService)
 {
     _deliService  = deliService;
     _parseService = parseService;
     _calService   = calService;
 }
Example #13
0
 public BarLogic(IOutputService outputService, ICalculateService calculateService)
 {
     _outputService = outputService;
     _calculateService = calculateService;
 }
Example #14
0
 public void Setup()
 {
     _calculateService = new AdditionCalculationService();
 }
Example #15
0
 public LoanService(ICalculateService calculateService)
 {
     _calculateService = calculateService;
 }
Example #16
0
 /// <summary>
 /// Método constructor da classe
 /// </summary>
 /// <param name="calculate">Micro-serviço para realização de cálculo de juros composto</param>
 public CalculoController(ICalculateService calculate)
 {
     _calculate = calculate;
 }
Example #17
0
 public CalculateController(ICalculateService calculateService, ILogger <CalculateController> logger)
 {
     this.calculateService = calculateService;
     this.logger           = logger;
 }
 public CalculatorController(ICalculateService calculateService, ITaxRateService taxRateService)
 {
     this.calculateService = calculateService;
     this.taxRateService   = taxRateService;
 }
 public CalculateController(ICalcResultRepository repository, ICalculateService calcService, ILoggerManager logger)
 {
     _calcResRepo = repository;
     _calcService = calcService;
     _logger      = logger;
 }
Example #20
0
 public CalculateCommandHandler(ICalculateService calculateService)
 {
     _calculateService = calculateService;
 }
Example #21
0
 public CalcController(
     ICalculateService calculateService)
 {
     _calculateService = calculateService;
 }
Example #22
0
 public CalculateServiceTests()
 {
     _container        = new TestsHelper().GetContainer();
     _calculateService = _container.Resolve <ICalculateService>();
     _fixture          = _container.Resolve <Fixture>();
 }
Example #23
0
 public CalculatorViewModel(ICalculatorStorageService calculatorStorageService, ICalculateService calculateService)
 {
     _calculatorStorageService = calculatorStorageService;
     _calculateService         = calculateService;
 }
Example #24
0
 public PhoneController(ICalculateService calculate, IRepository repository)
 {
     _calculate  = calculate;
     _repository = repository;
 }
Example #25
0
 public HomeController(ICalculateService serv)
 {
     _serv = serv;
 }
Example #26
0
 public static void closeService(ICalculateService calculateService)
 {
     //关闭服务
     ((ClientBase <ICalculateService>)calculateService).Close();
 }
Example #27
0
 public HomeController(ILogger <HomeController> logger, ICalculateModelService calculateModelService, ICalculateService calculateService)
 {
     _logger = logger;
     _calculateModelService = calculateModelService;
     _calculateService      = calculateService;
 }
 public CalculateInvoiceTotalController(IDataFormatService dataFormatService, ICalculateService calculateService)
 {
     _dataFormatService = dataFormatService;
     _calculateService  = calculateService;
 }
Example #29
0
 public UdpData(ICalculateService <double> calculateService)
 {
     _calculateService = calculateService;
 }
 public CalculateController(ICalculateService calculateService)
 {
     this.calculateService = calculateService;
 }
Example #31
0
 public SimplifyCommand(ICalculateService calculateService)
 {
     _calculateService = calculateService;
 }