BarModeCollection Class
Encapsulates a collection of modes.
[TypeConverter(typeof(BarModeCollectionConverter))]
public class BarModeCollection : SimpleCollection<string>
- Inheritance:
- object Collection<string> SimpleCollection<string> object
Remarks
This class is a zero-based indexed collection.
Constructors
BarModeCollection()
Initializes an instance of the class.
public BarModeCollection()
Methods
Contains(string?)
Determines whether the ICollection<T> contains a specific value.
public bool Contains(string? mode)
| Parameter | Type | Description |
|---|---|---|
| mode | string |
Returns
- bool:
trueifitemis found in the ICollection<T>; otherwise,false.
OnItemAdded(int, string)
Performs additional custom processes after an item is added to the collection.
protected override void OnItemAdded(int index, string value)
| Parameter | Type | Description |
|---|---|---|
| index | int | The zero-based index at which the item was inserted. |
| value | string | The object that was inserted. |
Remarks
The default implementation of this method is intended to be overridden by a derived class to perform some action after the specified object is added.
OnValidate(string, int)
Performs additional custom processes when validating a value.
protected override void OnValidate(string value, int existingIndex)
| Parameter | Type | Description |
|---|---|---|
| value | string | The object to validate. |
| existingIndex | int | The index within the collection of the object that would be replaced by the value. |
Remarks
The default implementation of this method determines whether value is null, and if so,
throws ArgumentNullException. It is intended to be overridden by a derived class to
perform additional action when the specified element is validated.
Inherited Members
- SimpleCollection<string>.AddRange(IEnumerable<string>)
- SimpleCollection<string>.ClearItems()
- SimpleCollection<string>.FindIndex(Predicate<string>)
- SimpleCollection<string>.FindIndex(int, Predicate<string>)
- SimpleCollection<string>.FindIndex(int, int, Predicate<string>)
- SimpleCollection<string>.FindLastIndex(int, Predicate<string>)
- SimpleCollection<string>.FindLastIndex(int, int, Predicate<string>)
- SimpleCollection<string>.ForEach(Action<string>)
- SimpleCollection<string>.IndexOf(string, int)
- SimpleCollection<string>.IndexOf(string, int, int)
- SimpleCollection<string>.InsertItem(int, string)
- SimpleCollection<string>.InsertRange(int, IEnumerable<string>)
- SimpleCollection<string>.LastIndexOf(string)
- SimpleCollection<string>.LastIndexOf(string, int)
- SimpleCollection<string>.OnItemAdding(int, string)
- SimpleCollection<string>.OnItemRemoved(int, string)
- SimpleCollection<string>.OnItemRemoving(int, string)
- SimpleCollection<string>.RemoveItem(int)
- SimpleCollection<string>.SetItem(int, string)
- SimpleCollection<string>.Sort()
- SimpleCollection<string>.Sort(Comparison<string>)
- SimpleCollection<string>.Sort(IComparer<string>)
- SimpleCollection<string>.DefaultComparer
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()