AutoDeconstruct
AutoDeconstruct copied to clipboard
Handle Accessibility Correctly
AutoDeconstruct only looks at definitions in the current compilation. However, we need to handle the accessibility correctly. For example, if the target type is internal, the corresponding static Deconstruct extension method should be internal.
It may get complicated if types with the same name (like a generic and non-generic Person) have different accessibility. This may make determining the accessibility of the containing static class difficult.