//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version: 1.1.4322.573
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
using System;
using System.Collections;
namespace Server.Engines.Reports
{
///
/// Strongly typed collection of Server.Engines.Reports.QueueStatus.
///
public class QueueStatusCollection : CollectionBase
{
///
/// Gets or sets the value of the Server.Engines.Reports.QueueStatus at a specific position in the QueueStatusCollection.
///
public QueueStatus this[int index]
{
get => (QueueStatus)List[index];
set => List[index] = value;
}
///
/// Append a Server.Engines.Reports.QueueStatus entry to this collection.
///
/// Server.Engines.Reports.QueueStatus instance.
/// The position into which the new element was inserted.
public int Add(QueueStatus value)
{
return List.Add(value);
}
///
/// Determines whether a specified Server.Engines.Reports.QueueStatus instance is in this collection.
///
/// Server.Engines.Reports.QueueStatus instance to search for.
/// True if the Server.Engines.Reports.QueueStatus instance is in the collection; otherwise false.
public bool Contains(QueueStatus value)
{
return List.Contains(value);
}
///
/// Retrieve the index a specified Server.Engines.Reports.QueueStatus instance is in this collection.
///
/// Server.Engines.Reports.QueueStatus instance to find.
///
/// The zero-based index of the specified Server.Engines.Reports.QueueStatus instance. If the object is not found, the
/// return value is -1.
///
public int IndexOf(QueueStatus value)
{
return List.IndexOf(value);
}
///
/// Removes a specified Server.Engines.Reports.QueueStatus instance from this collection.
///
/// The Server.Engines.Reports.QueueStatus instance to remove.
public void Remove(QueueStatus value)
{
List.Remove(value);
}
///
/// Returns an enumerator that can iterate through the Server.Engines.Reports.QueueStatus instance.
///
/// An Server.Engines.Reports.QueueStatus's enumerator.
public new QueueStatusCollectionEnumerator GetEnumerator()
{
return new QueueStatusCollectionEnumerator(this);
}
///
/// Insert a Server.Engines.Reports.QueueStatus instance into this collection at a specified index.
///
/// Zero-based index.
/// The Server.Engines.Reports.QueueStatus instance to insert.
public void Insert(int index, QueueStatus value)
{
List.Insert(index, value);
}
///
/// Strongly typed enumerator of Server.Engines.Reports.QueueStatus.
///
public class QueueStatusCollectionEnumerator : IEnumerator
{
///
/// Collection to enumerate.
///
private QueueStatusCollection _collection;
///
/// Current element pointed to.
///
private QueueStatus _currentElement;
///
/// Current index
///
private int _index;
///
/// Default constructor for enumerator.
///
/// Instance of the collection to enumerate.
internal QueueStatusCollectionEnumerator(QueueStatusCollection collection)
{
_index = -1;
_collection = collection;
}
///
/// Gets the Server.Engines.Reports.QueueStatus object in the enumerated QueueStatusCollection currently indexed by this
/// instance.
///
public QueueStatus Current
{
get
{
if (_index == -1
|| _index >= _collection.Count)
throw new IndexOutOfRangeException("Enumerator not started.");
return _currentElement;
}
}
///
/// Gets the current element in the collection.
///
object IEnumerator.Current
{
get
{
if (_index == -1
|| _index >= _collection.Count)
throw new IndexOutOfRangeException("Enumerator not started.");
return _currentElement;
}
}
///
/// Reset the cursor, so it points to the beginning of the enumerator.
///
public void Reset()
{
_index = -1;
_currentElement = null;
}
///
/// Advances the enumerator to the next queue of the enumeration, if one is currently available.
///
///
/// true, if the enumerator was successfully advanced to the next queue; false, if the enumerator has reached the end
/// of the enumeration.
///
public bool MoveNext()
{
if (_index
< _collection.Count - 1)
{
_index = _index + 1;
_currentElement = _collection[_index];
return true;
}
_index = _collection.Count;
return false;
}
}
}
}