public ImportAuthorityGroupsResponse ImportAuthorityGroups(ImportAuthorityGroupsRequest request) { Platform.CheckForNullReference(request, "request"); Platform.CheckMemberIsSet(request.AuthorityGroups, "AuthorityGroups"); if (request.AuthorityGroups.Count > 0) { var importer = new AuthorityGroupImporter(); importer.Import( CollectionUtils.Map(request.AuthorityGroups, (AuthorityGroupDetail g) => new AuthorityGroupDefinition(g.Name, g.Description, g.DataGroup, CollectionUtils.Map(g.AuthorityTokens, (AuthorityTokenSummary s) => s.Name).ToArray())), (IUpdateContext)PersistenceContext); } return new ImportAuthorityGroupsResponse(); }
public bool ImportAuthorityGroups(List<AuthorityGroupDetail> groups) { var request = new ImportAuthorityGroupsRequest(groups); return _service.ImportAuthorityGroups(request)!=null; }
public ImportAuthorityGroupsResponse ImportAuthorityGroups(ImportAuthorityGroupsRequest request) { Platform.CheckForNullReference(request, "request"); Platform.CheckMemberIsSet(request.AuthorityGroups, "AuthorityGroups"); if (request.AuthorityGroups.Count > 0) { var importer = new AuthorityGroupImporter(); importer.Import( CollectionUtils.Map(request.AuthorityGroups, (AuthorityGroupDetail g) => GetAuthorityGroupDefinition(g)), (IUpdateContext)PersistenceContext); } return new ImportAuthorityGroupsResponse(); }