Class EntityColumnValueCollection
Collection of values of the entity columns.
Inheritance
Implements
Inherited Members
Namespace: Terrasoft.Core.Entities
Assembly: Terrasoft.Core.dll
Syntax
public class EntityColumnValueCollection : IEnumerable<EntityColumnValue>, IEnumerable, ICloneable
Constructors
EntityColumnValueCollection(EntityColumnValueCollection)
Initializes a new EntityColumnValueCollection instance that is a clone of the specified collection of values of the entity columns.
Declaration
public EntityColumnValueCollection(EntityColumnValueCollection source)
Parameters
Type | Name | Description |
---|---|---|
EntityColumnValueCollection | source | The collection of values of the entity columns whose clone is being created. Each element of the created collection is a clone of the corresponding element of the |
EntityColumnValueCollection(UserConnection)
Initializes a new EntityColumnValueCollection instance, using the specified user connection.
Declaration
public EntityColumnValueCollection(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
EntityColumnValueCollection(UserConnection, EntitySchemaColumnCollection)
Initializes a new EntityColumnValueCollection instance based on the specified collection of entity schema columns, using the specified user connection.
Declaration
public EntityColumnValueCollection(UserConnection userConnection, EntitySchemaColumnCollection columns)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
EntitySchemaColumnCollection | columns | A collection of columns of the object schema, from which the values of the current collection of column values of the object are created. |
Properties
Count
Number of items in the collection of values of the entity columns.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Add(EntityColumnValue)
Adds the specified EntityColumnValue instance to the collection.
Declaration
public void Add(EntityColumnValue item)
Parameters
Type | Name | Description |
---|---|---|
EntityColumnValue | item | The EntityColumnValue instance that is being added to the collection. |
Clear()
Removes all items from the current collection.
Declaration
public void Clear()
ClearValues()
Clears column values.
Declaration
public void ClearValues()
Clone()
Creates a clone of the current collection of values of the entity columns.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | A System.Object instance that is a clone of the current collection. |
FindByName(String)
In the collection, searches for the value of the entity column with the specified name. If the column value is not found, null
is returned.
Declaration
public EntityColumnValue FindByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the column value to get. |
Returns
Type | Description |
---|---|
EntityColumnValue | The EntityColumnValue instance with the |
ForceGetByName(String)
Gets the EntityColumnValue instance with the specified name from the collection. If the instance with this name does not exists in the collection, it is created.
Declaration
public EntityColumnValue ForceGetByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the entity column value that is searched for in the collection. |
Returns
Type | Description |
---|---|
EntityColumnValue | The EntityColumnValue instance with the |
ForceLoadColumnValue(String, IDataReader, Int32, Int32)
Loads the value with the specified name from the passed-in System.Data.IDataReader instance. If a value with the specified name is not found, a new element with the specified name is added to the collection.
Declaration
public void ForceLoadColumnValue(string name, IDataReader dataReader, int fieldIndex, int packageSize)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the entity column value. |
System.Data.IDataReader | dataReader | The System.Data.IDataReader instance from which the value is loaded. |
System.Int32 | fieldIndex | The position in the passed-in System.Data.IDataReader from which the value is loaded. |
System.Int32 | packageSize | The packet size. |
ForceLoadColumnValue(String, Object)
Loads the value with the specified name from the passed-in System.Object entity. If a value with the specified name is not found, a new element with the specified name is added to the collection.
Declaration
public void ForceLoadColumnValue(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the entity column value. |
System.Object | value | The value to assign. |
Remarks
Method is overloaded.
GetByName(String)
Gets the item with the specified name from the collection of column values. If no such item is found, an exception is thrown.
Declaration
public EntityColumnValue GetByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the column value to get. |
Returns
Type | Description |
---|---|
EntityColumnValue | The EntityColumnValue instance with the |
GetEnumerator()
Gets the typed enumerator of values of the entity columns.
Declaration
public IEnumerator<EntityColumnValue> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<EntityColumnValue> | The typed enumerator of values of the entity columns. |
TryGetValue<TValue>(String, out TValue)
Returns true
if column value is found; otherwise returns false
.
Declaration
public bool TryGetValue<TValue>(string name, out TValue value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Column value name. |
TValue | value | Result value. |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
TValue | Value type. |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Gets the enumerator of values of the entity columns.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | The enumerator of values of the entity columns. |