Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 07f5fd3

Browse files
Created Get-ItemType from logic in Write-RsCatalogItem
Pulled the logic for the Get-ItemType "utility" function out of Write-RsCatalogItem, converted it to a switch statement, and placed it in the Common folder.
1 parent ef7710e commit 07f5fd3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎Functions/Common/Get-ItemType.ps1‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function Get-ItemType
2+
{
3+
param(
4+
[string]$FileExtension
5+
)
6+
switch ($FileExtension)
7+
{
8+
'.rdl' {return 'Report'}
9+
'.rsds' {return 'DataSource'}
10+
'.rsd' {return 'DataSet'}
11+
default {throw 'Uploading currently only supports .rdl, .rsds and .rsd files'}
12+
}
13+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /