Beispiel #1
0
        TextLine GetArgumentDescriptionOrNull(FunctionInfo.ArgumentInfo argumentInfo)
        {
            if (string.IsNullOrEmpty(argumentInfo.Description))
            {
                return(null);
            }

            var name = argumentInfo.Name;
            var desc = argumentInfo.Description;

            if (desc.Contains(";"))
            {
                desc = desc.Split(';').First();
            }

            return(new TextLine {
                new TextRun
                {
                    Style = System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic,
                    Text = name + ": "
                },
                new TextRun
                {
                    Style = System.Drawing.FontStyle.Italic,
                    Text = desc ?? ""
                },
            });
        }
Beispiel #2
0
        IEnumerable <TextLine> GetArgumentDescription(FunctionInfo.ArgumentInfo argumentInfo)
        {
            if (string.IsNullOrEmpty(argumentInfo.Description))
            {
                yield break;
            }

            var lines = argumentInfo.Description.Split(s_newLineStringArray, StringSplitOptions.None);

            yield return(new TextLine {
                new TextRun
                {
                    Style = System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic,
                    Text = argumentInfo.Name + ": "
                },
                new TextRun
                {
                    Style = System.Drawing.FontStyle.Italic,
                    Text = lines.FirstOrDefault() ?? ""
                },
            });

            foreach (var line in lines.Skip(1))
            {
                yield return(new TextLine {
                    new TextRun
                    {
                        Style = System.Drawing.FontStyle.Italic,
                        Text = line
                    }
                });
            }
        }
Beispiel #3
0
        TextLine GetArgumentDescriptionOrNull(FunctionInfo.ArgumentInfo argumentInfo)
        {
            if (string.IsNullOrEmpty(argumentInfo.Description))
            {
                return(null);
            }

            return(new TextLine {
                new TextRun
                {
                    Style = System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic,
                    Text = argumentInfo.Name + ": "
                },
                new TextRun
                {
                    Style = System.Drawing.FontStyle.Italic,
                    Text = argumentInfo.Description ?? ""
                },
            });
        }