Skip to content
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

Fix and refactor Visual Studio snippets #2323

Merged
merged 2 commits into from Jan 21, 2020
Merged

Fix and refactor Visual Studio snippets #2323

merged 2 commits into from Jan 21, 2020

Conversation

Lixfeld
Copy link
Contributor

@Lixfeld Lixfeld commented Jan 20, 2020

What kind of change does this PR introduce?
Fix interaction snippet: => replaced with { get; } =
Some minor final syntax adjustments

What is the current behavior?
Failed to find a registration for a Interaction.

What is the new behavior?
No exception. The property returns the registered Interaction instead of a new one.

@Lixfeld Lixfeld requested a review from Jan 20, 2020
Copy link
Contributor

@worldbeater worldbeater left a comment

Looks good, thanks!

@@ -20,18 +20,18 @@
</Declarations>
<Code Language="csharp">
<![CDATA[public static readonly DependencyProperty ViewModelProperty =
DependencyProperty.Register("ViewModel", typeof($classname$Model), typeof($classname$), new PropertyMetadata(null));
DependencyProperty.Register(nameof(ViewModel), typeof($classname$Model), typeof($classname$), new PropertyMetadata(null));
Copy link
Contributor

@glennawatson glennawatson Jan 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I seen people do PropertyMetadata(default($classname$Model))) instead of PropertyMetadata(null))

This way it handles value types.

Copy link
Contributor Author

@Lixfeld Lixfeld Jan 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info.

@glennawatson glennawatson merged commit b26c43c into reactiveui:master Jan 21, 2020
2 checks passed
@lock lock bot locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants