Skip to content

Commit 1ff256a

Browse files
committed
Merged PR 52734: [release/10.0.1xx-rc1] Use ToLowerInvariant().Contains(...) for .NET Framework
[release/10.0.1xx-rc1] Use ToLowerInvariant().Contains(...) for .NET Framework ([#31354](#31354)) Co-authored-by: Stephane Delcroix <[email protected]> ---- #### AI description (iteration 1) #### PR Classification This pull request implements a code cleanup by simplifying case-insensitive string comparisons. #### PR Summary The changes update the conditions in the Maui Controls targets file, replacing multiple explicit string comparison overloads with a cleaner approach using ToLowerInvariant().Contains(...). - `src/Controls/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.targets`: Updated conditions for `<_MauiXaml_SG>`, `<_MauiXaml_RT>`, and `<_MauiXaml_XC>` to use ToLowerInvariant().Contains(...) instead of Contains(..., StringComparison.OrdinalIgnoreCase). <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
1 parent 358ea29 commit 1ff256a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Controls/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@
8787
<_MauiXaml_SG Remove="@(_MauiXaml_SG)" />
8888
<_MauiXaml_RT Remove="@(_MauiXaml_RT)" />
8989
<_MauiXaml_XC Remove="@(_MauiXaml_XC)" />
90-
<_MauiXaml_SG Include="@(MauiXaml)" Condition="$([System.String]::new('%(MauiXaml.Inflator)').Contains('SourceGen', StringComparison.OrdinalIgnoreCase))" />
91-
<_MauiXaml_RT Include="@(MauiXaml)" Condition="$([System.String]::new('%(MauiXaml.Inflator)').Contains('Runtime', StringComparison.OrdinalIgnoreCase))" />
92-
<_MauiXaml_XC Include="@(MauiXaml)" Condition="$([System.String]::new('%(MauiXaml.Inflator)').Contains('XamlC', StringComparison.OrdinalIgnoreCase))" />
90+
<_MauiXaml_SG Include="@(MauiXaml)" Condition="$([System.String]::new('%(MauiXaml.Inflator)').ToLowerInvariant().Contains('sourcegen'))" />
91+
<_MauiXaml_RT Include="@(MauiXaml)" Condition="$([System.String]::new('%(MauiXaml.Inflator)').ToLowerInvariant().Contains('runtime'))" />
92+
<_MauiXaml_XC Include="@(MauiXaml)" Condition="$([System.String]::new('%(MauiXaml.Inflator)').ToLowerInvariant().Contains('xamlc'))" />
9393
<_MauiXaml_AsEmbeddedResource Include="@(_MauiXaml_RT)" />
9494
<_MauiXaml_AsEmbeddedResource Include="@(_MauiXaml_XC)" KeepDuplicates="false" />
9595
</ItemGroup>

0 commit comments

Comments
 (0)