Class EventedList<TData, TContext>
Represents list that rises change events
Implements
System.Collections.Generic.IList<TData>
System.Collections.Generic.ICollection<TData>
System.Collections.Generic.IEnumerable<TData>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos.Collections
Assembly: Azos.dll
Syntax
[Serializable]
public class EventedList<TData, TContext> : EventedCollectionBase<TContext>, IList<TData>, ICollection<TData>, IEnumerable<TData>, IEnumerable
Type Parameters
Name | Description |
---|---|
TData | |
TContext |
Constructors
EventedList()
Initializes a new instance that is empty and has the default initial capacity.
Declaration
public EventedList()
EventedList(TContext, Boolean)
Initializes a new instance that is empty and has the default initial capacity.
Declaration
public EventedList(TContext context, bool contextReadOnly)
Parameters
Type | Name | Description |
---|---|---|
TContext | context | |
System.Boolean | contextReadOnly |
EventedList(TContext, Boolean, IEnumerable<TData>)
Initializes a new instance that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
Declaration
public EventedList(TContext context, bool contextReadOnly, IEnumerable<TData> collection)
Parameters
Type | Name | Description |
---|---|---|
TContext | context | |
System.Boolean | contextReadOnly | |
System.Collections.Generic.IEnumerable<TData> | collection |
EventedList(TContext, Boolean, Int32)
Initializes a new instance that is empty and has the specified initial capacity.
Declaration
public EventedList(TContext context, bool contextReadOnly, int capacity)
Parameters
Type | Name | Description |
---|---|---|
TContext | context | |
System.Boolean | contextReadOnly | |
System.Int32 | capacity |
Fields
ChangeEvent
Declaration
[NonSerialized]
public EventedList<TData, TContext>.ChangeHandler ChangeEvent
Field Value
Type | Description |
---|---|
EventedList.ChangeHandler<> |
Properties
Count
Declaration
public virtual int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
Declaration
public virtual TData this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
TData |
Methods
Add(TData)
Declaration
public virtual void Add(TData item)
Parameters
Type | Name | Description |
---|---|---|
TData | item |
Clear()
Declaration
public virtual void Clear()
Contains(TData)
Declaration
public virtual bool Contains(TData item)
Parameters
Type | Name | Description |
---|---|---|
TData | item |
Returns
Type | Description |
---|---|
System.Boolean |
CopyTo(TData[], Int32)
Declaration
public virtual void CopyTo(TData[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
TData[] | array | |
System.Int32 | arrayIndex |
GetEnumerator()
Declaration
public virtual IEnumerator<TData> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<TData> |
IndexOf(TData)
Declaration
public virtual int IndexOf(TData item)
Parameters
Type | Name | Description |
---|---|---|
TData | item |
Returns
Type | Description |
---|---|
System.Int32 |
Insert(Int32, TData)
Declaration
public virtual void Insert(int index, TData item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
TData | item |
Remove(TData)
Declaration
public virtual bool Remove(TData item)
Parameters
Type | Name | Description |
---|---|---|
TData | item |
Returns
Type | Description |
---|---|
System.Boolean |
RemoveAt(Int32)
Declaration
public virtual void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable