Beispiel #1
0
        internal static bool IsInFullTrust()
        {
            bool flag;

            if (SecurityManager.CurrentThreadRequiresSecurityContextCapture())
            {
                try
                {
                    PartialTrustHelpers.DemandForFullTrust();
                    flag = true;
                }
                catch (SecurityException securityException)
                {
                    flag = false;
                }
                return(flag);
            }
            else
            {
                return(true);
            }
        }