Ejemplo n.º 1
0
        /// <summary>
        /// Adds value as a line of code
        /// </summary>
        /// <param name="pCodeBlock">Parent block to add to</param>
        /// <param name="value">Code to add</param>
        /// <returns>Parent block</returns>
        public static ICodeBlock _(this ICodeBlock pCodeBlock, string value)
        {
            var returnValue = new CodeLine(value);

            pCodeBlock.BodyCodeLines.Add(returnValue);

            return pCodeBlock;
        }
Ejemplo n.º 2
0
 public override void AddToStringBuilder(StringBuilder pBldr, int pTabCount, string pTabCharacter)
 {
     if(PreCodeLines.Count == 0 && BodyCodeLines.Count == 0 && PostBodyCodeLines.Count == 0 && PostCodeLines.Count == 0)
     {
         var line = new CodeLine("// " + TagName + ":");
         line.AddToStringBuilder(pBldr, TabCount, TabCharacter);
     }else
     {
         base.AddToStringBuilder(pBldr, pTabCount, pTabCharacter);
     }
 }