Parameter
Define a parameter to be used in class or interface method.
import { Parameter } from "@alloy-js/csharp";
<Parameter attributes={AttributesProp} default={Children} in name={string | Namekey} optional out ref refReadonly refkey={Refkey} type={Children} />import { Parameter } from "@alloy-js/csharp/stc";
Parameter({ attributes: AttributesProp, default: Children, in: boolean, name: string | Namekey, optional: boolean, out: boolean, ref: boolean, refReadonly: boolean, refkey: Refkey, type: Children,}).children(children)| attributes | optional AttributesProp | Define attributes to attach |
| default | optional Children | Default value for the parameter |
| in | optional boolean | Parameter modifier: The argument must be initialized before calling the method. The method can’t assign a new value to the parameter. The compiler might create a temporary variable to hold a copy of the argument to in parameters. |
| name | string | Namekey | |
| optional | optional boolean | If the parmaeter is optional(without default value) |
| out | optional boolean | Parameter modifier: The calling method isn’t required to initialize the argument before calling the method. The method must assign a value to the parameter. |
| ref | optional boolean | Parameter modifier: The argument must be initialized before calling the method. The method can assign a new value to the parameter, but isn’t required to do so. |
| refReadonly | optional boolean | Parameter modifier: The argument must be initialized before calling the method. The method can’t assign a new value to the parameter. |
| refkey | optional Refkey | |
| type | Children |