private static ItemPathType createItemPathType(string path) { ItemPathType rv = new ItemPathType(); rv.Value = "declare default namespace '" + NS_C + "'; " + path; return(rv); }
private static ObjectType1[] listObjectsRestrictedAndSorted(modelPortType modelPort, XmlQualifiedName type) { // let's say we want to get first 3 users, sorted alphabetically by user name QueryType queryType = new QueryType(); // holds search query + paging options PagingType pagingType = new PagingType(); pagingType.maxSize = 3; ItemPathType orderBy = createItemPathType("name"); pagingType.orderBy = orderBy; pagingType.orderDirection = OrderDirectionType.ascending; queryType.paging = pagingType; searchObjects request = new searchObjects(type, queryType, null); searchObjectsResponse response = modelPort.searchObjects(request); ObjectListType objectList = response.objectList; ObjectType1[] objects = objectList.@object; return(objects); }
private static ItemPathType createItemPathType(string path) { ItemPathType rv = new ItemPathType(); rv.Value = "declare default namespace '" + NS_C + "'; " + path; return rv; }