Skip to content

API summary does not distinguish init accessor from set #2214

Open
@KalleOlaviNiemitalo

Description

@KalleOlaviNiemitalo

Before #2205, CliAction had a public bool Exclusive { get; protected set; } property, and the API summary showed that as a read-only Exclusive property with a separate protected set_Exclusive method:

public bool Exclusive { get; protected set; } = true;
public abstract class CliAction
public System.Boolean Exclusive { get; }
public System.Int32 Invoke(ParseResult parseResult)
public System.Threading.Tasks.Task<System.Int32> InvokeAsync(ParseResult parseResult, System.Threading.CancellationToken cancellationToken = null)
protected System.Void set_Exclusive(System.Boolean value)

After #2205, CliAction has a public bool Terminating { get; protected init; } property, and the API summary shows that as a read-only Terminating property with a separate protected set_Terminating method:

public bool Terminating { get; protected init; } = true;
public abstract class CliAction
public System.Boolean Terminating { get; }
protected System.Void set_Terminating(System.Boolean value)

That is, the API summary shows the protected accessor in the same way regardless of whether it is set or init.

Because replacing a set accessor with init is a breaking change, their API summaries should differ so that the API compatibility test can fail if such a change is made unexpectedly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions