public string[] GetModifiedRegistersDifferences(MemoryMap otherMap) { List <string> difs = new List <string> (); // Only check modified registers List <dynamic> modifiedRegisters = this.GetModifiedRegisters().GetAllElements(); foreach (dynamic register in modifiedRegisters) { string name = register.id; if (!otherMap.ContainsMember(name) || // Register not present in other memory map !base[name].Equals(otherMap[name])) // Both registers are not equal { difs.Add(name); continue; } } return(difs.ToArray()); }
public bool ValidateModifiedRegisters(MemoryMap otherMap) { return(this.GetModifiedRegistersDifferences(otherMap).Length == 0); }