Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSOE-170: Update all OSOCE NuGet dependencies #31

Merged
merged 2 commits into from
Aug 18, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Lombiq.BaseTheme/Models/ZoneDescriptor.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using GraphQL;
using GraphQL;
using Lombiq.BaseTheme.Constants;
using Lombiq.BaseTheme.Services;
using Microsoft.AspNetCore.Html;
using OrchardCore.DisplayManagement.Razor;
using OrchardCore.DisplayManagement.Zones;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;

Expand Down Expand Up @@ -47,7 +47,7 @@ public async Task<IHtmlContent> DisplayZoneAsync<TModel>(
var id = ZoneName.ToCamelCase();
var layoutClassName = string.IsNullOrEmpty(parent)
? "layout" + ZoneName
: FormattableString.Invariant($"layout{parent}__{id}");
: string.Create(CultureInfo.InvariantCulture, $"layout{parent}__{id}");
Piedone marked this conversation as resolved.
Show resolved Hide resolved

var classNames = classHolder.ConcatenateZoneClasses(
ZoneName,
Expand All @@ -69,17 +69,17 @@ public async Task<IHtmlContent> DisplayZoneAsync<TModel>(
var elementName = ZoneName == ZoneNames.Content ? "main" : "div";

body = new HtmlContentBuilder()
.AppendHtml(FormattableString.Invariant($"<{elementName} class=\"{bodyWrapperClass} {LeafClassName}\">"))
.AppendHtml(string.Create(CultureInfo.InvariantCulture, $"<{elementName} class=\"{bodyWrapperClass} {LeafClassName}\">"))
.AppendHtml(body)
.AppendHtml(FormattableString.Invariant($"</{elementName}>"));
.AppendHtml(string.Create(CultureInfo.InvariantCulture, $"</{elementName}>"));
}

return new HtmlContentBuilder()
.AppendHtml(FormattableString.Invariant($"<{ElementName} id=\"{id}\" class=\"{classNames}\">"))
.AppendHtml(string.Create(CultureInfo.InvariantCulture, $"<{ElementName} id=\"{id}\" class=\"{classNames}\">"))
.AppendHtml(await ConcatenateAsync(classHolder, page, ChildrenBefore, parent))
.AppendHtml(body)
.AppendHtml(await ConcatenateAsync(classHolder, page, ChildrenAfter, parent))
.AppendHtml(FormattableString.Invariant($"</{ElementName}>"));
.AppendHtml(string.Create(CultureInfo.InvariantCulture, $"</{ElementName}>"));
}

private Task<IHtmlContent> ConcatenateAsync<TModel>(
Expand All @@ -102,7 +102,7 @@ private static async Task<IHtmlContent> ConcatenateInnerAsync<TModel>(

var newParent = string.IsNullOrEmpty(parent)
? zoneName
: FormattableString.Invariant($"{parent}__{zoneName}");
: string.Create(CultureInfo.InvariantCulture, $"{parent}__{zoneName}");

foreach (var zoneDescriptor in zoneDescriptors)
{
Expand Down