Struct Parameter
Describes a parameter to a method.
Implements
Inherited Members
Namespace: Flame
Assembly: Flame.dll
Syntax
public struct Parameter : IMember
Constructors
| Improve this Doc View SourceParameter(IType)
Creates a parameter from a type.
Declaration
public Parameter(IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The parameter's type. |
Parameter(IType, UnqualifiedName)
Creates a parameter from a type and a name.
Declaration
public Parameter(IType type, UnqualifiedName name)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The parameter's type. |
UnqualifiedName | name | The parameter's name. |
Parameter(IType, UnqualifiedName, AttributeMap)
Creates a parameter from a type, a name and an attribute map.
Declaration
public Parameter(IType type, UnqualifiedName name, AttributeMap attributes)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The parameter's type. |
UnqualifiedName | name | The parameter's name. |
AttributeMap | attributes | The parameter's attributes. |
Parameter(IType, String)
Creates a parameter from a type and a name.
Declaration
public Parameter(IType type, string name)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The parameter's type. |
System.String | name | The parameter's name. |
Parameter(IType, String, AttributeMap)
Creates a parameter from a type, a name and an attribute map.
Declaration
public Parameter(IType type, string name, AttributeMap attributes)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The parameter's type. |
System.String | name | The parameter's name. |
AttributeMap | attributes | The parameter's attributes. |
Properties
| Improve this Doc View SourceAttributes
Gets this parameter's attributes.
Declaration
public AttributeMap Attributes { get; }
Property Value
Type | Description |
---|---|
AttributeMap | The attributes for this parameter. |
FullName
Gets this parameter's full name, which is just a qualified version of its unqualified name.
Declaration
public QualifiedName FullName { get; }
Property Value
Type | Description |
---|---|
QualifiedName | The parameter's full name. |
Name
Gets the parameter's unqualified name.
Declaration
public UnqualifiedName Name { get; }
Property Value
Type | Description |
---|---|
UnqualifiedName | The unqualified name. |
Type
Gets this parameter's type.
Declaration
public IType Type { get; }
Property Value
Type | Description |
---|---|
IType | The parameter's type. |
Methods
| Improve this Doc View SourceCreateThisParameter(IType)
Creates a 'this' parameter for a particular type.
Declaration
public static Parameter CreateThisParameter(IType parentType)
Parameters
Type | Name | Description |
---|---|---|
IType | parentType | The type to create a 'this' parameter for. |
Returns
Type | Description |
---|---|
Parameter | A 'this' parameter. |
Map(MemberMapping)
Applies a member mapping to this parameter's type. The result is returned as a new parameter.
Declaration
public Parameter Map(MemberMapping mapping)
Parameters
Type | Name | Description |
---|---|---|
MemberMapping | mapping | The member mapping to apply. |
Returns
Type | Description |
---|---|
Parameter | A new parameter. |
MapAll(IReadOnlyList<Parameter>, MemberMapping)
Applies a member mapping to every element of a read-only list.
Declaration
public static IReadOnlyList<Parameter> MapAll(IReadOnlyList<Parameter> parameters, MemberMapping mapping)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyList<Parameter> | parameters | The elements to map on. |
MemberMapping | mapping | The member mapping to apply to each member. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<Parameter> | A list of transformed parameters. |
WithAttributes(AttributeMap)
Creates a new parameter that retains all characteristics from this parameter except for its attributes, which are replaced by a new attribute map.
Declaration
public Parameter WithAttributes(AttributeMap attributes)
Parameters
Type | Name | Description |
---|---|---|
AttributeMap | attributes | The attribute map for the new parameter. |
Returns
Type | Description |
---|---|
Parameter | The new parameter. |
WithType(IType)
Creates a new parameter that retains all characteristics from this parameter except for its type, which is replaced by the given type.
Declaration
public Parameter WithType(IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The type of the new parameter. |
Returns
Type | Description |
---|---|
Parameter | The new parameter. |