Пример #1
0
        private IEnumerable <TraversalState> TraverseInner(Instance instance, InstancesPathTracker pathTracker)
        {
            pathTracker.UpdateIn(instance);

            var instances = _instanceRepository.GetByHostModule(instance.Netlist, instance.ModuleName);

            foreach (var curretnInstance in instances)
            {
                yield return(new TraversalState {
                    CurrentInstance = curretnInstance,
                    InstancesPathTracker = new InstancesPathTracker(pathTracker).UpdateIn(curretnInstance)
                });

                if (curretnInstance.IsModule())
                {
                    foreach (var state in TraverseInner(curretnInstance, pathTracker))
                    {
                        yield return(state);
                    }
                }
            }

            pathTracker.UpdateOut();
        }
Пример #2
0
 public InstancesPathTracker(InstancesPathTracker pathTracker)
 {
     this._path = new List <string>(pathTracker._path);
 }