Exemplo n.º 1
0
        /// <summary>
        /// Creates the snapshot entry for the given variable name.
        /// </summary>
        /// <param name="variable">The variable name.</param>
        /// <param name="global">Determines whether variable is global or local.</param>
        /// <param name="callLevel">The call level.</param>
        internal static ReadWriteSnapshotEntryBase CreateVariableEntry(AnalysisFramework.VariableIdentifier variable, GlobalContext global, int callLevel)
        {
            MemoryPath path;

            if (variable.IsUnknown)
            {
                path = MemoryPath.MakePathAnyVariable(global, callLevel);
            }
            else
            {
                var names = from name in variable.PossibleNames select name.Value;
                path = MemoryPath.MakePathVariable(names, global, callLevel);
            }

            return(new SnapshotEntry(path, variable));
        }