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

            return(result.Body);
        }
 public CustomersController(IMapper mapper, IClient client, IClient01 client01)
 {
     _mapper   = mapper;
     _client   = client;
     _client01 = client01;
 }
Exemple #4
0
        /// <param name='operations'>
        /// Reference to the AutoRest01.IClient01.
        /// </param>
        public static async Task <string> GetGreetingAsync(this IClient01 operations)
        {
            Microsoft.Rest.HttpOperationResponse <string> result = await operations.GetGreetingAsync(CancellationToken.None).ConfigureAwait(false);

            return(result.Body);
        }