[System.Security.SecurityCritical] // auto-generated
private void PerformSecurityCheck(Module m, ref StackCrawlMark stackMark, bool skipVisibility)
{
-#if !FEATURE_CORECLR
if (m == null)
throw new ArgumentNullException("m");
Contract.EndContractBlock();
new SecurityPermission(SecurityPermissionFlag.ControlEvidence).Demand();
#pragma warning restore 618
#endif //FEATURE_CORECLR
-#endif //!FEATURE_CORECLR
}
[System.Security.SecurityCritical] // auto-generated
private void PerformSecurityCheck(Type owner, ref StackCrawlMark stackMark, bool skipVisibility)
{
-#if !FEATURE_CORECLR
if (owner == null)
throw new ArgumentNullException("owner");
new SecurityPermission(SecurityPermissionFlag.ControlEvidence).Demand();
#pragma warning restore 618
#endif //FEATURE_CORECLR
-#endif //!FEATURE_CORECLR
}
//
bCanBeCached = false;
}
#endif
-#if FEATURE_CORECLR
- bSecurityCheckOff = true; // CoreCLR does not use security at all.
-#endif
Object instance = RuntimeTypeHandle.CreateInstance(this, publicOnly, bSecurityCheckOff, ref bCanBeCached, ref runtime_ctor, ref bNeedSecurityCheck);
if (ace.m_ctor != null)
{
-#if !FEATURE_CORECLR
// Perform security checks if needed
if (ace.m_bNeedSecurityCheck)
RuntimeMethodHandle.PerformSecurityCheck(instance, ace.m_hCtorMethodHandle, this, (uint)INVOCATION_FLAGS.INVOCATION_FLAGS_CONSTRUCTOR_INVOKE);
-#endif
// Call ctor (value types wont have any)
try
[MethodImplAttribute(MethodImplOptions.InternalCall)]
static extern internal uint GetSpecialSecurityFlags(IRuntimeMethodInfo method);
-#if !FEATURE_CORECLR
[System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
static extern internal void PerformSecurityCheck(Object obj, RuntimeMethodHandleInternal method, RuntimeType parent, uint invocationFlags);
-#endif //!FEATURE_CORECLR
[System.Security.SecurityCritical]
static internal void PerformSecurityCheck(Object obj, IRuntimeMethodInfo method, RuntimeType parent, uint invocationFlags)
{
-#if !FEATURE_CORECLR
RuntimeMethodHandle.PerformSecurityCheck(obj, method.Value, parent, invocationFlags);
GC.KeepAlive(method);
return;
-#endif //!FEATURE_CORECLR
}
#endregion
QCFuncElement("GetCallerType", RuntimeMethodHandle::GetCallerType)
FCFuncElement("GetLoaderAllocator", RuntimeMethodHandle::GetLoaderAllocator)
FCFuncElement("GetSpecialSecurityFlags", ReflectionInvocation::GetSpecialSecurityFlags)
-#ifndef FEATURE_CORECLR
FCFuncElement("PerformSecurityCheck", ReflectionInvocation::PerformSecurityCheck)
-#endif // FEATURE_CORECLR
FCFuncEnd()
FCFuncStart(gCOMDefaultBinderFuncs)
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
+
//
+
#include "common.h"
#include "reflectioninvocation.h"
#include "invokeutil.h"
}
FCIMPLEND
-#ifndef FEATURE_CORECLR
-
// Can not inline this function.
#ifdef _MSC_VER
__declspec(noinline)
}
FCIMPLEND
-#endif // FEATURE_CORECLR
-
/****************************************************************************/
/* boxed Nullable<T> are represented as a boxed T, so there is no unboxed
Nullable<T> inside to point at by reference. Because of this a byref