AngleSharp by AngleSharp

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

.NET API 1,214,976 bytes

 HtmlMeterElement

Represents the HTML meter element. https://html.spec.whatwg.org/multipage/forms.html#dom-meter-low
using AngleSharp.Dom.Collections; using AngleSharp.Dom.Css; using AngleSharp.Dom.Events; using AngleSharp.Extensions; using AngleSharp.Html; using System.Globalization; namespace AngleSharp.Dom.Html { internal sealed class HtmlMeterElement : HtmlElement, IHtmlMeterElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle, IGlobalEventHandlers, ILabelabelElement { private readonly NodeList _labels; public INodeList Labels => _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); } } public HtmlMeterElement(Document owner, string prefix = null) : base(owner, TagNames.Meter, prefix, NodeFlags.None) { _labels = new NodeList(); } } }