InterfaceProperty
Render a C# interface property.
import { InterfaceProperty } from "@alloy-js/csharp";
<InterfaceProperty attributes={AttributesProp} doc={Children} file get internal name={string | Namekey} new nullable private protected public refkey={Refkey} set type={Children} />import { InterfaceProperty } from "@alloy-js/csharp/stc";
InterfaceProperty({ attributes: AttributesProp, doc: Children, file: boolean, get: boolean, internal: boolean, name: string | Namekey, new: boolean, nullable: boolean, private: boolean, protected: boolean, public: boolean, refkey: Refkey, set: boolean, type: Children,}).children(children)| attributes | optional AttributesProp | Define attributes to attach |
| doc | optional Children | Doc comment |
| file | optional boolean | |
| get | optional boolean | If property should have a getter |
| internal | optional boolean | |
| name | string | Namekey | |
| new | optional boolean | |
| nullable | optional boolean | Property initializer |
| private | optional boolean | |
| protected | optional boolean | |
| public | optional boolean | |
| refkey | optional Refkey | |
| set | optional boolean | If property should have a setter |
| type | Children | Property type |
Example
Section titled “Example”<InterfaceProperty public name="My" get set />
public int My { get; set; };