Esempio n. 1
0
 /// <summary>
 /// Write codes to file(s)
 /// </summary>
 public void Write(object o, DataParserEventArgs e)
 {
     foreach (DataWriterConfig dwc in DataWriterConfigs)
     {
         try
         {
             string fileName    = FillTemplate(dwc.FileNameTemplate, e.Codes);
             string fileContent = FillTemplate(dwc.FileContentTemplate, e.Codes);
             File.WriteAllText($"{dwc.SavePath}\\{fileName}", fileContent);
         }
         catch (Exception ex)
         {
             Log.AddError("Unable to save file", ex);
         }
     }
 }
Esempio n. 2
0
 virtual protected void OnParsed(DataParserEventArgs e) => Parsed?.Invoke(this, e);