Skip to content

Commit 08282fd

Browse files
[housekeeping] Automated PR to fix formatting errors on dev/stdelc/xmlnsaggregation
1 parent ec71e64 commit 08282fd

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

src/Controls/src/Build.Tasks/XmlTypeExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static void GatherXmlnsDefinitionAttributes(List<XmlnsDefinitionAttribute> xmlns
5555
{
5656
var attr = GetXmlnsDefinition(ca, asmDef);
5757
//only add globalxmlns definition from the current assembly
58-
if ( attr.XmlNamespace == XamlParser.MauiGlobal
58+
if (attr.XmlNamespace == XamlParser.MauiGlobal
5959
&& asmDef != currentAssembly)
6060
continue;
6161
xmlnsDefinitions.Add(attr);

src/Controls/src/Core/XmlnsDefinitionAttribute.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ public sealed class XmlnsDefinitionAttribute : Attribute
1313
public string XmlNamespace { get; }
1414

1515
/// <include file="../../docs/Microsoft.Maui.Controls/XmlnsDefinitionAttribute.xml" path="//Member[@MemberName='Target']/Docs/*" />
16-
public string Target { get; }
16+
public string Target { get; }
1717
/// <include file="../../docs/Microsoft.Maui.Controls/XmlnsDefinitionAttribute.xml" path="//Member[@MemberName='ClrNamespace']/Docs/*" />
1818
[Obsolete("Use Target for ClrNamespace or other xmlns")]
19-
public string ClrNamespace => Target;
19+
public string ClrNamespace => Target;
2020
/// <include file="../../docs/Microsoft.Maui.Controls/XmlnsDefinitionAttribute.xml" path="//Member[@MemberName='AssemblyName']/Docs/*" />
2121
public string AssemblyName { get; set; }
2222

src/Controls/src/SourceGen/CodeBehindGenerator.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void Initialize(IncrementalGeneratorInitializationContext initContext)
9595
initContext.RegisterSourceOutput(xmlnsDefinitionsProvider, static (sourceProductionContext, xmlnsCache) =>
9696
{
9797
var source = GenerateGlobalXmlns(sourceProductionContext, xmlnsCache);
98-
if (!string.IsNullOrEmpty(source))
98+
if (!string.IsNullOrEmpty(source))
9999
sourceProductionContext.AddSource("Global.Xmlns.cs", SourceText.From(source!, Encoding.UTF8));
100100
});
101101
}
@@ -226,7 +226,7 @@ static AssemblyCaches GetAssemblyAttributes(Compilation compilation, Cancellatio
226226
assemblies.Add(compilation.Assembly);
227227
foreach (var reference in compilation.References)
228228
{
229-
cancellationToken.ThrowIfCancellationRequested();
229+
cancellationToken.ThrowIfCancellationRequested();
230230

231231
var assembly = compilation.GetAssemblyOrModuleSymbol(reference);
232232
if (assembly is IAssemblySymbol assemblySymbol)
@@ -238,7 +238,7 @@ static AssemblyCaches GetAssemblyAttributes(Compilation compilation, Cancellatio
238238
// load from references
239239
foreach (var assembly in assemblies)
240240
{
241-
cancellationToken.ThrowIfCancellationRequested();
241+
cancellationToken.ThrowIfCancellationRequested();
242242

243243
foreach (var attr in assembly.GetAttributes())
244244
{
@@ -254,12 +254,12 @@ static AssemblyCaches GetAssemblyAttributes(Compilation compilation, Cancellatio
254254
{
255255
xmlnsDef.AssemblyName = assembly.Name;
256256
}
257-
257+
258258
//only add globalxmlns definition from the current assembly
259-
if ( xmlnsDef.XmlNamespace == XamlParser.MauiGlobal
259+
if (xmlnsDef.XmlNamespace == XamlParser.MauiGlobal
260260
&& !SymbolEqualityComparer.Default.Equals(assembly, compilation.Assembly))
261261
{
262-
continue;
262+
continue;
263263
}
264264

265265
xmlnsDefinitions.Add(xmlnsDef);

src/Controls/src/Xaml/XamlParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ static void GatherXmlnsDefinitionAttributes(Assembly currentAssembly)
345345
foreach (XmlnsDefinitionAttribute attribute in assembly.GetCustomAttributes(typeof(XmlnsDefinitionAttribute)))
346346
{
347347
// Only add global xmlns definition from the current assembly
348-
if ( attribute.XmlNamespace == XamlParser.MauiGlobal
348+
if (attribute.XmlNamespace == XamlParser.MauiGlobal
349349
&& assembly != currentAssembly)
350350
continue;
351351
s_xmlnsDefinitions.Add(attribute);

src/Controls/tests/SourceGen.UnitTests/SourceGenXamlTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public void TestCodeBehindGenerator_AggregatedXmlns()
5252
</ContentPage>
5353
""";
5454

55-
var code =
56-
"""
55+
var code =
56+
"""
5757
using Microsoft.Maui.Controls;
5858
[assembly: XmlnsDefinition("http://schemas.microsoft.com/dotnet/maui/global", "http://schemas.microsoft.com/dotnet/2021/maui")]
5959
""";

src/Controls/tests/SourceGen.UnitTests/SourceGenXmlnsGlobal.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ private record AdditionalXamlFile(string Path, string Content, string? RelativeP
1515
[Test]
1616
public void TestXmlns_aggregation()
1717
{
18-
var code =
18+
var code =
1919
"""
2020
using Microsoft.Maui.Controls;
2121
[assembly: XmlnsDefinition("http://schemas.microsoft.com/dotnet/maui/global", "http://schemas.microsoft.com/dotnet/2021/maui")]
2222
""";
2323
var compilation = SourceGeneratorDriver.CreateMauiCompilation();
24-
compilation = compilation.AddSyntaxTrees(CSharpSyntaxTree.ParseText(code));
24+
compilation = compilation.AddSyntaxTrees(CSharpSyntaxTree.ParseText(code));
2525

2626
var result = SourceGeneratorDriver.RunGenerator<CodeBehindGenerator>(compilation);
2727

src/Controls/tests/Xaml.UnitTests/XmlnsAggregattion.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void XamlWithAggregatedXmlns([Values] bool useCompiledXaml)
3030

3131
var layout = new XmlnsAggregattion(useCompiledXaml);
3232
Assert.That(layout.label.Text, Is.EqualTo("Welcome to .NET MAUI!"));
33-
33+
3434
}
3535
}
3636
}

0 commit comments

Comments
 (0)