public virtual void CopyFrom(PoolPhycisSeariExtend fromBase) { PoolPhycisSeariExtend from = fromBase; var stringTableEnum = from.stringTable.GetEnumerator(); while (stringTableEnum.MoveNext()) { var kv = stringTableEnum.Current; this.stringTable.Add(kv.Key, kv.Value); } var byteTableEnum = from.byteTable.GetEnumerator(); while (byteTableEnum.MoveNext()) { var kv = byteTableEnum.Current; this.byteTable.Add(kv.Key, kv.Value); } var intTableEnum = from.intTable.GetEnumerator(); while (intTableEnum.MoveNext()) { var kv = intTableEnum.Current; this.intTable.Add(kv.Key, kv.Value); } var fpTableEnum = from.fpTable.GetEnumerator(); while (fpTableEnum.MoveNext()) { var kv = fpTableEnum.Current; this.fpTable.Add(kv.Key, kv.Value); } var byteArrayTableEnum = from.byteArrayTable.GetEnumerator(); while (byteArrayTableEnum.MoveNext()) { var kv = byteArrayTableEnum.Current; this.byteArrayTable.Add(kv.Key, kv.Value); } var tsVectorTableEnum = from.tsVectorTable.GetEnumerator(); while (tsVectorTableEnum.MoveNext()) { var kv = tsVectorTableEnum.Current; this.tsVectorTable.Add(kv.Key, kv.Value); } var tsVectorTable2Enum = from.tsVectorTable2.GetEnumerator(); while (tsVectorTable2Enum.MoveNext()) { var kv = tsVectorTable2Enum.Current; this.tsVectorTable2.Add(kv.Key, kv.Value); } }
/** * @brief Returns true if this {@link SyncedData} has all actions information equals to the provided one. **/ public bool EqualsData(PoolPhycisSeariExtend otherBase) { PoolPhycisSeariExtend other = (PoolPhycisSeariExtend)otherBase; if (this.stringTable.Count != other.stringTable.Count || this.byteTable.Count != other.byteTable.Count || this.intTable.Count != other.intTable.Count || this.fpTable.Count != other.fpTable.Count || this.byteArrayTable.Count != other.byteArrayTable.Count || this.tsVectorTable.Count != other.tsVectorTable.Count || this.tsVectorTable2.Count != other.tsVectorTable2.Count) { return(false); } if (!checkEqualsTable(this, other)) { return(false); } return(true); }
private static bool checkEqualsTable(PoolPhycisSeariExtend id1, PoolPhycisSeariExtend id2) { var stringTableEnum = id1.stringTable.GetEnumerator(); while (stringTableEnum.MoveNext()) { var pair = stringTableEnum.Current; if (!id2.stringTable.ContainsKey(pair.Key) || pair.Value != id2.stringTable[pair.Key]) { return(false); } } var byteTableEnum = id1.byteTable.GetEnumerator(); while (byteTableEnum.MoveNext()) { var pair = byteTableEnum.Current; if (!id2.byteTable.ContainsKey(pair.Key) || pair.Value != id2.byteTable[pair.Key]) { return(false); } } var intTableEnum = id1.intTable.GetEnumerator(); while (intTableEnum.MoveNext()) { var pair = intTableEnum.Current; if (!id2.intTable.ContainsKey(pair.Key) || pair.Value != id2.intTable[pair.Key]) { return(false); } } var fpTableEnum = id1.fpTable.GetEnumerator(); while (fpTableEnum.MoveNext()) { var pair = fpTableEnum.Current; if (!id2.fpTable.ContainsKey(pair.Key) || pair.Value != id2.fpTable[pair.Key]) { return(false); } } var byteArrayTableEnum = id1.byteArrayTable.GetEnumerator(); while (byteArrayTableEnum.MoveNext()) { var pair = byteArrayTableEnum.Current; if (!id2.byteArrayTable.ContainsKey(pair.Key) || pair.Value != id2.byteArrayTable[pair.Key]) { return(false); } } var tsVectorTableEnum = id1.tsVectorTable.GetEnumerator(); while (tsVectorTableEnum.MoveNext()) { var pair = tsVectorTableEnum.Current; if (!id2.tsVectorTable.ContainsKey(pair.Key) || pair.Value != id2.tsVectorTable[pair.Key]) { return(false); } } var tsVectorTable2Enum = id1.tsVectorTable2.GetEnumerator(); while (tsVectorTable2Enum.MoveNext()) { var pair = tsVectorTable2Enum.Current; if (!id2.tsVectorTable2.ContainsKey(pair.Key) || pair.Value != id2.tsVectorTable2[pair.Key]) { return(false); } } return(true); }