Exemple #1
0
        public override async Task SaveFile()
        {
            byte[][] data = await Task.WhenAll(this.storage.Select((s, i) => s.Save()));

            var memGarc = await GarcUtil.PackGarc(data, this.Def.Version, (int)this.Def.ContentPadToNearest);

            this.Def  = memGarc.Def;
            this.Data = memGarc.Data;
        }
Exemple #2
0
        public virtual async Task SetFiles(byte[][] files)
        {
            if (files == null || files.Length != this.FileCount)
            {
                throw new ArgumentException();
            }

            var memGarc = await GarcUtil.PackGarc(files, this.Def.Version, (int)this.Def.ContentPadToNearest);

            this.Def  = memGarc.Def;
            this.Data = memGarc.Data;
        }
Exemple #3
0
        public virtual async Task SaveFile()
        {
            byte[][] data = new byte[this.FileCount][];

            for (int i = 0; i < data.Length; i++)
            {
                data[i] = await this.GetFile(i);
            }

            var memGarc = await GarcUtil.PackGarc(data, this.Def.Version, (int)this.Def.ContentPadToNearest);

            this.Def  = memGarc.Def;
            this.Data = memGarc.Data;
        }