Skip to content

Commit

Permalink
[release/2.1] Fixing #17054 (#17061)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Venkatesan R <[email protected]>
  • Loading branch information
github-actions[bot] and vengi83644 authored Nov 25, 2024
1 parent e4b3fbc commit bd2512d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ public async Task AddSourcesAsync(string tenant, IConfigurationBuilder builder)
if (configuration is not null)
{
var configurationString = configuration.ToJsonString(JOptions.Default);
using var stream = new MemoryStream(Encoding.UTF8.GetBytes(configurationString));

builder.AddTenantJsonStream(stream);
builder.AddTenantJsonStream(new MemoryStream(Encoding.UTF8.GetBytes(configurationString)));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ public async Task AddSourcesAsync(IConfigurationBuilder builder)
if (document.ShellsSettings is not null)
{
var shellsSettingsString = document.ShellsSettings.ToJsonString(JOptions.Default);
using var stream = new MemoryStream(Encoding.UTF8.GetBytes(shellsSettingsString));

builder.AddTenantJsonStream(stream);
builder.AddTenantJsonStream(new MemoryStream(Encoding.UTF8.GetBytes(shellsSettingsString)));
}
}

Expand All @@ -55,9 +53,7 @@ public async Task AddSourcesAsync(string tenant, IConfigurationBuilder builder)
{
var shellSettings = new JsonObject { [tenant] = document.ShellsSettings[tenant] };
var shellSettingsString = shellSettings.ToJsonString(JOptions.Default);
using var stream = new MemoryStream(Encoding.UTF8.GetBytes(shellSettingsString));

builder.AddTenantJsonStream(stream);
builder.AddTenantJsonStream(new MemoryStream(Encoding.UTF8.GetBytes(shellSettingsString)));
}
}

Expand Down

0 comments on commit bd2512d

Please sign in to comment.