public GeneratorActionResult ExecuteAction(GeneratorArguments arguments, Core.InputFields.ActionInputValues values, Dictionary<string, string> parameters) { var location = values.GetString("DestinationFolder"); var copier = new DirectoryRenamerCopier(arguments.TemplateInformation.TemplatePath, location) { ExcludeExtensions = arguments.TemplateInformation.ExcludeExtensions.Select(x => x.FileExtension).ToList(), RemoveExtensions = arguments.TemplateInformation.RemoveExtensions.Select(x => x.FileExtension).ToList(), RenameExtensions = arguments.TemplateInformation.RenameExtensions.Select(x => x.FileExtension).ToList(), UtfExtensions = arguments.TemplateInformation.RenameExtensions.Where(x => x.UseUtf8Encoding).Select(x => x.FileExtension).ToList(), RenameWords = arguments.TemplateInformation.Renames }; if (copier.StartRenaming()) return new GeneratorActionResult(true, ""); else return new GeneratorActionResult(false, ""); }
public GeneratorActionResult ExecuteAction(GeneratorArguments arguments, Core.InputFields.ActionInputValues values, Dictionary<string, string> parameters) { var location = values.GetString("DestinationFolder"); var iisExpressUrl = parameters.ContainsKey("iisExpressUrl") ? parameters["iisExpressUrl"] : ""; var copier = new DirectoryRenamerCopier(arguments.TemplateInformation.TemplatePath, location) { ExcludeExtensions = arguments.TemplateInformation.ExcludeExtensions.Select(x => x.FileExtension).ToList(), RemoveExtensions = arguments.TemplateInformation.RemoveExtensions.Select(x => x.FileExtension).ToList(), RenameExtensions = arguments.TemplateInformation.RenameExtensions.Select(x => x.FileExtension).ToList(), UtfExtensions = arguments.TemplateInformation.RenameExtensions.Where(x => x.UseUtf8Encoding).Select(x => x.FileExtension).ToList(), RenameWords = arguments.TemplateInformation.Renames }; copier.RenameWords.Add(iisExpressUrl, string.Format("http://localhost:{0}/", GetRandomPort())); if (copier.StartRenaming()) return new GeneratorActionResult(true, ""); else return new GeneratorActionResult(false, ""); }