Skip to content
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
12 changes: 6 additions & 6 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -4274,27 +4274,27 @@ function New-PSOptionsObject
$RootInfo,

[Parameter(Mandatory)]
[String]
[string]
$Top,

[Parameter(Mandatory)]
[String]
[string]
$Runtime,

[Parameter(Mandatory)]
[String]
[string]
$Configuration,

[Parameter(Mandatory)]
[Bool]
$PSModuleRestore,

[Parameter(Mandatory)]
[String]
[string]
$Framework,

[Parameter(Mandatory)]
[String]
[string]
$Output,

[Parameter(Mandatory)]
Expand Down Expand Up @@ -4582,7 +4582,7 @@ function New-NugetPackageSource {
return [NugetPackageSource] @{Url = $Url; Name = $Name }
}

$script:NuGetEndpointCredentials = [System.Collections.Generic.Dictionary[String,System.Object]]::new()
$script:NuGetEndpointCredentials = [System.Collections.Generic.Dictionary[string,System.Object]]::new()
function New-NugetConfigFile {
<#
.SYNOPSIS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ private static IEnumerable<FormatViewDefinition> ViewsOf_System_Management_Autom
}
# if the object implements IEnumerable and not a string, we try to show each object
# We ignore the `Data` property as it can contain lots of type information by the interpreter that isn't useful here
elseif (!($prop.Value -is [System.String]) -and $prop.Value.GetType().GetInterface('IEnumerable') -ne $null -and $prop.Name -ne 'Data') {
elseif (!($prop.Value -is [string]) -and $prop.Value.GetType().GetInterface('IEnumerable') -ne $null -and $prop.Name -ne 'Data') {

if ($depth -ge $maxDepth) {
$null = $output.Append($ellipsis)
Expand Down Expand Up @@ -1379,7 +1379,7 @@ function Get-ConciseViewPositionMessage {

if ($ErrorView -eq 'ConciseView') {
$recommendedAction = $_.ErrorDetails.RecommendedAction
if (-not [String]::IsNullOrWhiteSpace($recommendedAction)) {
if (-not [string]::IsNullOrWhiteSpace($recommendedAction)) {
$recommendedAction = $newline +
${errorColor} +
' Recommendation: ' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ internal static List<CompletionResult> CompleteCommandParameter(CompletionContex
{
if (pattern.IsMatch(parameterName) && !parameterNames.Contains(parameterName, StringComparer.OrdinalIgnoreCase))
{
string tooltip = "[String] " + parameterName;
string tooltip = "[string] " + parameterName;
result.Add(new CompletionResult("-" + parameterName, parameterName, CompletionResultType.ParameterName, tooltip));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4413,13 +4413,13 @@ .FORWARDHELPCATEGORY Cmdlet
param(
[Parameter(ParameterSetName='nameSet', Position=0, ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='pathSet', Mandatory=$true, Position=0, ValueFromPipelineByPropertyName=$true)]
[System.String[]]
[string[]]
${Path},

[Parameter(ParameterSetName='nameSet', Mandatory=$true, ValueFromPipelineByPropertyName=$true)]
[AllowNull()]
[AllowEmptyString()]
[System.String]
[string]
${Name},

[Parameter(ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9069,12 +9069,12 @@ private void Process_Types_Ps1Xml(string filePath, ConcurrentBag<string> errors)
@"ToString",
GetScriptBlock(@"
$suffix = """"
if (![String]::IsNullOrEmpty($this.PSSemVerPreReleaseLabel))
if (![string]::IsNullOrEmpty($this.PSSemVerPreReleaseLabel))
{
$suffix = ""-""+$this.PSSemVerPreReleaseLabel
}

if (![String]::IsNullOrEmpty($this.PSSemVerBuildLabel))
if (![string]::IsNullOrEmpty($this.PSSemVerBuildLabel))
{
$suffix += ""+""+$this.PSSemVerBuildLabel
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4042,7 +4042,7 @@ function Enable-PSSessionConfiguration
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact=""Medium"")]
param(
[Parameter(Position=0, ValueFromPipeline=$true)]
[System.String]
[string]
$Name,

[Parameter()]
Expand Down Expand Up @@ -4429,7 +4429,7 @@ function Disable-PSSessionConfiguration
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact=""Low"")]
param(
[Parameter(Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)]
[System.String]
[string]
$Name,

[Parameter()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,17 +368,17 @@ Specifies the order of sorting for one or more properties.</value>
Specifies the order of sorting for one or more properties.</value>
</data>
<data name="LogNameHashtableKeyDescription" xml:space="preserve">
<value>[String[]]
<value>[string[]]
Specifies the log names to get events from.
Supports wildcards.</value>
</data>
<data name="ProviderNameHashtableKeyDescription" xml:space="preserve">
<value>[String[]]
<value>[string[]]
Specifies the event log providers to get events from.
Supports wildcards.</value>
</data>
<data name="PathHashtableKeyDescription" xml:space="preserve">
<value>[String[]]
<value>[string[]]
Specifies file paths to log files to get events from.
Valid file formats are: .etl, .evt, and .evtx</value>
</data>
Expand Down
2 changes: 1 addition & 1 deletion src/powershell-native/Install-PowerShellRemoting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function Install-PluginEndpoint {
# #
######################

if (-not [String]::IsNullOrEmpty($PowerShellHome))
if (-not [string]::IsNullOrEmpty($PowerShellHome))
{
$targetPsHome = $PowerShellHome
$targetPsVersion = & "$targetPsHome\pwsh" -NoProfile -Command '$PSVersionTable.PSVersion.ToString()'
Expand Down
2 changes: 1 addition & 1 deletion test/packaging/windows/exe.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Describe -Name "Windows EXE" -Fixture {

[Parameter(Mandatory)]
[ValidateScript({Test-Path -Path $_})]
[String]$ExePath
[string]$ExePath
)
$action = "$($PSCmdlet.ParameterSetName)ing"
if ($Install) {
Expand Down
2 changes: 1 addition & 1 deletion test/packaging/windows/msi.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Describe -Name "Windows MSI" -Fixture {

[Parameter(Mandatory)]
[ValidateScript({Test-Path -Path $_})]
[String]$MsiPath,
[string]$MsiPath,

[Parameter(ParameterSetName = 'Install')]
[HashTable] $Properties
Expand Down
6 changes: 3 additions & 3 deletions test/perf/benchmarks/assets/compiler.test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ function Start-CrossGen {
param(
[Parameter(Mandatory= $true)]
[ValidateNotNullOrEmpty()]
[String]
[string]
$PublishPath,

[Parameter(Mandatory=$true)]
Expand All @@ -1330,12 +1330,12 @@ function Start-CrossGen {
param (
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String[]]
[string[]]
$AssemblyPath,

[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]
[string]
$CrossgenPath,

[Parameter(Mandatory = $true)]
Expand Down
2 changes: 1 addition & 1 deletion test/powershell/Host/ConsoleHost.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ $powershell -c '[System.Management.Automation.Platform]::SelectProductNameForDir
param($testArg, $expectedMatches)
$output = & $powershell $testArg -File foo 2>&1
$LASTEXITCODE | Should -Be $ExitCodeBadCommandLineParameter
$outString = [String]::Join(",", $output)
$outString = [string]::Join(",", $output)
foreach ($expectedMatch in $expectedMatches)
{
$outString | Should -Match $expectedMatch
Expand Down
12 changes: 6 additions & 6 deletions test/powershell/Host/PSVersionTable.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ Describe "PSVersionTable" -Tags "CI" {
}

It "Should have the correct platform info" {
$platform = [String][System.Environment]::OSVersion.Platform
[String]$PSVersionTable["Platform"] | Should -Be $platform
$platform = [string][System.Environment]::OSVersion.Platform
[string]$PSVersionTable["Platform"] | Should -Be $platform
}

It "Should have the correct OS info" {
if ($IsCoreCLR)
{
$OSDescription = [String][System.Runtime.InteropServices.RuntimeInformation]::OSDescription
[String]$PSVersionTable["OS"] | Should -Be $OSDescription
$OSDescription = [string][System.Runtime.InteropServices.RuntimeInformation]::OSDescription
[string]$PSVersionTable["OS"] | Should -Be $OSDescription
}
else
{
$OSDescription = [String][System.Environment]::OSVersion
[String]$PSVersionTable["OS"] | Should -Be $OSDescription
$OSDescription = [string][System.Environment]::OSVersion
[string]$PSVersionTable["OS"] | Should -Be $OSDescription
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2899,7 +2899,7 @@ param ($Param1)
$scriptBl = {
function Test-Completion {
param (
[String]$TestVal
[string]$TestVal
)
}
[scriptblock]$completer = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,22 +279,22 @@ Describe 'ValidateSet support a dynamically generated set' -Tag "CI" {

BeforeAll {
class GenValuesForParam : System.Management.Automation.IValidateSetValuesGenerator {
[String[]] GetValidValues() {
[string[]] GetValidValues() {

return [string[]]("Test1","TestString1","Test2")
}
}

class GenValuesForParamNull : System.Management.Automation.IValidateSetValuesGenerator {
[String[]] GetValidValues() {
[string[]] GetValidValues() {

return [string[]]$null
}
}

# Return '$testValues2' and after 2 seconds after first use return another array '$testValues1'.
class GenValuesForParamCache1 : System.Management.Automation.IValidateSetValuesGenerator {
[String[]] GetValidValues() {
[string[]] GetValidValues() {

$testValues1 = "Test11","TestString11","Test22"
$testValues2 = "Test11","TestString22","Test22"
Expand Down Expand Up @@ -413,7 +413,7 @@ Describe 'ValidateSet support a dynamically generated set' -Tag "CI" {
GenValuesForParam() : base(300) {
}

[String[]] GenerateValidValues() {
[string[]] GenerateValidValues() {

return [string[]]("Test1","TestString1","Test2")
}
Expand All @@ -425,7 +425,7 @@ Describe 'ValidateSet support a dynamically generated set' -Tag "CI" {

Static [bool] $temp = $true;

[String[]] GenerateValidValues() {
[string[]] GenerateValidValues() {

if ([GenValuesWithExpiration]::temp) {
[GenValuesWithExpiration]::temp = $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class ClassWithStaticAbstractInterface : IInterfaceWithStaticAbstractProperty {
BeforeAll {
class TestHost : System.Management.Automation.Host.PSHost
{
[String]$myName = "MyHost"
[string]$myName = "MyHost"
[Version]$myVersion = [Version]"1.0.0.0"
[Guid]$myInstanceId = [guid]::NewGuid()
[System.Globalization.CultureInfo]$myCurrentCulture = "en-us"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Describe "Test restricted language check method on scriptblocks" -Tags "CI" {
Set-StrictMode -v 2
function list {

$l = [System.Collections.Generic.List[String]]::new()
$l = [System.Collections.Generic.List[string]]::new()
$args | ForEach-Object {$l.Add($_)}
, $l
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Categories=Application;
$beforeCount = [int]('tell application "TextEdit" to count of windows' | osascript)
& $TestFile
$startTime = Get-Date
$title = [String]::Empty
$title = [string]::Empty
while (((Get-Date) - $startTime).TotalSeconds -lt 30 -and ($title -ne $expectedTitle)) {
Start-Sleep -Milliseconds 100
$title = 'tell application "TextEdit" to get name of front window' | osascript
Expand Down
2 changes: 1 addition & 1 deletion test/powershell/Language/Scripting/ScriptHelp.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ Describe 'get-help other tests' -Tags "CI" {
Context 'get-help helpFunc12' {
# Test case w/ cmdlet binding, but no parameter sets.
function helpFunc12 {
Param ([Parameter(Mandatory=$true)][String]$Name,
Param ([Parameter(Mandatory=$true)][string]$Name,
[string]$Extension = "txt",
$NoType,
[switch]$ASwitch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function RemoveMachineName
param (
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[String]
[string]
$path
)

Expand Down Expand Up @@ -185,7 +185,7 @@ function TranslateCounterName
param (
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[String]
[string]
$counterName
)

Expand All @@ -205,7 +205,7 @@ function TranslateCounterPath
param (
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[String]
[string]
$path
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,8 @@ try {

BeforeEach {
if ($IsNotSkipped) {
$group1SID = [String](New-LocalGroup -Name TestGroupRemove1 -Description "Test Group Remove 1 Description" 2>&1).SID
$group2SID = [String](New-LocalGroup -Name TestGroupRemove2 -Description "Test Group Remove 2 Description" 2>&1).SID
$group1SID = [string](New-LocalGroup -Name TestGroupRemove1 -Description "Test Group Remove 1 Description" 2>&1).SID
$group2SID = [string](New-LocalGroup -Name TestGroupRemove2 -Description "Test Group Remove 2 Description" 2>&1).SID
}
}

Expand Down
Loading