/// <summary> /// Get false Boolean value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <bool?> GetFalseAsync(this IBoolModel operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetFalseWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { this.BoolModel = new BoolModel(this); this.BaseUri = new 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() { BoolModel = new BoolModel(this); BaseUri = new System.Uri("http://localhost"); SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new System.Collections.Generic.List <Newtonsoft.Json.JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new System.Collections.Generic.List <Newtonsoft.Json.JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); }
/// <summary> /// Get true Boolean 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 <bool?> GetTrueAsync(this IBoolModel operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetTrueWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get false Boolean value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static bool?GetFalse(this IBoolModel operations) { return(Task.Factory.StartNew(s => ((IBoolModel)s).GetFalseAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Set Boolean value true /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boolBody'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutTrueAsync(this IBoolModel operations, bool?boolBody, CancellationToken cancellationToken = default(CancellationToken)) { await operations.PutTrueWithHttpMessagesAsync(boolBody, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Set Boolean value true /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boolBody'> /// </param> public static void PutTrue(this IBoolModel operations, bool?boolBody) { Task.Factory.StartNew(s => ((IBoolModel)s).PutTrueAsync(boolBody), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Get false Boolean value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static bool?GetFalse(this IBoolModel operations) { return(operations.GetFalseAsync().GetAwaiter().GetResult()); }
/// <summary> /// Set Boolean value true /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boolBody'> /// </param> public static void PutTrue(this IBoolModel operations, bool boolBody) { operations.PutTrueAsync(boolBody).GetAwaiter().GetResult(); }
/// <summary> /// Get true Boolean value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <bool?> GetTrueAsync(this IBoolModel operations, CancellationToken cancellationToken = default(CancellationToken)) { HttpOperationResponse <bool?> result = await operations.GetTrueWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <summary> /// Set Boolean value true /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutTrueAsync(this IBoolModel operations, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.PutTrueWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Set Boolean value false /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static void PutFalse(this IBoolModel operations) { operations.PutFalseAsync().GetAwaiter().GetResult(); }
/// <summary> /// Set Boolean value true /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boolBody'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task PutTrueAsync(this IBoolModel operations, bool boolBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await operations.PutTrueWithHttpMessagesAsync(boolBody, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Get true Boolean value /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static bool?GetTrue(this IBoolModel operations) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IBoolModel)s).GetTrueAsync(), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Set Boolean value false /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boolBody'> /// </param> public static void PutFalse(this IBoolModel operations, bool boolBody) { System.Threading.Tasks.Task.Factory.StartNew(s => ((IBoolModel)s).PutFalseAsync(boolBody), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }