diff --git a/src/System.Management.Automation/engine/CoreAdapter.cs b/src/System.Management.Automation/engine/CoreAdapter.cs index 4fbf9d629e7..8761a6ff9d5 100644 --- a/src/System.Management.Automation/engine/CoreAdapter.cs +++ b/src/System.Management.Automation/engine/CoreAdapter.cs @@ -2472,8 +2472,8 @@ internal PropertyCacheEntry(PropertyInfo property) 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 6dd16ab05bd..822a26aaa85 100644 --- a/src/System.Management.Automation/engine/MshObject.cs +++ b/src/System.Management.Automation/engine/MshObject.cs @@ -463,7 +463,7 @@ internal static AdapterSet GetMappedAdapter(object obj, TypeTable typeTable) 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 2054f51b595..2ed40105724 100644 --- a/src/System.Management.Automation/utils/ExtensionMethods.cs +++ b/src/System.Management.Automation/utils/ExtensionMethods.cs @@ -118,16 +118,6 @@ internal static bool IsInteger(this Type type) 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) {