コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the Unknowntype class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public Unknowntype(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._bookings = new Bookings(this);
     this._heroes   = new Heroes(this);
     this._skills   = new Skills(this);
     this._baseUri  = new Uri("https://dqccomics-webapi.azurewebsites.net");
 }
コード例 #2
0
 /// <param name='operations'>
 /// Reference to the DqccomicsMobileapiService.IBookings.
 /// </param>
 public static IList <ApiBooking> GetBookings(this IBookings operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IBookings)s).GetBookingsAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the Unknowntype class.
 /// </summary>
 public Unknowntype()
     : base()
 {
     this._bookings = new Bookings(this);
     this._heroes   = new Heroes(this);
     this._skills   = new Skills(this);
     this._baseUri  = new Uri("https://dqccomics-webapi.azurewebsites.net");
 }
コード例 #4
0
 /// <param name='operations'>
 /// Reference to the DqccomicsMobileapiService.IBookings.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 public static ApiBooking DeleteBooking(this IBookings operations, int id)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IBookings)s).DeleteBookingAsync(id);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #5
0
ファイル: ApiController.cs プロジェクト: goekboet/meets
 public ApiController(
     IBookings client,
     ILogger <ApiController> log
     )
 {
     _client = client;
     _log    = log;
 }
コード例 #6
0
        /// <param name='operations'>
        /// Reference to the DqccomicsMobileapiService.IBookings.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <IList <ApiBooking> > GetBookingsAsync(this IBookings operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <DqccomicsMobileapiService.Models.ApiBooking> > result = await operations.GetBookingsWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
コード例 #7
0
        /// <param name='operations'>
        /// Reference to the DqccomicsMobileapiService.IBookings.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <ApiBooking> DeleteBookingAsync(this IBookings operations, int id, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <DqccomicsMobileapiService.Models.ApiBooking> result = await operations.DeleteBookingWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
コード例 #8
0
        /// <param name='operations'>
        /// Reference to the DqccomicsMobileapiService.IBookings.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='booking'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> PutBookingAsync(this IBookings operations, int id, ApiBooking booking, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.PutBookingWithOperationResponseAsync(id, booking, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }