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
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public abstract class CimIndicationEventArgs : EventArgs
/// Returns an Object value for an operation context
/// </para>
/// </summary>
public Object Context
public object Context
{
get
{
return context;
}
}

internal Object context;
internal object context;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ internal abstract class CimSubscriptionEventArgs : EventArgs
/// Returns an Object value for an operation context
/// </para>
/// </summary>
public Object Context
public object Context
{
get
{
return context;
}
}

protected Object context;
protected object context;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ private object PostProcessCimInstance(object resultObject)
string serializedForm = PSSerializer.Serialize(resultObject as CimInstance, depth: 1);
object deserializedObject = PSSerializer.Deserialize(serializedForm);
object returnObject = (deserializedObject is PSObject) ? (deserializedObject as PSObject).BaseObject : deserializedObject;
DebugHelper.WriteLogEx("Deserialized Object is {0}, type {1}", 1, returnObject, returnObject.GetType());
DebugHelper.WriteLogEx("Deserialized object is {0}, type {1}", 1, returnObject, returnObject.GetType());
return returnObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public String ComputerName
/// <summary>
/// Returns the object that generates events to be monitored
/// </summary>
protected override Object GetSourceObject()
protected override object GetSourceObject()
{
CimIndicationWatcher watcher = null;
string parameterSetName = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ private string HandleDataHashValue(Object value)
// Constructs and returns named event data field XPath portion as a string.
// Fix Issue #2327
//
private string HandleNamedDataHashValue(String key, Object value)
private string HandleNamedDataHashValue(String key, object value)
{
StringBuilder ret = new StringBuilder();
Array dataArray = value as Array;
Expand Down Expand Up @@ -1835,7 +1835,7 @@ private void CheckHashTablesForNullValues()
{
foreach (string key in hash.Keys)
{
Object value = hash[key];
object value = hash[key];
if (value == null)
{
string msg = _resourceMgr.GetString("NullNotAllowedInHashtable");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private string GetScopeString(string computer, string namespaceParameter)
/// <summary>
/// Returns the object that generates events to be monitored
/// </summary>
protected override Object GetSourceObject()
protected override object GetSourceObject()
{
string wmiQuery = this.Query;
if (this.Class != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public string[] LiteralPath

#endregion Property Value set

#region Shell Object set
#region Shell object set

/// <summary>
/// A PSObject that contains the properties and values to be set.
Expand All @@ -98,7 +98,7 @@ public string[] LiteralPath
ValueFromPipeline = true)]
public PSObject InputObject { get; set; }

#endregion Shell Object set
#endregion Shell object set

/// <summary>
/// A virtual method for retrieving the dynamic parameters for a cmdlet. Derived cmdlets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ protected override void BeginProcessing()
Assembly webserviceproxy = GenerateWebServiceProxyAssembly(_namespace, _class);
if (webserviceproxy == null)
return;
Object instance = InstantiateWebServiceProxy(webserviceproxy);
object instance = InstantiateWebServiceProxy(webserviceproxy);

//to set the credentials into the generated webproxy Object
PropertyInfo[] pinfo = instance.GetType().GetProperties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ private void WriteStartOfPSObject(
}
}

Object baseObject = mshObject.BaseObject;
object baseObject = mshObject.BaseObject;
if (!_notypeinformation)
WriteAttribute(_writer, CustomSerializationStrings.TypeAttribute, baseObject.GetType().ToString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal string DisplayName()
return this.displayName;
}

internal abstract Object GetValue(PSObject liveObject);
internal abstract object GetValue(PSObject liveObject);

internal Type GetValueType(PSObject liveObject, out object columnValue)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal ExpressionColumnInfo(string staleObjectPropertyName, string displayName
_expression = expression;
}

internal override Object GetValue(PSObject liveObject)
internal override object GetValue(PSObject liveObject)
{
List<PSPropertyExpressionResult> resList = _expression.GetValues(liveObject);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal PSObject AddColumnsToWindow(OutWindowProxy windowProxy, PSObject liveOb
{
propertyNames[count] = column.StaleObjectPropertyName();
displayNames[count] = column.DisplayName();
Object columnValue = null;
object columnValue = null;
types[count] = column.GetValueType(liveObject, out columnValue);

// Add a property to the stale object since a column value has been evaluated to get column's type.
Expand All @@ -58,4 +58,4 @@ internal PSObject CreateStalePSObject(PSObject liveObject)
return staleObject;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal OriginalColumnInfo(string staleObjectPropertyName, string displayName,
_parentCmdlet = parentCmdlet;
}

internal override Object GetValue(PSObject liveObject)
internal override object GetValue(PSObject liveObject)
{
try
{
Expand All @@ -31,7 +31,7 @@ internal override Object GetValue(PSObject liveObject)
}

// The live object has the liveObjectPropertyName property.
Object liveObjectValue = propertyInfo.Value;
object liveObjectValue = propertyInfo.Value;
ICollection collectionValue = liveObjectValue as ICollection;
if (collectionValue != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private void ProcessObject(PSObject input)
return;
}

Object baseObject = input.BaseObject;
object baseObject = input.BaseObject;

// Throw a terminating error for types that are not supported.
if (baseObject is ScriptBlock ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal ScalarTypeColumnInfo(Type type)
_type = type;
}

internal override Object GetValue(PSObject liveObject)
internal override object GetValue(PSObject liveObject)
{
// Strip a wrapping PSObject.
object baseObject = ((PSObject)liveObject).BaseObject;
Expand All @@ -35,7 +35,7 @@ internal TypeNameColumnInfo(string staleObjectPropertyName, string displayName)
: base(staleObjectPropertyName, displayName)
{ }

internal override Object GetValue(PSObject liveObject)
internal override object GetValue(PSObject liveObject)
{
// Strip a wrapping PSObject.
object baseObject = ((PSObject)liveObject).BaseObject;
Expand All @@ -53,7 +53,7 @@ internal ToStringColumnInfo(string staleObjectPropertyName, string displayName,
_parentCmdlet = parentCmdlet;
}

internal override Object GetValue(PSObject liveObject)
internal override object GetValue(PSObject liveObject)
{
// Convert to a string preserving PowerShell formatting.
return ColumnInfo.LimitString(_parentCmdlet.ConvertToString(liveObject));
Expand All @@ -70,10 +70,10 @@ internal IndexColumnInfo(string staleObjectPropertyName, string displayName, int
_index = index;
}

internal override Object GetValue(PSObject liveObject)
internal override object GetValue(PSObject liveObject)
{
// Every time this method is called, another raw is added to ML.
return _index++;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ private void ProcessFileContent(string path)
/// <param name="inputObject"></param>
private void ProcessObjectContent(PSObject inputObject)
{
Object obj = inputObject.BaseObject;
object obj = inputObject.BaseObject;
byte[] inputBytes = null;

switch (obj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public string EventName
/// <summary>
/// Returns the object that generates events to be monitored.
/// </summary>
protected override Object GetSourceObject()
protected override object GetSourceObject()
{
return _inputObject;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class RegisterEngineEventCommand : ObjectEventRegistrationBase
/// <summary>
/// Returns the object that generates events to be monitored.
/// </summary>
protected override Object GetSourceObject()
protected override object GetSourceObject()
{
// If it's not a forwarded event, the user must specify
// an action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public int Timeout

private AutoResetEvent _eventArrived = new AutoResetEvent(false);
private PSEventArgs _receivedEvent = null;
private Object _receivedEventLock = new Object();
private object _receivedEventLock = new Object();
private WildcardPattern _matchPattern;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1900,7 +1900,7 @@ private void AddMultipartContent(object fieldName, object fieldValue, MultipartF
/// </summary>
/// <param name="fieldName">The Field Name to use for the <see cref="StringContent" />.</param>
/// <param name="fieldValue">The Field Value to use for the <see cref="StringContent" />.</param>
private StringContent GetMultipartStringContent(Object fieldName, Object fieldValue)
private StringContent GetMultipartStringContent(Object fieldName, object fieldValue)
{
var contentDisposition = new ContentDispositionHeaderValue("form-data");
// .NET does not enclose field names in quotes, however, modern browsers and curl do.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private object ProcessValue(object obj, int depth)
if (pso != null)
obj = pso.BaseObject;

Object rv = obj;
object rv = obj;
bool isPurePSObj = false;
bool isCustomObj = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ private object SafeCreateInstance(Type t, object[] args)
#if !CORECLR
private class ComCreateInfo
{
public Object objectCreated;
public object objectCreated;
public bool success;
public Exception e;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected override void EndProcessing()
}
}

Object messageSender = null;
object messageSender = null;
if (_sender != null) { messageSender = _sender.BaseObject; }

// And then generate the event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public sealed class WriteInformationCommand : PSCmdlet
/// </summary>
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true)]
[Alias("Msg", "Message")]
public Object MessageData { get; set; }
public object MessageData { get; set; }

/// <summary>
/// Any tags to be associated with this information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public override
fieldPromptList.Append(
string.Format(CultureInfo.InvariantCulture, "{0}]: ", inputList.Count));
Boolean inputListEnd = false;
Object convertedObj = null;
object convertedObj = null;
string inputString = PromptForSingleItem(elementType, fieldPromptList.ToString(), fieldPrompt, caption, message,
desc, fieldEchoOnPrompt, true, out inputListEnd, out cancelInput, out convertedObj);

Expand Down Expand Up @@ -243,7 +243,7 @@ public override
string printFieldPrompt = StringUtil.Format(ConsoleHostUserInterfaceStrings.PromptFieldPromptInputSeparatorTemplate,
fieldPrompt);
// field is not a list
Object convertedObj = null;
object convertedObj = null;
Boolean dummy = false;

PromptForSingleItem(fieldType, printFieldPrompt, fieldPrompt, caption, message, desc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private class Context
{
public ContextOperation operation;
public ContextObjectType type;
public Object target;
public object target;
public string objectId;
public string memberId;

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.WSMan.Management/WsManHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private static string FormatResourceMsgFromResourcetextS(
/// </summary>
/// <param name="key">connection string</param>
/// <param name="value">session object</param>
internal void AddtoDictionary(string key, Object value)
internal void AddtoDictionary(string key, object value)
{
key = key.ToLowerInvariant();
lock (Sessions.SessionObjCache)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ internal static string FormatField(FieldFormattingDirective directive, object va

private static PSMemberSet MaskDeserializedAndGetStandardMembers(PSObject so)
{
Diagnostics.Assert(so != null, "Shell Object to process cannot be null");
Diagnostics.Assert(so != null, "Shell object to process cannot be null");
var typeNames = so.InternalTypeNames;
Collection<string> typeNamesWithoutDeserializedPrefix = Deserializer.MaskDeserializationPrefix(typeNames);
if (typeNamesWithoutDeserializedPrefix == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ protected override void ProcessRecord()
// doesn't actually write pipeline objects.
if (_outVarResults != null)
{
Object inputObjectBase = PSObject.Base(InputObject);
object inputObjectBase = PSObject.Base(InputObject);

// Ignore errors and formatting records, as those can't be captured
if (
Expand Down
4 changes: 2 additions & 2 deletions src/System.Management.Automation/engine/COM/ComProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ internal object GetValue(Object target, Object[] arguments)
/// </summary>
/// <param name="target">instance of the object to which to set the property value</param>
/// <param name="setValue">value to set this property</param>
internal void SetValue(Object target, Object setValue)
internal void SetValue(Object target, object setValue)
{
object[] propValue = new object[1];
setValue = Adapter.PropertySetAndMethodArgumentConvertTo(setValue, this.Type, CultureInfo.InvariantCulture);
Expand Down Expand Up @@ -250,7 +250,7 @@ internal void SetValue(Object target, Object setValue)
/// <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 };
Expand Down
2 changes: 1 addition & 1 deletion src/System.Management.Automation/engine/COM/ComUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ internal static ParameterInformation[] GetParameterInformation(COM.FUNCDESC func

//get the type of parameter
Type type = ComUtil.GetTypeFromTypeDesc(ElementDescription.tdesc);
Object defaultvalue = null;
object defaultvalue = null;

//check is this parameter is optional.
if ((ElementDescription.desc.paramdesc.wParamFlags & COM.PARAMFLAG.PARAMFLAG_FOPT) != 0)
Expand Down
Loading