public void GenerateAsset(GeneratorCriteria criteria) { if (criteria.Project.SelectedValue != null) { var file = new FileLibrary(); var filePath = file.GetFilePath(criteria); var fileName = file.DetermineName(criteria.ViewType, criteria.Arguments) + criteria.Extension; if (!string.IsNullOrEmpty(criteria.FolderPath)) { filePath += criteria.FolderPath + "\\" + criteria.Arguments.VerticleName + "\\"; file.CreateDirectory(filePath); } var fullPath = file.GetFullPath(filePath, fileName); WriteFile(file, fileName, fullPath, criteria); } }
public void GenerateInterface(GeneratorCriteria criteria) { if (criteria.Project.SelectedValue != null) { var file = new FileLibrary(); var filePath = file.GetFilePath(criteria); var fileName = INTERFACE_PREFIX + criteria.Arguments.VerticleName + criteria.Extension; if (!string.IsNullOrEmpty(criteria.FolderPath)) { filePath += criteria.FolderPath + "\\"; file.CreateDirectory(filePath); } var fullPath = file.GetFullPath(filePath, fileName); WriteFile(file, fileName, fullPath, criteria); } }