Example #1
0
        internal override RuntimeType?GetJitContext(out int securityControlFlags)
        {
            RuntimeType?typeOwner;

            SecurityControlFlags flags = SecurityControlFlags.Default;

            if (m_method.m_restrictedSkipVisibility)
            {
                flags |= SecurityControlFlags.RestrictedSkipVisibilityChecks;
            }
            else if (m_method.m_skipVisibility)
            {
                flags |= SecurityControlFlags.SkipVisibilityChecks;
            }

            typeOwner = m_method.m_typeOwner;

            securityControlFlags = (int)flags;

            return(typeOwner);
        }
        internal override RuntimeType GetJitContext(ref int securityControlFlags)
        {
            SecurityControlFlags flags = SecurityControlFlags.Default;

            if (this.m_method.m_restrictedSkipVisibility)
            {
                flags |= SecurityControlFlags.RestrictedSkipVisibilityChecks;
            }
            else if (this.m_method.m_skipVisibility)
            {
                flags |= SecurityControlFlags.SkipVisibilityChecks;
            }
            RuntimeType typeOwner = this.m_method.m_typeOwner;

            if (this.m_method.m_creationContext != null)
            {
                flags |= SecurityControlFlags.HasCreationContext;
            }
            securityControlFlags = (int)flags;
            return(typeOwner);
        }