本文整理汇总了C#中Package.Update方法的典型用法代码示例。如果您正苦于以下问题:C# Package.Update方法的具体用法?C# Package.Update怎么用?C# Package.Update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package.Update方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createPackage
private void createPackage(Package rootPackage)
{
EnterpriseArchitectModelElementFactory factory =
new EnterpriseArchitectModelElementFactory();
requirementsPackage = factory.createPackage(rootPackage, "Requirements");
requirementsPackage.Element.Author = "<imported>";
requirementsPackage.StereotypeEx = "ExchangeDocument";
if (! requirementsPackage.Update())
{
throw new ParserFailureException(requirementsPackage.GetLastError());
}
}
示例2: CreateFromOwner
public Package CreateFromOwner(System.Int32 __Id, Services.Packages.Security.ModelUser _Owner, string SessionToken)
{
ModelSession session = PackageSecureService.CheckSessionImp(SessionToken);
Package _Package = new Package(__Id);
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 _Package = Package.CreatePackage(__Id);
_Package.Owner = session.User;
_Package.Owner = _Owner;
_Package.Update();
return _Package;
}
示例3: 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();
}
示例4: 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();
}
示例5: 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();
}
示例6: UpdateObject
public void UpdateObject(Package _Package, string SessionToken)
{
if (!PackageSecureService.CheckAccessImp(_Package, SessionToken, "Update"))
throw new UnauthorizedAccessException("Access Denied");
_Package.Update();
}