BuildIt.CognitiveServices.VideoAPIExtensions.GetOperationResult C# (CSharp) Method

GetOperationResult() public static method

Get operation result. If succeeded, this interface returns a JSON that includes time stamps and operation status. Below is an example: Example JSON: <table class="element table"> <thead> </thead> <tbody> <tr> {<br/> "status": "Running",<br/> "createdDateTime": "2015-09-30T01:28:23.4493273Z",<br/> "lastActionDateTime": "2015-09-30T01:32:23.0895791Z",<br/> }<br/> </tr> </tbody> </table> <br/> <p> Possible values of "status" field are:<br/> <b>Not Started</b> - video content is received/uploaded but the process has not started.<br/> <b>Uploading</b> - the video content is being uploaded by the URL client side provides.<br/> <b>Running</b> - the process is running.<br/> <b>Failed</b> - the process is failed. Detailed information will be provided in "message" field.<br/> <b>Succeeded</b> - the process succeeded. In this case, depending on specific operation client side created, the result can be retrieved in following two ways:<br/> </p> <table class="element table"> <thead> <tr><th>Video Operation</th><th>How to Retrieve Result</th></tr> </thead> <tbody> <tr><td>Stabilization</td><td>The result (as a video file) can be retrieved from the URL specified in <b>resourceLocation</b> field.</td></tr> <tr><td>Face Detection and Tracking<br/>Motion Detection </td><td>The result (as a JSON in string) is available in <b>processingResult</b> field.</td></tr> </tbody> </table>
public static GetOperationResult ( this operations, string oid, string subscriptionKey = default(string), string ocpApimSubscriptionKey = default(string) ) : void
operations this /// The operations group for this extension method. ///
oid string /// OperationId ///
subscriptionKey string /// subscription key in url ///
ocpApimSubscriptionKey string /// subscription key in header ///
return void
            public static void GetOperationResult(this IVideoAPI operations, string oid, string subscriptionKey = default(string), string ocpApimSubscriptionKey = default(string))
            {
                System.Threading.Tasks.Task.Factory.StartNew(s => ((IVideoAPI)s).GetOperationResultAsync(oid, subscriptionKey, ocpApimSubscriptionKey), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None,  System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }