示例#1
0
        //       [Parameter(Position = 5, Mandatory = false)]
        //       public SwitchParameter ShowAllFields { get; set; }


        protected override void ProcessRecord()
        {
            //Boolean result = false;

            WriteVerbose("Input Csvfilename : " + CsvFileName);
            SessionState ss = new SessionState();

            Directory.SetCurrentDirectory(ss.Path.CurrentFileSystemLocation.Path);
            CsvFileName = Path.GetFullPath(CsvFileName);
            WriteVerbose("Output (Full) CsvFilename : " + CsvFileName);

            WriteVerbose("Input Adiffilename : " + AdifFileName);
            AdifFileName = Path.GetFullPath(AdifFileName);
            WriteVerbose("Output (Full) AdifFilename : " + AdifFileName);

            WriteVerbose("Check Csv file exists.");
            if (!File.Exists(CsvFileName))
            {
                WriteWarning("File not found : " + CsvFileName);
                return;
            }
            WriteVerbose("Reading and fill the list.");

            bool SwlStation = false;

            if (Swl)
            {
                SwlStation = true;
            }
            bool QslMsgComment = false;

            if (QslMsgCopyToComment)
            {
                QslMsgComment = true;
            }
            bool ShowAllFields = false;

            if (AllFields)
            {
                ShowAllFields = true;
            }

            CsvUtils.CsvReaderQso(CsvFileName, SwlStation, QslMsgComment, ShowAllFields);
            CsvUtils.AdiWriteQso(AdifFileName);
        }