AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="1.1.2" />

.NET API 956,416 bytes

 HtmlMeterElement

Represents the HTML meter element. https://html.spec.whatwg.org/multipage/forms.html#dom-meter-low
using AngleSharp.Common; using AngleSharp.Dom; using AngleSharp.Dom.Events; using AngleSharp.Text; using System.Globalization; using System.Runtime.CompilerServices; namespace AngleSharp.Html.Dom { internal sealed class HtmlMeterElement : HtmlElement, IHtmlMeterElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IGlobalEventHandlers, ILabelabelElement { [System.Runtime.CompilerServices.Nullable(1)] private readonly NodeList _labels; [System.Runtime.CompilerServices.Nullable(1)] public INodeList Labels { [System.Runtime.CompilerServices.NullableContext(1)] get { return _labels; } } public double Value { get { return this.GetOwnAttribute(AttributeNames.Value).ToDouble(0).Constraint(Minimum, Maximum); } set { this.SetOwnAttribute(AttributeNames.Value, value.ToString(NumberFormatInfo.InvariantInfo), false); } } public double Maximum { get { return this.GetOwnAttribute(AttributeNames.Max).ToDouble(1).Constraint(Minimum, Infinity); } set { this.SetOwnAttribute(AttributeNames.Max, value.ToString(NumberFormatInfo.InvariantInfo), false); } } public double Minimum { get { return this.GetOwnAttribute(AttributeNames.Min).ToDouble(0); } set { this.SetOwnAttribute(AttributeNames.Min, value.ToString(NumberFormatInfo.InvariantInfo), false); } } public double Low { get { return this.GetOwnAttribute(AttributeNames.Low).ToDouble(Minimum).Constraint(Minimum, Maximum); } set { this.SetOwnAttribute(AttributeNames.Low, value.ToString(NumberFormatInfo.InvariantInfo), false); } } public double High { get { return this.GetOwnAttribute(AttributeNames.High).ToDouble(Maximum).Constraint(Low, Maximum); } set { this.SetOwnAttribute(AttributeNames.High, value.ToString(NumberFormatInfo.InvariantInfo), false); } } public double Optimum { get { return this.GetOwnAttribute(AttributeNames.Optimum).ToDouble((Maximum + Minimum) * 0.5).Constraint(Minimum, Maximum); } set { this.SetOwnAttribute(AttributeNames.Optimum, value.ToString(NumberFormatInfo.InvariantInfo), false); } } [System.Runtime.CompilerServices.NullableContext(1)] public HtmlMeterElement(Document owner, [System.Runtime.CompilerServices.Nullable(2)] string prefix = null) : base(owner, TagNames.Meter, prefix, NodeFlags.None) { _labels = new NodeList(); } } }