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)); }
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)); }); }
public IStockLocationInfoFinishedProcessState StartProcess() { StockLocationInfoRequest request = this.CreateRequest(); StockLocationInfoResponse response = this.SendRequest(request, () => { return(this.Dialog.SendRequest(request)); }); return(new StockLocationInfoFinishedProcessState(request, response)); }
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); }
public Task <StockLocationInfoResponse> SendRequestAsync(StockLocationInfoRequest request, CancellationToken cancellationToken = default) { return(base.SendRequestAsync <StockLocationInfoRequest, StockLocationInfoResponse>(request, cancellationToken)); }
public StockLocationInfoResponse SendRequest(StockLocationInfoRequest request) { return(base.SendRequest <StockLocationInfoRequest, StockLocationInfoResponse>(request)); }
public StockLocationInfoRequestedProcessState(StockLocationInfoWorkflow workflow, StockLocationInfoRequest request) { this.Workflow = workflow; this.Request = request; }
public StockLocationInfoFinishedProcessState(StockLocationInfoRequest request, StockLocationInfoResponse response) { this.Request = request; this.Response = response; }
protected void OnRequestReceived(StockLocationInfoRequest request) { this.RequestReceived?.Invoke(this, new MessageReceivedEventArgs <StockLocationInfoRequest>(request, this.DialogProvider)); }