Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/System.Management.Automation/CoreCLR/CorePsStub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ public void Dispose()
{
}

public bool WriteMessage(String message)
public bool WriteMessage(string message)
{
return false;
}
Expand Down
8 changes: 4 additions & 4 deletions src/System.Management.Automation/DscSupport/CimDSCParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,7 @@ public static void LoadResourcesFromModule(IScriptExtent scriptExtent,
{
var dscResourcesPath = Path.Combine(moduleInfo.ModuleBase, "DscResources");

var resourcesFound = new List<String>();
var resourcesFound = new List<string>();
LoadPowerShellClassResourcesFromModule(moduleInfo, moduleInfo, resourcesToImport, resourcesFound, errorList, null, true, scriptExtent);

if (Directory.Exists(dscResourcesPath))
Expand Down Expand Up @@ -2161,7 +2161,7 @@ private static Assembly CurrentDomain_ReflectionOnlyAssemblyResolve(object sende

if (moduleInfo != null && !string.IsNullOrEmpty(moduleInfo.Path))
{
String asmToCheck = Path.GetDirectoryName(moduleInfo.Path) + "\\" + name.Name + ".dll";
string asmToCheck = Path.GetDirectoryName(moduleInfo.Path) + "\\" + name.Name + ".dll";
if (File.Exists(asmToCheck))
{
return Assembly.ReflectionOnlyLoadFrom(asmToCheck);
Expand Down Expand Up @@ -2490,7 +2490,7 @@ private static bool GetResourceDefinitionsFromModule(string fileName, out IEnume
{
if (errorList != null && extent != null)
{
List<String> errorMessages = new List<string>();
List<string> errorMessages = new List<string>();
foreach (var error in errors)
{
errorMessages.Add(error.ToString());
Expand Down Expand Up @@ -2694,7 +2694,7 @@ private static bool IsSameNestedObject(CimClass oldClass, CimClass newClass)
return true;
}

internal static string MapTypeToMofType(Type type, String memberName, String className, out bool isArrayType, out string embeddedInstanceType, List<object> embeddedInstanceTypes)
internal static string MapTypeToMofType(Type type, string memberName, string className, out bool isArrayType, out string embeddedInstanceType, List<object> embeddedInstanceTypes)
{
isArrayType = false;
if (type.IsValueType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private Assembly ResolveAssemblyNameInLoadedAssemblies(string assemblyName, bool
continue;
}

String nameToCompare = fullName ? aName.FullName : aName.Name;
string nameToCompare = fullName ? aName.FullName : aName.Name;

if (string.Equals(nameToCompare, assemblyName, StringComparison.Ordinal))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private sealed class CommandEntry : IDisposable
/// <returns>true if there is a match</returns>
internal bool AppliesToType(string typeName)
{
foreach (String s in _applicableTypes)
foreach (string s in _applicableTypes)
{
if (string.Equals(s, typeName, StringComparison.OrdinalIgnoreCase))
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ private string GetCmdletName(CommonCmdletMetadata cmdletMetadata)
return verb + "-" + noun;
}

private readonly List<String> _aliasesToExport = new List<string>();
private readonly List<String> _functionsToExport = new List<string>();
private readonly List<string> _aliasesToExport = new List<string>();
private readonly List<string> _functionsToExport = new List<string>();

private string GetCmdletAttributes(CommonCmdletMetadata cmdletMetadata)
{
Expand Down
4 changes: 2 additions & 2 deletions src/System.Management.Automation/engine/COM/ComAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ protected override object MethodInvoke(PSMethod method, object[] arguments)
/// </summary>
/// <param name="method">the return of GetMethodData</param>
/// <returns></returns>
protected override Collection<String> MethodDefinitions(PSMethod method)
protected override Collection<string> MethodDefinitions(PSMethod method)
{
ComMethod commethod = (ComMethod)method.adapterData;
return commethod.MethodDefinitions();
Expand Down Expand Up @@ -316,7 +316,7 @@ protected override string ParameterizedPropertyToString(PSParameterizedProperty
/// Called after a non null return from GetMember to return the overloads
/// </summary>
/// <param name="property">the return of GetMember</param>
protected override Collection<String> ParameterizedPropertyDefinitions(PSParameterizedProperty property)
protected override Collection<string> ParameterizedPropertyDefinitions(PSParameterizedProperty property)
{
ComProperty prop = (ComProperty)property.adapterData;
Collection<string> returnValue = new Collection<string> { prop.GetDefinition() };
Expand Down
4 changes: 2 additions & 2 deletions src/System.Management.Automation/engine/COM/ComMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ internal void AddFuncDesc(int index)
/// Returns the different method overloads signatures.
/// </summary>
/// <returns></returns>
internal Collection<String> MethodDefinitions()
internal Collection<string> MethodDefinitions()
{
Collection<String> result = new Collection<string>();
Collection<string> result = new Collection<string>();

foreach (int index in _methods)
{
Expand Down
14 changes: 7 additions & 7 deletions src/System.Management.Automation/engine/COM/ComTypeInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ internal class ComTypeInfo
/// <summary>
/// Member variables.
/// </summary>
private Dictionary<String, ComProperty> _properties = null;
private Dictionary<String, ComMethod> _methods = null;
private Dictionary<string, ComProperty> _properties = null;
private Dictionary<string, ComMethod> _methods = null;
private COM.ITypeInfo _typeinfo = null;
private Guid _guid = Guid.Empty;

Expand All @@ -41,8 +41,8 @@ internal class ComTypeInfo
internal ComTypeInfo(COM.ITypeInfo info)
{
_typeinfo = info;
_properties = new Dictionary<String, ComProperty>(StringComparer.OrdinalIgnoreCase);
_methods = new Dictionary<String, ComMethod>(StringComparer.OrdinalIgnoreCase);
_properties = new Dictionary<string, ComProperty>(StringComparer.OrdinalIgnoreCase);
_methods = new Dictionary<string, ComMethod>(StringComparer.OrdinalIgnoreCase);

if (_typeinfo != null)
{
Expand All @@ -53,7 +53,7 @@ internal ComTypeInfo(COM.ITypeInfo info)
/// <summary>
/// Collection of properties in the COM object.
/// </summary>
internal Dictionary<String, ComProperty> Properties
internal Dictionary<string, ComProperty> Properties
{
get
{
Expand All @@ -64,7 +64,7 @@ internal Dictionary<String, ComProperty> Properties
/// <summary>
/// Collection of methods in the COM object.
/// </summary>
internal Dictionary<String, ComMethod> Methods
internal Dictionary<string, ComMethod> Methods
{
get
{
Expand Down Expand Up @@ -118,7 +118,7 @@ private void Initialize()
continue;
}

String strName = ComUtil.GetNameFromFuncDesc(_typeinfo, funcdesc);
string strName = ComUtil.GetNameFromFuncDesc(_typeinfo, funcdesc);

switch (funcdesc.invkind)
{
Expand Down
4 changes: 2 additions & 2 deletions src/System.Management.Automation/engine/COM/ComUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ internal static string GetMethodSignatureFromFuncDesc(COM.ITypeInfo typeinfo, CO
internal static string GetNameFromFuncDesc(COM.ITypeInfo typeinfo, COM.FUNCDESC funcdesc)
{
//Get the method or property name.
String strName, strDoc, strHelp;
string strName, strDoc, strHelp;
int id;
typeinfo.GetDocumentation(funcdesc.memid, out strName, out strDoc, out id, out strHelp);
return strName;
Expand All @@ -126,7 +126,7 @@ private static string GetStringFromCustomType(COM.ITypeInfo typeinfo, IntPtr ref

if (custtypeinfo != null)
{
String strName, strDoc, strHelp;
string strName, strDoc, strHelp;
int id;
custtypeinfo.GetDocumentation(-1, out strName, out strDoc, out id, out strHelp);
return strName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2725,7 +2725,7 @@ private int ResolveParameterSetAmbiguityBasedOnMandatoryParameters()
}

internal static int ResolveParameterSetAmbiguityBasedOnMandatoryParameters(
Dictionary<String, MergedCompiledCommandParameter> boundParameters,
Dictionary<string, MergedCompiledCommandParameter> boundParameters,
ICollection<MergedCompiledCommandParameter> unboundParameters,
MergedCommandParameterMetadata bindableParameters,
ref uint _currentParameterSetFlag,
Expand Down Expand Up @@ -2939,7 +2939,7 @@ internal bool HandleUnboundMandatoryParameters(

Collection<FieldDescription> fieldDescriptionList = CreatePromptDataStructures(missingMandatoryParameters);

Dictionary<String, PSObject> parameters =
Dictionary<string, PSObject> parameters =
PromptForMissingMandatoryParameters(
fieldDescriptionList,
missingMandatoryParameters);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private static void CheckForAmbiguousMatch(Type argumentType, List<VarEnum> comp
return;
}

String typeNames = string.Empty;
string typeNames = string.Empty;
for (int i = 0; i < compatibleComTypes.Count; i++)
{
string typeName = s_comToManagedPrimitiveTypes[compatibleComTypes[i]].Name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ public void SetAsByrefDate(ref Double value)
}

// VT_BSTR
public String AsBstr
public string AsBstr
{
get
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1033,15 +1033,15 @@ private List<CompletionResult> GetResultForEnumPropertyValueOfDSCResource(
DynamicKeywordProperty property;
if (keywordAst.Keyword.Properties.TryGetValue(propertyNameAst.Value, out property))
{
List<String> existingValues = null;
List<string> existingValues = null;
WildcardPattern wildcardPattern = null;
bool isDependsOnProperty = String.Equals(property.Name, @"DependsOn", StringComparison.OrdinalIgnoreCase);
bool hasNewLine = false;
string stringQuote = (completionContext.TokenAtCursor is StringExpandableToken) ? "\"" : "'";
if ((property.ValueMap != null && property.ValueMap.Count > 0) || isDependsOnProperty)
{
shouldContinue = false;
existingValues = new List<String>();
existingValues = new List<string>();
if (String.Equals(property.TypeConstraint, "StringArray", StringComparison.OrdinalIgnoreCase))
{
var arrayAst = Ast.GetAncestorAst<ArrayLiteralAst>(lastAst);
Expand Down
4 changes: 2 additions & 2 deletions src/System.Management.Automation/engine/CommandDiscovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ internal static void VerifyRequiredModules(ExternalScriptInfo scriptInfo, Execut
}
}

private static Collection<String> GetPSSnapinNames(IEnumerable<PSSnapInSpecification> PSSnapins)
private static Collection<string> GetPSSnapinNames(IEnumerable<PSSnapInSpecification> PSSnapins)
{
Collection<string> result = new Collection<string>();

Expand Down Expand Up @@ -1563,7 +1563,7 @@ internal static PSModuleAutoLoadingPreference GetCommandDiscoveryPreference(Exec
}

// check the environment variable
String psEnvironmentVariable = Environment.GetEnvironmentVariable(environmentVariable);
string psEnvironmentVariable = Environment.GetEnvironmentVariable(environmentVariable);
if (!String.IsNullOrEmpty(psEnvironmentVariable))
{
return LanguagePrimitives.ConvertTo<PSModuleAutoLoadingPreference>(psEnvironmentVariable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace System.Management.Automation
/// Used to enumerate the commands on the system that match the specified
/// command name
/// </summary>
internal class CommandPathSearch : IEnumerable<String>, IEnumerator<String>
internal class CommandPathSearch : IEnumerable<string>, IEnumerator<string>
{
[TraceSource("CommandSearch", "CommandSearch")]
private static PSTraceSource s_tracer = PSTraceSource.GetTracer("CommandSearch", "CommandSearch");
Expand Down
14 changes: 7 additions & 7 deletions src/System.Management.Automation/engine/CoreAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ protected virtual object MethodInvoke(PSMethod method, PSMethodInvocationConstra
/// </summary>
/// <param name="method">the return of GetMember</param>
/// <returns></returns>
protected abstract Collection<String> MethodDefinitions(PSMethod method);
protected abstract Collection<string> MethodDefinitions(PSMethod method);

/// <summary>
/// Returns the string representation of the method in the object
Expand Down Expand Up @@ -265,7 +265,7 @@ protected virtual bool ParameterizedPropertyIsGettable(PSParameterizedProperty p
/// It is not necessary for derived methods to override this.
/// This method is called only if ParameterizedProperties are present.
/// </remarks>
protected virtual Collection<String> ParameterizedPropertyDefinitions(PSParameterizedProperty property)
protected virtual Collection<string> ParameterizedPropertyDefinitions(PSParameterizedProperty property)
{
Diagnostics.Assert(false, "adapter is not called for parameterized properties");
throw PSTraceSource.NewNotSupportedException();
Expand Down Expand Up @@ -556,7 +556,7 @@ internal object BaseMethodInvoke(PSMethod method, PSMethodInvocationConstraints
}
}

internal Collection<String> BaseMethodDefinitions(PSMethod method)
internal Collection<string> BaseMethodDefinitions(PSMethod method)
{
try
{
Expand Down Expand Up @@ -628,7 +628,7 @@ internal bool BaseParameterizedPropertyIsGettable(PSParameterizedProperty proper
}
}

internal Collection<String> BaseParameterizedPropertyDefinitions(PSParameterizedProperty property)
internal Collection<string> BaseParameterizedPropertyDefinitions(PSParameterizedProperty property)
{
try
{
Expand Down Expand Up @@ -4194,7 +4194,7 @@ protected override object MethodInvoke(PSMethod method, PSMethodInvocationConstr
/// </summary>
/// <param name="method">the return of GetMember</param>
/// <returns></returns>
protected override Collection<String> MethodDefinitions(PSMethod method)
protected override Collection<string> MethodDefinitions(PSMethod method)
{
MethodCacheEntry methodEntry = (MethodCacheEntry)method.adapterData;
IList<string> uniqueValues = methodEntry
Expand Down Expand Up @@ -4269,7 +4269,7 @@ protected override void ParameterizedPropertySet(PSParameterizedProperty propert
/// <summary>
/// Called after a non null return from GetMember to return the overloads
/// </summary>
protected override Collection<String> ParameterizedPropertyDefinitions(PSParameterizedProperty property)
protected override Collection<string> ParameterizedPropertyDefinitions(PSParameterizedProperty property)
{
var adapterData = (ParameterizedPropertyCacheEntry)property.adapterData;
var returnValue = new Collection<string>();
Expand Down Expand Up @@ -4514,7 +4514,7 @@ protected override object MethodInvoke(PSMethod method, object[] arguments)
/// </summary>
/// <param name="method">the return of GetMember</param>
/// <returns></returns>
protected override Collection<String> MethodDefinitions(PSMethod method)
protected override Collection<string> MethodDefinitions(PSMethod method)
{
Diagnostics.Assert(false, "redirection adapter is not called for methods");
throw PSTraceSource.NewNotSupportedException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ internal void SetModule(PSModuleInfo module)
/// <summary>
/// Gets or sets the description for the provider
/// </summary>
public String Description { get; set; }
public string Description { get; set; }

/// <summary>
/// Gets the capabilities that are implemented by the provider.
Expand Down
2 changes: 1 addition & 1 deletion src/System.Management.Automation/engine/EventManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2277,7 +2277,7 @@ internal PSEventArgs(string computerName, Guid runspaceId, int eventIdentifier,
/// <summary>
/// Gets the identifier associated with the source of this event
/// </summary>
public String SourceIdentifier { get; }
public string SourceIdentifier { get; }

/// <summary>
/// Gets the time and date that this event was generated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal class ExecutionContext
/// </summary>
internal PSLocalEventManager Events { get; private set; }

internal HashSet<String> AutoLoadingModuleInProgress { get; } = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
internal HashSet<string> AutoLoadingModuleInProgress { get; } = new HashSet<string>(StringComparer.OrdinalIgnoreCase);

/// <summary>
/// The debugger for the interpreter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2066,16 +2066,16 @@ public virtual InitialSessionStateEntryCollection<SessionStateVariableEntry> Env

/// <summary>
/// </summary>
public virtual HashSet<String> StartupScripts
public virtual HashSet<string> StartupScripts
{
get
{
if (_startupScripts == null)
Interlocked.CompareExchange(ref _startupScripts, new HashSet<String>(), null);
Interlocked.CompareExchange(ref _startupScripts, new HashSet<string>(), null);
return _startupScripts;
}
}
private HashSet<String> _startupScripts = new HashSet<string>();
private HashSet<string> _startupScripts = new HashSet<string>();

private Object _syncObject = new Object();

Expand Down
Loading