BarCommandCollection Class
Encapsulates a collection of BarCommand objects.
public class BarCommandCollection : SimpleCollection<BarCommand>
- Inheritance:
- object Collection<BarCommand> SimpleCollection<BarCommand> object
Remarks
This class is a zero-based indexed collection.
Constructors
BarCommandCollection()
Initializes an instance of the class.
Properties
this[string]
The BarCommand with the specified FullName.
public BarCommand? this[string fullName] { get; }
| Parameter | Type | Description |
|---|---|---|
| fullName | string | The FullName of the BarCommand to return. |
Property Value
See Also
Methods
Contains(string)
Determines whether a BarCommand is in the collection with the specified FullName.
public virtual bool Contains(string fullName)
| Parameter | Type | Description |
|---|---|---|
| fullName | string | The FullName of the BarCommand to locate in the collection. |
Returns
- bool:
trueif the name is found in the collection; otherwise,false.
See Also
IndexOf(string)
Searches for the specified FullName of a BarCommand and returns the zero-based index of the first occurrence within the entire collection.
public virtual int IndexOf(string fullName)
| Parameter | Type | Description |
|---|---|---|
| fullName | string | The FullName of the BarCommand to locate in the collection. |
Returns
- int:
The zero-based index of the first occurrence of the FullName within the entire collection, if found; otherwise,
-1.
See Also
OnItemAdded(int, BarCommand)
Performs additional custom processes after an item is added to the collection.
protected override void OnItemAdded(int index, BarCommand value)
| Parameter | Type | Description |
|---|---|---|
| index | int | The zero-based index at which the item was inserted. |
| value | BarCommand | 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.
See Also
OnItemRemoved(int, BarCommand)
Performs additional custom processes after an item is removed from the collection.
protected override void OnItemRemoved(int index, BarCommand value)
| Parameter | Type | Description |
|---|---|---|
| index | int | The zero-based index from which the item was removed. |
| value | BarCommand | The object that was removed. |
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 removed.
See Also
OnValidate(BarCommand, int)
Performs additional custom processes when validating a value.
protected override void OnValidate(BarCommand value, int existingIndex)
| Parameter | Type | Description |
|---|---|---|
| value | BarCommand | 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.
See Also
Inherited Members
- SimpleCollection<BarCommand>.AddRange(IEnumerable<BarCommand>)
- SimpleCollection<BarCommand>.ClearItems()
- SimpleCollection<BarCommand>.FindIndex(Predicate<BarCommand>)
- SimpleCollection<BarCommand>.FindIndex(int, Predicate<BarCommand>)
- SimpleCollection<BarCommand>.FindIndex(int, int, Predicate<BarCommand>)
- SimpleCollection<BarCommand>.FindLastIndex(int, Predicate<BarCommand>)
- SimpleCollection<BarCommand>.FindLastIndex(int, int, Predicate<BarCommand>)
- SimpleCollection<BarCommand>.ForEach(Action<BarCommand>)
- SimpleCollection<BarCommand>.IndexOf(BarCommand, int)
- SimpleCollection<BarCommand>.IndexOf(BarCommand, int, int)
- SimpleCollection<BarCommand>.InsertItem(int, BarCommand)
- SimpleCollection<BarCommand>.InsertRange(int, IEnumerable<BarCommand>)
- SimpleCollection<BarCommand>.LastIndexOf(BarCommand)
- SimpleCollection<BarCommand>.LastIndexOf(BarCommand, int)
- SimpleCollection<BarCommand>.OnItemAdding(int, BarCommand)
- SimpleCollection<BarCommand>.OnItemRemoving(int, BarCommand)
- SimpleCollection<BarCommand>.RemoveItem(int)
- SimpleCollection<BarCommand>.SetItem(int, BarCommand)
- SimpleCollection<BarCommand>.Sort()
- SimpleCollection<BarCommand>.Sort(Comparison<BarCommand>)
- SimpleCollection<BarCommand>.Sort(IComparer<BarCommand>)
- SimpleCollection<BarCommand>.DefaultComparer
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()
Extension Methods
- ObjectExtensions.TryConvertToDouble(object, out double)
- ObjectExtensions.TryConvertToDouble(object, IFormatProvider, out double)