Listing groups
Log in to add to favouritesListing groups can be achieved by using one of the List
method overloads.
- List(SecurityListOptions listOptions)
- ListAsync(SecurityListOptions listOptions)
- List(SecurityListOptions listOptions, string query)
- ListAsync(SecurityListOptions listOptions, string query)
List groups specifying page options.
Syntax
public PagedList<Group> List(SecurityListOptions listOptions = null, string query = null)
{
}
Parameters
listOptions
Type: SecurityListOptions
The list options, page size, page index, etc.
query
Type: string
The optional group list query, which performs a basic contains
on the group name.
Examples
using Zengenti.Contensis.Management;
using Zengenti.Data;
// Create a client
var client = ManagementClient.Create();
SecurityListOptions listOptions = new SecurityListOptions
{
PageOptions = new PageOptions(0, 10)
};
// List the groups
PagedList<Group> groups = client.Security.Groups.List(listOptions);
List groups specifying page options asynchronously.
Syntax
public async Task<PagedList<Group>> ListAsync(SecurityListOptions listOptions = null, string query = null)
{
}
Parameters
listOptions
Type: SecurityListOptions
The list options, page size, page index, etc.
query
Type: string
The optional group list query, which performs a basic contains
on the group name.
Examples
using Zengenti.Contensis.Management;
using Zengenti.Data;
// Create a client
var client = ManagementClient.Create();
SecurityListOptions listOptions = new SecurityListOptions
{
PageOptions = new PageOptions(0, 10)
};
// List the groups
PagedList<Group> groups = await client.Security.Groups.ListAsync(listOptions);
List groups specifying a query to filter groups by.
Syntax
public PagedList<Group> List(SecurityListOptions listOptions = null, string query = null)
{
}
Parameters
listOptions
Type: SecurityListOptions
The list options, page size, page index, etc.
query
Type: string
The optional group list query, which performs a basic contains
on the group name.
Examples
using Zengenti.Contensis.Management;
using Zengenti.Data;
// Create a client
var client = ManagementClient.Create();
SecurityListOptions listOptions = new SecurityListOptions
{
PageOptions = new PageOptions(0, 10)
};
// List the groups with a query value of "fight club"
PagedList<Group> groups = client.Security.Groups.List(listOptions, "fight club");
List groups specifying a query to filter groups by asynchronously.
Syntax
public async Task<PagedList<Group>> ListAsync(SecurityListOptions listOptions = null, string query = null)
{
}
Parameters
listOptions
Type: SecurityListOptions
The list options, page size, page index, etc.
query
Type: string
The optional group list query, which performs a basic contains
on the group name.
Examples
using Zengenti.Contensis.Management;
using Zengenti.Data;
// Create a client
var client = ManagementClient.Create();
SecurityListOptions listOptions = new SecurityListOptions
{
PageOptions = new PageOptions(0, 10)
};
// List the groups with a query value of "fight club"
PagedList<Group> groups = await client.Security.Groups.ListAsync(listOptions, "fight club");