コード例 #1
0
        public void AddClassificationReferenceAssociation(string classificationName, string classificationReferenceCode, IFCAnyHandle classificationReferenceAssociation)
        {
            ClassificationReferenceKey key = new ClassificationReferenceKey()
            {
                ClassificationId = classificationName, ClassificationReferenceCode = classificationReferenceCode
            };

            if (classificationReferenceMap.ContainsKey(key))
            {
                throw new Exception("classificationReferenceCache already contains this classificationReferenceKey");
            }

            classificationReferenceMap[key] = classificationReferenceAssociation;
        }
コード例 #2
0
        public IFCAnyHandle GetClassificationReferenceAssociation(string classificationName, string classificationReferenceCode)
        {
            IFCAnyHandle classificationReferenceHandle;
            ClassificationReferenceKey key = new ClassificationReferenceKey()
            {
                ClassificationId = classificationName, ClassificationReferenceCode = classificationReferenceCode
            };

            if (classificationReferenceMap.TryGetValue(key, out classificationReferenceHandle))
            {
                return(classificationReferenceHandle);
            }
            else
            {
                return(null);
            }
        }