diff options
Diffstat (limited to 'src/mscorlib/src/System/RuntimeHandles.cs')
-rw-r--r-- | src/mscorlib/src/System/RuntimeHandles.cs | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/src/mscorlib/src/System/RuntimeHandles.cs b/src/mscorlib/src/System/RuntimeHandles.cs index 7d4628ae74..34683be98a 100644 --- a/src/mscorlib/src/System/RuntimeHandles.cs +++ b/src/mscorlib/src/System/RuntimeHandles.cs @@ -23,8 +23,10 @@ namespace System using Microsoft.Win32.SafeHandles; using System.Diagnostics.Contracts; using StackCrawlMark = System.Threading.StackCrawlMark; - - [Serializable()] + +#if FEATURE_SERIALIZATION + [Serializable] +#endif [System.Runtime.InteropServices.ComVisible(true)] public unsafe struct RuntimeTypeHandle : ISerializable { @@ -690,9 +692,9 @@ namespace System [SuppressUnmanagedCodeSecurity] internal extern static bool IsCollectible(RuntimeTypeHandle handle); - #if FEATURE_CORECLR +#if FEATURE_CORECLR [System.Security.SecuritySafeCritical] // auto-generated - #endif +#endif [MethodImplAttribute(MethodImplOptions.InternalCall)] internal extern static bool HasInstantiation(RuntimeType type); @@ -916,9 +918,11 @@ namespace System { get; } - } + } +#if FEATURE_SERIALIZATION [Serializable] +#endif [System.Runtime.InteropServices.ComVisible(true)] public unsafe struct RuntimeMethodHandle : ISerializable { @@ -1163,7 +1167,7 @@ namespace System [MethodImplAttribute(MethodImplOptions.InternalCall)] internal extern static object InvokeMethod(object target, object[] arguments, Signature sig, bool constructor); - #region Private Invocation Helpers +#region Private Invocation Helpers [System.Security.SecurityCritical] // auto-generated internal static INVOCATION_FLAGS GetSecurityFlags(IRuntimeMethodInfo handle) { @@ -1187,7 +1191,7 @@ namespace System return; } #endif //!FEATURE_CORECLR - #endregion +#endregion [System.Security.SecuritySafeCritical] // auto-generated [DebuggerStepThroughAttribute] @@ -1202,11 +1206,11 @@ namespace System [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool _IsTokenSecurityTransparent(RuntimeModule module, int metaDataToken); - #if FEATURE_CORECLR +#if FEATURE_CORECLR [System.Security.SecuritySafeCritical] // auto-generated - #else +#else [System.Security.SecurityCritical] - #endif +#endif internal static bool IsTokenSecurityTransparent(Module module, int metaDataToken) { return _IsTokenSecurityTransparent(module.ModuleHandle.GetRuntimeModule(), metaDataToken); @@ -1466,8 +1470,10 @@ namespace System } } +#if FEATURE_SERIALIZATION [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] +#endif + [System.Runtime.InteropServices.ComVisible(true)] public unsafe struct RuntimeFieldHandle : ISerializable { // Returns handle for interop with EE. The handle is guaranteed to be non-null. @@ -1680,27 +1686,27 @@ namespace System public unsafe struct ModuleHandle { // Returns handle for interop with EE. The handle is guaranteed to be non-null. - #region Public Static Members +#region Public Static Members public static readonly ModuleHandle EmptyHandle = GetEmptyMH(); - #endregion +#endregion unsafe static private ModuleHandle GetEmptyMH() { return new ModuleHandle(); } - #region Private Data Members +#region Private Data Members private RuntimeModule m_ptr; - #endregion +#endregion - #region Constructor +#region Constructor internal ModuleHandle(RuntimeModule module) { m_ptr = module; } - #endregion +#endregion - #region Internal FCalls +#region Internal FCalls internal RuntimeModule GetRuntimeModule() { @@ -1962,12 +1968,12 @@ namespace System { return new MetadataImport(_GetMetadataImport(module.GetNativeHandle()), module); } - #endregion +#endregion } internal unsafe class Signature { - #region Definitions +#region Definitions internal enum MdSigCallingConvention : byte { Generics = 0x10, @@ -1987,18 +1993,18 @@ namespace System GenericInst = 0x0A, Max = 0x0B, } - #endregion +#endregion - #region FCalls +#region FCalls [System.Security.SecurityCritical] // auto-generated [MethodImplAttribute(MethodImplOptions.InternalCall)] private extern void GetSignature( void* pCorSig, int cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType); - #endregion +#endregion - #region Private Data Members +#region Private Data Members // // Keep the layout in sync with SignatureNative in the VM // @@ -2012,9 +2018,9 @@ namespace System internal int m_nSizeOfArgStack; internal int m_csig; internal RuntimeMethodHandleInternal m_pMethod; - #endregion +#endregion - #region Constructors +#region Constructors [System.Security.SecuritySafeCritical] // auto-generated public Signature ( IRuntimeMethodInfo method, @@ -2048,9 +2054,9 @@ namespace System { GetSignature(pCorSig, cCorSig, new RuntimeFieldHandleInternal(), null, declaringType); } - #endregion +#endregion - #region Internal Members +#region Internal Members internal CallingConventions CallingConvention { get { return (CallingConventions)(byte)m_managedCallingConventionAndArgIteratorFlags; } } internal RuntimeType[] Arguments { get { return m_arguments; } } internal RuntimeType ReturnType { get { return m_returnTypeORfieldType; } } @@ -2063,7 +2069,7 @@ namespace System [System.Security.SecuritySafeCritical] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal extern Type[] GetCustomModifiers(int position, bool required); - #endregion +#endregion } |