Skip to content

Commit 8f2301f

Browse files
authored
Merge pull request #19431 from unoplatform/mergify/bp/release/stable/5.6/pr-19418
fix(hr): Fix ENC1002 when dealing with event handlers (backport #19418)
2 parents abe4595 + e5f3d5b commit 8f2301f

21 files changed

+625
-285
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Page
2+
x:Class="Test01.MainPage"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:CSHRTest01"
6+
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
7+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
mc:Ignorable="d">
10+
11+
12+
<Grid>
13+
<TextBlock Text="Hello world!" />
14+
15+
<Button Click="Button_Click" />
16+
17+
<Button Click="Button_Click" Content="Button 2" />
18+
</Grid>
19+
</Page>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Runtime.InteropServices.WindowsRuntime;
6+
using Windows.Foundation;
7+
using Windows.Foundation.Collections;
8+
using Microsoft.UI.Xaml;
9+
using Microsoft.UI.Xaml.Controls;
10+
using Microsoft.UI.Xaml.Controls.Primitives;
11+
using Microsoft.UI.Xaml.Data;
12+
using Microsoft.UI.Xaml.Input;
13+
using Microsoft.UI.Xaml.Media;
14+
using Microsoft.UI.Xaml.Navigation;
15+
16+
namespace Test01;
17+
18+
public sealed partial class MainPage : Page
19+
{
20+
public MainPage()
21+
{
22+
this.InitializeComponent();
23+
}
24+
25+
private async void Button_Click(object sender, RoutedEventArgs e)
26+
{
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Page
2+
x:Class="Test01.MainPage"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:CSHRTest01"
6+
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
7+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
mc:Ignorable="d">
10+
11+
12+
<Grid>
13+
<Button Click="Button_Click" />
14+
15+
<TextBlock Text="Hello world!" /><!--WARNING : The blank line MUST be removed (compared to original) for the test to fail!-->
16+
<Button Click="Button_Click" Content="Button 2" />
17+
</Grid>
18+
</Page>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Runtime.InteropServices.WindowsRuntime;
6+
using Windows.Foundation;
7+
using Windows.Foundation.Collections;
8+
using Microsoft.UI.Xaml;
9+
using Microsoft.UI.Xaml.Controls;
10+
using Microsoft.UI.Xaml.Controls.Primitives;
11+
using Microsoft.UI.Xaml.Data;
12+
using Microsoft.UI.Xaml.Input;
13+
using Microsoft.UI.Xaml.Media;
14+
using Microsoft.UI.Xaml.Navigation;
15+
16+
namespace Test01;
17+
18+
public sealed partial class MainPage : Page
19+
{
20+
public MainPage()
21+
{
22+
this.InitializeComponent();
23+
}
24+
25+
private async void Button_Click(object sender, RoutedEventArgs e)
26+
{
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"Scenarios": [
3+
{
4+
"IsDebug": true,
5+
"IsMono": false,
6+
"PassResults": [
7+
{
8+
"MetadataUpdates": 1,
9+
"Diagnostics": []
10+
}
11+
]
12+
},
13+
{
14+
"IsDebug": true,
15+
"IsMono": true,
16+
"PassResults": [
17+
{
18+
"MetadataUpdates": 1,
19+
"Diagnostics": []
20+
}
21+
]
22+
}
23+
]
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Page
2+
x:Class="Test01.MainPage"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:CSHRTest01"
6+
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
7+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
mc:Ignorable="d">
10+
11+
12+
<Grid>
13+
<TextBlock Text="Hello world!" />
14+
15+
<Button Click="{x:Bind Button_Click}" />
16+
17+
<Button Click="{x:Bind Button_Click}" Content="Button 2" />
18+
</Grid>
19+
</Page>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Runtime.InteropServices.WindowsRuntime;
6+
using Windows.Foundation;
7+
using Windows.Foundation.Collections;
8+
using Microsoft.UI.Xaml;
9+
using Microsoft.UI.Xaml.Controls;
10+
using Microsoft.UI.Xaml.Controls.Primitives;
11+
using Microsoft.UI.Xaml.Data;
12+
using Microsoft.UI.Xaml.Input;
13+
using Microsoft.UI.Xaml.Media;
14+
using Microsoft.UI.Xaml.Navigation;
15+
16+
namespace Test01;
17+
18+
public sealed partial class MainPage : Page
19+
{
20+
public MainPage()
21+
{
22+
this.InitializeComponent();
23+
}
24+
25+
private async void Button_Click(object sender, RoutedEventArgs e)
26+
{
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Page
2+
x:Class="Test01.MainPage"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:CSHRTest01"
6+
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
7+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
mc:Ignorable="d">
10+
11+
12+
<Grid>
13+
<Button Click="{x:Bind Button_Click}" />
14+
15+
<TextBlock Text="Hello world!" /><!--WARNING : The blank line MUST be removed (compared to original) for the test to fail!-->
16+
<Button Click="{x:Bind Button_Click}" Content="Button 2" />
17+
</Grid>
18+
</Page>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Runtime.InteropServices.WindowsRuntime;
6+
using Windows.Foundation;
7+
using Windows.Foundation.Collections;
8+
using Microsoft.UI.Xaml;
9+
using Microsoft.UI.Xaml.Controls;
10+
using Microsoft.UI.Xaml.Controls.Primitives;
11+
using Microsoft.UI.Xaml.Data;
12+
using Microsoft.UI.Xaml.Input;
13+
using Microsoft.UI.Xaml.Media;
14+
using Microsoft.UI.Xaml.Navigation;
15+
16+
namespace Test01;
17+
18+
public sealed partial class MainPage : Page
19+
{
20+
public MainPage()
21+
{
22+
this.InitializeComponent();
23+
}
24+
25+
private async void Button_Click(object sender, RoutedEventArgs e)
26+
{
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"Scenarios": [
3+
{
4+
"IsDebug": true,
5+
"IsMono": false,
6+
"PassResults": [
7+
{
8+
"MetadataUpdates": 1,
9+
"Diagnostics": []
10+
}
11+
]
12+
},
13+
{
14+
"IsDebug": true,
15+
"IsMono": true,
16+
"PassResults": [
17+
{
18+
"MetadataUpdates": 1,
19+
"Diagnostics": []
20+
}
21+
]
22+
}
23+
]
24+
}

0 commit comments

Comments
 (0)