/// <summary>
 /// Adds a new property of a string value to the cache.
 /// </summary>
 /// <param name="parameterId">The parameter id.  Can be null or InvalidElementId if propertyName != null.</param>
 /// <param name="propertyName">The property name.  Can be null if elementId != InvalidElementId.</param>
 /// <param name="value">The value.</param>
 /// <param name="propertyHandle">The property handle.</param>
 public void Add(ElementId parameterId, string propertyName, string value, IFCAnyHandle propertyHandle)
 {
     if ((parameterId != null) && (parameterId != ElementId.InvalidElementId))
     {
         ElementId parameterIdToUse = ParameterUtil.MapParameterId(parameterId);
         m_PropertiesByIdCache[new KeyValuePair <ElementId, string>(parameterIdToUse, value)] = propertyHandle;
     }
     else
     {
         m_NamedPropertiesCache[new KeyValuePair <string, string>(propertyName, value)] = propertyHandle;
     }
 }
        /// <summary>
        /// Finds if it contains the property with the specified string value.
        /// </summary>
        /// <param name="parameterId">The parameter id.  Can be null or InvalidElementId if propertyName != null.</param>
        /// <param name="propertyName">The property name.  Can be null if elementId != InvalidElementId.</param>
        /// <param name="value">The value.</param>
        /// <returns>True if it has, false otherwise.</returns>
        public IFCAnyHandle Find(ElementId parameterId, string propertyName, string value)
        {
            IFCAnyHandle propertyHandle = null;

            if ((parameterId != null) && (parameterId != ElementId.InvalidElementId))
            {
                ElementId parameterIdToUse = ParameterUtil.MapParameterId(parameterId);
                if (m_PropertiesByIdCache.TryGetValue(new KeyValuePair <ElementId, string>(parameterIdToUse, value), out propertyHandle))
                {
                    return(propertyHandle);
                }
            }
            else
            {
                if (m_NamedPropertiesCache.TryGetValue(new KeyValuePair <string, string>(propertyName, value), out propertyHandle))
                {
                    return(propertyHandle);
                }
            }

            return(null);
        }