Class AttributeMapBuilder
Defines a mutable attribute map.
Inheritance
Inherited Members
Namespace: Flame
Assembly: Flame.dll
Syntax
public sealed class AttributeMapBuilder
Constructors
| Improve this Doc View SourceAttributeMapBuilder()
Creates an empty attribute map builder.
Declaration
public AttributeMapBuilder()
AttributeMapBuilder(AttributeMap)
Creates an attribute map builder by copying the contents of an existing attribute map.
Declaration
public AttributeMapBuilder(AttributeMap attributes)
Parameters
Type | Name | Description |
---|---|---|
AttributeMap | attributes | An attribute map. |
AttributeMapBuilder(AttributeMapBuilder)
Creates an attribute map builder by copying the contents of another attribute map builder.
Declaration
public AttributeMapBuilder(AttributeMapBuilder attributes)
Parameters
Type | Name | Description |
---|---|---|
AttributeMapBuilder | attributes | An attribute map builder. |
AttributeMapBuilder(IAttribute[])
Creates an attribute map builder from an array of attributes.
Declaration
public AttributeMapBuilder(params IAttribute[] attributes)
Parameters
Type | Name | Description |
---|---|---|
IAttribute[] | attributes | An array of attributes. |
AttributeMapBuilder(IEnumerable<IAttribute>)
Creates an attribute map builder from a sequence of attributes.
Declaration
public AttributeMapBuilder(IEnumerable<IAttribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IAttribute> | attributes | A sequence of attributes. |
Methods
| Improve this Doc View SourceAdd(IAttribute)
Adds the given attribute to this attribute map builder.
Declaration
public void Add(IAttribute attribute)
Parameters
Type | Name | Description |
---|---|---|
IAttribute | attribute |
AddRange(AttributeMap)
Adds the given range of attributes to this attribute map builder.
Declaration
public void AddRange(AttributeMap attributes)
Parameters
Type | Name | Description |
---|---|---|
AttributeMap | attributes |
AddRange(AttributeMapBuilder)
Adds the given range of attributes to this attribute map builder.
Declaration
public void AddRange(AttributeMapBuilder attributes)
Parameters
Type | Name | Description |
---|---|---|
AttributeMapBuilder | attributes |
AddRange(IAttribute[])
Adds the given range of attributes to this attribute map builder.
Declaration
public void AddRange(IAttribute[] attributes)
Parameters
Type | Name | Description |
---|---|---|
IAttribute[] | attributes |
AddRange(IEnumerable<IAttribute>)
Adds the given range of attributes to this attribute map builder.
Declaration
public void AddRange(IEnumerable<IAttribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IAttribute> | attributes |
Contains(IType)
Checks if this attribute map contains at least one attribute of a particular type.
Declaration
public bool Contains(IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The type of attribute to look for. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetAll(IType)
Gets all attributes of a particular type in this attribute map.
Declaration
public IEnumerable<IAttribute> GetAll(IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The type of attribute to look for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IAttribute> | A sequence that contains all attributes of type |
GetOrNull(IType)
Finds the first attribute of a particular type. Returns null
if no such attribute exists.
Declaration
public IAttribute GetOrNull(IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The type of attribute to look for. |
Returns
Type | Description |
---|---|
IAttribute | An attribute of type |
RemoveAll(IType)
Removes all attributes that have the given type.
Declaration
public void RemoveAll(IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type |