Style: Change 'Object[]' to 'object[]' (#8526)

This commit is contained in:
Ilya 2018-12-24 12:32:38 +05:00 committed by GitHub
parent 42ba9d22ce
commit 1ae1594bd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 22 additions and 22 deletions

View file

@ -466,7 +466,7 @@ namespace Microsoft.PowerShell.Commands
// a web service binding attribute
foreach (Type type in assembly.GetTypes())
{
Object[] obj = type.GetCustomAttributes(typeof(WebServiceBindingAttribute), false);
object[] obj = type.GetCustomAttributes(typeof(WebServiceBindingAttribute), false);
if (obj.Length > 0)
{
proxyType = type;

View file

@ -361,7 +361,7 @@ namespace Microsoft.PowerShell.Commands
// ExcludeProperty implies -Property * for better UX
if ((Property == null) || (Property.Length == 0))
{
Property = new Object[] { "*" };
Property = new object[] { "*" };
_propertyMshParameterList = processor.ProcessParameters(Property, invocationContext);
}
}

View file

@ -174,7 +174,7 @@ namespace System.Management.Automation
/// <param name="target">instance of the object from which to get the property value</param>
/// <param name="arguments">parameters to get the property value</param>
/// <returns>value of the property</returns>
internal object GetValue(Object target, Object[] arguments)
internal object GetValue(Object target, object[] arguments)
{
try
{
@ -250,7 +250,7 @@ namespace System.Management.Automation
/// <param name="target">instance of the object to which to set the property value</param>
/// <param name="setValue">value to set this property</param>
/// <param name="arguments">parameters to set this property.</param>
internal void SetValue(Object target, object setValue, Object[] arguments)
internal void SetValue(Object target, Object setValue, object[] arguments)
{
object[] newarguments;
var setterCollection = new Collection<int> { _hasSetterByRef ? _setterByRefIndex : _setterIndex };

View file

@ -2215,7 +2215,7 @@ namespace System.Management.Automation
/// <param name="additionalData">
/// Additional data attached by the user to this event.
/// </param>
internal PSEventArgs(string computerName, Guid runspaceId, int eventIdentifier, string sourceIdentifier, object sender, Object[] originalArgs, PSObject additionalData)
internal PSEventArgs(string computerName, Guid runspaceId, int eventIdentifier, string sourceIdentifier, Object sender, object[] originalArgs, PSObject additionalData)
{
// Capture the first EventArgs as SourceEventArgs
if (originalArgs != null)
@ -2279,7 +2279,7 @@ namespace System.Management.Automation
/// Gets the list of arguments captured by the original event source
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public Object[] SourceArgs { get; }
public object[] SourceArgs { get; }
/// <summary>
/// Gets the identifier associated with the source of this event

View file

@ -409,7 +409,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
[Parameter()]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public Object[] VisibleCmdlets
public object[] VisibleCmdlets
{
get
{
@ -422,14 +422,14 @@ namespace Microsoft.PowerShell.Commands
}
}
private Object[] _visibleCmdlets = null;
private object[] _visibleCmdlets = null;
/// <summary>
/// A list of visible functions
/// </summary>
[Parameter()]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public Object[] VisibleFunctions
public object[] VisibleFunctions
{
get
{
@ -442,7 +442,7 @@ namespace Microsoft.PowerShell.Commands
}
}
private Object[] _visibleFunctions = null;
private object[] _visibleFunctions = null;
/// <summary>
/// A list of visible external commands (scripts and applications)
@ -1298,7 +1298,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
[Parameter()]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public Object[] VisibleCmdlets
public object[] VisibleCmdlets
{
get
{
@ -1311,14 +1311,14 @@ namespace Microsoft.PowerShell.Commands
}
}
private Object[] _visibleCmdlets = null;
private object[] _visibleCmdlets = null;
/// <summary>
/// A list of visible functions
/// </summary>
[Parameter()]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public Object[] VisibleFunctions
public object[] VisibleFunctions
{
get
{
@ -1331,7 +1331,7 @@ namespace Microsoft.PowerShell.Commands
}
}
private Object[] _visibleFunctions = null;
private object[] _visibleFunctions = null;
/// <summary>
/// A list of visible external commands (scripts and applications)

View file

@ -1228,7 +1228,7 @@ namespace Microsoft.PowerShell.Commands
[Parameter()]
[Alias("Args")]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public virtual Object[] ArgumentList
public virtual object[] ArgumentList
{
get
{
@ -1241,7 +1241,7 @@ namespace Microsoft.PowerShell.Commands
}
}
private Object[] _args;
private object[] _args;
/// <summary>
/// Indicates that if a job/command is invoked remotely the connection should be severed

View file

@ -529,7 +529,7 @@ namespace Microsoft.PowerShell.Commands
[ValidateTrustedData]
[Alias("Args")]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public override Object[] ArgumentList
public override object[] ArgumentList
{
get { return base.ArgumentList; }

View file

@ -2525,13 +2525,13 @@ namespace System.Management.Automation
if (numberToReturn == 1)
{
return new Object[] { current };
return new object[] { current };
}
return rest.ToArray();
}
System.Object[] first = new System.Object[numberToReturn];
object[] first = new System.Object[numberToReturn];
while (MoveNext(context, enumerator))
{
current = Current(enumerator);
@ -2560,7 +2560,7 @@ namespace System.Management.Automation
rest.Add(e);
}
return new System.Object[] { first, rest.ToArray() };
return new object[] { first, rest.ToArray() };
}
return first;
@ -2681,7 +2681,7 @@ namespace System.Management.Automation
notMatched.Add(ie == null ? null : PSObject.AsPSObject(ie));
}
return new System.Object[] { matches, notMatched };
return new object[] { matches, notMatched };
}
return matches;

View file

@ -128,7 +128,7 @@ namespace System.Management.Automation
/// <returns>An object that represents the serialized content</returns>
public static object Deserialize(string source)
{
Object[] results = DeserializeAsList(source);
object[] results = DeserializeAsList(source);
// Return the results
if (results.Length == 0)