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