-
Notifications
You must be signed in to change notification settings - Fork 361
Replace [Obsolete] with [Experimental] attributes #1487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
1ebd68b
126be52
64a420d
330d697
13c0786
b842896
dd6d164
3ab103f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,19 +11,17 @@ | |
| // limitations under the License. | ||
| // ------------------------------------------------------------------------ | ||
|
|
||
| using Dapr.Common.Extensions; | ||
|
|
||
| namespace Dapr.Client; | ||
|
|
||
| using System; | ||
| using System.Buffers; | ||
| using System.Collections.Generic; | ||
| using System.Diagnostics.CodeAnalysis; | ||
| using System.IO; | ||
| using System.Linq; | ||
| using System.Net.Http; | ||
| using System.Net.Http.Json; | ||
| using System.Runtime.CompilerServices; | ||
| using System.Runtime.InteropServices; | ||
| using System.Text.Json; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
|
|
@@ -1664,8 +1662,7 @@ public override async Task<UnsubscribeConfigurationResponse> UnsubscribeConfigur | |
| #region Cryptography | ||
|
|
||
| /// <inheritdoc /> | ||
| [Obsolete( | ||
| "The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| [Experimental("DAPR10001")] | ||
|
||
| public override async Task<ReadOnlyMemory<byte>> EncryptAsync(string vaultResourceName, | ||
| ReadOnlyMemory<byte> plaintextBytes, string keyName, EncryptionOptions encryptionOptions, | ||
| CancellationToken cancellationToken = default) | ||
|
|
@@ -1685,8 +1682,7 @@ public override async Task<ReadOnlyMemory<byte>> EncryptAsync(string vaultResour | |
| } | ||
|
|
||
| /// <inheritdoc /> | ||
| [Obsolete( | ||
| "The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| [Experimental("DAPR10001")] | ||
| public override async Task<IAsyncEnumerable<ReadOnlyMemory<byte>>> EncryptAsync(string vaultResourceName, | ||
| Stream plaintextStream, | ||
| string keyName, EncryptionOptions encryptionOptions, CancellationToken cancellationToken = default) | ||
|
|
@@ -1787,8 +1783,7 @@ private async IAsyncEnumerable<ReadOnlyMemory<byte>> RetrieveEncryptedStreamAsyn | |
| } | ||
|
|
||
| /// <inheritdoc /> | ||
| [Obsolete( | ||
| "The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| [Experimental("DAPR10001")] | ||
| public override async Task<IAsyncEnumerable<ReadOnlyMemory<byte>>> DecryptAsync(string vaultResourceName, | ||
| Stream ciphertextStream, string keyName, | ||
| DecryptionOptions decryptionOptions, CancellationToken cancellationToken = default) | ||
|
|
@@ -1819,8 +1814,7 @@ public override async Task<IAsyncEnumerable<ReadOnlyMemory<byte>>> DecryptAsync( | |
| } | ||
|
|
||
| /// <inheritdoc /> | ||
| [Obsolete( | ||
| "The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| [Experimental("DAPR10001")] | ||
| public override Task<IAsyncEnumerable<ReadOnlyMemory<byte>>> DecryptAsync(string vaultResourceName, | ||
| Stream ciphertextStream, string keyName, CancellationToken cancellationToken = default) => | ||
| DecryptAsync(vaultResourceName, ciphertextStream, keyName, new DecryptionOptions(), | ||
|
|
@@ -1883,8 +1877,7 @@ private async IAsyncEnumerable<ReadOnlyMemory<byte>> RetrieveDecryptedStreamAsyn | |
| } | ||
|
|
||
| /// <inheritdoc /> | ||
| [Obsolete( | ||
| "The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| [Experimental("DAPR10001")] | ||
| public override async Task<ReadOnlyMemory<byte>> DecryptAsync(string vaultResourceName, | ||
| ReadOnlyMemory<byte> ciphertextBytes, string keyName, DecryptionOptions decryptionOptions, | ||
| CancellationToken cancellationToken = default) | ||
|
|
@@ -1904,8 +1897,7 @@ public override async Task<ReadOnlyMemory<byte>> DecryptAsync(string vaultResour | |
| } | ||
|
|
||
| /// <inheritdoc /> | ||
| [Obsolete( | ||
| "The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| [Experimental("DAPR10001")] | ||
| public override async Task<ReadOnlyMemory<byte>> DecryptAsync(string vaultResourceName, | ||
| ReadOnlyMemory<byte> ciphertextBytes, string keyName, CancellationToken cancellationToken = default) => | ||
| await DecryptAsync(vaultResourceName, ciphertextBytes, keyName, | ||
|
|
@@ -1914,7 +1906,7 @@ await DecryptAsync(vaultResourceName, ciphertextBytes, keyName, | |
| #region Subtle Crypto Implementation | ||
|
|
||
| ///// <inheritdoc/> | ||
| //[Obsolete("This API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| //[Experimental("DAPR10001")] | ||
| //public override async Task<(string Name, string PublicKey)> GetKeyAsync(string vaultResourceName, string keyName, Autogenerated.SubtleGetKeyRequest.Types.KeyFormat keyFormat, | ||
| // CancellationToken cancellationToken = default) | ||
| //{ | ||
|
|
@@ -1943,7 +1935,7 @@ await DecryptAsync(vaultResourceName, ciphertextBytes, keyName, | |
| //} | ||
|
|
||
| ///// <inheritdoc/> | ||
| //[Obsolete("This API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| //[Experimental("DAPR10001")] | ||
| //public override async Task<(byte[] CipherTextBytes, byte[] AuthenticationTag)> EncryptAsync(string vaultResourceName, byte[] plainTextBytes, string algorithm, | ||
| // string keyName, byte[] nonce, byte[] associatedData, CancellationToken cancellationToken = default) | ||
| //{ | ||
|
|
@@ -1979,7 +1971,7 @@ await DecryptAsync(vaultResourceName, ciphertextBytes, keyName, | |
| //} | ||
|
|
||
| ///// <inheritdoc/> | ||
| //[Obsolete("This API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| //[Experimental("DAPR10001")] | ||
| //public override async Task<byte[]> DecryptAsync(string vaultResourceName, byte[] cipherTextBytes, string algorithm, string keyName, byte[] nonce, byte[] tag, | ||
| // byte[] associatedData, CancellationToken cancellationToken = default) | ||
| //{ | ||
|
|
@@ -2015,7 +2007,7 @@ await DecryptAsync(vaultResourceName, ciphertextBytes, keyName, | |
| //} | ||
|
|
||
| ///// <inheritdoc/> | ||
| //[Obsolete("This API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| //[Experimental("DAPR10001")] | ||
| //public override async Task<(byte[] WrappedKey, byte[] AuthenticationTag)> WrapKeyAsync(string vaultResourceName, byte[] plainTextKey, string keyName, | ||
| // string algorithm, byte[] nonce, byte[] associatedData, CancellationToken cancellationToken = default) | ||
| //{ | ||
|
|
@@ -2051,7 +2043,7 @@ await DecryptAsync(vaultResourceName, ciphertextBytes, keyName, | |
| //} | ||
|
|
||
| ///// <inheritdoc/> | ||
| //[Obsolete("This API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| //[Experimental("DAPR10001")] | ||
| //public override async Task<byte[]> UnwrapKeyAsync(string vaultResourceName, byte[] wrappedKey, string algorithm, | ||
| // string keyName, byte[] nonce, byte[] tag, byte[] associatedData, CancellationToken cancellationToken = default) | ||
| //{ | ||
|
|
@@ -2088,7 +2080,7 @@ await DecryptAsync(vaultResourceName, ciphertextBytes, keyName, | |
| //} | ||
|
|
||
| ///// <inheritdoc/> | ||
| //[Obsolete("This API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| //[Experimental("DAPR10001")] | ||
| //public override async Task<byte[]> SignAsync(string vaultResourceName, byte[] digest, string algorithm, string keyName, CancellationToken cancellationToken = default) | ||
| //{ | ||
| // ArgumentVerifier.ThrowIfNullOrEmpty(vaultResourceName, nameof(vaultResourceName)); | ||
|
|
@@ -2121,7 +2113,7 @@ await DecryptAsync(vaultResourceName, ciphertextBytes, keyName, | |
| //} | ||
|
|
||
| ///// <inheritdoc/> | ||
| //[Obsolete("This API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] | ||
| //[Experimental("DAPR10001")] | ||
| //public override async Task<bool> VerifyAsync(string vaultResourceName, byte[] digest, byte[] signature, | ||
| // string algorithm, string keyName, CancellationToken cancellationToken = default) | ||
| //{ | ||
|
|
@@ -2163,7 +2155,7 @@ await DecryptAsync(vaultResourceName, ciphertextBytes, keyName, | |
| #region Distributed Lock API | ||
|
|
||
| /// <inheritdoc/> | ||
| [Obsolete] | ||
| [Experimental("DAPR10001")] | ||
| public async override Task<TryLockResponse> Lock( | ||
| string storeName, | ||
| string resourceId, | ||
|
|
@@ -2203,7 +2195,7 @@ public async override Task<TryLockResponse> Lock( | |
| } | ||
|
|
||
| /// <inheritdoc/> | ||
| [Obsolete] | ||
| [Experimental("DAPR10001")] | ||
| public async override Task<UnlockResponse> Unlock( | ||
| string storeName, | ||
| string resourceId, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Experimental("...")]?