/// <summary> /// Collects the control variables. /// </summary> /// <param name="collector">The collector.</param> /// <param name="controlPathSegment">The control path segment.</param> public void CollectControl(TreeIndexCollector collector, ControlPathSegment controlPathSegment) { int currentCallLevel = collector.GetCurrentCallLevel(); ContainerCollectorNode controlStackNode = GetOrCreateControlStackNode(collector, currentCallLevel); controlStackNode.Collect(collector, controlPathSegment); HasRootNode = true; }
public void VisitControl(ControlPathSegment controlPathSegment) { if (!RootNode.HasRootNode) { RootNode.CollectControl(this, controlPathSegment); } else { throw new Exception("Malformed MemoryPath - duplicit root segment"); } }
/// <summary> /// Visits the control. /// </summary> /// <param name="controlPathSegment">The control path segment.</param> public void VisitControl(ControlPathSegment controlPathSegment) { switch (collector.Global) { case GlobalContext.LocalOnly: CreatedIndex = snapshot.CreateLocalControll(Name, collector.CallLevel); break; case GlobalContext.GlobalOnly: CreatedIndex = snapshot.CreateGlobalControll(Name); break; default: break; } }
/// <summary> /// Visits the control variable to traverse memory tree from control variable root. /// </summary> /// <param name="segment">The segment.</param> public void VisitControl(ControlPathSegment segment) { switch (Global) { case GlobalContext.LocalOnly: processSegment(segment, snapshot.Structure.Readonly. GetReadonlyStackContext(CallLevel).ReadonlyControllVariables); break; case GlobalContext.GlobalOnly: processSegment(segment, snapshot.Structure.Readonly.ReadonlyGlobalContext.ReadonlyControllVariables); break; default: break; } }