Skip to content

Commit 77c0d03

Browse files
committed
Add nullable annotation to IGrainStorageStreamingSerializer.DeserializeAsync return type
1 parent 59a6eac commit 77c0d03

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Orleans.Core/Providers/IGrainStorageSerializer.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public interface IGrainStorageSerializer
3030
T Deserialize<T>(BinaryData input);
3131
}
3232

33+
#nullable enable
3334
/// <summary>
3435
/// Optional stream-based serializer for grain state.
3536
/// </summary>
@@ -51,8 +52,9 @@ public interface IGrainStorageStreamingSerializer
5152
/// <param name="cancellationToken">The cancellation token.</param>
5253
/// <typeparam name="T">The output type.</typeparam>
5354
/// <returns>The deserialized object.</returns>
54-
ValueTask<T> DeserializeAsync<T>(Stream input, CancellationToken cancellationToken = default);
55+
ValueTask<T?> DeserializeAsync<T>(Stream input, CancellationToken cancellationToken = default);
5556
}
57+
#nullable restore
5658

5759
/// <summary>
5860
/// Extensions for <see cref="IGrainStorageSerializer"/>.
@@ -103,7 +105,7 @@ public void PostConfigure(string name, TOptions options)
103105
{
104106
if (options.GrainStorageSerializer == default)
105107
{
106-
// First, try to get a IGrainStorageSerializer that was registered with
108+
// First, try to get a IGrainStorageSerializer that was registered with
107109
// the same name as the storage provider
108110
// If none is found, fallback to system wide default
109111
options.GrainStorageSerializer = _serviceProvider.GetKeyedService<IGrainStorageSerializer>(name) ?? _serviceProvider.GetRequiredService<IGrainStorageSerializer>();

0 commit comments

Comments
 (0)