Skip to content

Support expression-bodied (Lambda) read-only properties in C# #70

@aalramadan

Description

@aalramadan

Read-only properties are defined with expression-bodied (lambda) syntax such as:

public string Data => "Hello from the default";

XML:

<expr_stmt><expr><specifier>public</specifier> <name>string</name> <lambda><parameter_list type="pseudo"><parameter><decl><name>Data</name></decl></parameter></parameter_list> =&gt;<block type="pseudo"><block_content> <expr><literal type="string">"Hello from the default"</literal></expr></block_content></block></lambda></expr>;</expr_stmt></unit>

And are used to declare implicit read-only fields. Stereocode does not collect these as they are tagged with <expr_stmt>. Stereocode currently only collects properties with the <property> tag (e.g., auto-properties or regular properties).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions