public void Generate( FileItem createdFiles, string templateFileName, string[] path, string destFolder, string sourcePath, bool cleanUp, bool createIndex, FileActionHandler fileAction) { _sourcePath = Path.GetFullPath(sourcePath); _destFolder = Path.GetFullPath(destFolder); _fileAction = fileAction; if (cleanUp) { CleanUp(); } CreateDestFolder(); var template = File.ReadAllText(templateFileName); GenerateContent(createdFiles, template, path, createIndex); }
public void Generate( FileItem createdFiles, string templateFileName, string[] path, string destFolder, string sourcePath, bool cleanUp, bool createIndex, FileActionHandler fileAction) { _sourcePath = Path.GetFullPath(sourcePath); _destFolder = Path.GetFullPath(destFolder); _fileAction = fileAction; if (cleanUp) CleanUp(); CreateDestFolder(); var template = File.ReadAllText(templateFileName); GenerateContent(createdFiles, template, path, createIndex); }
// // Summary: // A function protected containing the Event 'FileActionHandler' // ==> So that the event can also be used in the inheritens class. // // Parameters: // filePath: // Contains result of the user search. // // Returns: // Returns void. // protected virtual void OnFileActionHandler(string filePath) { FileActionHandler?.Invoke(filePath); }