Class QueryParameterCollection
Collection of the query parameters.
Inheritance
Implements
Inherited Members
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public class QueryParameterCollection : Collection<QueryParameter>, IList<QueryParameter>, ICollection<QueryParameter>, IList, ICollection, IReadOnlyList<QueryParameter>, IReadOnlyCollection<QueryParameter>, IEnumerable<QueryParameter>, IEnumerable, ICloneable
Constructors
QueryParameterCollection()
Initializes a new QueryParameterCollection instance.
Declaration
public QueryParameterCollection()
QueryParameterCollection(QueryParameterCollection)
Initializes a new QueryParameterCollection instance that is a clone of the specified collection of query parameters.
Declaration
public QueryParameterCollection(QueryParameterCollection source)
Parameters
Type | Name | Description |
---|---|---|
QueryParameterCollection | source | The collection of query parameters whose clone is being created. |
Properties
ParentParametrizedQuery
The parent query to which the given collection of query parameters belongs.
Declaration
public IParametrizedQuery ParentParametrizedQuery { get; set; }
Property Value
Type | Description |
---|---|
IParametrizedQuery |
Methods
Add(String, Object)
In the current collection of query parameters, adds the parameter with the specified name and value.
Declaration
public QueryParameter Add(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the query parameter being added. |
System.Object | value | The value of the query parameter being added. |
Returns
Type | Description |
---|---|
QueryParameter | The QueryParameter parameter with the |
Add(String, Object, String)
In the current collection of query parameters, adds the parameter with the specified name and value. The value has the specific data type with the specified name.
Declaration
public QueryParameter Add(string name, object value, string parameterTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the query parameter being added. |
System.Object | value | The value of the query parameter being added. |
System.String | parameterTypeName | The name of the data type of the query parameter value. |
Returns
Type | Description |
---|---|
QueryParameter | The QueryParameter parameter added in the current collection of query parameters. It has the |
Add(String, Object, DataValueType)
In the current collection of query parameters, adds the parameter with the specified name and value, which also has the specific data type.
Declaration
public QueryParameter Add(string name, object value, DataValueType parameterType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the query parameter being added. |
System.Object | value | The value of the query parameter being added. |
DataValueType | parameterType | The type of the value data of the query parameter being added. |
Returns
Type | Description |
---|---|
QueryParameter | The QueryParameter parameter added in the current collection of query parameters. It has the |
AddOut(String, String)
In the current collection of query parameters, adds the output parameter with the specified parameter name and name of the data type of the parameter value.
Declaration
public QueryParameter AddOut(string name, string parameterTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the query parameter being added. |
System.String | parameterTypeName | The name of the data type of the query parameter value. |
Returns
Type | Description |
---|---|
QueryParameter | The QueryParameter parameter with the |
AddOut(String, DataValueType)
In the current collection of query parameters, adds the output parameter with the specified name and the specified type of the parameter value data.
Declaration
public QueryParameter AddOut(string name, DataValueType parameterType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the query parameter being added. |
DataValueType | parameterType | The data type of the query parameter value. |
Returns
Type | Description |
---|---|
QueryParameter | The QueryParameter output parameter whose value has the |
AddVar(String, Object, String)
In the current collection of query parameters, adds the input/output parameter with the specified name, value and name of the data type of the parameter value.
Declaration
public QueryParameter AddVar(string name, object value, string parameterTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the query parameter being added. |
System.Object | value | The value of the query parameter being added. |
System.String | parameterTypeName | The name of the value data type of the query parameter being added. |
Returns
Type | Description |
---|---|
QueryParameter | The QueryParameter parameter with the |
AddVar(String, Object, DataValueType)
In the current collection of query parameters, adds the input/output parameter with the specified name, value and value type.
Declaration
public QueryParameter AddVar(string name, object value, DataValueType parameterType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the query parameter being added. |
System.Object | value | The value of the query parameter being added. |
DataValueType | parameterType | The type of the value data of the query parameter being added. |
Returns
Type | Description |
---|---|
QueryParameter | The QueryParameter parameter with the |
ClearItems()
Declaration
protected override void ClearItems()
Overrides
Clone()
Creates the clone of the current QueryParameterCollection instance.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | A new QueryParameterCollection instance that represents the copy of the current instance. |
FindByName(String)
In the current collection of query parameters, searches for the parameter with the specified name.
Declaration
public QueryParameter FindByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the parameter to get. |
Returns
Type | Description |
---|---|
QueryParameter | The instance of the QueryParameter query parameter with the |
GenerateUniqueName(String)
For the specified prefix generates a unique name of the query parameter.
Declaration
public string GenerateUniqueName(string parameterNamePrefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | parameterNamePrefix | The prefix of the query parameter name. |
Returns
Type | Description |
---|---|
System.String | The unique name of the query parameter. |
GenerateUniqueNames()
Generates unique names for all items of the current collection of query parameters.
Declaration
public void GenerateUniqueNames()
GetByName(String)
From the current collection of query parameters, returns the parameter with the specified name. If the parameter is not found in the collection, an exception is thrown.
Declaration
public QueryParameter GetByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the query parameter to return. |
Returns
Type | Description |
---|---|
QueryParameter | The instance of the QueryParameter query parameter with the |
Exceptions
Type | Condition |
---|---|
ItemNotFoundException | If the parameter with the |
ArgumentNullOrEmptyException | If the empty value or |
InsertItem(Int32, QueryParameter)
Declaration
protected override void InsertItem(int index, QueryParameter item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
QueryParameter | item |
Overrides
RemoveItem(Int32)
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Overrides
ResetParameters()
Clears the collection of query parameters that were added automatically.
Declaration
public void ResetParameters()
SetItem(Int32, QueryParameter)
Declaration
protected override void SetItem(int index, QueryParameter item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
QueryParameter | item |