Search Results for

    Show / Hide Table of Contents

    Class ChunkTypesCollection

    Collection of ChunkType objects which provide identity information of a chunk.
    Inheritance
    object
    ChunkTypesCollection
    Implements
    IEnumerable<ChunkType>
    IEnumerable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.Core
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public sealed class ChunkTypesCollection : IEnumerable<ChunkType>, IEnumerable

    Methods

    Add(Type, string)

    Adds chunk type along with the corresponding ID.
    Declaration
    public void Add(Type type, string id)
    Parameters
    Type Name Description
    Type type Type of chunk.
    string id ID of chunk.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • type is null.
    • id is null.
    ArgumentException Chunk type specified by type and id already exists in the ChunksCollection.

    GetEnumerator()

    Returns an enumerator that iterates through a collection.
    Declaration
    public IEnumerator<ChunkType> GetEnumerator()
    Returns
    Type Description
    IEnumerator<ChunkType> An enumerator that can be used to iterate through the collection.

    TryGetId(Type, out string)

    Gets the ID associated with the specified chunk type.
    Declaration
    public bool TryGetId(Type type, out string id)
    Parameters
    Type Name Description
    Type type Chunk type to get ID for.
    string id When this method returns, contains the ID associated with the specified chunk type, if the type is found; otherwise, null. This parameter is passed uninitialized.
    Returns
    Type Description
    bool true if the ChunkTypesCollection contains an ID for the specified chunk type; otherwise, false.

    TryGetType(string, out Type)

    Gets the chunk type associated with the specified ID.
    Declaration
    public bool TryGetType(string id, out Type type)
    Parameters
    Type Name Description
    string id ID of the chunk type to get.
    Type type When this method returns, contains the chunk type associated with the specified ID, if ID is found; otherwise, null. This parameter is passed uninitialized.
    Returns
    Type Description
    bool true if the ChunkTypesCollection contains a chunk type with the specified ID; otherwise, false.

    Implements

    IEnumerable<T>
    IEnumerable
    In this article
    Back to top 2024 / Generated by DocFX