Skip to content

Commit 9d2bfa3

Browse files
committed
some fb
1 parent 8575113 commit 9d2bfa3

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

src/Abstractions/Converters/BlobPayloadStore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public BlobPayloadStore(LargePayloadStorageOptions options)
3737
}
3838

3939
/// <inheritdoc/>
40-
public async Task<string> UploadAsync(string contentType, ReadOnlyMemory<byte> payloadBytes, CancellationToken cancellationToken)
40+
public async Task<string> UploadAsync(ReadOnlyMemory<byte> payloadBytes, CancellationToken cancellationToken)
4141
{
4242
// Ensure container exists
4343
await this.containerClient.CreateIfNotExistsAsync(PublicAccessType.None, cancellationToken: cancellationToken).ConfigureAwait(false);

src/Abstractions/Converters/IPayloadStore.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ public interface IPayloadStore
1111
/// <summary>
1212
/// Uploads a payload and returns an opaque reference token that can be embedded in orchestration messages.
1313
/// </summary>
14-
/// <param name="contentType">The content type of the payload (e.g., application/json).</param>
1514
/// <param name="payloadBytes">The payload bytes.</param>
1615
/// <param name="cancellationToken">Cancellation token.</param>
1716
/// <returns>Opaque reference token.</returns>
18-
Task<string> UploadAsync(string contentType, ReadOnlyMemory<byte> payloadBytes, CancellationToken cancellationToken);
17+
Task<string> UploadAsync(ReadOnlyMemory<byte> payloadBytes, CancellationToken cancellationToken);
1918

2019
/// <summary>
2120
/// Downloads the payload referenced by the token.

src/Abstractions/Converters/LargePayloadDataConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public sealed class LargePayloadDataConverter(DataConverter innerConverter, IPay
5555

5656
// Upload synchronously in this context by blocking on async. SDK call sites already run on threadpool.
5757
byte[] bytes = this.utf8.GetBytes(json);
58-
string token = this.payLoadStore.UploadAsync("application/json", bytes, CancellationToken.None).GetAwaiter().GetResult();
58+
string token = this.payLoadStore.UploadAsync(bytes, CancellationToken.None).GetAwaiter().GetResult();
5959
return token;
6060
}
6161

src/Abstractions/DataConverter.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ namespace Microsoft.DurableTask;
1010
/// </summary>
1111
/// <remarks>
1212
/// Implementations of this abstract class are free to use any serialization method. The default implementation
13-
/// uses the JSON serializer from the System.Text.Json namespace. Implementations may optionally externalize
14-
/// large payloads and return an opaque reference string that can be resolved during deserialization.
15-
/// These methods all accept null values, in which case the return value should also be null.
13+
/// uses the JSON serializer from the System.Text.Json namespace. Currently only strings are supported as
14+
/// the serialized representation of data. Byte array payloads and streams are not supported by this abstraction.
15+
/// Note that these methods all accept null values, in which case the return value should also be null.
16+
/// Implementations may choose to return a pointer or reference (such as an external token) to the data
17+
/// instead of the actual serialized data itself.
1618
/// </remarks>
1719
public abstract class DataConverter
1820
{

test/Grpc.IntegrationTests/LargePayloadTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ public InMemoryPayloadStore(Dictionary<string, string> shared)
380380
int downloadCount;
381381
public int DownloadCount => this.downloadCount;
382382

383-
public Task<string> UploadAsync(string contentType, ReadOnlyMemory<byte> payloadBytes, CancellationToken cancellationToken)
383+
public Task<string> UploadAsync(ReadOnlyMemory<byte> payloadBytes, CancellationToken cancellationToken)
384384
{
385385
Interlocked.Increment(ref this.uploadCount);
386386
string json = System.Text.Encoding.UTF8.GetString(payloadBytes.Span);

0 commit comments

Comments
 (0)