I am using the API to do some querying. I would like to do two sorts on a history query, first being based on the name and ascending, the second based on the version number and descending.
How do i do that? This is what i have so far, but it doesn't seem to be working. No documentation is available on the methodology of sortying.
VaultLib.VaultHistoryQueryRequest req = new VaultLib.VaultHistoryQueryRequest();
sorts.Add((long)VaultQueryRequestSort.NameSort);
sorts.Add((long)VaultQueryRequestSort.VersionSort);
sorts.Add((long)VaultQueryRequestSort.DescSort);
req.Sorts = (long[]) sorts.ToArray(typeof(long));
thanks
Haider
sorting history query in API
Moderator: SourceGear
Try this:
Code: Select all
VaultLib.VaultHistoryQueryRequest req = new VaultLib.VaultHistoryQueryRequest();
uint nSort = VaultQueryRequestSort.NameSort;
sorts.Add((long)nSort);
nSort = VaultQueryRequestSort.VersionSort | VaultQueryRequestSort.DescSort;
sorts.Add((long)nSort);
req.Sorts = (long[]) sorts.ToArray(typeof(long));
Jeff Clausius
SourceGear
SourceGear