/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { ApplicationScreenings = new ApplicationScreenings(this); Authentication = new Authentication(this); WorkerScreenings = new WorkerScreenings(this); BaseUri = new System.Uri("http://localhost"); SerializationSettings = new 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 List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new 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 List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='workerIdString'> /// </param> /// <param name='bearer'> /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse POST1WithHttpMessages(this IWorkerScreenings operations, string workerIdString, string bearer = default(string), Dictionary <string, List <string> > customHeaders = null) { return(operations.POST1WithHttpMessagesAsync(workerIdString, bearer, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='workerIdString'> /// </param> /// <param name='bearer'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task POST1Async(this IWorkerScreenings operations, string workerIdString, string bearer = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.POST1WithHttpMessagesAsync(workerIdString, bearer, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='workerIdString'> /// </param> /// <param name='bearer'> /// </param> public static void POST1(this IWorkerScreenings operations, string workerIdString, string bearer = default(string)) { operations.POST1Async(workerIdString, bearer).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse POSTWithHttpMessages(this IWorkerScreenings operations, IList <CompletedWorkerScreening> body = default(IList <CompletedWorkerScreening>), Dictionary <string, List <string> > customHeaders = null) { return(operations.POSTWithHttpMessagesAsync(body, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task POSTAsync(this IWorkerScreenings operations, IList <CompletedWorkerScreening> body = default(IList <CompletedWorkerScreening>), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.POSTWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> public static void POST(this IWorkerScreenings operations, IList <CompletedWorkerScreening> body = default(IList <CompletedWorkerScreening>)) { operations.POSTAsync(body).GetAwaiter().GetResult(); }