diff --git a/sdk/core/Azure.Core/src/AzureExtensions.cs b/sdk/core/Azure.Core/src/AzureExtensions.cs deleted file mode 100644 index 69c432aeb3f3..000000000000 --- a/sdk/core/Azure.Core/src/AzureExtensions.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Azure -{ - /// - /// Extension for various types. - /// - public static class AzureExtensions - { - /// - /// Periodically calls the server till the LRO completes. - /// - /// The representing a result of starting the operation. - /// - /// - /// - /// This method will periodically call UpdateStatusAsync till HasCompleted is true, then return the final result of the operation. - /// - public static async ValueTask> WaitForCompletionAsync(this Task operation, CancellationToken cancellationToken = default) - where T : notnull - where TOperation: Operation - { - Operation o = await operation.ConfigureAwait(false); - return await o.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - } - - /// - /// Periodically calls the server till the LRO completes. - /// - /// The representing a result of starting the operation. - /// - /// The interval between status requests to the server. - /// The interval can change based on information returned from the server. - /// For example, the server might communicate to the client that there is not reason to poll for status change sooner than some time. - /// - /// - /// - /// - /// This method will periodically call UpdateStatusAsync till HasCompleted is true, then return the final result of the operation. - /// - public static async ValueTask> WaitForCompletionAsync(this Task operation, TimeSpan pollingInterval, CancellationToken cancellationToken) - where T : notnull - where TOperation: Operation - { - Operation o = await operation.ConfigureAwait(false); - return await o.WaitForCompletionAsync(pollingInterval, cancellationToken).ConfigureAwait(false); - } - } -}