Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Struct: RT.Servers.ValuesCollection<TValue>

Summary

Represents a collection of values associated with a single key inside a NameValuesCollection<TValue>.

Generic type parameters

TValueThe type of the values stored in this collection.

Remarks

Implemented as a wrapper for a List which can be read-only or read-write as desired.

Constructors

ValuesCollection<TValue>(List<TValue> values, bool isReadOnly)
Creates a wrapper for the specified list instance. The list may be null to represent an empty wrapper provided that the wrapper is read-only. (see also remarks)

Instance methods

void
Add(TValue item)
  • Implements: ICollection<TValue>.Add(TValue)
Adds the specified value to the collection.
void
  • Implements: ICollection<TValue>.Clear()
Clears all items from the collection.
bool
Contains(TValue item)
  • Implements: ICollection<TValue>.Contains(TValue)
Returns true iff the collection contains the specified item.
void
CopyTo(TValue[] array, int arrayIndex)
  • Implements: ICollection<TValue>.CopyTo(TValue[], int)
Copies all items in this collection to the specified array.
IEnumerator<TValue>
  • Implements: IEnumerable<TValue>.GetEnumerator()
Returns an enumerator to iterate over all items in this collection.
int
IndexOf(TValue item)
  • Implements: IList<TValue>.IndexOf(TValue)
Returns the index of the specified item in this collection, or -1 if not found.
void
Insert(int index, TValue item)
  • Implements: IList<TValue>.Insert(int, TValue)
Inserts the item at the specified position.
bool
Remove(TValue item)
  • Implements: ICollection<TValue>.Remove(TValue)
Removes the specified item from the collection. Returns true iff an item was removed.
void
RemoveAt(int index)
  • Implements: IList<TValue>.RemoveAt(int)
Removes the item at the specified position from the collection.
string
  • Overrides: object.ToString()
Returns a string listing all values in the collection, comma-separated, inside square brackets.

Static methods

ValuesCollection<TValue>
Create(params TValue[] initialValues)
Creates a writable (non-read-only) ValuesCollection<TValue> containing the specified values.
ValuesCollection<TValue>Creates a writable (non-read-only) empty ValuesCollection<TValue>.
ValuesCollection<TValue>
CreateReadOnly(params TValue[] initialValues)
Creates a read-only ValuesCollection<TValue> containing the specified values.

Operators

ValuesCollection<TValue>Creates a read-only ValuesCollection<TValue> containing the specified values.
ValuesCollection<TValue>Creates a read-only ValuesCollection<TValue> wrapping the specified list instance. (see also remarks)

Instance properties

int
  • Implements: ICollection<TValue>.Count
Gets the count of items stored in this collection.
bool
  • Implements: ICollection<TValue>.IsReadOnly
Returns true iff this collection is read-only (cannot be modified).
TValue
this[int index]
  • Implements: IList<TValue>.this[int]
Gets or sets the value at the specified index.
TValue Gets the first value stored in this value collection. If the collection is empty, returns the default value for TValue (i.e. null for all reference types).