Replace the use of dynamic with Reflection to support AOT#270
Replace the use of dynamic with Reflection to support AOT#270
Conversation
…it issues in MauiTestApp
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Copilot reviewed 54 out of 64 changed files in this pull request and generated 1 comment.
Files not reviewed (10)
- Darker.sln: Language not supported
- Darker.sln.DotSettings: Language not supported
- Directory.Packages.props: Language not supported
- SampleMauiTestApp/App.xaml: Language not supported
- SampleMauiTestApp/AppShell.xaml: Language not supported
- SampleMauiTestApp/MainPage.xaml: Language not supported
- SampleMauiTestApp/Platforms/Android/AndroidManifest.xml: Language not supported
- SampleMauiTestApp/Platforms/Android/Resources/values/colors.xml: Language not supported
- SampleMauiTestApp/Platforms/MacCatalyst/Entitlements.plist: Language not supported
- SampleMauiTestApp/Platforms/MacCatalyst/Info.plist: Language not supported
| { | ||
| if (int.TryParse(numberEntry.Text, out int number)) | ||
| { | ||
| ; |
There was a problem hiding this comment.
Remove the extraneous semicolon on this line; it appears to be a leftover statement.
| ; |
There was a problem hiding this comment.
Removed the extra semicolon. Kinda embarrassed by this. :)
There was a problem hiding this comment.
@iancooper Unfortunately, I don't have permission to push the change to the new branch. I will refork the Dark repository to see if that helps. It might be easier for you to make this change for me.
There was a problem hiding this comment.
Let me see if I can build, get in the first version, and then you ought to be able to merge. Not quite sure why this repository is behaving this way. The branch protection looks sensible.
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
|
@SteveBush Moving your PR here. GitHub refused to allow me to resolve merge issues with updates to package dependencies. Resolving here. |
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
|
@SteveBush I need to look at our build here so that we can get Maui working. It needs a Windows build, not a Linux build. I may look at both a Windows and Linux build, so that we can only build the Maui samples on the Windows build |
@iancooper This seems like a lot of work for you. I'm happy to either do the job or remove the MAUI test project as it served its purpose. |
|
@SteveBush I'll time box it. If we have folks using it for Maui, then it makes some sense. In the worst case, I can move the sample to a separate repo. But, hell, I may learn something. |
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Copilot reviewed 56 out of 65 changed files in this pull request and generated 3 comments.
Files not reviewed (9)
- Darker.sln: Language not supported
- Darker.sln.DotSettings: Language not supported
- Directory.Packages.props: Language not supported
- SampleMauiTestApp/App.xaml: Language not supported
- SampleMauiTestApp/AppShell.xaml: Language not supported
- SampleMauiTestApp/MainPage.xaml: Language not supported
- SampleMauiTestApp/Platforms/Android/AndroidManifest.xml: Language not supported
- SampleMauiTestApp/Platforms/Android/Resources/values/colors.xml: Language not supported
- SampleMauiTestApp/Platforms/MacCatalyst/Entitlements.plist: Language not supported
| if (int.TryParse(numberEntry.Text, out int number)) | ||
| { | ||
| ; | ||
| var person = _queryProcessor.ExecuteAsync(new GetPersonNameQuery(number)).Result; |
There was a problem hiding this comment.
Using .Result on an asynchronous operation may cause deadlocks in the UI thread. Consider making the event handler async and using await.
| private void OnAllPeopleButtonClicked(object sender, EventArgs e) | ||
| { | ||
| var people = _queryProcessor.ExecuteAsync(new GetPeopleQuery()).Result; | ||
|
|
There was a problem hiding this comment.
Blocking on asynchronous tasks using .Result in a UI event handler can lead to deadlocks. Refactor the code to use async/await for better responsiveness.
| private void OnAllPeopleButtonClicked(object sender, EventArgs e) | |
| { | |
| var people = _queryProcessor.ExecuteAsync(new GetPeopleQuery()).Result; | |
| private async void OnAllPeopleButtonClicked(object sender, EventArgs e) | |
| { | |
| var people = await _queryProcessor.ExecuteAsync(new GetPeopleQuery()); |
| @@ -0,0 +1,6 @@ | |||
| namespace SampleMauiTestApp.Domain | |||
| { | |||
| public sealed class SomethingWentTerriblyWrongException : Exception | |||
There was a problem hiding this comment.
[nitpick] Consider adding standard exception constructors (e.g. parameterless, message, and inner exception overloads) to improve error reporting and usability.
This is a replacement for #269 due to merge issues