System.Security.SecurityRuntime.RevertAssert C# (CSharp) Method

RevertAssert() static private method

static private RevertAssert ( System.Threading.StackCrawlMark &stackMark ) : void
stackMark System.Threading.StackCrawlMark
return void
        internal static void RevertAssert(ref StackCrawlMark stackMark)
        {
            FrameSecurityDescriptor secObj = GetSecurityObjectForFrame(ref stackMark, false);
            if (secObj != null)
            {
                secObj.RevertAssert();
            }
            else if (SecurityManager._IsSecurityOn())
                throw new ExecutionEngineException( Environment.GetResourceString( "ExecutionEngine_MissingSecurityDescriptor" ) );
        }

Usage Example

Example #1
0
        // Static methods for manipulation of stack

        /// <include file='doc\CodeAccessPermission.uex' path='docs/doc[@for="CodeAccessPermission.RevertAssert"]/*' />
        public static void RevertAssert()
        {
            SecurityRuntime isr = SecurityManager.GetSecurityRuntime();

            if (isr != null)
            {
                StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
                isr.RevertAssert(ref stackMark);
            }
        }
All Usage Examples Of System.Security.SecurityRuntime::RevertAssert