當前位置: 首頁>>代碼示例>>C#>>正文


C# ApplicationException.Reload方法代碼示例

本文整理匯總了C#中System.ApplicationException.Reload方法的典型用法代碼示例。如果您正苦於以下問題:C# ApplicationException.Reload方法的具體用法?C# ApplicationException.Reload怎麽用?C# ApplicationException.Reload使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.ApplicationException的用法示例。


在下文中一共展示了ApplicationException.Reload方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetInnerExceptions

        public Services.Packages.Log.ApplicationExceptionCollection GetInnerExceptions(ApplicationException _ApplicationException, string SessionToken)
        {
            _ApplicationException.Reload();

            //*
            if (!Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            /*
            if (!Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException.InnerExceptions, SessionToken, "Read"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            return _ApplicationException.InnerExceptions;
        }
開發者ID:phaetto,項目名稱:services-update,代碼行數:16,代碼來源:Services.Packages.Log.Security.ApplicationExceptionSecureService.cs

示例2: GetOwner

        public Services.Packages.Security.ModelUser GetOwner(ApplicationException _ApplicationException, string SessionToken)
        {
            _ApplicationException.Reload();

            //*
            if (!Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            //*
            if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ApplicationException.Owner, SessionToken, "Read"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            return _ApplicationException.Owner;
        }
開發者ID:phaetto,項目名稱:services-update,代碼行數:16,代碼來源:Services.Packages.Log.Security.ApplicationExceptionSecureService.cs

示例3: CreateObjectFromOwner

        public void CreateObjectFromOwner(ApplicationException _ApplicationException, Services.Packages.Security.ModelUser _Owner, string SessionToken)
        {
            ModelSession session = ApplicationExceptionSecureService.CheckSessionImp(SessionToken);

            //if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Create ApplicationExceptionOwning"))
            //	throw new UnauthorizedAccessException("Access Denied");

            _ApplicationException.Reload();

            if (!_ApplicationException.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Create ApplicationExceptionOwning"))
                throw new UnauthorizedAccessException("Access Denied");
            else if (_ApplicationException.Exists && !ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");

            _ApplicationException.Owner = session.User;
            _ApplicationException.Owner = _Owner;
            _ApplicationException.Create();
        }
開發者ID:phaetto,項目名稱:services-update,代碼行數:18,代碼來源:Services.Packages.Log.Security.ApplicationExceptionSecureService.cs

示例4: CreateObjectFromParentException

        public void CreateObjectFromParentException(ApplicationException _ApplicationException, Services.Packages.Log.ApplicationException _ParentException, string SessionToken)
        {
            ModelSession session = ApplicationExceptionSecureService.CheckSessionImp(SessionToken);

            //if (!Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ParentException, SessionToken, "Create InnerExceptions"))
            //	throw new UnauthorizedAccessException("Access Denied");

            _ApplicationException.Reload();

            if (!_ApplicationException.Exists && !Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ParentException, SessionToken, "Create InnerExceptions"))
                throw new UnauthorizedAccessException("Access Denied");
            else if (_ApplicationException.Exists && !ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");

            _ApplicationException.Owner = session.User;
            _ApplicationException.ParentException = _ParentException;
            _ApplicationException.Create();
        }
開發者ID:phaetto,項目名稱:services-update,代碼行數:18,代碼來源:Services.Packages.Log.Security.ApplicationExceptionSecureService.cs

示例5: SetParentException

        public void SetParentException(ApplicationException _ApplicationException, Services.Packages.Log.ApplicationException _ParentException, string SessionToken)
        {
            _ApplicationException.Reload();

            //*
            if (!Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            //*
            _ParentException.Reload();
            if (_ParentException.Exists && !Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ParentException, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");
            else if (!_ParentException.Exists && !Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Create InnerExceptions"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            _ApplicationException.ParentException = _ParentException;
            _ApplicationException.Update();
        }
開發者ID:phaetto,項目名稱:services-update,代碼行數:20,代碼來源:Services.Packages.Log.Security.ApplicationExceptionSecureService.cs

示例6: SetOwner

        public void SetOwner(ApplicationException _ApplicationException, Services.Packages.Security.ModelUser _Owner, string SessionToken)
        {
            _ApplicationException.Reload();

            //*
            if (!Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            //*
            _Owner.Reload();
            if (_Owner.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");
            else if (!_Owner.Exists && !Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Create ApplicationExceptionOwning"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            _ApplicationException.Owner = _Owner;
            _ApplicationException.Update();
        }
開發者ID:phaetto,項目名稱:services-update,代碼行數:20,代碼來源:Services.Packages.Log.Security.ApplicationExceptionSecureService.cs

示例7: SetApiKey

        public void SetApiKey(ApplicationException _ApplicationException, Services.Packages.ApiKey _ApiKey, string SessionToken)
        {
            _ApplicationException.Reload();

            //*
            if (!Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            //*
            _ApiKey.Reload();
            if (_ApiKey.Exists && !Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");
            else if (!_ApiKey.Exists && !Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Create ApplicationExceptionsLogged"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            _ApplicationException.ApiKey = _ApiKey;
            _ApplicationException.Update();
        }
開發者ID:phaetto,項目名稱:services-update,代碼行數:20,代碼來源:Services.Packages.Log.Security.ApplicationExceptionSecureService.cs

示例8: SetACLs

        public void SetACLs(ApplicationException _ApplicationException, Services.Packages.Log.Security.ApplicationExceptionAccessControlListCollection _ACLs, string SessionToken)
        {
            _ApplicationException.Reload();

            //*
            if (!Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Traverse"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            /*
            _ACLs.Reload();
            if (_ACLs.Exists && !Services.Packages.Log.Security.Security.ApplicationExceptionAccessControlListSecureService.CheckAccessImp(_ACLs, SessionToken, "Update"))
                throw new UnauthorizedAccessException("Access Denied");
            else if (!_ACLs.Exists && !Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Create ACLs"))
                throw new UnauthorizedAccessException("Access Denied");
            //*/

            _ApplicationException.ACLs = _ACLs;
            _ApplicationException.Update();
        }
開發者ID:phaetto,項目名稱:services-update,代碼行數:20,代碼來源:Services.Packages.Log.Security.ApplicationExceptionSecureService.cs

示例9: Reload

        public ApplicationException Reload(ApplicationException _ApplicationException, string SessionToken)
        {
            _ApplicationException.Reload();

            if (!ApplicationExceptionSecureService.CheckAccessImp(_ApplicationException, SessionToken, "Read"))
                throw new UnauthorizedAccessException("Access Denied");

            return _ApplicationException;
        }
開發者ID:phaetto,項目名稱:services-update,代碼行數:9,代碼來源:Services.Packages.Log.Security.ApplicationExceptionSecureService.cs


注:本文中的System.ApplicationException.Reload方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。