diff options
Diffstat (limited to 'src/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs')
-rw-r--r-- | src/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs b/src/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs index 0213e8821..23c22a965 100644 --- a/src/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs +++ b/src/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs @@ -87,11 +87,11 @@ namespace Internal.Runtime.Augments // // In these cases, this helper returns "null" and ConstructorInfo.Invoke() must deal with these specially. // - public static Object NewObject(RuntimeTypeHandle typeHandle) + public static object NewObject(RuntimeTypeHandle typeHandle) { EETypePtr eeType = typeHandle.ToEETypePtr(); if (eeType.IsNullable - || eeType == EETypePtr.EETypePtrOf<String>() + || eeType == EETypePtr.EETypePtrOf<string>() ) return null; return RuntimeImports.RhNewObject(eeType); @@ -102,7 +102,7 @@ namespace Internal.Runtime.Augments // Unlike the NewObject API, this is the raw version that does not special case any EEType, and should be used with // caution for very specific scenarios. // - public static Object RawNewObject(RuntimeTypeHandle typeHandle) + public static object RawNewObject(RuntimeTypeHandle typeHandle) { return RuntimeImports.RhNewObject(typeHandle.ToEETypePtr()); } @@ -192,7 +192,7 @@ namespace Internal.Runtime.Augments // // Helper to create a delegate on a runtime-supplied type. // - public static Delegate CreateDelegate(RuntimeTypeHandle typeHandleForDelegate, IntPtr ldftnResult, Object thisObject, bool isStatic, bool isOpen) + public static Delegate CreateDelegate(RuntimeTypeHandle typeHandleForDelegate, IntPtr ldftnResult, object thisObject, bool isStatic, bool isOpen) { return Delegate.CreateDelegate(typeHandleForDelegate.ToEETypePtr(), ldftnResult, thisObject, isStatic: isStatic, isOpen: isOpen); } @@ -248,7 +248,7 @@ namespace Internal.Runtime.Augments return new IntPtr(RuntimeImports.RhGetThreadStaticFieldAddress(typeHandle.ToEETypePtr(), threadStaticsBlockOffset, fieldOffset)); } - public static unsafe void StoreValueTypeField(IntPtr address, Object fieldValue, RuntimeTypeHandle fieldType) + public static unsafe void StoreValueTypeField(IntPtr address, object fieldValue, RuntimeTypeHandle fieldType) { RuntimeImports.RhUnbox(fieldValue, *(void**)&address, fieldType.ToEETypePtr()); } @@ -258,7 +258,7 @@ namespace Internal.Runtime.Augments return ref obj.GetRawData(); } - public static unsafe Object LoadValueTypeField(IntPtr address, RuntimeTypeHandle fieldType) + public static unsafe object LoadValueTypeField(IntPtr address, RuntimeTypeHandle fieldType) { return RuntimeImports.RhBox(fieldType.ToEETypePtr(), *(void**)&address); } @@ -268,12 +268,12 @@ namespace Internal.Runtime.Augments return Pointer.Box(*(void**)address, Type.GetTypeFromHandle(fieldType)); } - public static unsafe void StoreValueTypeField(ref byte address, Object fieldValue, RuntimeTypeHandle fieldType) + public static unsafe void StoreValueTypeField(ref byte address, object fieldValue, RuntimeTypeHandle fieldType) { RuntimeImports.RhUnbox(fieldValue, ref address, fieldType.ToEETypePtr()); } - public static unsafe void StoreValueTypeField(Object obj, int fieldOffset, Object fieldValue, RuntimeTypeHandle fieldType) + public static unsafe void StoreValueTypeField(object obj, int fieldOffset, object fieldValue, RuntimeTypeHandle fieldType) { fixed (IntPtr* pObj = &obj.m_pEEType) { @@ -283,7 +283,7 @@ namespace Internal.Runtime.Augments } } - public static unsafe Object LoadValueTypeField(Object obj, int fieldOffset, RuntimeTypeHandle fieldType) + public static unsafe object LoadValueTypeField(object obj, int fieldOffset, RuntimeTypeHandle fieldType) { fixed (IntPtr* pObj = &obj.m_pEEType) { @@ -293,7 +293,7 @@ namespace Internal.Runtime.Augments } } - public static unsafe Object LoadPointerTypeField(Object obj, int fieldOffset, RuntimeTypeHandle fieldType) + public static unsafe object LoadPointerTypeField(object obj, int fieldOffset, RuntimeTypeHandle fieldType) { fixed (IntPtr* pObj = &obj.m_pEEType) { @@ -303,17 +303,17 @@ namespace Internal.Runtime.Augments } } - public static unsafe void StoreReferenceTypeField(IntPtr address, Object fieldValue) + public static unsafe void StoreReferenceTypeField(IntPtr address, object fieldValue) { - Volatile.Write<Object>(ref Unsafe.As<IntPtr, Object>(ref *(IntPtr*)address), fieldValue); + Volatile.Write<Object>(ref Unsafe.As<IntPtr, object>(ref *(IntPtr*)address), fieldValue); } - public static unsafe Object LoadReferenceTypeField(IntPtr address) + public static unsafe object LoadReferenceTypeField(IntPtr address) { - return Volatile.Read<Object>(ref Unsafe.As<IntPtr, Object>(ref *(IntPtr*)address)); + return Volatile.Read<Object>(ref Unsafe.As<IntPtr, object>(ref *(IntPtr*)address)); } - public static unsafe void StoreReferenceTypeField(Object obj, int fieldOffset, Object fieldValue) + public static unsafe void StoreReferenceTypeField(object obj, int fieldOffset, object fieldValue) { fixed (IntPtr* pObj = &obj.m_pEEType) { @@ -323,7 +323,7 @@ namespace Internal.Runtime.Augments } } - public static unsafe Object LoadReferenceTypeField(Object obj, int fieldOffset) + public static unsafe object LoadReferenceTypeField(object obj, int fieldOffset) { fixed (IntPtr* pObj = &obj.m_pEEType) { @@ -473,7 +473,7 @@ namespace Internal.Runtime.Augments // Note that this is not versionable as it is exposed as a const (and needs to be a const so we can used as a custom attribute argument - which // is the other reason this string is not versionable.) // - public const String HiddenScopeAssemblyName = "HiddenScope, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; + public const string HiddenScopeAssemblyName = "HiddenScope, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; // // This implements the "IsAssignableFrom()" api for runtime-created types. By policy, we let the underlying runtime decide assignability. @@ -716,7 +716,7 @@ namespace Internal.Runtime.Augments return true; } - public static Object CheckArgument(Object srcObject, RuntimeTypeHandle dstType, BinderBundle binderBundle) + public static object CheckArgument(object srcObject, RuntimeTypeHandle dstType, BinderBundle binderBundle) { return InvokeUtils.CheckArgument(srcObject, dstType, binderBundle); } @@ -728,7 +728,7 @@ namespace Internal.Runtime.Augments return InvokeUtils.CheckArgument(srcObject, dstType.ToEETypePtr(), InvokeUtils.CheckArgumentSemantics.SetFieldDirect, binderBundle: null); } - public static bool IsAssignable(Object srcObject, RuntimeTypeHandle dstType) + public static bool IsAssignable(object srcObject, RuntimeTypeHandle dstType) { EETypePtr srcEEType = srcObject.EETypePtr; return RuntimeImports.AreTypesAssignable(srcEEType, dstType.ToEETypePtr()); @@ -751,9 +751,9 @@ namespace Internal.Runtime.Augments // // Useful helper for finding .pdb's. (This design is admittedly tied to the single-module design of Project N.) // - public static String TryGetFullPathToMainApplication() + public static string TryGetFullPathToMainApplication() { - Func<String> delegateToAnythingInsideMergedApp = TryGetFullPathToMainApplication; + Func<string> delegateToAnythingInsideMergedApp = TryGetFullPathToMainApplication; IntPtr ipToAnywhereInsideMergedApp = delegateToAnythingInsideMergedApp.GetFunctionPointer(out RuntimeTypeHandle _, out bool _, out bool _); IntPtr moduleBase = RuntimeImports.RhGetOSModuleFromPointer(ipToAnywhereInsideMergedApp); return TryGetFullPathToApplicationModule(moduleBase); @@ -763,7 +763,7 @@ namespace Internal.Runtime.Augments /// Locate the file path for a given native application module. /// </summary> /// <param name="moduleBase">Module base address</param> - public static unsafe String TryGetFullPathToApplicationModule(IntPtr moduleBase) + public static unsafe string TryGetFullPathToApplicationModule(IntPtr moduleBase) { #if PLATFORM_UNIX byte* pModuleNameUtf8; @@ -772,7 +772,7 @@ namespace Internal.Runtime.Augments #else // PLATFORM_UNIX char* pModuleName; int numChars = RuntimeImports.RhGetModuleFileName(moduleBase, out pModuleName); - String modulePath = new String(pModuleName, 0, numChars); + string modulePath = new string(pModuleName, 0, numChars); #endif // PLATFORM_UNIX return modulePath; } @@ -1111,7 +1111,7 @@ namespace Internal.Runtime.Augments return RuntimeImports.RhBoxAny((void*)pData, new EETypePtr(pEEType)); } - public static IntPtr RhHandleAlloc(Object value, GCHandleType type) + public static IntPtr RhHandleAlloc(object value, GCHandleType type) { return RuntimeImports.RhHandleAlloc(value, type); } |