Ejemplo n.º 1
0
 /// <summary>
 /// Post Get and return the response port.
 /// </summary>
 /// <param name="body"></param>
 /// <returns></returns>
 public virtual PortSet <irobot.RoombaState, Fault> Get(GetRequestType body)
 {
     irobot.Get op = new irobot.Get();
     op.Body = body ?? new GetRequestType();
     this.Post(op);
     return(op.ResponsePort);
 }
        /// <summary>
        /// Post Get with body and return the response port.
        /// </summary>
        public virtual PortSet <MotorState, Fault> Get(GetRequestType body)
        {
            Get op = new Get();

            op.Body = body ?? new GetRequestType();
            this.PostUnknownType(op);
            return(op.ResponsePort);
        }
Ejemplo n.º 3
0
    public ResultType getTP(GetRequestType getRequest)
    {
        object[] results = this.Invoke("getTP", new object[] {
            getRequest
        });

        return((ResultType)(results[0]));
    }
Ejemplo n.º 4
0
        /// <summary>
        /// Required Get body type
        /// </summary>
        public virtual PortSet <GpsState, Fault> Get()
        {
            GetRequestType body = new GetRequestType();
            Get            op   = new Get(body);

            this.Post(op);
            return(op.ResponsePort);
        }
Ejemplo n.º 5
0
 /// <remarks/>
 public void getTPAsync(GetRequestType getRequest, object userState)
 {
     if ((this.getTPOperationCompleted == null))
     {
         this.getTPOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetTPOperationCompleted);
     }
     this.InvokeAsync("getTP", new object[] {
         getRequest
     }, this.getTPOperationCompleted, userState);
 }
Ejemplo n.º 6
0
        /// <summary>
        ///
        /// </summary>
        public void StartAppAsync()
        {
            // Временно. Переключатель получения запроса: из файла или из кода.
            GetRequestType requestType = GetRequestType.FromCode;

            // Получить список запросов.
            RequestFactory            requestFactory = new RequestFactory();
            IEnumerable <BankRequest> requests;

            switch (requestType)
            {
            case GetRequestType.FromFile:
                var requestsFileName = Path.Combine(Directory.GetCurrentDirectory(), @"AspApp\Models\Requests.json");
                //@"D:\Projects\RatesParsing\RatesParsingConsole\RatesParsingConsole\AspApp\Models\Requests.json";
                requests = requestFactory.GetBankRequestsFromFile(requestsFileName);
                break;

            case GetRequestType.FromCode:
                requests = requestFactory.GetBankRequestsFromCode();
                break;

            default:
                requests = Array.Empty <BankRequest>();
                break;
            }

            // Передать данные запроса в консольное приложение и получить результаты.
            // В процессе конвертировать данные из domain в dto и при получении произвести обратную конвертацию: из dto в domain.
            ConsoleHome consoleHome = new ConsoleHome();

            var requestsDto = requests.Adapt <IEnumerable <BankRequestDto> >();

            // Применена конструкция .Result, так как применение await требует соответственно сделать входной метод Program.Main(), что недопустимо в текущей версии языка.
            IEnumerable <BankRatesDto> banksDto = consoleHome.GetBankRatesAsync(requestsDto).Result;
            var banks = banksDto.Adapt <IEnumerable <BankRates> >();

            // Получить данные курсов по банкам синхронно.
            //IEnumerable<BankRatesDto> banks = consoleHome.GetBankRates(requests);

            // Вывести полученные значения.
            var publishResults = new PublishResults();

            //publishResults.ShowExchangeRates(banks);
            publishResults.WriteToFileAsync(banks);
            publishResults.SerializeToJsonFile(banks).Wait();
        }
Ejemplo n.º 7
0
 public Get(GetRequestType body, PortSet <GenericPanTiltState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">The request message body</param>
 public Get(GetRequestType body)
     : base(body)
 {
 }
Ejemplo n.º 9
0
 public Get(GetRequestType body, PortSet <VectorState, Fault> responsePort) :
     base(body, responsePort)
 {
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <HumanoidState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <MultipleSimulatedSensorsState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">The request message body</param>
 /// <param name="responsePort">The response port for the request</param>
 public Get(GetRequestType body, PortSet <Parallax2011ReferencePlatformIoControllerState, Fault> responsePort) : base(body, responsePort)
 {
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <MySimulationServiceState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="body">Button release request message</param>
 public Start2(GetRequestType body)
     : base(body)
 {
 }
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <CustomSimulatedEntitiesState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <TrackRoamerBrickProximityBoardState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <DriveInSquareState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">The request message body</param>
 /// <param name="responsePort">The response port for the request</param>
 public Get(GetRequestType body, PortSet <TrackroamerRP2011AbstractionLayerState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <TrackroamerObstacleAvoidanceDriveState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <PololuMaestroServiceState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 public SURFInfo2(GetRequestType body)
     : base(body)
 {
 }
 /// <summary>
 /// SpeechRecognizer Get Operation
 /// </summary>
 public Get(GetRequestType body, PortSet <SpeechRecognizerState, Fault> responsePort) :
     base(body, responsePort)
 {
 }
Ejemplo n.º 23
0
 public Get(GetRequestType body, PortSet <SimulatedPioneerGPSState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <OpenCVDSSState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <MyHexaPodServiceState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">The request message body</param>
 /// <param name="responsePort">The response port for the request</param>
 public Get(GetRequestType body, PortSet <ReferencePlatform2011State, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <EntityUIState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 28
0
        public void UpdateFromUi()
        {
            var get = new GetRequestType();

            Activate(Arbiter.Choice(
                _pololuMaestroServicePort.Get(get),
                state => _wpfServicePort.Invoke(() => _userInterface.ViewModel.UpdateState(state)),
                fault => _wpfServicePort.Invoke(() => _userInterface.ShowFault(fault)))
            );
        }
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">The request message body</param>
 /// <param name="responsePort">The response port for the request</param>
 public Get(GetRequestType body, PortSet <MarkRobotState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">The request message body</param>
 /// <param name="responsePort">The response port for the request</param>
 public Get(GetRequestType body, PortSet <RobotDashboardState, Fault> responsePort)
     : base(body, responsePort)
 {
 }
 /// <summary>
 /// Creates a new instance of Get
 /// </summary>
 /// <param name="body">the request message body</param>
 /// <param name="responsePort">the response port for the request</param>
 public Get(GetRequestType body, PortSet <ChrUm6OrientationSensorState, Fault> responsePort)
     : base(body, responsePort)
 {
 }