Beispiel #1
0
        public int Transfer(Addressable source, long index, T destination)
        {
            int length = source.ReadInt32(index + 0);

            property.SetValue(destination, source.ReadString(index + 4, length));
            return(NormalizeLength(length));
        }
Beispiel #2
0
        public int Transfer(Addressable source, long index, Substitute <T> destination)
        {
            int length = source.ReadInt32(index + 0);

            destination.Add(property.Name, () =>
            {
                if (length < 0)
                {
                    return(null);
                }

                return(new SubstituteText(length, () => source.ReadString(index + 4, length)));
            });

            return(NormalizeLength(length));
        }