/// <inheritdoc /> public override double GetFloat64Value() { ReadOnlySpan <byte> numberToken = this.jsonTextBuffer.GetBufferedRawJsonToken( this.token.Start, this.token.End).Span; return(JsonTextParser.GetFloat64Value(numberToken)); }
private Float64Node(ReadOnlyMemory <byte> bufferedToken) : base(JsonNodeType.Float64) { this.lazyValue = new Lazy <double>(() => { double value = JsonTextParser.GetFloat64Value(bufferedToken.Span); return(value); }); }
/// <inheritdoc /> public override double GetFloat64Value(IJsonNavigatorNode node) { if (!(node is Float64Node numberNode)) { throw new ArgumentException($"{node} was not of type: {nameof(Float64Node)}."); } double value = JsonTextParser.GetFloat64Value(numberNode.BufferedToken.Span); return(value); }