Esempio n. 1
0
        /// <summary>
        /// Remove the last indent that was added with PushIndent
        /// </summary>
        public string PopIndent()
        {
            var returnValue = "";

            if ((IndentLengths.Count > 0))
            {
                var indentLength = IndentLengths[(IndentLengths.Count - 1)];
                IndentLengths.RemoveAt((IndentLengths.Count - 1));
                if ((indentLength > 0))
                {
                    returnValue         = _currentIndentField.Substring((_currentIndentField.Length - indentLength));
                    _currentIndentField = _currentIndentField.Remove((_currentIndentField.Length - indentLength));
                }
            }
            return(returnValue);
        }
Esempio n. 2
0
        /// <summary>
        ///     Remove the last indent that was added with PushIndent
        /// </summary>
        public string PopIndent()
        {
            var returnValue = "";

            if (IndentLengths.Count > 0)
            {
                var indentLength = IndentLengths[IndentLengths.Count - 1];
                IndentLengths.RemoveAt(IndentLengths.Count - 1);
                if (indentLength > 0)
                {
                    returnValue   = CurrentIndent.Substring(CurrentIndent.Length - indentLength);
                    CurrentIndent = CurrentIndent.Remove(CurrentIndent.Length - indentLength);
                }
            }
            return(returnValue);
        }
        /// <summary>
        /// Remove the last indent that was added with PushIndent
        /// </summary>
        public string PopIndent()
        {
            string returnValue = "";

            if (IndentLengths.Count > 0)
            {
                int indentLength = IndentLengths[IndentLengths.Count - 1];
                IndentLengths.RemoveAt(IndentLengths.Count - 1);
                if (indentLength > 0)
                {
                    returnValue         = _currentIndentField.Substring(_currentIndentField.Length - indentLength);
                    _currentIndentField = _currentIndentField.Remove(_currentIndentField.Length - indentLength);
                }
            }
            return(returnValue);
        }
Esempio n. 4
0
        /// <summary>
        /// Remove the last indent that was added with PushIndent
        /// </summary>
        public T PopIndent()
        {
            string returnValue = "";

            if (IndentLengths.Count > 0)
            {
                int indentLength = IndentLengths[IndentLengths.Count - 1];
                IndentLengths.RemoveAt(IndentLengths.Count - 1);
                if (indentLength > 0)
                {
                    returnValue    = _currentIndent.Substring(_currentIndent.Length - indentLength);
                    _currentIndent = _currentIndent.Remove(_currentIndent.Length - indentLength);
                }
            }
            // return returnValue;
            PopIndentText = returnValue;
            return((T)this);
        }