public async Task WhenReadVersionThenVersionMatch()
        {
            await using var pfs3AioStream = new MemoryStream(await File.ReadAllBytesAsync(@"TestData\pfs3aio"));
            var version = await VersionReader.Read(pfs3AioStream);

            Assert.Equal(
                "$VER: Professional-File-System-III 19.2 PFS3AIO-VERSION (2.10.2018) written by Michiel Pelt and copyright (c) 1994-2012 Peltin BV",
                version);
        }
示例#2
0
    public override void Execute()
    {
        ReadConfig();
        FindEditorBrowsableTypes();
        FindObsoleteType();

        assemblyVersion = VersionReader.Read(ModuleDefinition.Assembly);

        ProcessAssembly();
    }
示例#3
0
        public static RigidDiskBlock AddFileSystem(this RigidDiskBlock rigidDiskBlock,
                                                   byte[] dosType, byte[] fileSystemBytes)
        {
            var version     = VersionReader.Read(fileSystemBytes);
            var fileVersion = VersionReader.Parse(version);

            var fileSystemHeaderBlock = BlockHelper.CreateFileSystemHeaderBlock(dosType, fileVersion.Version,
                                                                                fileVersion.Revision,
                                                                                fileSystemBytes);

            rigidDiskBlock.FileSystemHeaderBlocks = rigidDiskBlock.FileSystemHeaderBlocks.Concat(new[]
                                                                                                 { fileSystemHeaderBlock });

            return(rigidDiskBlock);
        }