17 lines
880 B
Plaintext
17 lines
880 B
Plaintext
<#@ template language="C#" HostSpecific="True" inherits="DynamicTransform" #>
|
|
<#@ Output Extension="ps1" #>
|
|
[T4Scaffolding.Scaffolder(Description = "Enter a description of <#= Model.Scaffolder #> here")][CmdletBinding()]
|
|
param(
|
|
[string]$Project,
|
|
[string]$CodeLanguage,
|
|
[string[]]$TemplateFolders,
|
|
[switch]$Force = $false
|
|
)
|
|
|
|
$outputPath = "ExampleOutput" # The filename extension will be added based on the template's <#= "<" #>#@ Output Extension="..." #<#= ">" #> directive
|
|
$namespace = (Get-Project $Project).Properties.Item("DefaultNamespace").Value
|
|
|
|
Add-ProjectItemViaTemplate $outputPath -Template <#= Model.TemplateName #> `
|
|
-Model @{ Namespace = $namespace; ExampleValue = "Hello, world!" } `
|
|
-SuccessMessage "Added <#= Model.Scaffolder #> output at {0}" `
|
|
-TemplateFolders $TemplateFolders -Project $Project -CodeLanguage $CodeLanguage -Force:$Force |