コード例 #1
0
 public bool MatchesTag(DocTag tag)
 {
     return(!string.IsNullOrWhiteSpace(tag.Text) &&
            (string.IsNullOrWhiteSpace(tag.Tag) ||
             !tag.Tag.StartsWith("(") && !tag.Tag.StartsWith("@")
            ));
 }
コード例 #2
0
 public IDocElement Parse(DocTag tag)
 {
     return(new NullDocElement {
         Tag = tag.Tag,
         Text = tag.Text
     });
 }
コード例 #3
0
 public IDocElement Parse(DocTag tag)
 {
     return(new ParameterRefDocElement {
         ParameterName = tag.Text.Substring(0, tag.Text.IndexOf(' ')),
         Remainder = tag.Text.Substring(tag.Text.IndexOf(' '))
     });
 }
コード例 #4
0
 public bool MatchesTag(DocTag tag)
 {
     return(string.IsNullOrWhiteSpace(tag.Tag) && string.IsNullOrWhiteSpace(tag.Text) ||
            tag.Tag.StartsWith("(") ||
            tag.Tag.StartsWith("@") ||
            tag.Tag.StartsWith("@endtsexample") ||
            tag.Tag.StartsWith("@hide"));
 }
コード例 #5
0
 public IDocElement Parse(DocTag tag)
 {
     return(new DescriptionDocElement {
         Children = new List <IDocElement>()
         {
             new TextDocElement {
                 Text = tag.Text.Trim()
             }
         }
     });
 }
コード例 #6
0
 public IDocElement Parse(DocTag tag)
 {
     return(new RemarkDocElement {
         Children = new List <IDocElement>()
         {
             new TextDocElement {
                 Text = tag.Text
             }
         }
     });
 }
コード例 #7
0
 public IDocElement Parse(DocTag tag)
 {
     return(new CodeExampleDocElement {
         Language = "TorqueScript",
         Children = new List <IDocElement>()
         {
             new TextDocElement {
                 Text = tag.Text.Trim()
             }
         }
     });
 }
コード例 #8
0
        public IDocElement Parse(DocTag tag)
        {
            string text = tag.Text.Trim();

            if (text.IndexOf(' ') > -1)
            {
                return(new ParameterDocElement {
                    ParameterName = text.Substring(0, text.IndexOf(' ')),
                    Children = new List <IDocElement>()
                    {
                        new TextDocElement {
                            Text = text.Substring(text.IndexOf(' ')).Trim()
                        }
                    }
                });
            }
            else
            {
                return(new ParameterDocElement {
                    ParameterName = text
                });
            }
        }
コード例 #9
0
        public IDocElement Parse(DocTag tag)
        {
            if (tag.Text.IndexOf('\n') > -1)
            {
                return(new CompoundDocElement {
                    Children = new List <IDocElement>()
                    {
                        new SummaryDocElement {
                            Children = new List <IDocElement>()
                            {
                                new TextDocElement {
                                    Text = tag.Text.Substring(0, tag.Text.IndexOf('\n')).Trim()
                                }
                            }
                        },
                        new DescriptionDocElement {
                            Children = new List <IDocElement>()
                            {
                                new TextDocElement {
                                    Text = tag.Text.Substring(tag.Text.IndexOf('\n')).Trim()
                                }
                            }
                        },
                    }
                });
            }

            return(new SummaryDocElement()
            {
                Children = new List <IDocElement>()
                {
                    new TextDocElement {
                        Text = tag.Text.Trim()
                    }
                }
            });
        }
コード例 #10
0
 public IDocElement Parse(DocTag tag)
 {
     return(new SeeDocElement {
         Element = tag.Text.Trim()
     });
 }
コード例 #11
0
 public bool MatchesTag(DocTag tag)
 {
     return(tag.Tag.Equals("@a"));
 }
コード例 #12
0
 public bool MatchesTag(DocTag tag)
 {
     return(tag.Tag.Equals("@param") ||
            tag.Tag.Equals("@params"));
 }
コード例 #13
0
 public IDocElement Parse(DocTag tag)
 {
     return(new InGroupDocElement {
         GroupName = tag.Text
     });
 }
コード例 #14
0
 public IDocElement Parse(DocTag tag)
 {
     return(new TextDocElement {
         Text = tag.Tag + tag.Text
     });
 }
コード例 #15
0
 public bool MatchesTag(DocTag tag)
 {
     return(tag.Tag.Trim().Equals("@") ||
            tag.Tag.Trim().Equals("@cell"));
 }
コード例 #16
0
 public IDocElement Parse(DocTag tag)
 {
     return(new InternalDocElement());
 }
コード例 #17
0
 public bool MatchesTag(DocTag tag)
 {
     return(tag.Tag.Equals("@tsexample"));
 }
コード例 #18
0
 public bool MatchesTag(DocTag tag)
 {
     return(tag.Tag.Equals("@return") ||
            tag.Tag.Equals("@returns"));
 }
コード例 #19
0
 public static IDocElement ParseDocTag(DocTag tag)
 {
     return(DocStringParsers
            .Find(parser => parser.MatchesTag(tag))
            .Parse(tag));
 }
コード例 #20
0
 public bool MatchesTag(DocTag tag)
 {
     return(tag.Tag.Trim().Equals("@brief"));
 }