protected override void ProcessRecord()
 {
     base.ProcessRecord();
     if (header == null && first)
     {
         parser.ReadHeader(InputString);
         first = false;
     }
     else
     {
         try {
             Dictionary <string, object> output = parser.ReadLine(InputString);
             WriteObject(TypeConversion.DictToPSObject(output));
         } catch (InvalidDataException err) {
             WriteWarning(err.Message);
         }
     }
 }
Exemple #2
0
 protected override void ProcessRecord()
 {
     base.ProcessRecord();
     while (currentLine != null)
     {
         try {
             Dictionary <string, object> output = parser.ReadLine(currentLine);
             if (Mapping != null)
             {
                 output = Mapping.GetRow(output);
             }
             WriteObject(TypeConversion.DictToPSObject(output));
         } catch (InvalidDataException err) {
             WriteWarning(err.Message);
         }
         currentLine = reader.ReadLine();
     }
 }