BDInfo.runner.GenerateReport C# (CSharp) Метод

GenerateReport() публичный Метод

public GenerateReport ( String savePath ) : void
savePath String
Результат void
        public void GenerateReport(String savePath)
        {
            if (ScanResult.ScanException != null)
            {
                System.Console.WriteLine(string.Format("{0}", ScanResult.ScanException.Message));
            }
            else
            {
                if (ScanResult.FileExceptions.Count > 0)
                {
                    System.Console.WriteLine("Scan completed with errors (see report).");
                }
                else
                {
                    System.Console.WriteLine("Scan completed successfully.");
                }

                System.Console.WriteLine("Please wait while we generate the report...");
                try
                {
                    FormReport report = new FormReport();
                    report.Generate(BDROM, selectedPlayLists, ScanResult, savePath);
                }
                catch (Exception ex)
                {
                    System.Console.WriteLine(string.Format("{0}", (ex.Message)));
                }
            }
        }

Usage Example

Пример #1
0
        static void Main(string[] args)
        {
            var options = new MyOptions();
            // Parse in 'strict mode', success or quit
            if(CommandLine.Parser.Default.ParseArguments(args, options))
            {
                validatePath(options.input);
                validatePath(options.output);

                runner run = new runner();
                run.InitBDROM(options.input);

                //If mpsl specified, select playlist in a different way
                if (options.playlistsToScan != null)
                {
                    try
                    {
                        System.Console.WriteLine("-m or --mpls specified, running in non-interactive mode...");
                        System.Console.Write("Atempting to find ");
                        System.Console.Write(String.Join<String>(", ", options.playlistsToScan) + Environment.NewLine);

                        run.SelectPlayList(options.playlistsToScan);
                    }
                    catch (Exception ex)
                    {
                        System.Console.WriteLine("ERROR: " + ex.Message);
                        Environment.Exit(-1);
                    }
                }
                else
                {
                    run.SelectPlayList();
                }

                run.AddStreamFilesInPlaylists();
                run.ScanBDROM();
                run.GenerateReport(options.output);
            }
        }