static void BuildBindableListFromDebugItems(DebugLine list, Dictionary <string, DebugLineGroup> groups, IDebugItemResult result, bool isInputs)
        {
            if (string.IsNullOrEmpty(result.GroupName))
            {
                list.LineItems.Add(new DebugLineItem(result));
            }
            else
            {
                if (!groups.TryGetValue(result.GroupName, out DebugLineGroup group))
                {
                    var label = isInputs ? string.Format("{0} = ", result.Label) : result.Label;
                    group = new DebugLineGroup(result.GroupName, label)
                    {
                        MoreLink = result.MoreLink
                    };

                    groups.Add(group.GroupName, group);
                    list.LineItems.Add(group);
                }

                if (!group.Rows.TryGetValue(result.GroupIndex, out DebugLineGroupRow row))
                {
                    row = new DebugLineGroupRow();
                    group.Rows.Add(result.GroupIndex, row);
                }
                row.LineItems.Add(new DebugLineItem(result));
            }
        }
        static void BuildBindableListFromDebugItems(IEnumerable <IDebugItem> debugItems, ICollection <object> destinationList)
        {
            destinationList.Clear();

            if (debugItems == null)
            {
                return;
            }

            foreach (var item in debugItems)
            {
                var list   = new DebugLine();
                var groups = new Dictionary <string, DebugLineGroup>();
                foreach (var result in item.FetchResultsList())
                {
                    if (string.IsNullOrEmpty(result.GroupName))
                    {
                        list.LineItems.Add(new DebugLineItem(result));
                    }
                    else
                    {
                        DebugLineGroup group;
                        if (!groups.TryGetValue(result.GroupName, out group))
                        {
                            group = new DebugLineGroup(result.GroupName, result.Label)
                            {
                                MoreLink = result.MoreLink
                            };

                            groups.Add(group.GroupName, group);
                            list.LineItems.Add(group);
                        }

                        DebugLineGroupRow row;
                        if (!group.Rows.TryGetValue(result.GroupIndex, out row))
                        {
                            row = new DebugLineGroupRow();
                            group.Rows.Add(result.GroupIndex, row);
                        }
                        row.LineItems.Add(new DebugLineItem(result));
                    }
                }

                destinationList.Add(list);
            }
        }
        public override void Render(GameTime deltaTime)
        {
            base.Render(deltaTime);

            if (m_TrailPoints.Count > 0)
            {
                Color color = Color.Blue;

                if (m_DrawRouteColour == BoardSquare.Route.eAlternative1)
                    color = Color.Red;
                else if (m_DrawRouteColour == BoardSquare.Route.eAlternative2)
                    color = Color.Red;
                else if (m_DrawRouteColour == BoardSquare.Route.eAlternative3)
                    color = Color.Red;

                Vector3 offset = new Vector3(0, 0.05f, 0.0f);

                DebugLineGroup lineGroup = new DebugLineGroup(new List<DebugLinePoint>());
                lineGroup.AddLinePoint(m_TrailPoints[0] + offset, color);

                // Render points between the start and end point
                if (m_TrailPoints.Count > 2)
                {
                    for (int i = 0; i < m_TrailPoints.Count; i++)
                    {
                        if ((i > 0) && (i < (m_TrailPoints.Count - 1)))
                            lineGroup.AddLinePoint(m_TrailPoints[i] + offset, color);
                    }
                }

                // Add final point
                lineGroup.AddLinePoint(m_TrailPoints[(m_TrailPoints.Count - 1)] + offset, color);

                // Render line group
                DebugRender.Instance.RenderLineGroup(lineGroup);

                // Clear line point
                lineGroup.linePoints.Clear();
            }
        }