/// <summary> /// Gets the management lock of a scope. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='lockName'> /// Name of the management lock. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ManagementLockObject> GetAsync(this IManagementLocksOperations operations, string lockName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(lockName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }