Skip to content

Commit

Permalink
Move BotService to main (Azure#15636)
Browse files Browse the repository at this point in the history
* Move BotService to main

* Update Changelog.md

Co-authored-by: azurepowershell <[email protected]>
Co-authored-by: wyunchi-ms <[email protected]>
  • Loading branch information
3 people authored Aug 10, 2021
1 parent 615fb74 commit 367651b
Show file tree
Hide file tree
Showing 52 changed files with 8,494 additions and 163 deletions.
4 changes: 2 additions & 2 deletions src/BotService/Az.BotService.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 2021-03-11
# Generated on: 8/10/2021
#

@{
Expand Down Expand Up @@ -110,7 +110,7 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* Updated the online links.'
# ReleaseNotes = ''

# Prerelease string of this module
# Prerelease = ''
Expand Down
4 changes: 2 additions & 2 deletions src/BotService/Az.BotService.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
}

if(-not $accountsModule) {
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
} elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
}
Write-Information "Loaded Module '$($accountsModule.Name)'"

Expand Down
102 changes: 72 additions & 30 deletions src/BotService/BotService.sln
Original file line number Diff line number Diff line change
@@ -1,48 +1,90 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29709.97
VisualStudioVersion = 16.6.30114.105
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{75E060CE-B2DA-4FCD-99B7-D2556C680A97}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{62843FE6-7575-4D88-B989-7DF7EEC0BC01}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{515536C5-5785-4A0C-A802-19525A580D4B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{442C609B-A431-4A71-B289-08F0B63C83E5}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{B75C3C64-838A-48CF-8050-680FA319C3C0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{59E8F6B8-8F0E-403F-B88B-9736DBC396D9}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{2B871AAD-94E7-498A-ABED-0ECC22AC384F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Az.BotService", "Az.BotService.csproj", "{1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.BotService", "Az.BotService.csproj", "{632974A6-B006-488B-BBE8-18CD2E8CB8AD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.Build.0 = Release|Any CPU
{62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Release|Any CPU.Build.0 = Release|Any CPU
{442C609B-A431-4A71-B289-08F0B63C83E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{442C609B-A431-4A71-B289-08F0B63C83E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{442C609B-A431-4A71-B289-08F0B63C83E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{442C609B-A431-4A71-B289-08F0B63C83E5}.Release|Any CPU.Build.0 = Release|Any CPU
{59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Release|Any CPU.Build.0 = Release|Any CPU
{1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Release|Any CPU.Build.0 = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F9B3D96E-9680-40BE-A917-02EE655D6030}
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Debug|x64.ActiveCfg = Debug|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Debug|x64.Build.0 = Debug|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Debug|x86.ActiveCfg = Debug|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Debug|x86.Build.0 = Debug|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Release|Any CPU.Build.0 = Release|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Release|x64.ActiveCfg = Release|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Release|x64.Build.0 = Release|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Release|x86.ActiveCfg = Release|Any CPU
{75E060CE-B2DA-4FCD-99B7-D2556C680A97}.Release|x86.Build.0 = Release|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Debug|x64.ActiveCfg = Debug|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Debug|x64.Build.0 = Debug|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Debug|x86.ActiveCfg = Debug|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Debug|x86.Build.0 = Debug|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Release|Any CPU.Build.0 = Release|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Release|x64.ActiveCfg = Release|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Release|x64.Build.0 = Release|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Release|x86.ActiveCfg = Release|Any CPU
{515536C5-5785-4A0C-A802-19525A580D4B}.Release|x86.Build.0 = Release|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Debug|x64.ActiveCfg = Debug|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Debug|x64.Build.0 = Debug|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Debug|x86.ActiveCfg = Debug|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Debug|x86.Build.0 = Debug|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Release|Any CPU.Build.0 = Release|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Release|x64.ActiveCfg = Release|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Release|x64.Build.0 = Release|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Release|x86.ActiveCfg = Release|Any CPU
{B75C3C64-838A-48CF-8050-680FA319C3C0}.Release|x86.Build.0 = Release|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Debug|x64.ActiveCfg = Debug|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Debug|x64.Build.0 = Debug|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Debug|x86.ActiveCfg = Debug|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Debug|x86.Build.0 = Debug|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Release|Any CPU.Build.0 = Release|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Release|x64.ActiveCfg = Release|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Release|x64.Build.0 = Release|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Release|x86.ActiveCfg = Release|Any CPU
{2B871AAD-94E7-498A-ABED-0ECC22AC384F}.Release|x86.Build.0 = Release|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Debug|x64.ActiveCfg = Debug|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Debug|x64.Build.0 = Debug|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Debug|x86.ActiveCfg = Debug|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Debug|x86.Build.0 = Debug|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Release|Any CPU.Build.0 = Release|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Release|x64.ActiveCfg = Release|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Release|x64.Build.0 = Release|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Release|x86.ActiveCfg = Release|Any CPU
{632974A6-B006-488B-BBE8-18CD2E8CB8AD}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
1 change: 1 addition & 0 deletions src/BotService/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Fixed the issue that `New-AzBotService` will fail in WebApp mode. [#15608]

## Version 0.3.0
* Updated the online links.
Expand Down
7 changes: 7 additions & 0 deletions src/BotService/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ $moduleName = 'Az.BotService'
$examplesFolder = Join-Path $PSScriptRoot 'examples'
$null = New-Item -ItemType Directory -Force -Path $examplesFolder

Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
$modelCmdlets = @()
if ($modelCmdlets.Count -gt 0) {
. (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
CreateModelCmdlet($modelCmdlets)
}

if($NoDocs) {
Write-Host -ForegroundColor Green 'Creating exports...'
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
Expand Down
2 changes: 1 addition & 1 deletion src/BotService/check-dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $tools = Join-Path $PSScriptRoot 'tools'
$resourceDir = Join-Path $tools 'Resources'
$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1'

if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) {
Write-Host -ForegroundColor Green "Building local Resource module used for test..."
Set-Location $resourceDir
$null = autorest .\readme.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
Expand Down
168 changes: 168 additions & 0 deletions src/BotService/create-model-cmdlets.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------------

function CreateModelCmdlet {

param([string[]]$Models)

if ($Models.Count -eq 0)
{
return
}

$ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
$ModuleName = 'Az.BotService'.Split(".")[1]
$OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
$null = New-Item -ItemType Directory -Force -Path $OutputDir

$CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
$Content = ''
$null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 )
{ $Content += get-content $_.fullname -raw
} }

$Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content)
$Nodes = $Tree.ChildNodes().ChildNodes()
foreach ($Model in $Models)
{
$InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") }
if ($InterfaceNode.count -eq 0) {
continue
}
# through a queue, we iterate all the parent models.
$Queue = @($InterfaceNode)
$visited = @("I$Model")
$AllInterfaceNodes = @()
while ($Queue.count -ne 0)
{
$AllInterfaceNodes += $Queue[0]
# Baselist contains the direct parent models.
foreach ($parent in $Queue[0].BaseList.Types)
{
if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value)))
{
$Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) })
$visited = [Array]$visited + $parent.Type.Right.Identifier.Value
}
}
$first, $Queue = $Queue
}

$Namespace = $InterfaceNode.Parent.Name
$ObjectType = $Model
$ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
# remove duplicated module name
if ($ObjectType.StartsWith($ModuleName)) {
$ModulePrefix = ''
} else {
$ModulePrefix = $ModuleName
}
$OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir

$ParameterDefineScriptList = New-Object System.Collections.Generic.List[string]
$ParameterAssignScriptList = New-Object System.Collections.Generic.List[string]
foreach ($Node in $AllInterfaceNodes)
{
foreach ($Member in $Node.Members)
{
$Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments
$Required = $false
$Description = ""
$Readonly = $False
foreach ($Argument in $Arguments)
{
if ($Argument.NameEquals.Name.Identifier.Value -eq "Required")
{
$Required = $Argument.Expression.Token.Value
}
if ($Argument.NameEquals.Name.Identifier.Value -eq "Description")
{
$Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"')
}
if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly")
{
$Readonly = $Argument.Expression.Token.Value
}
}
if ($Readonly)
{
continue
}
$Identifier = $Member.Identifier.Value
$Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
$ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string]
if ($Required)
{
$ParameterDefinePropertyList.Add("Mandatory")
}
if ($Description -ne "")
{
$ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"")
}
$ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList)
$ParameterDefineScript = "
[Parameter($ParameterDefineProperty)]
[${Type}]
`$${Identifier}"
$ParameterDefineScriptList.Add($ParameterDefineScript)
$ParameterAssignScriptList.Add("
`$Object.${Identifier} = `$${Identifier}")
}
}
$ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator ","
$ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator ""

$Script = "
# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the \`"License\`");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an \`"AS IS\`" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Create a in-memory object for ${ObjectType}
.Description
Create a in-memory object for ${ObjectType}
.Outputs
${ObjectTypeWithNamespace}
.Link
https://docs.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
#>
function New-Az${ModulePrefix}${ObjectType}Object {
[OutputType('${ObjectTypeWithNamespace}')]
[CmdletBinding(PositionalBinding=`$false)]
Param(
${ParameterDefineScript}
)
process {
`$Object = [${ObjectTypeWithNamespace}]::New()
${ParameterAssignScript}
return `$Object
}
}
"
Set-Content -Path $OutputPath -Value $Script
}
}
Loading

0 comments on commit 367651b

Please sign in to comment.