Show / Hide Table of Contents

    Struct AttributeMap

    Defines a container that facilitates quick type-based attribute lookups.

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Flame
    Assembly: Flame.dll
    Syntax
    public struct AttributeMap

    Constructors

    | Improve this Doc View Source

    AttributeMap(AttributeMapBuilder)

    Creates this attribute map as a read-only view of an attribute map builder.

    Declaration
    public AttributeMap(AttributeMapBuilder builder)
    Parameters
    Type Name Description
    AttributeMapBuilder builder

    An attribute map builder to create a read-only view of.

    | Improve this Doc View Source

    AttributeMap(IAttribute[])

    Creates a new attribute map from a sequence of attributes.

    Declaration
    public AttributeMap(params IAttribute[] attributes)
    Parameters
    Type Name Description
    IAttribute[] attributes

    A sequence of attributes to wrap in an attribute map.

    | Improve this Doc View Source

    AttributeMap(IEnumerable<IAttribute>)

    Creates a new attribute map from a sequence of attributes.

    Declaration
    public AttributeMap(IEnumerable<IAttribute> attributes)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<IAttribute> attributes

    A sequence of attributes to wrap in an attribute map.

    Fields

    | Improve this Doc View Source

    Empty

    An empty attribute map.

    Declaration
    public static readonly AttributeMap Empty
    Field Value
    Type Description
    AttributeMap

    An attribute map.

    Methods

    | Improve this Doc View Source

    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

    true if an attribute of type type is in this attribute map; otherwise, false.

    | Improve this Doc View Source

    GetAll()

    Gets all attributes in this attribute map.

    Declaration
    public IEnumerable<IAttribute> GetAll()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<IAttribute>

    A sequence that contains all attributes in this attribute map.

    | Improve this Doc View Source

    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 type defined in this attribute map.

    | Improve this Doc View Source

    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 type, if one is defined in this attribute map; otherwise, null.

    | Improve this Doc View Source

    TryGet(IType, out IAttribute)

    Tries to find an attribute of a particular type.

    Declaration
    public bool TryGet(IType type, out IAttribute attribute)
    Parameters
    Type Name Description
    IType type

    The type of attribute to look for.

    IAttribute attribute

    A variable to store the attribute in, if one is found.

    Returns
    Type Description
    System.Boolean

    true if an attribute of type type is found in this attribute map and stored in attribute; otherwise, false.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX