Ejemplo n.º 1
0
        internal Guid ReadGuid()
        {
            Guid value = default(Guid);

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = FastToValue.ToGuid(_buffer, ref position, ',');
                }
                else
                {
                    value = FastToValue.ToGuid(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }
Ejemplo n.º 2
0
        internal Uri ReadUri()
        {
            Uri value = null;

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = FastToValue.ToUri(_buffer, ref position, ',');
                }
                else
                {
                    value = FastToValue.ToUri(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }
Ejemplo n.º 3
0
        internal DateTimeOffset ReadDateTimeOffset()
        {
            DateTimeOffset value = default(DateTimeOffset);

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = FastToValue.ToDateTimeOffset(_buffer, ref position, ',');
                }
                else
                {
                    value = FastToValue.ToDateTimeOffset(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }
Ejemplo n.º 4
0
        internal TimeSpan ReadTimeSpan()
        {
            TimeSpan value = default(TimeSpan);

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = FastToValue.ToTimeSpan(_buffer, ref position, ',');
                }
                else
                {
                    value = FastToValue.ToTimeSpan(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }
Ejemplo n.º 5
0
        internal unsafe float ReadSingle()
        {
            float value = 0;

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = FastToValue.ToFloat(_buffer, ref position, ',');
                }
                else
                {
                    value = FastToValue.ToFloat(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }
Ejemplo n.º 6
0
        internal unsafe double ReadDouble()
        {
            double value = 0;

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = FastToValue.ToDouble(_buffer, ref position, ',');
                }
                else
                {
                    value = FastToValue.ToDouble(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }
Ejemplo n.º 7
0
        internal decimal ReadDecimal()
        {
            decimal value = 0;

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = FastToValue.ToDecimal(_buffer, ref position, ',');
                }
                else
                {
                    value = FastToValue.ToDecimal(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }
Ejemplo n.º 8
0
        internal sbyte ReadSByte()
        {
            sbyte value = 0;

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = (sbyte)FastToValue.ToUInt32(_buffer, ref position, ',');
                }
                else
                {
                    value = (sbyte)FastToValue.ToUInt32(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }
Ejemplo n.º 9
0
        internal short ReadInt16()
        {
            short value = 0;

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = (short)FastToValue.ToInt32(_buffer, ref position, ',');
                }
                else
                {
                    value = (short)FastToValue.ToInt32(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }
Ejemplo n.º 10
0
        internal long ReadInt64()
        {
            long value = 0;

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = FastToValue.ToInt64(_buffer, ref position, ',');
                }
                else
                {
                    value = FastToValue.ToInt64(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }
Ejemplo n.º 11
0
        internal uint ReadUInt32()
        {
            uint value = 0;

            if (CheckAndSkipName())
            {
                if (current != currentLast)
                {
                    value = FastToValue.ToUInt32(_buffer, ref position, ',');
                }
                else
                {
                    value = FastToValue.ToUInt32(_buffer, ref position, '}');
                    position++;
                }
                position++;
            }
            return(value);
        }