diff --git a/Adaptors/Embed/src/ObjectStorage.cs b/Adaptors/Embed/src/ObjectStorage.cs index bc4ea87b5..8bb28d693 100644 --- a/Adaptors/Embed/src/ObjectStorage.cs +++ b/Adaptors/Embed/src/ObjectStorage.cs @@ -17,7 +17,7 @@ using System; using System.Collections.Generic; -using System.Runtime.CompilerServices; +using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -67,18 +67,17 @@ public Task Check(HealthCheckTag tag) await foreach (var val in valueChunks.WithCancellation(cancellationToken) .ConfigureAwait(false)) { - array.AddRange(val.ToArray()); + array.AddRange(val.Span); } return (array.ToArray(), array.Count); } /// - public async IAsyncEnumerable GetValuesAsync(byte[] id, - [EnumeratorCancellation] CancellationToken cancellationToken = default) - { - yield return id; - } + public IAsyncEnumerable GetValuesAsync(byte[] id, + CancellationToken cancellationToken = default) + => AsyncEnumerable.Repeat(id, + 1); /// public Task TryDeleteAsync(IEnumerable ids,