Skip to content

Commit

Permalink
Filter custom members in TypeProvider (#4518)
Browse files Browse the repository at this point in the history
Moves the custom member filtering into TypeProvider so that we can
maintain a clear contract that the Properties, Methods, Constructors
properties only contain providers that we are actually going to
generate.
  • Loading branch information
JoshLove-msft authored Sep 24, 2024
1 parent 08384aa commit 8eb635f
Show file tree
Hide file tree
Showing 8 changed files with 335 additions and 229 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Microsoft.Generator.CSharp
[ExportMetadata("PluginName", nameof(CodeModelPlugin))]
public abstract class CodeModelPlugin
{
private List<LibraryVisitor> _visitors = [new MemberRemoverVisitor()];
private List<LibraryVisitor> _visitors = [];
private static CodeModelPlugin? _instance;
internal static CodeModelPlugin Instance
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public class PropertyProvider

internal IEnumerable<AttributeData>? Attributes { get; init; }

internal PropertyProvider? SpecProperty { get; set; }

// for mocking
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
protected PropertyProvider()
Expand Down
Loading

0 comments on commit 8eb635f

Please sign in to comment.