Skip to content

Conversation

@John-Leitch
Copy link

Fixes #60

This PR refactors the XAML Studio codebase to make more extensive use of modern C# features. The refactor was performed using various Roslyn analyzers. All transformations to the code were carefully reviewed, and reformatted where necessary to follow the conventions of adjacent code.

For the most part, this is a "pure" refactor, but a couple semantic changes are included:

  • ActivationHandler was updated to avoid the is/as anti-pattern.
  • MainWindowViewModel.OpenDocument was updated to await the OpenFile call and the CloseWelcomeScreen call was removed as OpenFile already calls it.

I am also not sure about the constructor comment moved to the top of XamlRenderResultContext following the promotion to primary constructor. It's a little awkward, but I left it.

PR Type

What kind of change does this PR introduce?

  • Refactoring (no functional changes, no api changes)

What is the current behavior?

No significant behavioral changes.

What is the new behavior?

No significant behavioral changes.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest dev branch of XAML Studio
  • Tested code with current supported SDKs
  • Tests for the changes have been added (if applicable)
  • License Header has been added to all new source files
  • Contains NO breaking changes to save/state files

Other information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XAML Studio should make more extensive use of modern C# features

1 participant