Getting a group
Log in to add to favouritesRequesting an individual group can be achieved by using one of the Get
methods overloads.
- Get(Guid id)
- GetAsync(Guid id)
- Get(string id)
- GetAsync(string id)
- Get(string groupName)
- GetAsync(string groupName)
Gets a group by its id.
Syntax
public Group Get(Guid id)
{
}
Parameters
id
Type: Guid
The id of the group.
Remarks
Returns null if no group matches the specified id.
Examples
using Zengenti.Contensis.Management;
// Create a client
var client = ManagementClient.Create();
// Mimic a guid value
var groupId = Guid.Parse("c5da1719-cb3f-4f2e-927b-f678293258f3");
// Get the group
Group group = client.Security.Groups.Get(groupId);
Gets a group by its id asynchronously.
Syntax
public async Task<Group> GetAsync(Guid id)
{
}
Parameters
id
Type: Guid
The id of the group.
Remarks
Returns null if no group matches the specified id.
Examples
using Zengenti.Contensis.Management;
// Create a client
var client = ManagementClient.Create();
// Mimic a guid value
var groupId = Guid.Parse("c5da1719-cb3f-4f2e-927b-f678293258f3");
// Get the group
Group group = await client.Security.Groups.GetAsync(groupId);
Gets a group by its id.
Syntax
public Group Get(string id)
{
}
Parameters
id
Type: string
The group identifier, either group name, or identifier.
Remarks
Returns null if no group matches the specified id.
Examples
using Zengenti.Contensis.Management;
// Create a client
var client = ManagementClient.Create();
// Get the group
Group group = client.Security.Groups.Get("c5da1719-cb3f-4f2e-927b-f678293258f3");
Gets a group by its id asynchronously.
Syntax
public async Task<Group> GetAsync(string id)
{
}
Parameters
id
Type: string
The groups identifier, either group name, or identifier.
Remarks
Returns null if no group matches the specified id.
Examples
using Zengenti.Contensis.Management;
// Create a client
var client = ManagementClient.Create();
// Get the group
Group group = await client.Security.Groups.GetAsync("c5da1719-cb3f-4f2e-927b-f678293258f3");
Gets a group by its name.
Syntax
public Group Get(string id)
{
}
Parameters
id
Type: string
The group identifier, either group name, or identifier.
Remarks
Returns null if no group matches the specified name.
Examples
using Zengenti.Contensis.Management;
// Create a client
var client = ManagementClient.Create();
// Get the group
Group group = client.Security.Groups.Get("Fight Club Members");
Gets a group by its name asynchronously.
Syntax
public async Task<Group> GetAsync(string id)
{
}
Parameters
id
Type: string
The groups identifier, either group name, or identifier.
Remarks
Returns null if no group matches the specified group name.
Examples
using Zengenti.Contensis.Management;
// Create a client
var client = ManagementClient.Create();
// Get the group
Group group = await client.Security.Groups.GetAsync("Fight Club Members");