/// <summary> /// Deserialize the object /// </summary> public static IList<Customer> DeserializeJson(JToken inputObject) { IList<Customer> deserializedObject = new List<Customer>(); foreach (JToken iListValue in ((JArray)inputObject)) { Customer customer = new Customer(); customer.DeserializeJson(iListValue); deserializedObject.Add(customer); } return deserializedObject; }
/// <param name='operations'> /// Reference to the Pltkw3msUI1.ICustomerOperations. /// </param> /// <param name='value'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task<object> PostByValueAsync(this ICustomerOperations operations, Customer value, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse<object> result = await operations.PostByValueWithOperationResponseAsync(value, cancellationToken).ConfigureAwait(false); return result.Body; }
/// <param name='operations'> /// Reference to the Pltkw3msUI1.ICustomerOperations. /// </param> /// <param name='value'> /// Required. /// </param> public static object PostByValue(this ICustomerOperations operations, Customer value) { return Task.Factory.StartNew((object s) => { return ((ICustomerOperations)s).PostByValueAsync(value); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }