Exemple #1
0
 /// <param name='operations'>
 /// Reference to the RestaurantClient.IRestaurantUsers.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 public static User DeleteRestaurantUserById(this IRestaurantUsers operations, string id)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRestaurantUsers)s).DeleteRestaurantUserByIdAsync(id);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemple #2
0
 /// <param name='operations'>
 /// Reference to the RestaurantClient.IRestaurantUsers.
 /// </param>
 public static RestaurantUser GetCurrentRestaurantUser(this IRestaurantUsers operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRestaurantUsers)s).GetCurrentRestaurantUserAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemple #3
0
 /// <param name='operations'>
 /// Reference to the RestaurantClient.IRestaurantUsers.
 /// </param>
 /// <param name='userId'>
 /// Required.
 /// </param>
 /// <param name='patch'>
 /// Required.
 /// </param>
 public static object PutRestaurantUserByUseridAndPatch(this IRestaurantUsers operations, string userId, string patch)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRestaurantUsers)s).PutRestaurantUserByUseridAndPatchAsync(userId, patch);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the RestaurantWaitTime class.
 /// </summary>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public RestaurantWaitTime(params DelegatingHandler[] handlers)
     : base(handlers)
 {
     this._restaurants     = new Restaurants(this);
     this._restaurantUsers = new RestaurantUsers(this);
     this._subscriptions   = new Subscriptions(this);
     this._users           = new Users(this);
     this._waitTimes       = new WaitTimes(this);
     this._baseUri         = new Uri("https://restaurantwaittime.azurewebsites.net");
 }
 /// <summary>
 /// Initializes a new instance of the RestaurantWaitTime class.
 /// </summary>
 public RestaurantWaitTime()
     : base()
 {
     this._restaurants     = new Restaurants(this);
     this._restaurantUsers = new RestaurantUsers(this);
     this._subscriptions   = new Subscriptions(this);
     this._users           = new Users(this);
     this._waitTimes       = new WaitTimes(this);
     this._baseUri         = new Uri("https://restaurantwaittime.azurewebsites.net");
 }
Exemple #6
0
        /// <param name='operations'>
        /// Reference to the RestaurantClient.IRestaurantUsers.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <string> GetCurrentRestaurantAsync(this IRestaurantUsers operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <string> result = await operations.GetCurrentRestaurantWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Exemple #7
0
        /// <param name='operations'>
        /// Reference to the RestaurantClient.IRestaurantUsers.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <User> DeleteRestaurantUserByIdAsync(this IRestaurantUsers operations, string id, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <RestaurantClient.Models.User> result = await operations.DeleteRestaurantUserByIdWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Exemple #8
0
        /// <param name='operations'>
        /// Reference to the RestaurantClient.IRestaurantUsers.
        /// </param>
        /// <param name='userId'>
        /// Required.
        /// </param>
        /// <param name='patch'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> PutRestaurantUserByUseridAndPatchAsync(this IRestaurantUsers operations, string userId, string patch, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.PutRestaurantUserByUseridAndPatchWithOperationResponseAsync(userId, patch, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Exemple #9
0
        /// <param name='operations'>
        /// Reference to the RestaurantClient.IRestaurantUsers.
        /// </param>
        /// <param name='restaurantUser'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <RestaurantUser> PostRestaurantUserByRestaurantuserAsync(this IRestaurantUsers operations, RestaurantUser restaurantUser, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <RestaurantClient.Models.RestaurantUser> result = await operations.PostRestaurantUserByRestaurantuserWithOperationResponseAsync(restaurantUser, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }