From 2f4e12fa90524d349d10f7f045e8ac34d7348d4e Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Wed, 6 Nov 2024 02:17:38 +0300 Subject: [PATCH] Suppress warning --- .../Values/CultureValue.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/OrchardCore/OrchardCore.DisplayManagement.Liquid/Values/CultureValue.cs b/src/OrchardCore/OrchardCore.DisplayManagement.Liquid/Values/CultureValue.cs index 7c5646d32f8..c2f13df935d 100644 --- a/src/OrchardCore/OrchardCore.DisplayManagement.Liquid/Values/CultureValue.cs +++ b/src/OrchardCore/OrchardCore.DisplayManagement.Liquid/Values/CultureValue.cs @@ -27,9 +27,14 @@ public override bool Equals(FluidValue other) public override string ToStringValue() => _culture.Name; +#pragma warning disable CS0672 // Member overrides obsolete member public override void WriteTo(TextWriter writer, TextEncoder encoder, CultureInfo cultureInfo) +#pragma warning restore CS0672 // Member overrides obsolete member => writer.Write(ToStringValue()); + public async override ValueTask WriteToAsync(TextWriter writer, TextEncoder encoder, CultureInfo cultureInfo) + => await writer.WriteAsync(ToStringValue()); + protected override FluidValue GetValue(string name, TemplateContext context) => name switch {