Ejemplo n.º 1
0
        public async Task AddFile(FileStateObject state, Stream src)
        {
            var ostate = (BSAFileStateObject)state;

            var r = await FileEntry.Create(this, ostate.Path, src, ostate.FlipCompression);

            lock (this)
            {
                _files.Add(r);
            }
        }
Ejemplo n.º 2
0
        public void AddFile(FileStateObject state, Stream src)
        {
            switch (_state.Type)
            {
            case EntryType.GNRL:
                var result = new BA2FileEntryBuilder((BA2FileEntryState)state, src);
                lock (_entries) _entries.Add(result);
                break;

            case EntryType.DX10:
                var resultdx10 = new BA2DX10FileEntryBuilder((BA2DX10EntryState)state, src);
                lock (_entries) _entries.Add(resultdx10);
                break;
            }
        }
Ejemplo n.º 3
0
        public async Task AddFile(FileStateObject state, Stream src)
        {
            switch (_state.Type)
            {
            case EntryType.GNRL:
                var result = await BA2FileEntryBuilder.Create((BA2FileEntryState)state, src, _slab);

                lock (_entries) _entries.Add(result);
                break;

            case EntryType.DX10:
                var resultdx10 = await BA2DX10FileEntryBuilder.Create((BA2DX10EntryState)state, src, _slab);

                lock (_entries) _entries.Add(resultdx10);
                break;
            }
        }