本文整理匯總了C#中System.ApplicationException.Create方法的典型用法代碼示例。如果您正苦於以下問題:C# ApplicationException.Create方法的具體用法?C# ApplicationException.Create怎麽用?C# ApplicationException.Create使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.ApplicationException
的用法示例。
在下文中一共展示了ApplicationException.Create方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: 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
示例2: 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
示例3: CreateObject
public void CreateObject(ApplicationException _ApplicationException, string SessionToken)
{
ModelSession session = ApplicationExceptionSecureService.CheckSessionImp(SessionToken);
if (!ApplicationExceptionSecureService.CheckUserRightsImp(session.User.Name, "Create " + typeof(ApplicationException).FullName))
throw new UnauthorizedAccessException("Access Denied");
_ApplicationException.Owner = session.User;
_ApplicationException.Create();
}
開發者ID:phaetto,項目名稱:services-update,代碼行數:10,代碼來源:Services.Packages.Log.Security.ApplicationExceptionSecureService.cs