Exemple #1
0
 public static void AddToImport(BbBase bbBase)
 {
     BbDb.AddDbToImport(bbBase);
 }
Exemple #2
0
 public void AddDbToImport(BbBase bbBase)
 {
     if(bbBase == null) return;
     _bbInstanceList.Add(bbBase);
     AddSemToImport(bbBase);
 }
Exemple #3
0
        private void AddSemToImport(BbBase bbBase)
        {
            //uint retValue = 0;
            if (bbBase == null) return; // 0;

            foreach (var propertyInfo in bbBase.GetType().GetProperties())
            {
                if (!IsEarlyBindingInstance(propertyInfo)) continue;
                var ins = propertyInfo.GetValue(bbBase, null) as P21Instance;
                if (ins == null) continue;

                // retValue = EarlyBindingInstanceModel.Add(ins);

                if (!_semToIfcDictionary.ContainsKey(bbBase.Guid))
                {
                    _semToIfcDictionary.Add(bbBase.Guid, new SortedSet<uint>() { ins.EIN });
                }
                _semToIfcDictionary[bbBase.Guid].Add(ins.EIN);
                if (!_ifcToSemDictionary.ContainsKey(ins.EIN))
                {
                    _ifcToSemDictionary.Add(ins.EIN, new SortedSet<Guid>() { bbBase.Guid });
                }
                _ifcToSemDictionary[ins.EIN].Add(bbBase.Guid);

                //if (IsBbComponents(propertyInfo))
                //{
                //    var lists = propertyInfo.GetValue(BbBase, null) as IList;
                //    if (lists == null) continue;
                //    if (lists.Count <= 0) continue;
                //    foreach (var list in lists)
                //    {
                //        var sem = list as BbBase;
                //        if (sem == null) continue;
                //        retValue = AddSemToExport(sem);
                //        //continue;
                //    }
                //}
            }
            //return retValue;
        }
Exemple #4
0
 public static void Remove(BbBase bbBase)
 {
     //todo: implement
 }