예제 #1
0
        private void Dialog_RequestReceived(Object sender, MessageReceivedEventArgs <ConfigurationGetRequest> e)
        {
            ConfigurationGetRequest request = e.Message;

            this.OnMessageReceived(request,
                                   () =>
            {
                IConfigurationGetRequestedProcessState processState = new ConfigurationGetRequestedProcessState(this, request);

                this.ProcessStarted?.Invoke(this, new ProcessStartedEventArgs <IConfigurationGetRequestedProcessState>(processState));
            });
        }
예제 #2
0
        public async Task <IConfigurationGetFinishedProcessState> StartProcessAsync(CancellationToken cancellationToken = default)
        {
            ConfigurationGetRequest request = this.CreateRequest();

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

            return(new ConfigurationGetFinishedProcessState(request, response));
        }
예제 #3
0
        public IConfigurationGetFinishedProcessState StartProcess()
        {
            ConfigurationGetRequest request = this.CreateRequest();

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

            return(new ConfigurationGetFinishedProcessState(request, response));
        }
예제 #4
0
 public ConfigurationGetFinishedProcessState(ConfigurationGetRequest request,
                                             ConfigurationGetResponse response)
 {
     this.Request  = request;
     this.Response = response;
 }
 public ConfigurationGetRequestedProcessState(ConfigurationGetWorkflow workflow, ConfigurationGetRequest request)
 {
     this.Workflow = workflow;
     this.Request  = request;
 }
예제 #6
0
 public Task <ConfigurationGetResponse> SendRequestAsync(ConfigurationGetRequest request, CancellationToken cancellationToken = default)
 {
     return(base.SendRequestAsync <ConfigurationGetRequest, ConfigurationGetResponse>(request, cancellationToken));
 }
예제 #7
0
 public ConfigurationGetResponse SendRequest(ConfigurationGetRequest request)
 {
     return(base.SendRequest <ConfigurationGetRequest, ConfigurationGetResponse>(request));
 }
예제 #8
0
 protected void OnRequestReceived(ConfigurationGetRequest request)
 {
     this.RequestReceived?.Invoke(this, new MessageReceivedEventArgs <ConfigurationGetRequest>(request, this.DialogProvider));
 }