Skip to content

Roslyn-based GenAPI does not handle abstract event and delegate functions properly #11222

@andriipatsula

Description

@andriipatsula

Delegates are generated incorrectly, more like class + members:
Example:

    public delegate ISyntaxReceiver SyntaxReceiverCreator()
    {
        public SyntaxReceiverCreator(object @object, nint method) { throw null; }
        public virtual System.IAsyncResult BeginInvoke(System.AsyncCallback callback, object @object) { throw null; }
        public virtual Microsoft.CodeAnalysis.ISyntaxReceiver EndInvoke(System.IAsyncResult result) { throw null; }
        public virtual Microsoft.CodeAnalysis.ISyntaxReceiver Invoke() { throw null; }
    }

Expectations:

public delegate ISyntaxReceiver SyntaxReceiverCreator();

Implementation details must be omitted for abstract events:

public abstract event System.EventHandler<T> TextChanged { add { throw null; } remove { throw null; } }

Expectations:

public abstract event System.EventHandler<T> TextChanged;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions