Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ public async Task When_Grid_Uses_Both_Syntaxes()
{
ExpectedDiagnostics =
{
// Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\Grid_Uses_Both_Syntaxes_794c1760299b374d12fe38ba3b633206.cs(105,5): error CS1912: Duplicate initialization of member 'ColumnDefinitions'
DiagnosticResult.CompilerError("CS1912").WithSpan(Path.Combine("Uno.UI.SourceGenerators","Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator","Grid_Uses_Both_Syntaxes_794c1760299b374d12fe38ba3b633206.cs"), 113, 5, 113, 22).WithArguments("ColumnDefinitions"),
// Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\Grid_Uses_Both_Syntaxes_794c1760299b374d12fe38ba3b633206.cs(139,5): error CS1912: Duplicate initialization of member 'RowDefinitions'
DiagnosticResult.CompilerError("CS1912").WithSpan(Path.Combine("Uno.UI.SourceGenerators","Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator","Grid_Uses_Both_Syntaxes_794c1760299b374d12fe38ba3b633206.cs"), 147, 5, 147, 19).WithArguments("RowDefinitions"),
// Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\Grid_Uses_Both_Syntaxes_794c1760299b374d12fe38ba3b633206.cs(120,5): error CS1912: Duplicate initialization of member 'ColumnDefinitions'
DiagnosticResult.CompilerError("CS1912").WithSpan(Path.Combine("Uno.UI.SourceGenerators","Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator","Grid_Uses_Both_Syntaxes_794c1760299b374d12fe38ba3b633206.cs"), 120, 5, 120, 22).WithArguments("ColumnDefinitions"),
// Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\Grid_Uses_Both_Syntaxes_794c1760299b374d12fe38ba3b633206.cs(154,5): error CS1912: Duplicate initialization of member 'RowDefinitions'
DiagnosticResult.CompilerError("CS1912").WithSpan(Path.Combine("Uno.UI.SourceGenerators","Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator","Grid_Uses_Both_Syntaxes_794c1760299b374d12fe38ba3b633206.cs"), 154, 5, 154, 19).WithArguments("RowDefinitions"),
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ public void MyBindBack(string s) { }
}.AddGeneratedSources();
test.ExpectedDiagnostics.AddRange(new[]
{
// Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs(75,239): error CS1061: 'MyViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'MyViewModel' could be found (are you missing a using directive or an assembly reference?)
DiagnosticResult.CompilerError("CS1061").WithSpan(@"Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs", 72, 239, 72, 243).WithArguments("TestRepro.MyViewModel", "Name"),
// Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs(97,239): error CS1061: 'MyViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'MyViewModel' could be found (are you missing a using directive or an assembly reference?)
DiagnosticResult.CompilerError("CS1061").WithSpan(@"Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs", 94, 239, 94, 243).WithArguments("TestRepro.MyViewModel", "Name"),
// Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs(119,239): error CS1061: 'MyViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'MyViewModel' could be found (are you missing a using directive or an assembly reference?)
DiagnosticResult.CompilerError("CS1061").WithSpan(@"Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs", 116, 239, 116, 243).WithArguments("TestRepro.MyViewModel", "Name"),
// Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs(79,239): error CS1061: 'MyViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'MyViewModel' could be found (are you missing a using directive or an assembly reference?)
DiagnosticResult.CompilerError("CS1061").WithSpan(@"Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs", 79, 239, 79, 243).WithArguments("TestRepro.MyViewModel", "Name"),
// Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs(101,239): error CS1061: 'MyViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'MyViewModel' could be found (are you missing a using directive or an assembly reference?)
DiagnosticResult.CompilerError("CS1061").WithSpan(@"Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs", 101, 239, 101, 243).WithArguments("TestRepro.MyViewModel", "Name"),
// Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs(123,239): error CS1061: 'MyViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'MyViewModel' could be found (are you missing a using directive or an assembly reference?)
DiagnosticResult.CompilerError("CS1061").WithSpan(@"Uno.UI.SourceGenerators\Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator\MainPage_d6cd66944958ced0c513e0a04797b51d.cs", 123, 239, 123, 243).WithArguments("TestRepro.MyViewModel", "Name"),
});

await test.RunAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ partial class MainPage : global::Microsoft.UI.Xaml.Controls.Page
private const string __baseUri_prefix_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
private global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private void InitializeComponent()
{
var __resourceLocator = new global::System.Uri("file:///C:/Project/0/MainPage.xaml");
Expand All @@ -52,7 +52,14 @@ private void InitializeComponent()
global::Microsoft.UI.Xaml.Application.LoadComponent(this, __resourceLocator);
return;
}
NameScope.SetNameScope(this, __nameScope);
if (NameScope.GetNameScope(this) is { } existingRootNameScope)
{
__nameScope = existingRootNameScope;
}
else
{
NameScope.SetNameScope(this, __nameScope);
}
var __that = this;
base.IsParsing = true;
// Source 0\MainPage.xaml (Line 1:2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ partial class MainPage : global::Microsoft.UI.Xaml.Controls.Page
private const string __baseUri_prefix_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
private global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private void InitializeComponent()
{
var __resourceLocator = new global::System.Uri("file:///C:/Project/0/MainPage.xaml");
Expand All @@ -52,7 +52,14 @@ private void InitializeComponent()
global::Microsoft.UI.Xaml.Application.LoadComponent(this, __resourceLocator);
return;
}
NameScope.SetNameScope(this, __nameScope);
if (NameScope.GetNameScope(this) is { } existingRootNameScope)
{
__nameScope = existingRootNameScope;
}
else
{
NameScope.SetNameScope(this, __nameScope);
}
var __that = this;
base.IsParsing = true;
Resources[
Expand Down Expand Up @@ -322,7 +329,7 @@ private class _MainPage_d6cd66944958ced0c513e0a04797b51d_TestReproMainPageSC0 :
private const string __baseUri_prefix_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
public _View Build(object __ResourceOwner_1)
{
_View __rootInstance = null;
Expand Down Expand Up @@ -392,7 +399,7 @@ public _View Build(object __ResourceOwner_1)
if (global::Microsoft.UI.Xaml.NameScope.GetNameScope(d) == null)
{
global::Microsoft.UI.Xaml.NameScope.SetNameScope(d, __nameScope);
__nameScope.Owner = d;
((global::Microsoft.UI.Xaml.NameScope)__nameScope).Owner = d;
}
global::Uno.UI.FrameworkElementHelper.AddObjectReference(d, this);
}
Expand Down Expand Up @@ -423,7 +430,7 @@ private class _MainPage_d6cd66944958ced0c513e0a04797b51d_TestReproMainPageSC1 :
private const string __baseUri_prefix_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
public _View Build(object __ResourceOwner_1)
{
_View __rootInstance = null;
Expand All @@ -447,7 +454,7 @@ public _View Build(object __ResourceOwner_1)
if (global::Microsoft.UI.Xaml.NameScope.GetNameScope(d) == null)
{
global::Microsoft.UI.Xaml.NameScope.SetNameScope(d, __nameScope);
__nameScope.Owner = d;
((global::Microsoft.UI.Xaml.NameScope)__nameScope).Owner = d;
}
global::Uno.UI.FrameworkElementHelper.AddObjectReference(d, this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ partial class MainPage : global::Microsoft.UI.Xaml.Controls.Page
private const string __baseUri_prefix_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
private global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private void InitializeComponent()
{
var __resourceLocator = new global::System.Uri("file:///C:/Project/0/MainPage.xaml");
Expand All @@ -52,7 +52,14 @@ private void InitializeComponent()
global::Microsoft.UI.Xaml.Application.LoadComponent(this, __resourceLocator);
return;
}
NameScope.SetNameScope(this, __nameScope);
if (NameScope.GetNameScope(this) is { } existingRootNameScope)
{
__nameScope = existingRootNameScope;
}
else
{
NameScope.SetNameScope(this, __nameScope);
}
var __that = this;
base.IsParsing = true;
Resources[
Expand Down Expand Up @@ -177,7 +184,7 @@ private class _MainPage_d6cd66944958ced0c513e0a04797b51d_TestReproMainPageSC0 :
private const string __baseUri_prefix_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
public _View Build(object __ResourceOwner_1)
{
_View __rootInstance = null;
Expand Down Expand Up @@ -247,7 +254,7 @@ public _View Build(object __ResourceOwner_1)
if (global::Microsoft.UI.Xaml.NameScope.GetNameScope(d) == null)
{
global::Microsoft.UI.Xaml.NameScope.SetNameScope(d, __nameScope);
__nameScope.Owner = d;
((global::Microsoft.UI.Xaml.NameScope)__nameScope).Owner = d;
}
global::Uno.UI.FrameworkElementHelper.AddObjectReference(d, this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ partial class MainPage : global::Microsoft.UI.Xaml.Controls.Page
private const string __baseUri_prefix_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
private global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private void InitializeComponent()
{
var __resourceLocator = new global::System.Uri("file:///C:/Project/0/MainPage.xaml");
Expand All @@ -52,7 +52,14 @@ private void InitializeComponent()
global::Microsoft.UI.Xaml.Application.LoadComponent(this, __resourceLocator);
return;
}
NameScope.SetNameScope(this, __nameScope);
if (NameScope.GetNameScope(this) is { } existingRootNameScope)
{
__nameScope = existingRootNameScope;
}
else
{
NameScope.SetNameScope(this, __nameScope);
}
var __that = this;
base.IsParsing = true;
Resources[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ partial class MainPage : global::Microsoft.UI.Xaml.Controls.Page
private const string __baseUri_prefix_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
private global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private void InitializeComponent()
{
var __resourceLocator = new global::System.Uri("file:///C:/Project/0/MainPage.xaml");
Expand All @@ -52,7 +52,14 @@ private void InitializeComponent()
global::Microsoft.UI.Xaml.Application.LoadComponent(this, __resourceLocator);
return;
}
NameScope.SetNameScope(this, __nameScope);
if (NameScope.GetNameScope(this) is { } existingRootNameScope)
{
__nameScope = existingRootNameScope;
}
else
{
NameScope.SetNameScope(this, __nameScope);
}
var __that = this;
base.IsParsing = true;
Resources[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public sealed partial class GlobalStaticResources
[global::System.Runtime.CompilerServices.CreateNewOnMetadataUpdate]
internal sealed class ResourceDictionarySingleton__MyDictionary_b7707bcf1e73425b710b6a5d04177088 : global::Uno.UI.IXamlResourceDictionaryProvider
{
private static global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private static global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private static global::Uno.UI.IXamlResourceDictionaryProvider __that;
internal static global::Uno.UI.IXamlResourceDictionaryProvider Instance
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ partial class MainPage : global::Microsoft.UI.Xaml.Controls.Page
private const string __baseUri_prefix_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
private global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private void InitializeComponent()
{
NameScope.SetNameScope(this, __nameScope);
if (NameScope.GetNameScope(this) is { } existingRootNameScope)
{
__nameScope = existingRootNameScope;
}
else
{
NameScope.SetNameScope(this, __nameScope);
}
var __that = this;
base.IsParsing = true;
// Source 0\MainPage.xaml (Line 1:2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ partial class MainPage : global::Microsoft.UI.Xaml.Controls.Page
private const string __baseUri_prefix_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_MainPage_d6cd66944958ced0c513e0a04797b51d = "ms-appx:///TestProject/";
private global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private void InitializeComponent()
{
NameScope.SetNameScope(this, __nameScope);
if (NameScope.GetNameScope(this) is { } existingRootNameScope)
{
__nameScope = existingRootNameScope;
}
else
{
NameScope.SetNameScope(this, __nameScope);
}
var __that = this;
base.IsParsing = true;
// Source 0\MainPage.xaml (Line 1:2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ partial class UserControl1 : global::Microsoft.UI.Xaml.Controls.UserControl
private const string __baseUri_prefix_UserControl1_81d855d5b3bba02f594dcda3b149beb2 = "ms-appx:///TestProject/";
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private const string __baseUri_UserControl1_81d855d5b3bba02f594dcda3b149beb2 = "ms-appx:///TestProject/";
private global::Microsoft.UI.Xaml.NameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private global::Microsoft.UI.Xaml.Markup.INameScope __nameScope = new global::Microsoft.UI.Xaml.NameScope();
private void InitializeComponent()
{
NameScope.SetNameScope(this, __nameScope);
if (NameScope.GetNameScope(this) is { } existingRootNameScope)
{
__nameScope = existingRootNameScope;
}
else
{
NameScope.SetNameScope(this, __nameScope);
}
var __that = this;
base.IsParsing = true;
// Source 0\UserControl1.xaml (Line 1:2)
Expand Down
Loading