Example #1
0
        internal List <GremlinPathStepVariable> GetGremlinStepList(GremlinVariable stopVariable = null)
        {
            List <GremlinPathStepVariable> gremlinStepList = ParentContext?.GetGremlinStepList(HomeVariable);

            if (gremlinStepList == null)
            {
                gremlinStepList = new List <GremlinPathStepVariable>();
            }
            foreach (var step in StepList)
            {
                if (step == stopVariable)
                {
                    break;
                }
                gremlinStepList.Add(step.GetAndPopulatePath());
            }
            return(gremlinStepList);
        }