예제 #1
0
        public ArchiveAccessor CreateDescriptor(string binaryFile, ArchiveEntry entry)
        {
            ArchiveAccessor result = new ArchiveAccessor(new SharedMemoryMappedFile(binaryFile), _binaryFile, entry);

            result._level = _level + 1;
            return(result);
        }
예제 #2
0
 private ArchiveListingReaderV1(ArchiveAccessor accessor, Action<long> progressIncrement, Action<long> progressTotalChanged)
 {
     _accessor = accessor;
     _progressIncrement = progressIncrement;
     _progressTotalChanged = progressTotalChanged;
     _input = accessor.ExtractListing();
 }
예제 #3
0
 private ArchiveListingReaderV1(ArchiveAccessor accessor, Action <long> progressIncrement, Action <long> progressTotalChanged)
 {
     _accessor             = accessor;
     _progressIncrement    = progressIncrement;
     _progressTotalChanged = progressTotalChanged;
     _input = accessor.ExtractListing();
 }
예제 #4
0
        public ArchiveAccessor CreateDescriptor(ArchiveEntry entry)
        {
            ArchiveAccessor result = new ArchiveAccessor(null, _binaryFile, entry);

            result._level = _level + 1;
            return(result);
        }
예제 #5
0
 public static ArchiveListing Read(ArchiveAccessor accessor, Action <long> progressIncrement, Action <long> progressTotalChanged)
 {
     using (ArchiveListingReaderV2 reader = new ArchiveListingReaderV2(accessor, progressIncrement, progressTotalChanged))
     {
         ArchiveListing result = reader.Read();
         return(result);
     }
 }
예제 #6
0
 public static ArchiveListing Read(ArchiveAccessor accessor, Action<long> progressIncrement, Action<long> progressTotalChanged)
 {
     using (ArchiveListingReaderV2 reader = new ArchiveListingReaderV2(accessor, progressIncrement, progressTotalChanged))
     {
         ArchiveListing result = reader.Read();
         return result;
     }
 }
예제 #7
0
        public UiArchives Build()
        {
            string[] lists = _gameLocation.EnumerateListingFiless().ToArray();
            ConcurrentBag<UiArchiveNode> nodes = new ConcurrentBag<UiArchiveNode>();

            Parallel.ForEach(lists, fileName =>
            {
                ArchiveAccessor accessor = new ArchiveAccessor(GetBinaryFilePath(fileName), fileName);
                nodes.Add(new UiArchiveNode(accessor, null));
            });

            return new UiArchives(nodes.OrderBy(n=>n.Name).ToArray());
        }
예제 #8
0
        public UiArchives Build()
        {
            string[] lists = Directory.GetFiles(_gameLocation.SystemDirectory, "filelist*.bin");
            ConcurrentBag<UiArchiveNode> nodes = new ConcurrentBag<UiArchiveNode>();

            Parallel.ForEach(lists, fileName =>
            {
                ArchiveAccessor accessor = new ArchiveAccessor(GetBinaryFilePath(fileName), fileName);
                nodes.Add(new UiArchiveNode(accessor, null));
            });

            return new UiArchives(nodes.ToArray());
        }
예제 #9
0
 private ArchiveListingWriterV2(ArchiveListing listing)
 {
     _listing = listing;
     _accessor = _listing.Accessor;
 }
예제 #10
0
 private ArchiveListingWriterV2(ArchiveListing listing)
 {
     _listing  = listing;
     _accessor = _listing.Accessor;
 }
예제 #11
0
 public ArchiveAccessor CreateDescriptor(string binaryFile, ArchiveEntry entry)
 {
     ArchiveAccessor result = new ArchiveAccessor(new SharedMemoryMappedFile(binaryFile), _binaryFile, entry);
     result._level = _level + 1;
     return result;
 }
예제 #12
0
 public ArchiveAccessor CreateDescriptor(ArchiveEntry entry)
 {
     ArchiveAccessor result = new ArchiveAccessor(null, _binaryFile, entry);
     result._level = _level + 1;
     return result;
 }
예제 #13
0
 private ArchiveListingReaderV2(ArchiveAccessor accessor, Action <long> progressIncrement, Action <long> progressTotalChanged)
 {
     _accessor             = accessor;
     _progressIncrement    = progressIncrement;
     _progressTotalChanged = progressTotalChanged;
 }
예제 #14
0
 public UiArchiveNode(ArchiveAccessor accessor, ArchiveListing parentListing)
     : base(accessor.ListingEntry.Name, UiNodeType.Archive)
 {
     _accessor = accessor;
     _parentListing = parentListing;
 }
예제 #15
0
 public ArchiveListing(ArchiveAccessor accessor, IArchiveListingHeader header)
     : base(header.EntriesCount)
 {
     Accessor = accessor;
     Header   = header;
 }
예제 #16
0
 private ArchiveListingReaderV2(ArchiveAccessor accessor, Action<long> progressIncrement, Action<long> progressTotalChanged)
 {
     _accessor = accessor;
     _progressIncrement = progressIncrement;
     _progressTotalChanged = progressTotalChanged;
 }