Beispiel #1
0
        /// <summary>
        /// Deletes the property and value given the property name specified.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="propertyName"></param>
        /// <returns></returns>
        public bool Delete <T>(string propertyName)
        {
            lock (_lock)
            {
                if (PropertyNameList.Contains(propertyName) &&
                    PropertyNameList[propertyName].DataType == typeof(T))
                {
                    PropertyNameList.Remove(propertyName);
                    IsDirty = true;

                    return(true);
                }
            }

            return(false);
        }