This site provides a machine-readable index at /llms.txt.

Skip to main content Skip to navigation

ParsedXmlDoc Pennington.ApiMetadata

Structured representation of a parsed xmldoc comment split into its standard sections.

Properties

Empty Pennington.ApiMetadata.ParsedXmlDoc
Default: new( Summary: [], Remarks: [], Params: ImmutableDictionary<string, ImmutableArray<XmlDocNode>>.Empty, TypeParams: ImmutableDictionary<string, ImmutableArray<XmlDocNode>>.Empty, Returns: [], Example: [], SeeAlso: [])
Shared empty instance used when no xmldoc is available.
Example System.Collections.Immutable.ImmutableArray<XmlDocNode>
Nodes from the <example> element.
HasExample bool
True when Example contains any nodes.
HasRemarks bool
True when Remarks contains any nodes.
HasReturns bool
True when Returns contains any nodes.
HasSummary bool
True when Summary contains any nodes.
Params System.Collections.Immutable.ImmutableDictionary<string, System.Collections.Immutable.ImmutableArray<XmlDocNode>>
Per-parameter nodes keyed by parameter name, from <param> elements.
Remarks System.Collections.Immutable.ImmutableArray<XmlDocNode>
Nodes from the <remarks> element.
Returns System.Collections.Immutable.ImmutableArray<XmlDocNode>
Nodes from the <returns> element.
SeeAlso System.Collections.Immutable.ImmutableArray<string>
Cref values collected from <seealso> elements.
Summary System.Collections.Immutable.ImmutableArray<XmlDocNode>
Nodes from the <summary> element.
TypeParams System.Collections.Immutable.ImmutableDictionary<string, System.Collections.Immutable.ImmutableArray<XmlDocNode>>
Per-type-parameter nodes keyed by name, from <typeparam> elements.

Constructors

.ctor

#
public record ParsedXmlDoc(
    ImmutableArray<XmlDocNode> Summary,
    ImmutableArray<XmlDocNode> Remarks,
    ImmutableDictionary<string, ImmutableArray<XmlDocNode>> Params,
    ImmutableDictionary<string, ImmutableArray<XmlDocNode>> TypeParams,
    ImmutableArray<XmlDocNode> Returns,
    ImmutableArray<XmlDocNode> Example,
    ImmutableArray<string> SeeAlso)
{
    /// <summary>Shared empty instance used when no xmldoc is available.</summary>
    public static ParsedXmlDoc Empty { get; } = new(
        Summary: [],
        Remarks: [],
        Params: ImmutableDictionary<string, ImmutableArray<XmlDocNode>>.Empty,
        TypeParams: ImmutableDictionary<string, ImmutableArray<XmlDocNode>>.Empty,
        Returns: [],
        Example: [],
        SeeAlso: []);

    /// <summary>True when <see cref="Summary"/> contains any nodes.</summary>
    public bool HasSummary => Summary.Length > 0;
    /// <summary>True when <see cref="Remarks"/> contains any nodes.</summary>
    public bool HasRemarks => Remarks.Length > 0;
    /// <summary>True when <see cref="Returns"/> contains any nodes.</summary>
    public bool HasReturns => Returns.Length > 0;
    /// <summary>True when <see cref="Example"/> contains any nodes.</summary>
    public bool HasExample => Example.Length > 0;
}

Structured representation of a parsed xmldoc comment split into its standard sections.

Parameters

Summary ImmutableArray<XmlDocNode>
Nodes from the <summary> element.
Remarks ImmutableArray<XmlDocNode>
Nodes from the <remarks> element.
Params ImmutableDictionary<string, ImmutableArray<XmlDocNode>>
Per-parameter nodes keyed by parameter name, from <param> elements.
TypeParams ImmutableDictionary<string, ImmutableArray<XmlDocNode>>
Per-type-parameter nodes keyed by name, from <typeparam> elements.
Returns ImmutableArray<XmlDocNode>
Nodes from the <returns> element.
Example ImmutableArray<XmlDocNode>
Nodes from the <example> element.
SeeAlso ImmutableArray<string>
Cref values collected from <seealso> elements.

Pennington.ApiMetadata.ParsedXmlDoc

namespace Pennington.ApiMetadata;

/// Structured representation of a parsed xmldoc comment split into its standard sections.
public record ParsedXmlDoc
{
    /// Structured representation of a parsed xmldoc comment split into its standard sections.
    
public record ParsedXmlDoc(
    ImmutableArray<XmlDocNode> Summary,
    ImmutableArray<XmlDocNode> Remarks,
    ImmutableDictionary<string, ImmutableArray<XmlDocNode>> Params,
    ImmutableDictionary<string, ImmutableArray<XmlDocNode>> TypeParams,
    ImmutableArray<XmlDocNode> Returns,
    ImmutableArray<XmlDocNode> Example,
    ImmutableArray<string> SeeAlso)
{
    /// <summary>Shared empty instance used when no xmldoc is available.</summary>
    public static ParsedXmlDoc Empty { get; } = new(
        Summary: [],
        Remarks: [],
        Params: ImmutableDictionary<string, ImmutableArray<XmlDocNode>>.Empty,
        TypeParams: ImmutableDictionary<string, ImmutableArray<XmlDocNode>>.Empty,
        Returns: [],
        Example: [],
        SeeAlso: []);

    /// <summary>True when <see cref="Summary"/> contains any nodes.</summary>
    public bool HasSummary => Summary.Length > 0;
    /// <summary>True when <see cref="Remarks"/> contains any nodes.</summary>
    public bool HasRemarks => Remarks.Length > 0;
    /// <summary>True when <see cref="Returns"/> contains any nodes.</summary>
    public bool HasReturns => Returns.Length > 0;
    /// <summary>True when <see cref="Example"/> contains any nodes.</summary>
    public bool HasExample => Example.Length > 0;
}
/// Shared empty instance used when no xmldoc is available.
public static ParsedXmlDoc Empty { get; } = new(
    Summary: [],
    Remarks: [],
    Params: ImmutableDictionary<string, ImmutableArray<XmlDocNode>>.Empty,
    TypeParams: ImmutableDictionary<string, ImmutableArray<XmlDocNode>>.Empty,
    Returns: [],
    Example: [],
    SeeAlso: []);
/// Nodes from the <example> element.
ImmutableArray<XmlDocNode> Example
; /// True when Example contains any nodes.
public bool HasExample => Example.Length > 0;
/// True when Remarks contains any nodes.
public bool HasRemarks => Remarks.Length > 0;
/// True when Returns contains any nodes.
public bool HasReturns => Returns.Length > 0;
/// True when Summary contains any nodes.
public bool HasSummary => Summary.Length > 0;
/// Per-parameter nodes keyed by parameter name, from <param> elements.
ImmutableDictionary<string, ImmutableArray<XmlDocNode>> Params
; /// Nodes from the <remarks> element.
ImmutableArray<XmlDocNode> Remarks
; /// Nodes from the <returns> element.
ImmutableArray<XmlDocNode> Returns
; /// Cref values collected from <seealso> elements.
ImmutableArray<string> SeeAlso
; /// Nodes from the <summary> element.
ImmutableArray<XmlDocNode> Summary
; /// Per-type-parameter nodes keyed by name, from <typeparam> elements.
ImmutableDictionary<string, ImmutableArray<XmlDocNode>> TypeParams
; }