Exemplo n.º 1
0
        /// <summary>
        /// Read memory represented by given index identifier resolved on current
        /// snapshot entry (resulting snapshot entry can encapsulate merging, alias resolving and
        /// other stuff based on nondeterminism of identifier and current snapshot entry)
        /// </summary>
        /// <param name="context">Context snapshot where operation is proceeded</param>
        /// <param name="index">Identifier of an index</param>
        /// <returns>
        /// Snapshot entry representing index resolving on current entry
        /// </returns>
        protected override ReadWriteSnapshotEntryBase readIndex(SnapshotBase context, MemberIdentifier index)
        {
            MemoryPath newPath;

            if (index.IsAny)
            {
                newPath = MemoryPath.MakePathAnyIndex(path);
            }
            else if (index.IsUnknown)
            {
                newPath = MemoryPath.MakePathUnknownIndex(path);
            }
            else
            {
                newPath = MemoryPath.MakePathIndex(path, index.PossibleNames);
            }

            return(new SnapshotEntry(newPath, variableId));
        }