ScriptStack 1.0.0
A .NET scripting language
Lade ...
Suche ...
Keine Treffer
ScriptStack.Collections.ReadOnlyICollection< T > Template-Klassenreferenz
Klassendiagramm für ScriptStack.Collections.ReadOnlyICollection< T >:

Öffentliche Methoden

 ReadOnlyICollection (ICollection< T > collectionToWrap)
 Initializes a new instance of the ReadOnlyICollection<T> class.
 
void Add (T item)
 Add does not change a ReadOnlyICollection.
 
void Clear ()
 Clear does not change a ReadOnlyICollection.
 
bool Contains (T item)
 Determines whether the T:System.Collections.Generic.ICollection`1 contains a specific value.
 
void CopyTo (T[] array, int arrayIndex)
 Copies the elements of the T:System.Collections.Generic.ICollection`1 to an T:System.Array, starting at a particular T:System.Array index.
 
bool Remove (T item)
 Remove does not change a ReadOnlyICollection.
 
IEnumerator< TGetEnumerator ()
 Returns an enumerator that iterates through the collection.
 

Öffentliche, statische Methoden

static ReadOnlyICollection< TAsReadOnly (ICollection< T > collectionToWrap)
 Returned a read only wrapper around the collectionToWrap.
 

Propertys

bool IsReadOnly [get]
 Gets a value indicating whether the T:System.Collections.Generic.ICollection`1 is read-only.
 
int Count [get]
 Gets the number of elements contained in the T:System.Collections.Generic.ICollection`1.
 

Private Methoden

IEnumerator IEnumerable. GetEnumerator ()
 Returns an enumerator that iterates through a collection.
 

Private Attribute

ICollection< Tm_collection
 

Beschreibung der Konstruktoren und Destruktoren

◆ ReadOnlyICollection()

ScriptStack.Collections.ReadOnlyICollection< T >.ReadOnlyICollection ( ICollection< T > collectionToWrap)

Initializes a new instance of the ReadOnlyICollection<T> class.

Parameter
collectionToWrapThe collection to wrap.
54 {
55 m_collection = collectionToWrap;
56 }
ICollection< T > m_collection
Definition ReadOnlyICollection.cs:14

Benutzt ScriptStack.Collections.ReadOnlyICollection< T >.m_collection.

Dokumentation der Elementfunktionen

◆ Add()

Add does not change a ReadOnlyICollection.

Parameter
itemThe object to add to the T:System.Collections.Generic.ICollection`1.
Ausnahmebehandlung
T:System.NotSupportedExceptionThe T:System.Collections.Generic.ICollection`1 is read-only.
64 {
65 }

◆ AsReadOnly()

static ReadOnlyICollection< T > ScriptStack.Collections.ReadOnlyICollection< T >.AsReadOnly ( ICollection< T > collectionToWrap)
static

Returned a read only wrapper around the collectionToWrap.

Parameter
collectionToWrapThe collection to wrap.
Rückgabe
41 {
42 return new ReadOnlyICollection<T>(collectionToWrap);
43 }

◆ Clear()

Clear does not change a ReadOnlyICollection.

Ausnahmebehandlung
T:System.NotSupportedExceptionThe T:System.Collections.Generic.ICollection`1 is read-only.
72 {
73 }

◆ Contains()

Determines whether the T:System.Collections.Generic.ICollection`1 contains a specific value.

Parameter
itemThe object to locate in the T:System.Collections.Generic.ICollection`1.
Rückgabe
true if item is found in the T:System.Collections.Generic.ICollection`1; otherwise, false.
83 {
84 return m_collection.Contains(item);
85 }
bool Contains(KeyValuePair< TKey, TValue > item)
Definition ReadOnlyDictionary.cs:87

Benutzt ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Contains() und ScriptStack.Collections.ReadOnlyICollection< T >.m_collection.

◆ CopyTo()

void ScriptStack.Collections.ReadOnlyICollection< T >.CopyTo ( T[] array,
int arrayIndex )

Copies the elements of the T:System.Collections.Generic.ICollection`1 to an T:System.Array, starting at a particular T:System.Array index.

Parameter
arrayThe one-dimensional T:System.Array that is the destination of the elements copied from T:System.Collections.Generic.ICollection`1. The T:System.Array must have zero-based indexing.
arrayIndexThe zero-based index in array at which copying begins.
Ausnahmebehandlung
T:System.ArgumentOutOfRangeExceptionarrayIndex is less than 0.
T:System.ArgumentNullExceptionarray is null.
T:System.ArgumentExceptionarray is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source T:System.Collections.Generic.ICollection`1 is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array.
96 {
97 m_collection.CopyTo(array, arrayIndex);
98 }
void CopyTo(KeyValuePair< TKey, TValue >[] array, int arrayIndex)
Definition ReadOnlyDictionary.cs:91

Benutzt ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.CopyTo() und ScriptStack.Collections.ReadOnlyICollection< T >.m_collection.

◆ GetEnumerator() [1/2]

IEnumerator IEnumerable. ScriptStack.Collections.ReadOnlyICollection< T >.GetEnumerator ( )
private

Returns an enumerator that iterates through a collection.

Rückgabe
An T:System.Collections.IEnumerator object that can be used to iterate through the collection.
27 {
29 }
IEnumerator IEnumerable. GetEnumerator()
Definition ReadOnlyDictionary.cs:27

Benutzt ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.GetEnumerator() und ScriptStack.Collections.ReadOnlyICollection< T >.m_collection.

◆ GetEnumerator() [2/2]

Returns an enumerator that iterates through the collection.

Rückgabe
A T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.
133 {
135 }

Benutzt ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.GetEnumerator() und ScriptStack.Collections.ReadOnlyICollection< T >.m_collection.

◆ Remove()

Remove does not change a ReadOnlyICollection.

Parameter
itemThe object to remove from the T:System.Collections.Generic.ICollection`1.
Rückgabe
true if item was successfully removed from the T:System.Collections.Generic.ICollection`1; otherwise, false. This method also returns false if item is not found in the original T:System.Collections.Generic.ICollection`1.
Ausnahmebehandlung
T:System.NotSupportedExceptionThe T:System.Collections.Generic.ICollection`1 is read-only.
122 {
123 return false;
124 }

Dokumentation der Datenelemente

◆ m_collection

Dokumentation der Propertys

◆ Count

Gets the number of elements contained in the T:System.Collections.Generic.ICollection`1.

Rückgabe
The number of elements contained in the T:System.Collections.Generic.ICollection`1.
147 {
148 get
149 {
150 return m_collection.Count;
151 }
152 }
int Count
Definition ReadOnlyDictionary.cs:155

◆ IsReadOnly

Gets a value indicating whether the T:System.Collections.Generic.ICollection`1 is read-only.

Rückgabe
true if the T:System.Collections.Generic.ICollection`1 is read-only; otherwise, false.
106 {
107 get
108 {
109 return true;
110 }
111 }

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: