Пример #1
0
        public async Task <IStockLocationInfoFinishedProcessState> StartProcessAsync(CancellationToken cancellationToken = default)
        {
            StockLocationInfoRequest request = this.CreateRequest();

            StockLocationInfoResponse response = await this.SendRequestAsync(request,
                                                                             () =>
            {
                return(this.Dialog.SendRequestAsync(request, cancellationToken));
            }).ConfigureAwait(continueOnCapturedContext: false);

            return(new StockLocationInfoFinishedProcessState(request, response));
        }
Пример #2
0
        private void Dialog_RequestReceived(Object sender, MessageReceivedEventArgs <StockLocationInfoRequest> e)
        {
            StockLocationInfoRequest request = e.Message;

            this.OnMessageReceived(request,
                                   () =>
            {
                IStockLocationInfoRequestedProcessState processState = new StockLocationInfoRequestedProcessState(this, request);

                this.ProcessStarted?.Invoke(this, new ProcessStartedEventArgs <IStockLocationInfoRequestedProcessState>(processState));
            });
        }
Пример #3
0
        public IStockLocationInfoFinishedProcessState StartProcess()
        {
            StockLocationInfoRequest request = this.CreateRequest();

            StockLocationInfoResponse response = this.SendRequest(request,
                                                                  () =>
            {
                return(this.Dialog.SendRequest(request));
            });

            return(new StockLocationInfoFinishedProcessState(request, response));
        }
Пример #4
0
        public void ProcessStockLocationInfoRequest(StockLocationInfoRequest stockLocationInfoRequest)
        {
            StockLocationInfoResponse stockLocationInfoResponse = new StockLocationInfoResponse();

            stockLocationInfoResponse.AdoptHeader(stockLocationInfoRequest);

            foreach (StockLocationInfo stockLocationInfo in this.stockLocationList)
            {
                StockLocation stockLocation = new StockLocation();
                stockLocation.ID          = stockLocationInfo.ID;
                stockLocation.Description = stockLocationInfo.Description;
                stockLocationInfoResponse.StockLocations.Add(stockLocation);
            }


            stockLocationInfoResponse.ConverterStream.Write(stockLocationInfoResponse);
        }
Пример #5
0
 public Task <StockLocationInfoResponse> SendRequestAsync(StockLocationInfoRequest request, CancellationToken cancellationToken = default)
 {
     return(base.SendRequestAsync <StockLocationInfoRequest, StockLocationInfoResponse>(request, cancellationToken));
 }
Пример #6
0
 public StockLocationInfoResponse SendRequest(StockLocationInfoRequest request)
 {
     return(base.SendRequest <StockLocationInfoRequest, StockLocationInfoResponse>(request));
 }
Пример #7
0
 public StockLocationInfoRequestedProcessState(StockLocationInfoWorkflow workflow, StockLocationInfoRequest request)
 {
     this.Workflow = workflow;
     this.Request  = request;
 }
 public StockLocationInfoFinishedProcessState(StockLocationInfoRequest request,
                                              StockLocationInfoResponse response)
 {
     this.Request  = request;
     this.Response = response;
 }
Пример #9
0
 protected void OnRequestReceived(StockLocationInfoRequest request)
 {
     this.RequestReceived?.Invoke(this, new MessageReceivedEventArgs <StockLocationInfoRequest>(request, this.DialogProvider));
 }