public override void DeepMerge(IMap mapObject) { Copy(mapObject); ISourceMap sourceMap = (ISourceMap)mapObject; ITableMap tableMap; ITableMap checkTableMap; ArrayList remove = new ArrayList(); foreach (ITableMap iTableMap in this.TableMaps) { checkTableMap = sourceMap.GetTableMap(iTableMap.Name); if (checkTableMap == null) { checkTableMap = (ITableMap)iTableMap.DeepClone(); checkTableMap.SourceMap = sourceMap; } else { iTableMap.DeepMerge(checkTableMap); } } foreach (ITableMap iTableMap in sourceMap.TableMaps) { tableMap = this.GetTableMap(iTableMap.Name); if (tableMap == null) { remove.Add(iTableMap); } } foreach (ITableMap iTableMap in remove) { sourceMap.TableMaps.Remove(iTableMap); } }
public override bool DeepCompare(IMap compareTo) { if (!(Compare(compareTo))) { return(false); } ISourceMap sourceMap = (ISourceMap)compareTo; ITableMap checkTableMap; if (!(this.TableMaps.Count == sourceMap.TableMaps.Count)) { return(false); } foreach (ITableMap tableMap in this.TableMaps) { checkTableMap = sourceMap.GetTableMap(tableMap.Name); if (checkTableMap == null) { return(false); } else { if (!(tableMap.DeepCompare(checkTableMap))) { return(false); } } } return(true); }