/// <inheritdoc />
            public override long GetInt64Value()
            {
                ReadOnlySpan <byte> numberToken = this.jsonTextBuffer.GetBufferedRawJsonToken(
                    this.token.Start,
                    this.token.End).Span;

                return(JsonTextParser.GetInt64Value(numberToken));
            }
 private Int64Node(ReadOnlyMemory <byte> bufferedToken)
     : base(JsonNodeType.Int64)
 {
     this.lazyValue = new Lazy <long>(() =>
     {
         long value = JsonTextParser.GetInt64Value(bufferedToken.Span);
         return(value);
     });
 }
Example #3
0
            /// <inheritdoc />
            public override long GetInt64Value(IJsonNavigatorNode node)
            {
                if (!(node is Int64Node numberNode))
                {
                    throw new ArgumentException($"{node} was not of type: {nameof(Int64Node)}.");
                }

                long value = JsonTextParser.GetInt64Value(numberNode.BufferedToken.Span);

                return(value);
            }