Class ConverterCollections.ConverterCollection
A Converter Collection views an underlying ICollection through an IConverter.
Inherited Members
Namespace: Tangosol.Util
Assembly: Coherence.dll
Syntax
[Serializable]
public class ConverterCollections.ConverterCollection : ICollection, IEnumerable
Constructors
ConverterCollection(ICollection, IConverter, IConverter)
Constructor.
Declaration
public ConverterCollection(ICollection col, IConverter convUp, IConverter convDown)
Parameters
Type | Name | Description |
---|---|---|
ICollection | col | The underlying ICollection. |
IConverter | convUp | The IConverter from the underlying collection. |
IConverter | convDown | The IConverter to the underlying collection. |
Fields
m_col
The underlying ICollection.
Declaration
protected ICollection m_col
Field Value
Type | Description |
---|---|
ICollection |
m_convDown
The IConverter from this ICollection to the underlying ICollection.
Declaration
protected IConverter m_convDown
Field Value
Type | Description |
---|---|
IConverter |
m_convUp
The IConverter from the underlying ICollection to this ICollection.
Declaration
protected IConverter m_convUp
Field Value
Type | Description |
---|---|
IConverter |
Properties
Collection
The underlying ICollection.
Declaration
public virtual ICollection Collection { get; }
Property Value
Type | Description |
---|---|
ICollection | The underlying ICollection. |
ConverterDown
The IConverter used to pass values down to the underlying collection.
Declaration
public virtual IConverter ConverterDown { get; }
Property Value
Type | Description |
---|---|
IConverter | The IConverter to the underlying collection. |
ConverterUp
The IConverter used to view the underlying collection's values through.
Declaration
public virtual IConverter ConverterUp { get; }
Property Value
Type | Description |
---|---|
IConverter | The IConverter from the underlying collection. |
Count
Gets the number of elements contained in the collection.
Declaration
public virtual int Count { get; }
Property Value
Type | Description |
---|---|
int | The number of elements contained in the collection. |
IsSynchronized
Gets a value indicating whether access to the collection is synchronized (thread safe).
Declaration
public virtual bool IsSynchronized { get; }
Property Value
Type | Description |
---|---|
bool | true if access to the collection is synchronized (thread safe); otherwise, false. |
SyncRoot
Gets an object that can be used to synchronize access to the collection.
Declaration
public virtual object SyncRoot { get; }
Property Value
Type | Description |
---|---|
object | An object that can be used to synchronize access to the collection. |
Methods
CopyTo(Array, int)
Copies the elements of the ICollection to an array, starting at a particular index.
Declaration
public virtual void CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
Array | array | The one-dimensional array that is the destination of the elements copied from collection. The array must have zero-based indexing. |
int | index | The zero-based index in array at which copying begins. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Array is null. |
ArgumentOutOfRangeException | Index is less than zero. |
ArgumentException | Array is multidimensional or index is equal to or greater than the length of array or the number of elements in the source collection is greater than the available space from index to the end of the destination array. |
InvalidCastException | The type of the source collection cannot be cast automatically to the type of the destination array. |
Equals(object)
Compares the specified object with this collection for equality.
Declaration
public override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
object | o | Object to be compared for equality with this collection. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to this collection. |
Overrides
GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
public virtual IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator | An IEnumerator object that can be used to iterate through the collection. |
GetHashCode()
Returns the hash code value for this collection.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | The hash code value for this collection. |
Overrides
InstantiateEnumerator(IEnumerator, IConverter)
Create a Converter enumerator.
Declaration
protected virtual IEnumerator InstantiateEnumerator(IEnumerator enumerator, IConverter conv)
Parameters
Type | Name | Description |
---|---|---|
IEnumerator | enumerator | The underlying IEnumerator. |
IConverter | conv | The IConverter to view the underlying IEnumerator through. |
Returns
Type | Description |
---|---|
IEnumerator | A Converter enumerator. |
Invalidate()
Drop references to the underlying collection and the converters.
Declaration
public virtual void Invalidate()
ToString()
Return a string description for this collection.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string description of the collection. |