All Downloads are FREE. Search and download functionalities are using the official Maven repository.

powershell.model.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
{{#models}}
{{#model}}
function New-{{{classname}}} {
    [CmdletBinding()]
    Param (
{{#vars}}
        [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true{{#required}}, Mandatory = $true{{/required}})]
        [{{#isString}}{{{datatype}}}{{/isString}}{{^isString}}{{^required}}System.Nullable[{{/required}}{{datatype}}{{^required}}]{{/required}}{{/isString}}]
        {{=<% %>=}}
        ${<%name%>}<%^-last%>,<%/-last%>
        <%={{ }}=%>
{{/vars}}
    )

    Process {
        'Creating object: {{{packageName}}}.Model.{{{classname}}}' | Write-Verbose
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        New-Object -TypeName {{{packageName}}}.Model.{{{classname}}} -ArgumentList @(
{{#vars}}
            {{=<% %>=}}
            ${<%name%>}<%^-last%>,<%/-last%>
            <%={{ }}=%>
{{/vars}}
        )
    }
}
{{/model}}
{{/models}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy