public CompareClassifyLocalStatus RetreiveOpeningsLocalCoresponding(List <OpeningModelDTO> opennings)
        {
            CompareClassifyLocalStatus localClassifyStatus = new CompareClassifyLocalStatus();

            foreach (var opening in opennings)
            {
                var openingLocalFind = _openingsLocal.FirstOrDefault(x => x.IdLocal.Equals(opening.IdRevitElement));
                if (openingLocalFind != null)
                {
                    if (localClassifyStatus.NormalLocal == null)
                    {
                        localClassifyStatus.NormalLocal = new List <ComparisonCoupleElement>();
                    }
                    localClassifyStatus.NormalLocal.Add(new ComparisonCoupleElement(opening, openingLocalFind));
                }
                else
                {
                    if (localClassifyStatus.DeletedLocal == null)
                    {
                        localClassifyStatus.DeletedLocal = new List <ComparisonCoupleElement>();
                    }
                    localClassifyStatus.DeletedLocal.Add(new ComparisonCoupleElement(opening)
                    {
                        LocalStatus = DefineStatus.DELETED
                    });
                }
            }
            return(localClassifyStatus);
        }
Esempio n. 2
0
 public IClassify ImplementClassifyLocal()
 {
     _localClassify = _factory.RetreiveOpeningsLocalCoresponding(_openingPendingCreateStatus);
     return(this);
 }