示例#1
0
        /// <summary>
        /// Add function allows a new name value pair to be added.
        /// </summary>
        /// <param name="pPropertyName">unique name of property for object</param>
        /// <param name="pPropertyValue">Value to set property to</param>
        public void Add(string pPropertyName, bool pPropertyValue)
        {
            ConnectionObjectPropertyPair oPair = new ConnectionObjectPropertyPair(pPropertyName, ConnectionServerRest.BoolToString(pPropertyValue));

            AddUniqueName(oPair);
        }
示例#2
0
        /// <summary>
        /// Returns true if the value exists and matches the value provided, false if not
        /// </summary>
        /// <param name="pPropertyName">Name of property to check for</param>
        /// <param name="pValue">value to check for</param>
        /// <returns>true if the property exists and the value matches</returns>
        public bool ValueExists(string pPropertyName, bool pValue)
        {
            string strValue = ConnectionServerRest.BoolToString(pValue);

            return((from oPair in this where oPair.PropertyName.Equals(pPropertyName) select oPair.PropertyValue.Equals(strValue)).FirstOrDefault());
        }