/// <param name='operations'>
 /// Reference to the RestaurantClient.IRestaurants.
 /// </param>
 /// <param name='item'>
 /// Required.
 /// </param>
 public static Restaurant PostRestaurantByItem(this IRestaurants operations, Restaurant item)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRestaurants)s).PostRestaurantByItemAsync(item);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// Reference to the RestaurantClient.IRestaurants.
 /// </param>
 /// <param name='restaurantId'>
 /// Required.
 /// </param>
 public static Restaurant GetRestaurantByRestaurantid(this IRestaurants operations, string restaurantId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRestaurants)s).GetRestaurantByRestaurantidAsync(restaurantId);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// Reference to the RestaurantClient.IRestaurants.
 /// </param>
 public static IList <string> GetAllRestaurants(this IRestaurants operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRestaurants)s).GetAllRestaurantsAsync();
     }
                                  , 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");
 }
        /// <param name='operations'>
        /// Reference to the RestaurantClient.IRestaurants.
        /// </param>
        /// <param name='restaurantId'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <Restaurant> GetRestaurantByRestaurantidAsync(this IRestaurants operations, string restaurantId, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <RestaurantClient.Models.Restaurant> result = await operations.GetRestaurantByRestaurantidWithOperationResponseAsync(restaurantId, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the RestaurantClient.IRestaurants.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <IList <string> > GetAllRestaurantsAsync(this IRestaurants operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <string> > result = await operations.GetAllRestaurantsWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the RestaurantClient.IRestaurants.
        /// </param>
        /// <param name='restaurantId'>
        /// Required.
        /// </param>
        /// <param name='patch'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> UpdateRestaurantByRestaurantidAndPatchAsync(this IRestaurants operations, string restaurantId, string patch, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.UpdateRestaurantByRestaurantidAndPatchWithOperationResponseAsync(restaurantId, patch, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Exemple #9
0
 public LunchController(IRestaurants restaurants)
 {
     _restaurants = restaurants;
 }
Exemple #10
0
 public RestaurantsController(IRestaurants restaurants)
 {
     _restaurants = restaurants;
 }
        /// <param name='operations'>
        /// Reference to the UserClient.IRestaurants.
        /// </param>
        /// <param name='item'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <Restaurant> PostRestaurantByItemAsync(this IRestaurants operations, Restaurant item, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <UserClient.Models.Restaurant> result = await operations.PostRestaurantByItemWithOperationResponseAsync(item, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the UserClient.IRestaurants.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <Restaurant> GetSubscribedRestaurantsAsync(this IRestaurants operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <UserClient.Models.Restaurant> result = await operations.GetSubscribedRestaurantsWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }