Code Snippet Details

<- Back to List


Language
C#.Net
Description
GenericParameters
Code
using System.Collections.Generic; namespace Alphabet.Framework.DAL { /// <summary> /// Managing class for parameter values. /// </summary> /// <remarks>Used to pass values to the data provider in a non database specific way.</remarks> public class GenericParameters { #region Member variables private Dictionary<string, GenericParameter> _Records = new Dictionary<string, GenericParameter>(); #endregion public void Add(string name, object Value) { GenericParameter parameterValue = new GenericParameter(name, Value); _Records.Add(name, parameterValue); } /// <summary> /// Wrapper to the underlying dictionary object's value collection. /// </summary> /// <returns>The list of values in the collection to iterate through</returns> /// <remarks>e.g. For Each parameterValue As ParameterValue In parameterValues.Values</remarks> public Dictionary<string, GenericParameter>.ValueCollection Values() { return _Records.Values; } public GenericParameter Item(string name) { return _Records[name]; } public int Count() { return _Records.Values.Count; } } }