protected virtual SwDmComponent CreateComponentInstance(ISwDMComponent dmComp) { var comp = SwDmObjectFactory.FromDispatch <SwDmComponent>(dmComp, m_OwnerAssm); comp.OwnerAssembly = m_OwnerAssm; return(comp); }
protected virtual SwDmComponent CreateComponentInstance(ISwDMComponent dmComp) { var compName = ((ISwDMComponent7)dmComp).Name2; if (!m_ComponentsCache.TryGetValue(compName, out SwDmComponent comp)) { comp = SwDmObjectFactory.FromDispatch <SwDmComponent>(dmComp, m_ParentAssm); m_ComponentsCache.Add(compName, comp); } return(comp); }
public IEnumerator <IXDrawingView> GetEnumerator() { var views = ((ISwDMSheet4)m_Sheet.Sheet).GetViews() as object[] ?? new object[0]; return(views.Cast <ISwDMView>().Select(v => SwDmObjectFactory.FromDispatch <ISwDmDrawingView>(v, m_Drw)).GetEnumerator()); }