Search Results for

    Show / Hide Table of Contents

    Class CustomHeadsetEffect

    Custom effect for headsets.

    Inheritance
    Object
    CustomHeadsetEffect
    Implements
    IEquatable<CustomHeadsetEffect>
    Namespace: Colore.Effects.Headset
    Assembly: Colore.dll
    Syntax
    public sealed class CustomHeadsetEffect : ValueType

    Constructors

    CustomHeadsetEffect(Color)

    Initializes a new instance of the CustomHeadsetEffect struct with a default color to apply to every LED.

    Declaration
    public CustomHeadsetEffect(Color color)
    Parameters
    Type Name Description
    Color color

    The color to set every LED to initially.

    CustomHeadsetEffect(CustomHeadsetEffect)

    Initializes a new instance of the CustomHeadsetEffect struct with the colors copied from another struct of the same type.

    Declaration
    public CustomHeadsetEffect(CustomHeadsetEffect other)
    Parameters
    Type Name Description
    CustomHeadsetEffect other

    The struct to copy data from.

    CustomHeadsetEffect(IList<Color>)

    Initializes a new instance of the CustomHeadsetEffect struct.

    Declaration
    public CustomHeadsetEffect(IList<Color> colors)
    Parameters
    Type Name Description
    IList<Color> colors

    The colors to use.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if colors is null.

    ArgumentException

    Thrown if the colors list supplied is of an incorrect size.

    Properties

    Item[Int32]

    Gets or sets LEDs in the custom array.

    Declaration
    public Color this[int led] { get; set; }
    Parameters
    Type Name Description
    Int32 led

    Index of the LED to access.

    Property Value
    Type Description
    Color

    The Color at the specified position.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the specified LED index is outside the range of available LED indices.

    Methods

    Clear()

    Clears the colors in this CustomHeadsetEffect struct (sets to Black).

    Declaration
    public void Clear()

    Clone()

    Returns a copy of this struct.

    Declaration
    public CustomHeadsetEffect Clone()
    Returns
    Type Description
    CustomHeadsetEffect

    A copy of this struct.

    Create()

    Create a new empty CustomHeadsetEffect struct.

    Declaration
    public static CustomHeadsetEffect Create()
    Returns
    Type Description
    CustomHeadsetEffect

    An instance of CustomHeadsetEffect filled with the color black.

    Equals(CustomHeadsetEffect)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(CustomHeadsetEffect other)
    Parameters
    Type Name Description
    CustomHeadsetEffect other

    An object to compare with this object.

    Returns
    Type Description
    Boolean

    true if the current object is equal to the other parameter; otherwise, false.

    Equals(Object)

    Indicates whether this instance and a specified object are equal.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    Another object to compare to.

    Returns
    Type Description
    Boolean

    true if obj and this instance are the same type and represent the same value; otherwise, false.

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A 32-bit signed integer that is the hash code for this instance.

    Set(Color)

    Sets all the LED indices to the specified Color.

    Declaration
    public void Set(Color color)
    Parameters
    Type Name Description
    Color color

    The Color to set the LEDs to.

    Operators

    Equality(CustomHeadsetEffect, Object)

    Compares an instance of CustomHeadsetEffect with another object for equality.

    Declaration
    public static bool operator ==(CustomHeadsetEffect left, object right)
    Parameters
    Type Name Description
    CustomHeadsetEffect left

    The left operand, an instance of CustomHeadsetEffect.

    Object right

    The right operand, any type of object.

    Returns
    Type Description
    Boolean

    true if the two objects are equal, otherwise false.

    Inequality(CustomHeadsetEffect, Object)

    Compares an instance of CustomHeadsetEffect with another object for inequality.

    Declaration
    public static bool operator !=(CustomHeadsetEffect left, object right)
    Parameters
    Type Name Description
    CustomHeadsetEffect left

    The left operand, an instance of CustomHeadsetEffect.

    Object right

    The right operand, any type of object.

    Returns
    Type Description
    Boolean

    true if the two objects are not equal, otherwise false.

    Implements

    System.IEquatable<T>
    In This Article
    Back to top Copyright © 2015-2022 by Adam Hellberg and Brandon Scott
    Generated by DocFX