-
Notifications
You must be signed in to change notification settings - Fork 777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor ViewModel fields and add XML documentation #937
Conversation
- Added pragma directive in `ShellViewModel.cs` to suppress CS8618 warning for `_navigationService`. - Changed `_output` initialization in `ActionsViewModel.cs`. - Renamed `text` to `_text` and updated `Text` property in `EventSourceViewModel.cs`. - Added constructor to initialize `_text` in `NavigationTargetViewModel.cs`. - Added pragma directives in `ScreenExtentionTests.cs` to handle CS0618 warning, and updated `OnActivateAsync` and `OnActivatedAsync` methods. - Renamed private fields and added XML documentation in `WindowConductor.cs`. Changed `Deactivated` method return type to `Task<bool>`. - Removed unused code and added XML documentation in `TriggerAction.cs`. - Added more XML documentation in `WindowConductor.cs` for window event handling and lifecycle methods.
- Added `[Obsolete]` attribute to `OnActivateAsync` in `ConductorWithCollectionOneActiveTests.cs` to indicate it should be replaced by `OnActivatedAsync`. - Introduced new `OnActivatedAsync` method in `ConductorWithCollectionOneActiveTests.cs`. - Corrected spacing and formatting issues in `ConductorWithCollectionOneActiveTests.cs` for better readability. - Added a summary comment to `BootstrapperBase` class in `BootstrapperBase.cs`. - Made minor formatting adjustments in `BootstrapperBase.cs`. - Removed unnecessary `#pragma` directives and added `[Obsolete]` attribute in `ScreenExtentionTests.cs`. - Skipped a test in `ConductorWithCollectionOneActiveTests.cs` with `[Fact(Skip = "...")]` attribute, providing a reason for skipping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 13 changed files in this pull request and generated no comments.
Files not reviewed (8)
- samples/features/Features.Avalonia/ViewModels/ShellViewModel.cs: Evaluated as low risk
- samples/features/Features.CrossPlatform.Shared/ViewModels/ActionsViewModel.cs: Evaluated as low risk
- samples/features/Features.CrossPlatform.Shared/ViewModels/Events/EventSourceViewModel.cs: Evaluated as low risk
- src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/WindowConductor.cs: Evaluated as low risk
- src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/TriggerAction.cs: Evaluated as low risk
- src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/BootstrapperBase.cs: Evaluated as low risk
- src/Caliburn.Micro.Core/SimpleContainer.cs: Evaluated as low risk
- src/Caliburn.Micro.Platform/Platforms/net46-netcore/WindowConductor.cs: Evaluated as low risk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 14 changed files in this pull request and generated 1 comment.
Files not reviewed (9)
- src/Caliburn.Micro.Avalonia/Caliburn.Micro.Avalonia.csproj: Language not supported
- samples/features/Features.Avalonia/ViewModels/ShellViewModel.cs: Evaluated as low risk
- samples/features/Features.CrossPlatform.Shared/ViewModels/ActionsViewModel.cs: Evaluated as low risk
- samples/features/Features.CrossPlatform.Shared/ViewModels/Events/EventSourceViewModel.cs: Evaluated as low risk
- samples/features/Features.CrossPlatform.Shared/ViewModels/NavigationTargetViewModel.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/ConductorWithCollectionOneActiveTests.cs: Evaluated as low risk
- src/Caliburn.Micro.Core.Tests/ScreenExtentionTests.cs: Evaluated as low risk
- src/Caliburn.Micro.Core/SimpleContainer.cs: Evaluated as low risk
- src/Caliburn.Micro.Platform.Core/StringSplitter.cs: Evaluated as low risk
This pull request includes various changes across multiple files to improve code quality, fix issues, and add documentation. The most important changes include suppressing warnings, fixing field initialization, and adding documentation comments.
Suppressing Warnings
samples/features/Features.Avalonia/ViewModels/ShellViewModel.cs
: Suppressed CS8618 warning for_navigationService
not having a value in the constructor.Field Initialization Fixes
samples/features/Features.CrossPlatform.Shared/ViewModels/ActionsViewModel.cs
: Corrected field initialization for_output
.samples/features/Features.CrossPlatform.Shared/ViewModels/Events/EventSourceViewModel.cs
: Fixed field initialization for_text
.samples/features/Features.CrossPlatform.Shared/ViewModels/NavigationTargetViewModel.cs
: Added constructor to initialize_text
.Adding Documentation Comments
src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/BootstrapperBase.cs
: Added summary comments for class and methods. [1] [2]src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/TriggerAction.cs
: Added summary comments for class.src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/WindowConductor.cs
: Added summary comments for class and methods. [1] [2] [3]Code Simplification and Refactoring
src/Caliburn.Micro.Core/SimpleContainer.cs
: Simplified variable names and improved readability.src/Caliburn.Micro.Platform.Core/StringSplitter.cs
: Combined conditions in if statement for better readability.Closes #936, #879, #880, #883, #938