예제 #1
0
        /// <summary>
        /// Constructor for a full DumpEnvironment object from user information
        /// </summary>
        /// <param name="options"></param>
        /// <param name="outputDirectory"></param>
        /// <param name="outputFilename"></param>
        /// <param name="drive"></param>
        /// <param name="system"></param>
        /// <param name="type"></param>
        /// <param name="parameters"></param>
        public DumpEnvironment(Options options,
                               string outputDirectory,
                               string outputFilename,
                               Drive drive,
                               RedumpSystem?system,
                               MediaType?type,
                               string parameters)
        {
            // Set options object
            this.Options = options;

            // Output paths
            (this.OutputDirectory, this.OutputFilename) = InfoTool.NormalizeOutputPaths(outputDirectory, outputFilename);

            // UI information
            this.Drive  = drive;
            this.System = system ?? options.DefaultSystem;
            this.Type   = type ?? MediaType.NONE;

            // Dumping program
            SetParameters(parameters);
        }
예제 #2
0
 public void FixOutputPathsTest(string outputDirectory, string outputFilename, string expectedOutputDirectory, string expectedOutputFilename)
 {
     (string actualOutputDirectory, string actualOutputFilename) = InfoTool.NormalizeOutputPaths(outputDirectory, outputFilename, false);
     Assert.Equal(expectedOutputDirectory, actualOutputDirectory);
     Assert.Equal(expectedOutputFilename, actualOutputFilename);
 }