internal static CompressedStack GetCompressedStack(ref StackCrawlMark stackMark)
        {
            CompressedStack innerCS = null;

            if (CodeAccessSecurityEngine.QuickCheckForAllDemands())
            {
                return(new CompressedStack(null));
            }
            if (CodeAccessSecurityEngine.AllDomainsHomogeneousWithNoStackModifiers())
            {
                return(new CompressedStack(GetDelayedCompressedStack(ref stackMark, false))
                {
                    m_pls = PermissionListSet.CreateCompressedState_HG()
                });
            }
            CompressedStack stack = new CompressedStack(null);

            RuntimeHelpers.PrepareConstrainedRegions();
            try
            {
            }
            finally
            {
                stack.CompressedStackHandle = GetDelayedCompressedStack(ref stackMark, true);
                if ((stack.CompressedStackHandle != null) && IsImmediateCompletionCandidate(stack.CompressedStackHandle, out innerCS))
                {
                    try
                    {
                        stack.CompleteConstruction(innerCS);
                    }
                    finally
                    {
                        DestroyDCSList(stack.CompressedStackHandle);
                    }
                }
            }
            return(stack);
        }
 internal extern static void GetHomogeneousPLS(PermissionListSet hgPLS);
 private CompressedStack(SerializationInfo info, StreamingContext context)
 {
     this.m_pls = (PermissionListSet)info.GetValue("PLS", typeof(PermissionListSet));
 }
 [System.Security.SecurityCritical]  // auto-generated
 private CompressedStack(SafeCompressedStackHandle csHandle, PermissionListSet pls)
 {
     this.m_csHandle = csHandle;
     this.m_pls      = pls;
 }