Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the AddFileCommand class with a specified binary reader and delta tool container.
        /// </summary>
        /// <param name="reader">Binary reader.</param>
        /// <param name="deltaToolContainer">Delta tool container.</param>
        public AddFileCommand(BinaryReader reader, DeltaToolContainer deltaToolContainer)
        {
            this._Reader             = reader;
            this._DeltaToolContainer = deltaToolContainer;

            this.Filename  = reader.ReadString();
            this.Hash      = reader.ReadString();
            this.Overwrite = reader.ReadBoolean();
            this.Encoding  = reader.ReadByte();
            this.Length    = reader.ReadInt64();
        }
        /// <summary>
        /// Initializes a new instance of the ModifyFileCommand class with a specified binary reader and delta tool container.
        /// </summary>
        /// <param name="reader">Binary reader.</param>
        /// <param name="deltaToolContainer">Delta tool container.</param>
        public ModifyFileCommand(BinaryReader reader, DeltaToolContainer deltaToolContainer)
        {
            this._Reader             = reader;
            this._DeltaToolContainer = deltaToolContainer;

            this.Filename = reader.ReadString();
            this.OldHash  = reader.ReadString();
            this.NewHash  = reader.ReadString();
            this.Encoding = reader.ReadByte();
            this.Length   = reader.ReadInt64();
        }