/// <summary>Snippet for OneOfMethod</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void OneOfMethodRequestObject() { // Create client SnippetsClient snippetsClient = SnippetsClient.Create(); // Initialize request argument(s) OneOfRequest request = new OneOfRequest { NonOneOfString = "", AString = "", }; // Make the request Response response = snippetsClient.OneOfMethod(request); }
/// <summary>Snippet for OneOfMethodAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task OneOfMethodRequestObjectAsync() { // Create client SnippetsClient snippetsClient = await SnippetsClient.CreateAsync(); // Initialize request argument(s) OneOfRequest request = new OneOfRequest { NonOneOfString = "", AString = "", }; // Make the request Response response = await snippetsClient.OneOfMethodAsync(request); }
protected virtual async Task TimeConsumingProcessAsync(ProgressObserver <ProgressWithPercentage <string> > progress, OneOfRequest request) { foreach (var step in Steps) { await progress.Report(step.InvokeAsync().Result, step.ProgressPercentage); } //await progress.ThrowException(new Exception("Your pizza has been burnt!!")); await progress.ReportComplete("Your pizza is ready!"); }
public IObservable <ProgressWithPercentage <string> > TimeConsumingTask(OneOfRequest request) { return(ProgressWithPercentage <string> .CreateObservableFromAsync(TimeConsumingProcessAsync, request)); }