Esempio n. 1
0
        protected void DocTag(DocTag tag, string value)
        {
            var tagText = tag.Tagname();

            if (string.IsNullOrEmpty(value))
            {
                DocLine(tagText);
            }
            else
            {
                value = value.Replace("\r", null).Replace("\n", null);
                DocLine(String.Format("{0} {1}", tagText, value));
            }
        }
Esempio n. 2
0
 public DocTag(string s)
 {
     if (s.IndexOf(' ') < 0 || !s.Trim().StartsWith("@"))
     {
         Tag  = "";
         Text = "";
         if (s.StartsWith("@"))
         {
             Tag = s;
         }
         else
         {
             Text = s;
         }
     }
     else
     {
         Tag  = s.Substring(0, s.IndexOfAny(new [] { ' ', '\n' }));
         Text = s.Substring(s.IndexOfAny(new [] { ' ', '\n' }));
     }
     Next = null;
 }
 /// <summary>
 /// Converts DocTag value to corresponding JSDOC-friendly name
 /// </summary>
 /// <param name="tag">Tag instance</param>
 /// <returns>JSDOC-friendly name</returns>
 public static string Tagname(this DocTag tag)
 {
     var member = typeof (DocTag).GetField(tag.ToString());
     return member.GetCustomAttribute<JsdocTagAttribute>().RawTagName;
 }
 /// <summary>
 /// Adds an additional JSDOC documentation tag.
 /// </summary>
 public void AddTag(DocTag tag, string value = null) =>
 TagToDescription.Add(new Tuple <DocTag, string>(tag, value));