Ejemplo n.º 1
0
        public static T Read <T>(this IDataSource source, long offset)
            where T : unmanaged
        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            var value = default(T);

            source.CopyTo(offset, AsSpan(ref value));
            return(value);
        }