You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a setting to allow the partial keyword to be added to generated property.
Context (Input, Language)
Output Language: C#
Description
The partial keyword is added to class definitions in the outputted C# code, this enables you to add properties/methods to classes without having to make changes to the outputted code. But since the resulting properties don't also have the partial keyword you aren't able to make change to the properties. Having the properties be partial would mean you can add attributes to the properties like [Obsolete].
// <auto-generated />publicpartialclassMyClass{publicpartialintMyProp{get;set;}}// my code:publicpartialclassMyClass{[Obsolete("Use AnotherProp instead")]publicpartialintMyProp{get;set;}}
Solution
Add a setting that turns on adding the partial keyword to properties. This is a new feature added in C# 13 (see). So it should be default off but can be turned on when it is useful.
Alternatives
N/A
Context
The text was updated successfully, but these errors were encountered:
Add a setting to allow the
partial
keyword to be added to generated property.Context (Input, Language)
Output Language: C#
Description
The
partial
keyword is added to class definitions in the outputted C# code, this enables you to add properties/methods to classes without having to make changes to the outputted code. But since the resulting properties don't also have thepartial
keyword you aren't able to make change to the properties. Having the properties bepartial
would mean you can add attributes to the properties like[Obsolete]
.Current Behaviour / Output
Proposed Behaviour / Output
Solution
Add a setting that turns on adding the
partial
keyword to properties. This is a new feature added in C# 13 (see). So it should be default off but can be turned on when it is useful.Alternatives
N/A
Context
The text was updated successfully, but these errors were encountered: