예제 #1
0
 /// <param name='operations'>
 /// Reference to the AutoRest02.IClient02.
 /// </param>
 public static Greeting GetGreeting(this IClient02 operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IClient02)s).GetGreetingAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #2
0
        /// <summary>
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <Greeting> GetGreetingAsync(this IClient02 operations, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpOperationResponse <Greeting> result = await operations.GetGreetingWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
예제 #3
0
        /// <param name='operations'>
        /// Reference to the AutoRest02.IClient02.
        /// </param>
        public static async Task <Greeting> GetGreetingAsync(this IClient02 operations)
        {
            Microsoft.Rest.HttpOperationResponse <AutoRest02.Models.Greeting> result = await operations.GetGreetingAsync(CancellationToken.None).ConfigureAwait(false);

            return(result.Body);
        }