Skip to content

Commit

Permalink
added 'InvalidOperationException' to check for [useStringFormat && !u…
Browse files Browse the repository at this point in the history
…seJson]
  • Loading branch information
Ledjon Behluli authored and Ledjon Behluli committed May 18, 2024
1 parent 7353568 commit 57b5d8b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ private async Task<AzureTableGrainStorage> InitAzureTableGrainStorage(AzureTable

private async Task<AzureTableGrainStorage> InitAzureTableGrainStorage(bool useJson = false, bool useStringFormat = false, TypeNameHandling? typeNameHandling = null)
{
if (useStringFormat && !useJson)
{
throw new InvalidOperationException($"Using {nameof(OrleansGrainStorageSerializer)} in conjuction with string data format makes no sense, there for stopping attempt.");
}

var options = new AzureTableStorageOptions();
var jsonOptions = this.providerRuntime.ServiceProvider.GetService<IOptions<OrleansJsonSerializerOptions>>();
if (typeNameHandling != null)
Expand Down

0 comments on commit 57b5d8b

Please sign in to comment.