public ReplacementGroup CreateReplacementAction() { ReplacementGroup group = new ReplacementGroup(); foreach (var item in Replacements) { group.Append(Replacement.Create(item.Key, item.Value)); } return(group); }
protected ReplacementGroup GetStandardProjectReplacement(ProjectSubstitutions config) { ReplacementGroup group = ReplacementGroup.Create( Replacement.Create("%CODE%", config.CSProjConfig), Replacement.Create("%REFERENCES%", config.References), Replacement.Create("%REFERENCES_BEFORE_PLATFORM%", config.ReferencesBeforePlatform), Replacement.Create("%NAME%", config.AssemblyNameOverride ?? Path.GetFileNameWithoutExtension(TemplateInfo.ProjectName)), Replacement.Create("%ITEMGROUP%", config.ItemGroup), Replacement.Create("%TARGET_FRAMEWORK_VERSION%", config.TargetFrameworkVersion)); if (config.CustomProjectReplacement != null) { group.Append(Replacement.Create(config.CustomProjectReplacement.Item1, config.CustomProjectReplacement.Item2)); } return(group); }