test/3_Output_Correct/Case/ParameterAttributes.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

function Test-Function {
  #region Function parameters
  [CmdletBinding()]
  param(
    [Parameter(Mandatory = $true,ValueFromPipeline = $false)]
    [ValidateNotNullOrEmpty()]
    [string]$Server,
    [Parameter(Mandatory = $false,ValueFromPipeline = $false)]
    [ValidateSet("Black","DarkBlue","DarkGreen","DarkCyan","DarkRed","DarkMagenta","DarkYellow","Gray","DarkGray","Blue","Green","Cyan","Red","Magenta","Yellow","White")]
    [string]$BackgroundColor,
    [Parameter(Mandatory = $true,ValueFromPipeline = $true,ValueFromPipelineByPropertyName = $true)]
    [Alias("FullName")]
    [string[]]$SqlFilePath,
    [Parameter(Mandatory = $false,ValueFromPipeline = $false)]
    [System.Collections.Hashtable]$FileParameters,
    [Parameter(Mandatory = $false,ValueFromPipeline = $false)]
    [string[]]$FileExtensions = (".udf",".viw",".prc",".trg")
  )
  #endregion
  process {
    # nothing to do
  }
}