public static T ReadFirst <T>(Stream stream) { T first = default(T); using (var coder = new BinaryReadingCoder(stream)) coder.CodeT(ref first); return(first); }
public static T ReadFirst <T>(string fileName) { T first = default(T); using (var coder = new BinaryReadingCoder(fileName)) coder.CodeT(ref first); return(first); }
public static object ReadFirstObject(string fileName) { object first = null; using (var coder = new BinaryReadingCoder(fileName)) coder.Code(ref first); return(first); }
public static object ReadFirstObject(Stream stream) { object first = null; using (var coder = new BinaryReadingCoder(stream)) coder.Code(ref first); return(first); }
public static T Decode <T>(this byte[] self) { using (var stream = new MemoryStream(self)) { T result = default(T); using (var coder = new BinaryReadingCoder(stream)) coder.CodeT(ref result); return(result); } }