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: 7.8.0
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