diff --git a/src/Dapr.Client/DaprClient.cs b/src/Dapr.Client/DaprClient.cs index 738e1dc76..f608f8886 100644 --- a/src/Dapr.Client/DaprClient.cs +++ b/src/Dapr.Client/DaprClient.cs @@ -990,8 +990,7 @@ public abstract Task> DecryptAsync(string vaultResourceName /// The name of the key to use from the Vault for the decryption operation. /// A that can be used to cancel the operation. /// An array of decrypted bytes. - [Obsolete( - "The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] + [Obsolete("The API is currently not stable as it is in the Alpha stage. This attribute will be removed once it is stable.")] public abstract Task> DecryptAsync(string vaultResourceName, ReadOnlyMemory ciphertextBytes, string keyName, CancellationToken cancellationToken = default); diff --git a/src/Dapr.Client/DaprClientGrpc.cs b/src/Dapr.Client/DaprClientGrpc.cs index 5f689bb5e..1e695b572 100644 --- a/src/Dapr.Client/DaprClientGrpc.cs +++ b/src/Dapr.Client/DaprClientGrpc.cs @@ -1512,7 +1512,7 @@ await duplexStream.RequestStream.WriteAsync( ulong sequenceNumber = 0; while ((bytesRead = - await bufferedStream.ReadAsync(buffer, 0, streamingBlockSizeInBytes, cancellationToken)) != + await bufferedStream.ReadAsync(buffer.AsMemory(0, streamingBlockSizeInBytes), cancellationToken)) != 0) { await duplexStream.RequestStream.WriteAsync( @@ -1608,7 +1608,7 @@ await duplexStream.RequestStream.WriteAsync( int bytesRead; ulong sequenceNumber = 0; - while ((bytesRead = await bufferedStream.ReadAsync(buffer, 0, streamingBlockSizeInBytes, cancellationToken)) != 0) + while ((bytesRead = await bufferedStream.ReadAsync(buffer.AsMemory(0, streamingBlockSizeInBytes), cancellationToken)) != 0) { await duplexStream.RequestStream.WriteAsync(new Autogenerated.DecryptRequest {