Search Results for

    Show / Hide Table of Contents

    Class StatusGraphicCollection

    • C#
    • Visual Basic
    [Obfuscation(Exclude = true, ApplyToMembers = true)]
    [Serializable]
    public class StatusGraphicCollection
    <Obfuscation(Exclude:=True, ApplyToMembers:=True)>
    <Serializable>
    Public Class StatusGraphicCollection
    Inheritance
    System.Object
    StatusGraphicCollection
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: HomeSeer.PluginSdk.Devices
    Assembly: PluginSdk.dll


    A managed collection of StatusGraphics


    Remarks

    This is a System.Collections.Generic.SortedDictionary<TKey, TValue> where Value or RangeMin is used as the key. This is used to ensure that there is only one StatusGraphic per Value

    Fields

    View Source

    _statusGraphics

    Declaration
    • C#
    • Visual Basic
    SortedDictionary<double, StatusGraphic> _statusGraphics
    _statusGraphics As SortedDictionary(Of Double, StatusGraphic)
    Field Value
    Type Description
    System.Collections.Generic.SortedDictionary<System.Double, StatusGraphic>

    Properties

    View Source

    Count

    The number of StatusGraphics in the collection

    Declaration
    • C#
    • Visual Basic
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    Type Description
    System.Int32
    View Source

    Item[Double]

    Get the StatusGraphic in the collection that handles the specified value

    Declaration
    • C#
    • Visual Basic
    public StatusGraphic this[double value] { get; }
    Public ReadOnly Property Item(value As Double) As StatusGraphic
    Parameters
    Type Name Description
    System.Double value

    The value associated with the desired StatusGraphic

    Property Value
    Type Description
    StatusGraphic
    Exceptions
    Type Condition
    System.Collections.Generic.KeyNotFoundException

    Thrown when no StatusGraphic is found that handles the specified value

    View Source

    Values

    Get an unordered list of the StatusGraphics in the collection

    Declaration
    • C#
    • Visual Basic
    public List<StatusGraphic> Values { get; }
    Public ReadOnly Property Values As List(Of StatusGraphic)
    Property Value
    Type Description
    System.Collections.Generic.List<StatusGraphic>

    Methods

    View Source

    Add(StatusGraphic)

    Add a StatusGraphic to the collection

    Declaration
    • C#
    • Visual Basic
    public void Add(StatusGraphic statusGraphic)
    Public Sub Add(statusGraphic As StatusGraphic)
    Parameters
    Type Name Description
    StatusGraphic statusGraphic

    A StatusGraphic to add. It must not target a value that is already handled by the collection.

    Exceptions
    Type Condition
    System.ArgumentException

    Thrown if the statusGraphic targets a value that is already handled in the collection.

    View Source

    AddRange(IEnumerable<StatusGraphic>)

    Add multiple StatusGraphics to the collection

    Declaration
    • C#
    • Visual Basic
    public void AddRange(IEnumerable<StatusGraphic> statusGraphics)
    Public Sub AddRange(statusGraphics As IEnumerable(Of StatusGraphic))
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<StatusGraphic> statusGraphics

    A collection of StatusGraphics to add. Make sure there is only one StatusGraphic handling each value.

    Exceptions
    Type Condition
    System.ArgumentException

    Thrown if any element in statusGraphics targets a value that is already handled in the collection.

    View Source

    Contains(StatusGraphic)

    Determine if a StatusGraphic is already in the managed collection

    Declaration
    • C#
    • Visual Basic
    public bool Contains(StatusGraphic statusGraphic)
    Public Function Contains(statusGraphic As StatusGraphic) As Boolean
    Parameters
    Type Name Description
    StatusGraphic statusGraphic

    The StatusGraphic to search for

    Returns
    Type Description
    System.Boolean

    langword_csharp_True if the statusGraphic is in the collection, langword_csharp_False if it is not

    Remarks

    This check is based on Value or RangeMin

    View Source

    ContainsValue(Double)

    Determine if a value is handled by the collection

    Declaration
    • C#
    • Visual Basic
    public bool ContainsValue(double value)
    Public Function ContainsValue(value As Double) As Boolean
    Parameters
    Type Name Description
    System.Double value

    The value to check for

    Returns
    Type Description
    System.Boolean

    langword_csharp_True if the value is handled, langword_csharp_False if it is not

    View Source

    GetGraphicsForRange(Double, Double)

    Get a list of StatusGraphics that handle a given range of values

    Declaration
    • C#
    • Visual Basic
    public List<StatusGraphic> GetGraphicsForRange(double min, double max)
    Public Function GetGraphicsForRange(min As Double, max As Double) As List(Of StatusGraphic)
    Parameters
    Type Name Description
    System.Double min

    The smallest number in the range

    System.Double max

    The largest number in the range

    Returns
    Type Description
    System.Collections.Generic.List<StatusGraphic>

    A List of StatusGraphics

    View Source

    Remove(StatusGraphic)

    Remove a StatusGraphic from the collection

    Declaration
    • C#
    • Visual Basic
    public void Remove(StatusGraphic statusGraphic)
    Public Sub Remove(statusGraphic As StatusGraphic)
    Parameters
    Type Name Description
    StatusGraphic statusGraphic

    A StatusGraphic to remove

    Remarks

    A key is determined by the Value or RangeMin of statusGraphic. The found item is then compared by hash code to ensure they are the same.

    View Source

    RemoveAll()

    Remove all StatusGraphics in the collection

    Declaration
    • C#
    • Visual Basic
    public void RemoveAll()
    Public Sub RemoveAll
    View Source

    RemoveKey(Double)

    Remove the StatusGraphic that handles the specified value

    Declaration
    • C#
    • Visual Basic
    public void RemoveKey(double value)
    Public Sub RemoveKey(value As Double)
    Parameters
    Type Name Description
    System.Double value

    The value handled by the StatusGraphic to remove

    • View Source
    In This Article
    Back to top HomeSeer Technologies