Listing users
Log in to add to favouritesListing users 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 users specifying page options.
Syntax
public PagedList<User> List(SecurityListOptions listOptions = null, string query = null)
{
}
Parameters
listOptions
Type: SecurityListOptions
The list options, page size, page index, etc.
query
Type: string
The optional user list query, which performs a basic contains
on the users firstname, surname, username or email.
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 users
PagedList<User> users = client.Security.Users.List(listOptions);
List users specifying page options asynchronously.
Syntax
public async Task<PagedList<User>> ListAsync(SecurityListOptions listOptions = null, string query = null)
{
}
Parameters
listOptions
Type: SecurityListOptions
The list options, page size, page index, etc.
query
Type: string
The optional user list query, which performs a basic contains
on the users firstname, surname, username or email.
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 users
PagedList<User> users = await client.Security.Users.ListAsync(listOptions);
List users specifying a query to filter users by.
Syntax
public PagedList<User> List(SecurityListOptions listOptions = null, string query = null)
{
}
Parameters
listOptions
Type: SecurityListOptions
The list options, page size, page index, etc.
query
Type: string
The optional user list query, which performs a basic contains
on the users firstname, surname, username or email.
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 users with a query value of "tyler"
PagedList<User> users = client.Security.Users.List(listOptions, "tyler");
List users specifying a query to filter users by asynchronously.
Syntax
public async Task<PagedList<User>> ListAsync(SecurityListOptions listOptions = null, string query = null)
{
}
Parameters
listOptions
Type: SecurityListOptions
The list options, page size, page index, etc.
query
Type: string
The optional user list query, which performs a basic contains
on the users firstname, surname, username or email.
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 users with a query value of "tyler"
PagedList<User> users = await client.Security.Users.ListAsync(listOptions, "tyler");