Exemplo n.º 1
0
 public void Write(DirectoryInfo dir)
 {
     byte[] data = Data switch
     {
         EqdpFile eqdp => eqdp.WriteBytes(),
         EqpFile eqp => eqp.WriteBytes(),
         GmpFile gmp => gmp.WriteBytes(),
         EstFile est => est.WriteBytes(),
         ImcFile imc => imc.WriteBytes(),
            _ => throw new NotImplementedException(),
     };
     DisposeFile(CurrentFile);
     CurrentFile = TempFile.WriteNew(dir, data);
     Changed     = false;
 }
Exemplo n.º 2
0
            public void Write(DirectoryInfo dir, GamePath originalPath)
            {
                var data = Data switch
                {
                    EqdpFile eqdp => eqdp.WriteBytes(),
                    EqpFile eqp => eqp.WriteBytes(),
                    GmpFile gmp => gmp.WriteBytes(),
                    EstFile est => est.WriteBytes(),
                    ImcFile imc => imc.WriteBytes(),
                    CmpFile cmp => cmp.WriteBytes(),
                    _ => throw new NotImplementedException(),
                };

                DisposeFile(CurrentFile);
                CurrentFile = TempFile.WriteNew(dir, data, $"_{originalPath.Filename()}");
                Changed     = false;
            }