コード例 #1
0
        /// <summary>
        /// Add an instance to the model.
        /// </summary>
        /// <param name="instance">The instance to add to the Model.</param>
        /// <exception cref="DuplicateInstanceException">Another instance already exists in the model with the same id.</exception>
        public void AddInstance(BaseIfc instance)
        {
            if (instances.ContainsKey(instance.Id))
            {
                throw new DuplicateInstanceException(instance.Id);
            }

            instances.Add(instance.Id, instance);
        }
コード例 #2
0
ファイル: Document.cs プロジェクト: JoinCAD/IFC-gen
        private void RemoveAggregationRelationships(BaseIfc obj)
        {
            var relationships = storage.AllInstancesOfType <IfcRelAggregates>().Where(r => r.RelatedObjects.Contains(obj)).ToList();

            for (var i = relationships.Count() - 1; i >= 0; i--)
            {
                storage.RemoveInstance(relationships[i].Id);
            }
        }
コード例 #3
0
 public void UpdateInstance(BaseIfc instance)
 {
     throw new NotImplementedException();
 }