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 | optionalAttributesProp Define attributes to attach |
default | optionalChildren Default value for the parameter |
in | optionalboolean 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 | optionalboolean If the parmaeter is optional(without default value) |
out | optionalboolean 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 | optionalboolean 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 | optionalboolean Parameter modifier: The argument must be initialized before calling the method. The method can’t assign a new value to the parameter. |
refkey | optionalRefkey |
type | Children |