Functions/Types/New-CdsInstance.ps1
<#
.SYNOPSIS Initialize new object that represent a Cds Instance. #> function New-CdsInstance { [CmdletBinding()] [OutputType([PsObject])] param ( ) begin { $StopWatch = [System.Diagnostics.Stopwatch]::StartNew(); Trace-CdsFunction -Name $MyInvocation.MyCommand.Name -Stage Start -Parameters ($MyInvocation.MyCommand.Parameters); } process { $hash = @{}; $hash["Id"] = [Guid]::Empty; $hash["Name"] = [String]::Empty; $hash["UniqueName"] = [String]::Empty; $hash["DisplayName"] = [String]::Empty; $hash["Url"] = [String]::Empty; $hash["AdminApiUrl"] = [String]::Empty; $hash["ApiUrl"] = [String]::Empty; $hash["TenantId"] = [Guid]::Empty; $hash["EnviromentId"] = [Guid]::Empty; $hash["ConnectionString"] = [String]::Empty; $hash["ParentConnection"] = $null; $object = New-Object PsObject -Property $hash; $object; } end { $StopWatch.Stop(); Trace-CdsFunction -Name $MyInvocation.MyCommand.Name -Stage Stop -StopWatch $StopWatch; } } Export-ModuleMember -Function New-CdsInstance -Alias *; |