示例#1
0
        /// <summary>
        /// Create a full parameter name with links
        /// </summary>
        /// <param name="currentItem">The current markdown item with the property to be rendered</param>
        /// <param name="property">The markdown property</param>
        /// <param name="useFullName">Determines if the fullName of Markdown property should be used</param>
        /// <param name="useParameterNames">Determines if parameter names should be shown on property</param>
        /// <returns>Returns the full parameter name with links rendered in markdown</returns>
        public static string CreateFullParameterWithLinks(IMarkdownItem currentItem, MarkdownProperty property, bool useFullName, bool useParameterNames)
        {
            var             fullParameterName = property.InternalItem.ToString();
            MarkdownBuilder mb = new MarkdownBuilder();

            if (property.FileName != null)
            {
                mb.Link(property.Name, currentItem.To(property));
            }
            else
            {
                mb.Append(property.Name);
            }

            var parts = fullParameterName.Split('[', ']');

            var index = property.InternalItem.GetPropertyKeyType();

            if (index.Key != null)
            {
                mb.Append(" [ ");

                var link = CreateFullTypeWithLinks(currentItem, index.Key, useFullName, true);

                mb.Append(link);

                if (useParameterNames)
                {
                    mb.Append($" {index.Name}");
                }

                mb.Append(" ]");
            }

            return(mb.ToString());
        }
示例#2
0
 get => (string)GetValue(MarkdownProperty); set => SetValue(MarkdownProperty, value);
 set => this.SetValue(MarkdownProperty, value);
 set => SetValue(MarkdownProperty, value);
示例#5
0
 /// <summary>
 /// In default theme this returns only ""
 /// </summary>
 /// <param name="item">The item to build a page with</param>
 /// <returns>An empty string</returns>
 public string BuildPage(MarkdownProperty item)
 {
     return("");
 }