3using System.Collections.Generic;
6using System.Threading.Tasks;
16 List<ParameterDescriptor> m_rgParams =
new List<ParameterDescriptor>();
17 Dictionary<string, int> m_rgParamIdx =
new Dictionary<string, int>();
34 m_rgParamIdx.Add(p.
Name, m_rgParams.Count);
35 m_rgParams.Add(p.
Clone());
44 get {
return m_rgParams.Count; }
54 get {
return m_rgParams[nIdx]; }
63 m_rgParamIdx.Add(p.
Name, m_rgParams.Count);
74 if (!m_rgParamIdx.ContainsKey(strName))
77 int nIdx = m_rgParamIdx[strName];
78 return m_rgParams[nIdx];
87 public string Find(
string strName,
string strDefault)
102 public double Find(
string strName,
double dfDefault)
104 string strVal =
Find(strName,
null);
117 public bool Find(
string strName,
bool bDefault)
119 string strVal =
Find(strName,
null);
123 return bool.Parse(strVal);
132 return m_rgParams.GetEnumerator();
139 IEnumerator IEnumerable.GetEnumerator()
141 return m_rgParams.GetEnumerator();
The BaseParameter class is the base class for all other parameter classes.
static double ParseDouble(string strVal)
Parse double values using the US culture if the decimal separator = '.', then using the native cultur...
The ParameterDescriptorCollection class contains a list of ParameterDescriptor's.
ParameterDescriptorCollection(ParameterDescriptorCollection rg)
The ParameterDescriptorCollection constructor.
bool Find(string strName, bool bDefault)
Searches for a parameter by name and returns its value as a bool if found, or a default bool value if...
int Count
Returns the count of items in the collection.
double Find(string strName, double dfDefault)
Searches for a parameter by name and returns its value as a double if found, or a default double valu...
IEnumerator< ParameterDescriptor > GetEnumerator()
Returns the enumerator of the collection.
void Add(ParameterDescriptor p)
Adds a ParameterDescriptor to the collection.
ParameterDescriptor Find(string strName)
Searches for a parameter by name in the collection.
ParameterDescriptorCollection()
The ParameterDescriptorCollection constructor.
string Find(string strName, string strDefault)
Searches for a parameter by name and returns its string value if found, or a default string value if ...
The ParameterDescriptor class describes a parameter in the database.
virtual ParameterDescriptor Clone()
Creates a copy of the parameter descriptor.
string Name
Return the name of the item.
string Value
Get/set the value of the item.
The descriptors namespace contains all descriptor used to describe various items stored within the da...