/// <summary> /// Get invalid Unix time value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <System.DateTime?> GetInvalidUnixTimeAsync(this IIntModel operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetInvalidUnixTimeWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get underflow Int64 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <long?> GetUnderflowInt64Async(this IIntModel operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetUnderflowInt64WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { IntModel = new IntModel(this); BaseUri = new System.Uri("http://localhost"); 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(); }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { this.IntModel = new IntModel(this); this.BaseUri = new Uri("https://localhost"); SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver() }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver() }; }
/// <summary> /// Put datetime encoded as Unix time /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='intBody'> /// </param> public static void PutUnixTimeDate(this IIntModel operations, System.DateTime intBody) { operations.PutUnixTimeDateAsync(intBody).GetAwaiter().GetResult(); }
/// <summary> /// Put min int64 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='intBody'> /// </param> public static void PutMin64(this IIntModel operations, long intBody) { operations.PutMin64Async(intBody).GetAwaiter().GetResult(); }
/// <summary> /// Put min int32 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='intBody'> /// </param> public static void PutMin32(this IIntModel operations, int intBody) { operations.PutMin32Async(intBody).GetAwaiter().GetResult(); }
/// <summary> /// Get null Unix time value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static DateTime?GetNullUnixTime(this IIntModel operations) { return(Task.Factory.StartNew(s => ((IIntModel)s).GetNullUnixTimeAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Put datetime encoded as Unix time /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='intBody'> /// </param> public static void PutUnixTimeDate(this IIntModel operations, DateTime intBody) { Task.Factory.StartNew(s => ((IIntModel)s).PutUnixTimeDateAsync(intBody), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Get overflow Int32 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static int?GetOverflowInt32(this IIntModel operations) { return(operations.GetOverflowInt32Async().GetAwaiter().GetResult()); }
/// <summary> /// Get invalid Int value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static int?GetInvalid(this IIntModel operations) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IIntModel)s).GetInvalidAsync(), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Put datetime encoded as Unix time /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='intBody'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task PutUnixTimeDateAsync(this IIntModel operations, System.DateTime intBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await operations.PutUnixTimeDateWithHttpMessagesAsync(intBody, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Put min int64 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='intBody'> /// </param> public static void PutMin64(this IIntModel operations, long intBody) { System.Threading.Tasks.Task.Factory.StartNew(s => ((IIntModel)s).PutMin64Async(intBody), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Get underflow Int32 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <int?> GetUnderflowInt32Async(this IIntModel operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetUnderflowInt32WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get null Int value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static int? GetNull(this IIntModel operations) { return operations.GetNullAsync().GetAwaiter().GetResult(); }
/// <summary> /// Get null Unix time value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static System.DateTime?GetNullUnixTime(this IIntModel operations) { return(operations.GetNullUnixTimeAsync().GetAwaiter().GetResult()); }
/// <summary> /// Get invalid Int value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static int?GetInvalid(this IIntModel operations) { return(operations.GetInvalidAsync().GetAwaiter().GetResult()); }
/// <summary> /// Get invalid Int value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <int?> GetInvalidAsync(this IIntModel operations, CancellationToken cancellationToken = default(CancellationToken)) { var _result = await operations.GetInvalidWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return(_result.Body); }
/// <summary> /// Put min int64 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='intBody'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutMin64Async(this IIntModel operations, long intBody, CancellationToken cancellationToken = default(CancellationToken)) { await operations.PutMin64WithHttpMessagesAsync(intBody, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Put min int32 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='intBody'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutMin32Async(this IIntModel operations, int intBody, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.PutMin32WithHttpMessagesAsync(intBody, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Put datetime encoded as Unix time /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='intBody'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutUnixTimeDateAsync(this IIntModel operations, DateTime intBody, CancellationToken cancellationToken = default(CancellationToken)) { await operations.PutUnixTimeDateWithHttpMessagesAsync(intBody, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Get overflow Int32 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <int?> GetOverflowInt32Async(this IIntModel operations, CancellationToken cancellationToken = default(CancellationToken)) { HttpOperationResponse <int?> result = await operations.GetOverflowInt32WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <summary> /// Get overflow Int32 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static int?GetOverflowInt32(this IIntModel operations) { return(Task.Factory.StartNew(s => ((IIntModel)s).GetOverflowInt32Async(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get underflow Int64 value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static long?GetUnderflowInt64(this IIntModel operations) { return(operations.GetUnderflowInt64Async().GetAwaiter().GetResult()); }