/// <summary> /// Visits the variable. /// </summary> /// <param name="variableSegment">The variable segment.</param> public void VisitVariable(VariablePathSegment variableSegment) { switch (collector.Global) { case GlobalContext.LocalOnly: CreatedIndex = snapshot.CreateLocalVariable(Name, collector.CallLevel); break; case GlobalContext.GlobalOnly: CreatedIndex = snapshot.CreateGlobalVariable(Name); break; default: break; } }
/// <summary> /// Visits the variable to traverse memory tree from variable root. /// </summary> /// <param name="segment">The segment.</param> public void VisitVariable(VariablePathSegment segment) { switch (Global) { case GlobalContext.LocalOnly: processSegment(segment, snapshot.Structure.Variables[CallLevel]); break; case GlobalContext.GlobalOnly: processSegment(segment, snapshot.Structure.Variables.Global); break; default: break; } }
/// <summary> /// Visits the variable to traverse memory tree from variable root. /// </summary> /// <param name="variableSegment">The variable segment.</param> public void VisitVariable(VariablePathSegment variableSegment) { switch (Global) { case GlobalContext.LocalOnly: int level = CallLevel; if (CallLevel > snapshot.CallLevel) { level = snapshot.CallLevel; } process(variableSegment, snapshot.Structure.Variables[level]); break; case GlobalContext.GlobalOnly: process(variableSegment, snapshot.Structure.Variables.Global); break; default: break; } }