/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dictionaryName'> /// </param> /// <param name='version'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Dictionary> GetDictionaryByNameAndVersionAsync(this IDictionaryOperations operations, string dictionaryName, string version, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetDictionaryByNameAndVersionWithHttpMessagesAsync(dictionaryName, version, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { this.DictionaryOperations = new DictionaryOperations(this); this.BaseUri = new Uri("https://kacollapd01.alfa.bank.int:4443"); 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='dictionaryName'> /// </param> /// <param name='version'> /// </param> /// <param name='value'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Item> PostItemAsync(this IDictionaryOperations operations, string dictionaryName, string version, object value, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostItemWithHttpMessagesAsync(dictionaryName, version, value, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get complex types with dictionary property /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DictionaryWrapper> GetValidAsync(this IDictionaryOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetValidWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dictionaryName'> /// </param> /// <param name='version'> /// </param> /// <param name='id'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <bool?> DeleteDictionaryItemAsync(this IDictionaryOperations operations, string dictionaryName, string version, string id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteDictionaryItemWithHttpMessagesAsync(dictionaryName, version, id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dictionary'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Dictionary> CreateDictionaryAsync(this IDictionaryOperations operations, Dictionary dictionary, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateDictionaryWithHttpMessagesAsync(dictionary, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get complex types with dictionary property which is empty /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static DictionaryWrapper GetEmpty(this IDictionaryOperations operations) { return(Task.Factory.StartNew(s => ((IDictionaryOperations)s).GetEmptyAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Put complex types with dictionary property /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='defaultProgram'> /// </param> public static void PutValid(this IDictionaryOperations operations, IDictionary <string, string> defaultProgram = default(IDictionary <string, string>)) { Task.Factory.StartNew(s => ((IDictionaryOperations)s).PutValidAsync(defaultProgram), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Get complex types with dictionary property which is empty /// </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 <DictionaryWrapper> GetEmptyAsync(this IDictionaryOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetEmptyWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Put complex types with dictionary property /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='defaultProgram'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task PutValidAsync(this IDictionaryOperations operations, System.Collections.Generic.IDictionary <string, string> defaultProgram = default(System.Collections.Generic.IDictionary <string, string>), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await operations.PutValidWithHttpMessagesAsync(defaultProgram, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Put complex types with dictionary property /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='defaultProgram'> /// </param> public static void PutValid(this IDictionaryOperations operations, System.Collections.Generic.IDictionary <string, string> defaultProgram = default(System.Collections.Generic.IDictionary <string, string>)) { System.Threading.Tasks.Task.Factory.StartNew(s => ((IDictionaryOperations)s).PutValidAsync(defaultProgram), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
public DictionaryService(IDictionaryOperations dictionaryoperations) { _dictionaryOperations = dictionaryoperations; }
/// <summary> /// Put complex types with dictionary property /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='defaultProgram'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutValidAsync(this IDictionaryOperations operations, IDictionary <string, string> defaultProgram = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.PutValidWithHttpMessagesAsync(defaultProgram, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Get complex types with dictionary property /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static DictionaryWrapperInner GetValid(this IDictionaryOperations operations) { return(operations.GetValidAsync().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dictionaryName'> /// </param> /// <param name='version'> /// </param> /// <param name='id'> /// </param> public static bool?DeleteDictionaryItem(this IDictionaryOperations operations, string dictionaryName, string version, string id) { return(Task.Factory.StartNew(s => ((IDictionaryOperations)s).DeleteDictionaryItemAsync(dictionaryName, version, id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dictionaryName'> /// </param> public static IList <Dictionary> GetDictionaryByName(this IDictionaryOperations operations, string dictionaryName) { return(Task.Factory.StartNew(s => ((IDictionaryOperations)s).GetDictionaryByNameAsync(dictionaryName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dictionaryName'> /// </param> /// <param name='version'> /// </param> /// <param name='value'> /// </param> public static Item PostItem(this IDictionaryOperations operations, string dictionaryName, string version, object value) { return(Task.Factory.StartNew(s => ((IDictionaryOperations)s).PostItemAsync(dictionaryName, version, value), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public ComboListController(IDictionaryOperations dictionaryOperations) { _dictionaryOperations = dictionaryOperations; }
/// <summary> /// Get complex types with dictionary property while server doesn't provide a /// response payload /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static DictionaryWrapper GetNotProvided(this IDictionaryOperations operations) { return(operations.GetNotProvidedAsync().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='dictionaryName'> /// </param> /// <param name='version'> /// </param> /// <param name='dictionary'> /// </param> public static Dictionary PutDictionary(this IDictionaryOperations operations, string dictionaryName, string version, Dictionary dictionary) { return(Task.Factory.StartNew(s => ((IDictionaryOperations)s).PutDictionaryAsync(dictionaryName, version, dictionary), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Put complex types with dictionary property /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='defaultProgram'> /// </param> public static void PutValid(this IDictionaryOperations operations, IDictionary <string, string> defaultProgram = default(IDictionary <string, string>)) { operations.PutValidAsync(defaultProgram).GetAwaiter().GetResult(); }
/// <summary> /// Get complex types with dictionary property /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static DictionaryWrapper GetValid(this IDictionaryOperations operations) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IDictionaryOperations)s).GetValidAsync(), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get complex types with dictionary property which is empty /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static DictionaryWrapper GetEmpty(this IDictionaryOperations operations) { return(operations.GetEmptyAsync().GetAwaiter().GetResult()); }
public DictionaryController(IDictionaryOperations dictionaryOperations) { _dictionaryOperations = dictionaryOperations; }