File: Blocks\RichText\HeadingNode.cs
Web Access
Project: src\aspnetcore\src\Components\AI\src\Microsoft.AspNetCore.Components.AI.csproj (Microsoft.AspNetCore.Components.AI)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
namespace Microsoft.AspNetCore.Components.AI;
 
/// <summary>
/// Represents a heading.
/// </summary>
public class HeadingNode : RichTextNode
{
    /// <summary>
    /// Initializes a new instance of <see cref="HeadingNode"/>.
    /// </summary>
    public HeadingNode()
    {
    }
 
    /// <summary>
    /// Initializes a new instance of <see cref="HeadingNode"/>.
    /// </summary>
    /// <param name="level">The heading level.</param>
    public HeadingNode(int level)
    {
        Level = level;
    }
 
    /// <summary>
    /// Gets or sets the heading level.
    /// </summary>
    public int Level { get; set; } = 1;
}