/// <inheritdoc />
            public override Guid GetGuidValue()
            {
                ReadOnlySpan <byte> guidToken = this.jsonTextBuffer.GetBufferedRawJsonToken(
                    this.token.Start,
                    this.token.End).Span;

                return(JsonTextParser.GetGuidValue(guidToken));
            }
 private GuidNode(ReadOnlyMemory <byte> bufferedToken)
     : base(JsonNodeType.Guid)
 {
     this.lazyValue = new Lazy <Guid>(() =>
     {
         Guid value = JsonTextParser.GetGuidValue(bufferedToken.Span);
         return(value);
     });
 }
Esempio n. 3
0
            /// <inheritdoc />
            public override Guid GetGuidValue(IJsonNavigatorNode node)
            {
                if (!(node is GuidNode guidNode))
                {
                    throw new ArgumentException($"{node} was not of type: {nameof(GuidNode)}.");
                }

                Guid value = JsonTextParser.GetGuidValue(guidNode.BufferedToken.Span);

                return(value);
            }