Skip to content

Commit 560ecab

Browse files
committed
tests
1 parent 5c80501 commit 560ecab

3 files changed

Lines changed: 419 additions & 2 deletions

File tree

src/Abstractions/Converters/LargePayloadDataConverter.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ public sealed class LargePayloadDataConverter(DataConverter innerConverter, IPay
7878
toDeserialize = this.payLoadStore.DownloadAsync(data, CancellationToken.None).GetAwaiter().GetResult();
7979
}
8080

81-
return this.innerConverter.Deserialize(toDeserialize, targetType);
81+
return this.innerConverter.Deserialize(StripArrayCharacters(toDeserialize), targetType);
82+
}
83+
84+
static string? StripArrayCharacters(string? input)
85+
{
86+
if (input != null && input.StartsWith('[') && input.EndsWith(']'))
87+
{
88+
// Strip the outer bracket characters
89+
return input[1..^1];
90+
}
91+
92+
return input;
8293
}
8394
}

src/Abstractions/Converters/LargePayloadStorageOptions.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ namespace Microsoft.DurableTask.Converters;
99
/// </summary>
1010
public sealed class LargePayloadStorageOptions
1111
{
12+
/// <summary>
13+
/// Initializes a new instance of the <see cref="LargePayloadStorageOptions"/> class.
14+
/// Parameterless constructor required for options activation.
15+
/// </summary>
16+
public LargePayloadStorageOptions()
17+
{
18+
}
19+
1220
/// <summary>
1321
/// Initializes a new instance of the <see cref="LargePayloadStorageOptions"/> class.
1422
/// </summary>
@@ -32,7 +40,7 @@ public LargePayloadStorageOptions(string connectionString)
3240
/// <summary>
3341
/// Gets or sets the Azure Storage connection string to the customer's storage account. Required.
3442
/// </summary>
35-
public string ConnectionString { get; set; }
43+
public string ConnectionString { get; set; } = string.Empty;
3644

3745
/// <summary>
3846
/// Gets or sets the blob container name to use for payloads. Defaults to "durabletask-payloads".

0 commit comments

Comments
 (0)