Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix key access for collections with spaces in the keys #242

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ReportingServicesTools.Designer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function New-RsDataSource
throw (New-Object System.Exception("Exception occurred while converting credential retrieval to enum! $($_.Exception.Message)", $_.Exception))
}

$additionalProperties = New-Object System.Collections.Generic.List[$propertyDataType]
$additionalProperties = New-Object System.Collections.Generic.List["$propertyDataType"]
if ($Description)
{
$descriptionProperty = New-Object $propertyDataType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function New-RsFolder

$namespace = $proxy.GetType().Namespace
$propertyDataType = "$namespace.Property"
$additionalProperties = New-Object System.Collections.Generic.List[$propertyDataType]
$additionalProperties = New-Object System.Collections.Generic.List["$propertyDataType"]
if ($Description)
{
$descriptionProperty = New-Object $propertyDataType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function Write-RsCatalogItem
#region Upload other stuff
else
{
$additionalProperties = New-Object System.Collections.Generic.List[$propertyDataType]
$additionalProperties = New-Object System.Collections.Generic.List["$propertyDataType"]
$property = New-Object $propertyDataType

if ($itemType -eq 'Resource')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{
if ($goodKeys -contains $key)
{
$NewRsWebServiceProxyParam[$key] = $BoundParameters[$key]
$NewRsWebServiceProxyParam["$key"] = $BoundParameters["$key"]
}
}

Expand Down Expand Up @@ -96,7 +96,7 @@ function New-RsRestSessionHelper
{
if ($goodKeys -contains $key)
{
$NewRsRestSessionParams[$key] = $BoundParameters[$key]
$NewRsRestSessionParams["$key"] = $BoundParameters["$key"]
}
}

Expand Down Expand Up @@ -184,7 +184,7 @@ function New-RsConfigurationSettingObjectHelper
{
if ($goodKeys -contains $key)
{
$NewRsConfigurationSettingObjectParam[$key] = $BoundParameters[$key]
$NewRsConfigurationSettingObjectParam["$key"] = $BoundParameters["$key"]
}
}

Expand Down
9 changes: 9 additions & 0 deletions ReportingServicesTools/ReportingServicesTools.odsm.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Octopus deploy module export
$mainScript = "$PSScriptRoot\ReportingServicesTools.Designer.ps1"
@('# AUTO GENERATED SCRIPT', '# SOURCE https://github.com/microsoft/ReportingServicesTools') | sc -path $mainScript
gc "$PSScriptRoot\Libraries\library.ps1" | ac -path $mainScript -Encoding UTF8

$mainScript

$scripts = Get-ChildItem "$PSScriptRoot\Functions" -Recurse -Include *.ps1
foreach ($script in $scripts) { gc $script | ac -path $mainScript -Encoding UTF8 }