Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public override int Serialize(Core.Utility.BinaryWriter writer)
 {
     using (var file = FileUtilities.OpenFileStream(FileInfo.FullName))
     {
         file.CopyTo(writer.BaseStream);
     }
     return((int)FileInfo.Length);
 }
Ejemplo n.º 3
0
 /// <inheritdoc />
 public override int Serialize(Core.Utility.BinaryWriter writer)
 {
     throw new NotSupportedException();
 }
Ejemplo n.º 4
0
 /// <inheritdoc />
 public override int Serialize(Core.Utility.BinaryWriter writer)
 {
     throw new System.NotImplementedException();
 }