Repository navigation
Replies: 1 comment
|
As of now the docs page (ObservableProperty.md) still describes only the field-based form. The most precise reference for the partial property form is the analyzer diagnostics in the generator. In short, from 8.4: [ObservableProperty]
public partial string? Name { get; set; }
public string Name
{
get => string.IsNullOrEmpty(field) ? "Fallback" : field;
set => SetProperty(ref field, value);
} = "";I can't say whether custom accessors are planned. Nothing in the current generator source points that way. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Has any documentation been written for partial property support yet?
I see the existing docs, but it has no info about the new C# partial properties.
More specifically, I'm curious to know if there will be more functionality going forward. Will we be able to override values returned from a getter, override where values go in a setter, etc. ?
All reactions