/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TblServicesuse> GettblAsync(this IServicesuse operations, int id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GettblWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { this.Account = new Account(this); this.Customer = new Customer(this); this.Room = new Room(this); this.Roombook = new Roombook(this); this.Services = new Services(this); this.Servicesuse = new Servicesuse(this); this.BaseUri = new Uri("https://hotelmanagerapi.azurewebsites.net"); SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> public static TblServicesuse Gettbl(this IServicesuse operations, int id) { return(Task.Factory.StartNew(s => ((IServicesuse)s).GettblAsync(id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='tblServicesuse'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PuttblAsync(this IServicesuse operations, int id, TblServicesuse tblServicesuse, CancellationToken cancellationToken = default(CancellationToken)) { await operations.PuttblWithHttpMessagesAsync(id, tblServicesuse, null, cancellationToken).ConfigureAwait(false); }