Esempio n. 1
0
        /// <summary>
        /// Surround an item with left or/and right space(s)
        /// </summary>
        /// <param name="item">item to surround</param>
        /// <param name="mode">left, right or both</param>
        /// <returns>surrounded item</returns>
        protected string Surround(System.Enum item, ESpaceSurrounder mode)
        {
            string result = item.ToString();

            if (mode != ESpaceSurrounder.After)
            {
                result = SPACE + result;
            }
            if (mode != ESpaceSurrounder.Before)
            {
                result = result + SPACE;
            }
            return(result);
        }
        /// <summary>
        /// Surround an item with left or/and right space(s)
        /// </summary>
        /// <param name="item">item to surround</param>
        /// <param name="mode">left, right or both</param>
        /// <returns>surrounded item</returns>
        protected string Surround(Enum item, ESpaceSurrounder mode)
        {
            var result = item.ToString();

            if (mode != ESpaceSurrounder.After)
            {
                result = Space + result;
            }

            if (mode != ESpaceSurrounder.Before)
            {
                result = result + Space;
            }

            return(result);
        }
Esempio n. 3
0
 /// <summary>
 /// Write an item to the text buffer (space surrounding)
 /// </summary>
 /// <param name="item">the item to write</param>
 /// <param name="mode">space surrounding mode</param>
 protected void Write(System.Enum item, ESpaceSurrounder mode)
 {
     m_identedbuilder.Append(Surround(item, mode));
 }
 /// <summary>
 /// Surround an item with left or/and right space(s)
 /// </summary>
 /// <param name="item">item to surround</param>
 /// <param name="mode">left, right or both</param>
 /// <returns>surrounded item</returns>
 protected string Surround(System.Enum item, ESpaceSurrounder mode)
 {
     string result = item.ToString();
     if (mode != ESpaceSurrounder.After)
     {
         result = SPACE + result;
     }
     if (mode != ESpaceSurrounder.Before)
     {
         result = result + SPACE;
     }
     return result;
 }
 /// <summary>
 /// Write an item to the text buffer (space surrounding)
 /// </summary>
 /// <param name="item">the item to write</param>
 /// <param name="mode">space surrounding mode</param>
 protected void Write(System.Enum item, ESpaceSurrounder mode)
 {
     m_identedbuilder.Append(Surround(item, mode));
 }
        /// <summary>
        /// Surround an item with left or/and right space(s)
        /// </summary>
        /// <param name="item">item to surround</param>
        /// <param name="mode">left, right or both</param>
        /// <returns>surrounded item</returns>
        protected string Surround(Enum item, ESpaceSurrounder mode)
        {
            var result = item.ToString();

			if (mode != ESpaceSurrounder.After)
                result = Space + result;

			if (mode != ESpaceSurrounder.Before)
                result = result + Space;

			return result;
        }