Class ClrModifierType
An IL type that modifies a type by slapping on a required or optional modifier.
Inherited Members
Namespace: Flame.Clr
Assembly: Flame.Clr.dll
Syntax
public sealed class ClrModifierType : ContainerType, IType, IGenericMember, IMember
Properties
| Improve this Doc View SourceIsRequired
Tells if this type is a modreq type; if it is not, then it must be a modopt type.
Declaration
public bool IsRequired { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ModifierType
Gets the modifier type that is applied to the element type.
Declaration
public IType ModifierType { get; }
Property Value
Type | Description |
---|---|
IType | The modifier type. |
Methods
| Improve this Doc View SourceCreate(IType, IType, Boolean)
Creates a modreq or modopt type.
Declaration
public static ClrModifierType Create(IType elementType, IType modifierType, bool isRequired)
Parameters
Type | Name | Description |
---|---|---|
IType | elementType | An element type to associate with a modifier type. |
IType | modifierType | A modifier type to slap onto |
System.Boolean | isRequired | A Boolean flag that is |
Returns
Type | Description |
---|---|
ClrModifierType | A modreq or modopt type. |
CreateOptional(IType, IType)
Creates a modopt type.
Declaration
public static ClrModifierType CreateOptional(IType elementType, IType modifierType)
Parameters
Type | Name | Description |
---|---|---|
IType | elementType | An element type to associate with a modifier type. |
IType | modifierType | A modifier type to slap onto |
Returns
Type | Description |
---|---|
ClrModifierType | A modopt type. |
CreateRequired(IType, IType)
Creates a modreq type.
Declaration
public static ClrModifierType CreateRequired(IType elementType, IType modifierType)
Parameters
Type | Name | Description |
---|---|---|
IType | elementType | An element type to associate with a modifier type. |
IType | modifierType | A modifier type to slap onto |
Returns
Type | Description |
---|---|
ClrModifierType | A modreq type. |
WithElementType(IType)
Creates a container type that is identical to this one except for its element type, which is set to a given type.
Declaration
public override ContainerType WithElementType(IType newElementType)
Parameters
Type | Name | Description |
---|---|---|
IType | newElementType | The element type of the new container type. |
Returns
Type | Description |
---|---|
ContainerType | Another container type. |