public static RamSession CreateSession(Ram ram) { Monitor.Enter(ram.writeLock); return new RamSession(ram); }
/// <summary>Asserts, that the given expected RAM is equal to the actual RAM.</summary> /// <param name="expected"></param> public void AssertRamEquals(byte[] expected) { using (var ram = new Ram().CreateSession()) { ram.Set(AssureLength(expected)); Helper.DictionaryEqual(ram.Ram.Data, Processor.Ram.Data); } }
private RamSession(Ram ram) { this.Ram = ram; }