本文整理汇总了C#中Package.Reload方法的典型用法代码示例。如果您正苦于以下问题:C# Package.Reload方法的具体用法?C# Package.Reload怎么用?C# Package.Reload使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package.Reload方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Reload
public Package Reload(Package _Package, string SessionToken)
{
_Package.Reload();
if (!PackageSecureService.CheckAccessImp(_Package, SessionToken, "Read"))
throw new UnauthorizedAccessException("Access Denied");
return _Package;
}
示例2: GetApiKey
public Services.Packages.ApiKey GetApiKey(Package _Package, string SessionToken)
{
_Package.Reload();
//*
if (!Services.Packages.Security.PackageSecureService.CheckAccessImp(_Package, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
//*
if (!Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_Package.ApiKey, SessionToken, "Read"))
throw new UnauthorizedAccessException("Access Denied");
//*/
return _Package.ApiKey;
}
示例3: GetOwner
public Services.Packages.Security.ModelUser GetOwner(Package _Package, string SessionToken)
{
_Package.Reload();
//*
if (!Services.Packages.Security.PackageSecureService.CheckAccessImp(_Package, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
//*
if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Package.Owner, SessionToken, "Read"))
throw new UnauthorizedAccessException("Access Denied");
//*/
return _Package.Owner;
}
示例4: GetACLs
public Services.Packages.Security.PackageAccessControlListCollection GetACLs(Package _Package, string SessionToken)
{
_Package.Reload();
//*
if (!Services.Packages.Security.PackageSecureService.CheckAccessImp(_Package, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
/*
if (!Services.Packages.Security.Security.PackageAccessControlListSecureService.CheckAccessImp(_Package.ACLs, SessionToken, "Read"))
throw new UnauthorizedAccessException("Access Denied");
//*/
return _Package.ACLs;
}
示例5: CreateObjectFromOwner
public void CreateObjectFromOwner(Package _Package, Services.Packages.Security.ModelUser _Owner, string SessionToken)
{
ModelSession session = PackageSecureService.CheckSessionImp(SessionToken);
//if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Create PackageOwning"))
// throw new UnauthorizedAccessException("Access Denied");
_Package.Reload();
if (!_Package.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Create PackageOwning"))
throw new UnauthorizedAccessException("Access Denied");
else if (_Package.Exists && !PackageSecureService.CheckAccessImp(_Package, SessionToken, "Update"))
throw new UnauthorizedAccessException("Access Denied");
_Package.Owner = session.User;
_Package.Owner = _Owner;
_Package.Create();
}
示例6: SetACLs
public void SetACLs(Package _Package, Services.Packages.Security.PackageAccessControlListCollection _ACLs, string SessionToken)
{
_Package.Reload();
//*
if (!Services.Packages.Security.PackageSecureService.CheckAccessImp(_Package, SessionToken, "Traverse"))
throw new UnauthorizedAccessException("Access Denied");
//*/
/*
_ACLs.Reload();
if (_ACLs.Exists && !Services.Packages.Security.Security.PackageAccessControlListSecureService.CheckAccessImp(_ACLs, SessionToken, "Update"))
throw new UnauthorizedAccessException("Access Denied");
else if (!_ACLs.Exists && !Services.Packages.Security.PackageSecureService.CheckAccessImp(_Package, SessionToken, "Create ACLs"))
throw new UnauthorizedAccessException("Access Denied");
//*/
_Package.ACLs = _ACLs;
_Package.Update();
}
示例7: SetOwner
public void SetOwner(Package _Package, Services.Packages.Security.ModelUser _Owner, string SessionToken)
{
_Package.Reload();
//*
if (!Services.Packages.Security.PackageSecureService.CheckAccessImp(_Package, 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.Security.PackageSecureService.CheckAccessImp(_Package, SessionToken, "Create PackageOwning"))
throw new UnauthorizedAccessException("Access Denied");
//*/
_Package.Owner = _Owner;
_Package.Update();
}
示例8: SetApiKey
public void SetApiKey(Package _Package, Services.Packages.ApiKey _ApiKey, string SessionToken)
{
_Package.Reload();
//*
if (!Services.Packages.Security.PackageSecureService.CheckAccessImp(_Package, 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.Security.PackageSecureService.CheckAccessImp(_Package, SessionToken, "Create PackagesUploaded"))
throw new UnauthorizedAccessException("Access Denied");
//*/
_Package.ApiKey = _ApiKey;
_Package.Update();
}