/// <summary> /// Adds the open. /// </summary> /// <param name="item">The item.</param> public void AddOpen(T item, String prefix = "") { render = render + prefix; textMapContainer <T> st = new textMapContainer <T>(item, "", render.Length); stack.Push(st); }
/// <summary> /// Adds the close. /// </summary> public void AddClose(String sufix = "") { if (stack.Any()) { textMapContainer <T> st = stack.Pop(); st.render = render.Substring(st.pos, (render.Length - st.pos)); st.length = st.render.Length; items.Add(st); render = render + sufix; } }