/// <summary> /// Complete the provided SharedAsyncResult which will translate the error into an Exception /// </summary> /// <param name="result"></param> /// <param name="payload"></param> private void CompleteAsyncResult(ISharedAsyncResult result, ushort payloadId) { if (result != null) { // TODO: once we have custom exceptions for our operations we would throw the correct exception result.SetAsCompleted(new Exception("GetAccessControl returned with SharedObjectSecurity information for object we are not aware of"), false); } activeAsyncOperations.Remove(payloadId); }
internal void EnqueueAsyncResult(ISharedAsyncResult result, ushort payloadId) { if (result.CompletedSynchronously || result.IsCompleted) { return; } activeAsyncOperations[payloadId] = result; }