diff --git a/src/System.Management.Automation/engine/CoreAdapter.cs b/src/System.Management.Automation/engine/CoreAdapter.cs index 4fbf9d629e..8761a6ff9d 100644 --- a/src/System.Management.Automation/engine/CoreAdapter.cs +++ b/src/System.Management.Automation/engine/CoreAdapter.cs @@ -2472,8 +2472,8 @@ namespace System.Management.Automation if (declaringTypeInfo.IsValueType || propertyTypeInfo.IsGenericType || declaringTypeInfo.IsGenericType || - property.DeclaringType.IsComObject() || - property.PropertyType.IsComObject()) + property.DeclaringType.IsCOMObject || + property.PropertyType.IsCOMObject) { this.readOnly = property.GetSetMethod() == null; this.writeOnly = property.GetGetMethod() == null; diff --git a/src/System.Management.Automation/engine/MshObject.cs b/src/System.Management.Automation/engine/MshObject.cs index 6dd16ab05b..822a26aaa8 100644 --- a/src/System.Management.Automation/engine/MshObject.cs +++ b/src/System.Management.Automation/engine/MshObject.cs @@ -463,7 +463,7 @@ namespace System.Management.Automation if (result == null) { - if (objectType.IsComObject()) + if (objectType.IsCOMObject) { // All WinRT types are COM types. // All WinRT types would contain the TypeAttributes flag being set to WindowsRunTime. diff --git a/src/System.Management.Automation/utils/ExtensionMethods.cs b/src/System.Management.Automation/utils/ExtensionMethods.cs index 2054f51b59..2ed4010572 100644 --- a/src/System.Management.Automation/utils/ExtensionMethods.cs +++ b/src/System.Management.Automation/utils/ExtensionMethods.cs @@ -118,16 +118,6 @@ namespace System.Management.Automation return LanguagePrimitives.IsInteger(LanguagePrimitives.GetTypeCode(type)); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static bool IsComObject(this Type type) - { -#if UNIX - return false; -#else - return type.IsCOMObject; -#endif - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static TypeCode GetTypeCode(this Type type) {