Esempio n. 1
0
        public sealed override string Read(Span <byte> buffer, ref int offset)
        {
            int length = CalculateIncomingStringLength(buffer, ref offset);

            if (length == 0 || length < MaximumCharacterSize)
            {
                return(String.Empty);
            }

            //Read until terminator is found, then we skip over terminator in the buffer.
            //Slice just incase invalid data and terminator isn't there.
            string value = DecoratedSerializer.Read(buffer.Slice(0, (length) * MaximumCharacterSize + offset), ref offset);

            return(value);
        }
 public TType Read([NotNull] IWireStreamReaderStrategy source)
 {
     return(DecoratedSerializer.Read(source));
 }
 object ITypeSerializerStrategy.Read(IWireStreamReaderStrategy source)
 {
     return(DecoratedSerializer.Read(source));
 }