[Serializable] |
ctor #1 | Overloaded:.ctor() Default constructor. This constructor is called by derived class constructors to initialize state in this type.Initializes a new instance of the CodeAttributeArgumentCollection class. |
ctor #2 | Overloaded:.ctor(CodeAttributeArgument[] value) Initializes a new instance of the CodeAttributeArgumentCollection class containing the specified array of CodeAttributeArgument objects. |
ctor #3 | Overloaded:.ctor(CodeAttributeArgumentCollection value) Initializes a new instance of the CodeAttributeArgumentCollection class containing the elements of the specified source collection. |
Count (inherited from System.Collections.CollectionBase) |
Read-only See base class member description: System.Collections.CollectionBase.Count Gets the number of elements contained in the CollectionBase instance. |
Item | Read-write Gets or sets the CodeAttributeArgument at the specified index in the collection. |
Add | Adds the specified CodeAttributeArgument to the collection. |
AddRange | Overloaded:AddRange(CodeAttributeArgument[] value) Copies the elements of the specified CodeAttributeArgument array to the end of the collection. |
AddRange | Overloaded:AddRange(CodeAttributeArgumentCollection value) Adds the contents of another CodeAttributeArgumentCollection to the end of the collection. |
Clear (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.Clear Removes all objects from the CollectionBase instance. |
Contains | Gets a value indicating whether the collection contains the specified CodeAttributeArgument. |
CopyTo | Copies the collection objects to a one-dimensional Array instance beginning at the specified index. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetEnumerator (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.GetEnumerator Returns an enumerator that can iterate through the CollectionBase instance. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
IndexOf | Gets the index in the collection of the specified CodeAttributeArgument, if it exists in the collection. |
Insert | Inserts the specified CodeAttributeArgument into the collection at the specified index. |
Remove | Removes the specified CodeAttributeArgument from the collection. |
RemoveAt (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.RemoveAt Removes the element at the specified index of the CollectionBase instance. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
InnerList (inherited from System.Collections.CollectionBase) |
Read-only See base class member description: System.Collections.CollectionBase.InnerList Gets an ArrayList containing the list of elements in the CollectionBase instance. |
List (inherited from System.Collections.CollectionBase) |
Read-only See base class member description: System.Collections.CollectionBase.List Gets an IList containing the list of elements in the CollectionBase instance. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
OnClear (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.OnClear Performs additional custom processes when clearing the contents of the CollectionBase instance. |
OnClearComplete (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.OnClearComplete Performs additional custom processes after clearing the contents of the CollectionBase instance. |
OnInsert (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.OnInsert Performs additional custom processes before inserting a new element into the CollectionBase instance. |
OnInsertComplete (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.OnInsertComplete Performs additional custom processes after inserting a new element into the CollectionBase instance. |
OnRemove (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.OnRemove Performs additional custom processes when removing an element from the CollectionBase instance. |
OnRemoveComplete (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.OnRemoveComplete Performs additional custom processes after removing an element from the CollectionBase instance. |
OnSet (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.OnSet Performs additional custom processes before setting a value in the CollectionBase instance. |
OnSetComplete (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.OnSetComplete Performs additional custom processes after setting a value in the CollectionBase instance. |
OnValidate (inherited from System.Collections.CollectionBase) |
See base class member description: System.Collections.CollectionBase.OnValidate Performs additional custom processes when validating a value. |
Hierarchy:
public CodeAttributeArgumentCollection(); |
public CodeAttributeArgumentCollection( |
value
public CodeAttributeArgumentCollection(CodeAttributeArgumentCollection( |
value
public int Count {get;}
|
protected ArrayList InnerList {get;}
|
public CodeAttributeArgument this[int index] {get; set;}
|
index
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | The index parameter is outside the valid range of indices for the collection. |
protected IList List {get;}
|
public int Add( |
value
public void AddRange( |
value
public void AddRange( |
value
public void Clear(); |
public bool Contains( |
value
public void CopyTo( |
array
index
Exception Type | Condition |
---|---|
ArgumentException | The destination array is multidimensional. -or- The number of elements in the CodeAttributeArgumentCollection is greater than the available space between the index of the target array specified by the index parameter and the end of the target array. |
ArgumentNullException | The array parameter is null. |
ArgumentOutOfRangeException | The index parameter is less than the target array's minimum index. |
~CodeAttributeArgumentCollection(); |
public IEnumerator GetEnumerator(); |
Initially, the enumerator is positioned before the first element in the collection. IEnumerator.Reset also brings the enumerator back to this position. At this position, calling IEnumerator.Current throws an exception. Therefore, you must call IEnumerator.MoveNext to advance the enumerator to the first element of the collection before reading the value of IEnumerator.Current.
IEnumerator.Current returns the same object until either IEnumerator.MoveNext or IEnumerator.Reset is called. IEnumerator.MoveNext sets IEnumerator.Current to the next element.
After the end of the collection is passed, the enumerator is positioned after the last element in the collection, and calling IEnumerator.MoveNext returns false. If the last call to IEnumerator.MoveNext returned false, calling IEnumerator.Current throws an exception. To set IEnumerator.Current to the first element of the collection again, you can call IEnumerator.Reset followed by IEnumerator.MoveNext.
An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to IEnumerator.MoveNext or IEnumerator.Reset throws an InvalidOperationException. If the collection is modified between IEnumerator.MoveNext and IEnumerator.Current, IEnumerator.Current will return the element that it is set to, even if the enumerator is already invalidated.
The enumerator does not have exclusive access to the collection; therefore, enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads could still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.
public virtual int GetHashCode(); |
public Type GetType(); |
public int IndexOf( |
value
public void Insert( |
index
value
protected object MemberwiseClone(); |
protected virtual void OnClear(); |
The On* methods are invoked only on the instance returned by the CollectionBase.List property, but not on the instance returned by the CollectionBase.InnerList property.
This method allows implementers to define processes that must be performed before deleting all the elements from the underlying ArrayList. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.
CollectionBase.OnClear is invoked before the standard Clear behavior, whereas CollectionBase.OnClearComplete is invoked after the standard Clear behavior.
For example, implementers can exempt certain elements from deletion by a global Clear.
protected virtual void OnClearComplete(); |
The On* methods are invoked only on the instance returned by the CollectionBase.List property, but not on the instance returned by the CollectionBase.InnerList property.
This method allows implementers to define processes that must be performed after deleting all the elements from the underlying ArrayList. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.
CollectionBase.OnClear is invoked before the standard Clear behavior, whereas CollectionBase.OnClearComplete is invoked after the standard Clear behavior.
index
value
The On* methods are invoked only on the instance returned by the CollectionBase.List property, but not on the instance returned by the CollectionBase.InnerList property.
This method allows implementers to define processes that must be performed before inserting the element into the underlying ArrayList. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.
CollectionBase.OnInsert is invoked before the standard Insert behavior, whereas CollectionBase.OnInsertComplete is invoked after the standard Insert behavior.
For example, implementers can restrict which types of objects can be inserted into the ArrayList.
index
value
The On* methods are invoked only on the instance returned by the CollectionBase.List property, but not on the instance returned by the CollectionBase.InnerList property.
This method allows implementers to define processes that must be performed after inserting the element into the underlying ArrayList. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.
CollectionBase.OnInsert is invoked before the standard Insert behavior, whereas CollectionBase.OnInsertComplete is invoked after the standard Insert behavior.
index
value
The On* methods are invoked only on the instance returned by the CollectionBase.List property, but not on the instance returned by the CollectionBase.InnerList property.
This method allows implementers to define processes that must be performed before removing the element from the underlying ArrayList. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.
CollectionBase.OnRemove is invoked before the standard Remove behavior, whereas CollectionBase.OnRemoveComplete is invoked after the standard Remove behavior.
For example, implementers can prevent removal of elements by always throwing an exception in CollectionBase.OnRemove.
index
value
The On* methods are invoked only on the instance returned by the CollectionBase.List property, but not on the instance returned by the CollectionBase.InnerList property.
This method allows implementers to define processes that must be performed after removing the element from the underlying ArrayList. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.
CollectionBase.OnRemove is invoked before the standard Remove behavior, whereas CollectionBase.OnRemoveComplete is invoked after the standard Remove behavior.
index
oldValue
newValue
The On* methods are invoked only on the instance returned by the CollectionBase.List property, but not on the instance returned by the CollectionBase.InnerList property.
This method allows implementers to define processes that must be performed before setting the specified element in the underlying ArrayList. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.
CollectionBase.OnSet is invoked before the standard Set behavior, whereas CollectionBase.OnSetComplete is invoked after the standard Set behavior.
For example, implementers can restrict which values can be overwritten by performing a check inside CollectionBase.OnSet.
index
oldValue
newValue
The On* methods are invoked only on the instance returned by the CollectionBase.List property, but not on the instance returned by the CollectionBase.InnerList property.
This method allows implementers to define processes that must be performed after setting the specified element in the underlying ArrayList. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.
CollectionBase.OnSet is invoked before the standard Set behavior, whereas CollectionBase.OnSetComplete is invoked after the standard Set behavior.
protected virtual void OnValidate( |
value
The On* methods are invoked only on the instance returned by the CollectionBase.List property, but not on the instance returned by the CollectionBase.InnerList property.
This method allows implementers to define processes that must be performed when executing the standard behavior of the underlying ArrayList. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.
CollectionBase.OnValidate can be used to impose restrictions on the type of objects that are accepted into the collection. The default implementation prevents null from being added to or removed from the underlying ArrayList.
public void Remove( |
value
Exception Type | Condition |
---|---|
ArgumentException | The specified object is not found in the collection. |
public void RemoveAt( |
index
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | index is less than zero. -or- index is equal to or greater than CollectionBase.Count. |
public virtual string ToString(); |