public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext) { base.CopyFrom(from, cloneContext); DxfSortEntsTable dxfSortEntsTable = (DxfSortEntsTable)from; this.OwnerBlock = cloneContext.SourceModel != cloneContext.TargetModel ? Class906.smethod_0(cloneContext, dxfSortEntsTable.OwnerBlock, false) : (DxfBlock)cloneContext.GetExistingClone((IGraphCloneable)dxfSortEntsTable.OwnerBlock); foreach (DxfEntitySortWrapper from1 in dxfSortEntsTable.list_0) { DxfEntitySortWrapper entitySortWrapper = new DxfEntitySortWrapper(); entitySortWrapper.CopyFrom(cloneContext, from1); this.list_0.Add(entitySortWrapper); this.dictionary_0[entitySortWrapper.Entity.Reference] = entitySortWrapper; } }
internal DxfEntitySortWrapper method_8(DxfEntity entity) { DxfEntitySortWrapper entitySortWrapper = (DxfEntitySortWrapper)null; if (entity != null) { if (!this.dictionary_0.TryGetValue(entity.Reference, out entitySortWrapper)) { entitySortWrapper = new DxfEntitySortWrapper(); entitySortWrapper.Entity = entity; this.dictionary_0.Add(entitySortWrapper.Entity.Reference, entitySortWrapper); } this.list_0.Add(entitySortWrapper); } return(entitySortWrapper); }
internal DxfEntitySortWrapper method_9(DxfEntity entity, ulong sortHandle) { DxfEntitySortWrapper entitySortWrapper = (DxfEntitySortWrapper)null; if (entity != null) { if (this.dictionary_0.TryGetValue(entity.Reference, out entitySortWrapper)) { entitySortWrapper.SortHandle = sortHandle; } else { entitySortWrapper = new DxfEntitySortWrapper(entity, sortHandle); entitySortWrapper.Entity = entity; this.dictionary_0.Add(entitySortWrapper.Entity.Reference, entitySortWrapper); } this.list_0.Add(entitySortWrapper); } return(entitySortWrapper); }
internal void method_11(IList <DxfEntity> entities) { if (this.dictionary_0.Count != this.list_0.Count) { this.dictionary_0.Clear(); foreach (DxfEntitySortWrapper entitySortWrapper in this.list_0) { this.dictionary_0[entitySortWrapper.Entity.Reference] = entitySortWrapper; } } if (this.dxfHandledObjectCollection_1 != null && this.dxfHandledObjectCollection_1.Count == entities.Count) { return; } List <DxfEntitySortWrapper> entitySortWrapperList = new List <DxfEntitySortWrapper>(); foreach (DxfEntity entity in (IEnumerable <DxfEntity>)entities) { DxfEntitySortWrapper entitySortWrapper; if (!this.dictionary_0.TryGetValue(entity.Reference, out entitySortWrapper)) { entitySortWrapper = new DxfEntitySortWrapper(entity, entity.Handle); } entitySortWrapperList.Add(entitySortWrapper); } entitySortWrapperList.Sort(); if (this.dxfHandledObjectCollection_1 == null) { this.dxfHandledObjectCollection_1 = new DxfHandledObjectCollection <DxfEntity>(entitySortWrapperList.Count); } else { this.dxfHandledObjectCollection_1.Clear(); } foreach (DxfEntitySortWrapper entitySortWrapper in entitySortWrapperList) { this.dxfHandledObjectCollection_1.Add(entitySortWrapper.Entity); } }
internal void method_10(DxfEntitySortWrapper entitySortWrapper) { this.list_0.Remove(entitySortWrapper); this.dictionary_0.Remove(entitySortWrapper.Entity.Reference); }