/// <inheritdoc /> public override int Serialize(Core.Utility.BinaryWriter writer) { writer.Write(MagicKey); var bytesWritten = MagicKey.Length; writer.Write(Version); bytesWritten += sizeof(byte); writer.Write((ulong)Features); bytesWritten += sizeof(LuigiFeatureFlags); if (Version > 0) { writer.Write((ulong)Features2); bytesWritten += sizeof(LuigiFeatureFlags2); writer.Write(Uid); bytesWritten += sizeof(ulong); } writer.Write(Reserved); bytesWritten += Reserved.Length; writer.Write(Crc); bytesWritten += HeaderChecksumSize; return(bytesWritten); }
/// <inheritdoc /> public override int Serialize(Core.Utility.BinaryWriter writer) { using (var file = FileUtilities.OpenFileStream(FileInfo.FullName)) { file.CopyTo(writer.BaseStream); } return((int)FileInfo.Length); }
/// <inheritdoc /> public override int Serialize(Core.Utility.BinaryWriter writer) { throw new NotSupportedException(); }
/// <inheritdoc /> public override int Serialize(Core.Utility.BinaryWriter writer) { throw new System.NotImplementedException(); }