Open zhiyuanliang-ms opened 3 months ago
@jimmyca15
In v4 major version bump, we can have breaking change. I don't think there will be anyone inherit TargetingContext
. So, v4 is a good chance for us to make it sealed.
I don't think there will be anyone
But we never know.
Discussed offline. Will not take the breaking change in v4
For public class types, think we could always start with sealed
types if applicable since change a type from sealed
to non-sealed would not be a breaking change, for internal types, maybe we could enable the CA1852
analyzer rule in the editorconfig file to help enforce the sealed
internal types rule
[*.{cs,vb}]
dotnet_diagnostic.CA1852.severity = none
https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1852 https://github.com/microsoft/FeatureManagement-Dotnet/blob/main/.editorconfig
Yes, it should've been sealed given there was no intent to use it as a base class. However, sealing it now would be a breaking change that I don't believe we have a reason to take.