Unosquare
    Show / Hide Table of Contents

    Interface IComponentCollection<T>

    Represents a collection of components.

    Each component in the collection may be given a unique name for later retrieval.

    Namespace: EmbedIO.Utilities
    Syntax
    public interface IComponentCollection<T> : IReadOnlyList<T>
    Type Parameters
    Name Description
    T

    The type of components in the collection.

    Properties

    Item[String]

    Gets the component with the specified name.

    Declaration
    T this[string name] { get; }
    Parameters
    Type Name Description
    String name

    The name.

    Property Value
    Type Description
    T

    The component.

    Named

    Gets an interface representing the named components.

    Declaration
    IReadOnlyDictionary<string, T> Named { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<String, T>

    The named components.

    WithSafeNames

    Gets an interface representing all components associated with safe names.

    The safe name of a component is never null. If a component's unique name if null, its safe name will be some non-null string somehow identifying it.

    Note that safe names are not necessarily unique.

    Declaration
    IReadOnlyList<(string SafeName, T Component)> WithSafeNames { get; }
    Property Value
    Type Description
    IReadOnlyList<ValueTuple<String, T>>

    A list of s, each containing a safe name and a component.

    Methods

    Add(String, T)

    Adds a component to the collection, giving it the specified name if it is not null.

    Declaration
    void Add(string name, T component)
    Parameters
    Type Name Description
    String name

    The name given to the module, or null.

    T component

    The component.

    Comments

    Back to top Copyright © 2017-2019 Unosquare