mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Style: Change 'String.' to 'string.' (#8568)
This commit is contained in:
282 files changed
+1102
-1102
No files matched your search
@@ -1337,7 +1337,7 @@ namespace System.Management.Automation
|
||||
isFileOrDirectoryPresent = dynParam.File.IsPresent || dynParam.Directory.IsPresent;
|
||||
}
|
||||
|
||||
if (String.Equals(childName, "*", StringComparison.OrdinalIgnoreCase) && isFileOrDirectoryPresent)
|
||||
if (string.Equals(childName, "*", StringComparison.OrdinalIgnoreCase) && isFileOrDirectoryPresent)
|
||||
{
|
||||
string parentName = path.Substring(0, path.Length - childName.Length);
|
||||
path = parentName;
|
||||
@@ -1354,7 +1354,7 @@ namespace System.Management.Automation
|
||||
// those directories.
|
||||
if (!string.IsNullOrEmpty(path) && !IsItemContainer(path))
|
||||
{
|
||||
if (!String.Equals(childName, "*", StringComparison.OrdinalIgnoreCase))
|
||||
if (!string.Equals(childName, "*", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (context.Include != null)
|
||||
{
|
||||
@@ -2385,7 +2385,7 @@ namespace System.Management.Automation
|
||||
DoGetChildNamesManually(
|
||||
providerInstance,
|
||||
providerPath,
|
||||
String.Empty,
|
||||
string.Empty,
|
||||
returnContainers,
|
||||
includeMatcher,
|
||||
excludeMatcher,
|
||||
@@ -2471,7 +2471,7 @@ namespace System.Management.Automation
|
||||
DoGetChildNamesManually(
|
||||
providerInstance,
|
||||
providerPath,
|
||||
String.Empty,
|
||||
string.Empty,
|
||||
returnContainers,
|
||||
includeMatcher,
|
||||
excludeMatcher,
|
||||
@@ -3475,7 +3475,7 @@ namespace System.Management.Automation
|
||||
// function can be abused
|
||||
if (context.ExecutionContext.HasRunspaceEverUsedConstrainedLanguageMode &&
|
||||
(providerInstance is Microsoft.PowerShell.Commands.FunctionProvider) &&
|
||||
(String.Equals(type, "Directory", StringComparison.OrdinalIgnoreCase)))
|
||||
(string.Equals(type, "Directory", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
throw
|
||||
PSTraceSource.NewNotSupportedException(SessionStateStrings.DriveCmdletProvider_NotSupported);
|
||||
@@ -3520,7 +3520,7 @@ namespace System.Management.Automation
|
||||
out targetProvider,
|
||||
out targetProviderInstance);
|
||||
|
||||
if (String.Compare(targetProvider.Name, "filesystem", StringComparison.OrdinalIgnoreCase) != 0)
|
||||
if (string.Compare(targetProvider.Name, "filesystem", StringComparison.OrdinalIgnoreCase) != 0)
|
||||
{
|
||||
throw PSTraceSource.NewNotSupportedException(SessionStateStrings.MustBeFileSystemPath);
|
||||
}
|
||||
@@ -4097,7 +4097,7 @@ namespace System.Management.Automation
|
||||
|
||||
if (copyPath == null)
|
||||
{
|
||||
copyPath = String.Empty;
|
||||
copyPath = string.Empty;
|
||||
}
|
||||
|
||||
CmdletProviderContext context = new CmdletProviderContext(this.ExecutionContext);
|
||||
@@ -4163,7 +4163,7 @@ namespace System.Management.Automation
|
||||
|
||||
if (copyPath == null)
|
||||
{
|
||||
copyPath = String.Empty;
|
||||
copyPath = string.Empty;
|
||||
}
|
||||
|
||||
// Get the provider specific path for the destination
|
||||
@@ -4195,7 +4195,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
context.WriteError(new ErrorRecord(
|
||||
new ArgumentException(
|
||||
String.Format(System.Globalization.CultureInfo.InvariantCulture, SessionStateStrings.CopyItemFromSessionToSession, "FromSession", "ToSession")),
|
||||
string.Format(System.Globalization.CultureInfo.InvariantCulture, SessionStateStrings.CopyItemFromSessionToSession, "FromSession", "ToSession")),
|
||||
"InvalidInput",
|
||||
ErrorCategory.InvalidArgument,
|
||||
dynamicParams));
|
||||
@@ -4229,7 +4229,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
context.WriteError(new ErrorRecord(
|
||||
new ArgumentNullException(
|
||||
String.Format(
|
||||
string.Format(
|
||||
System.Globalization.CultureInfo.InvariantCulture,
|
||||
SessionStateStrings.CopyItemRemotelyPathIsNullOrEmpty,
|
||||
"Destination")),
|
||||
@@ -4805,7 +4805,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
context.WriteError(new ErrorRecord(
|
||||
new InvalidOperationException(
|
||||
String.Format(
|
||||
string.Format(
|
||||
System.Globalization.CultureInfo.InvariantCulture,
|
||||
SessionStateStrings.CopyItemSessionProperties,
|
||||
"LanguageMode",
|
||||
@@ -4844,7 +4844,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
context.WriteError(new ErrorRecord(
|
||||
new InvalidOperationException(
|
||||
String.Format(
|
||||
string.Format(
|
||||
System.Globalization.CultureInfo.InvariantCulture, SessionStateStrings.CopyItemValidateRemotePath, path)),
|
||||
"FailedToValidateRemotePath",
|
||||
ErrorCategory.InvalidOperation,
|
||||
@@ -4860,7 +4860,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
context.WriteError(new ErrorRecord(
|
||||
new ArgumentException(
|
||||
String.Format(
|
||||
string.Format(
|
||||
System.Globalization.CultureInfo.InvariantCulture, SessionStateStrings.CopyItemRemotelyPathIsNotAbsolute, path)),
|
||||
"RemotePathIsNotAbsolute",
|
||||
ErrorCategory.InvalidArgument,
|
||||
@@ -4889,7 +4889,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
context.WriteError(new ErrorRecord(
|
||||
new ArgumentException(
|
||||
String.Format(
|
||||
string.Format(
|
||||
System.Globalization.CultureInfo.InvariantCulture, SessionStateStrings.PathNotFound, path)),
|
||||
"RemotePathNotFound",
|
||||
ErrorCategory.InvalidArgument,
|
||||
@@ -4907,7 +4907,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
context.WriteError(new ErrorRecord(
|
||||
new InvalidOperationException(
|
||||
String.Format(System.Globalization.CultureInfo.InvariantCulture,
|
||||
string.Format(System.Globalization.CultureInfo.InvariantCulture,
|
||||
SessionStateStrings.CopyItemSessionProperties,
|
||||
"Availability", session.Availability)),
|
||||
"SessionIsNotAvailable",
|
||||
|
||||
Reference in new issue
Block a user