Пример #1
0
        private static void AddObject(string name, MemoryEntryEnum memoryEntry, byte[] bytes)
        {
            if (_memoryPointer + Constants.CellSize >= Constants.MemorySize)
            {
                throw new Exception(Resources.MemoryOverflow);
            }

            Objects.Add(name, new Tuple <MemoryEntryEnum, int>(memoryEntry, _memoryPointer));

            SetObject(_memoryPointer, bytes);

            _memoryPointer += Constants.CellSize;
        }
Пример #2
0
 private static void AddObject(string name, MemoryEntryEnum memoryEntry)
 {
     AddObject(name, memoryEntry, new byte[Constants.CellSize]);
 }