Gets a list of users in a specified role where the user name contains the specified user name to match.

Namespace: Novalys.VisualGuard.Security.Membership
Assembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2016.0.105.16 (2016.0.105.16)

Syntax

C#
[ObsoleteAttribute("Use FindUsersInRole(VGRole role, string usernameToMatch) method")]
public VGMembershipUserCollection FindUsersInRoleById(
	Guid roleId,
	string usernameToMatch
)
Visual Basic
<ObsoleteAttribute("Use FindUsersInRole(VGRole role, string usernameToMatch) method")> 
Public Function FindUsersInRoleById ( 
	roleId As Guid,
	usernameToMatch As String
) As VGMembershipUserCollection

Parameters

roleId
Type: System..::..Guid
The repository of the role to search in.
usernameToMatch
Type: System..::..String
The user name to search for.

Return Value

Type: VGMembershipUserCollection
A string array containing the names of all the users whose user name matches usernameToMatch and who are members of the specified role.

Remarks

Wildcards such as asterisks and question marks can be used in the usernameToMatch parameter value.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionusernameToMatch is null.
System..::..ArgumentExceptionroleId was not found in the repository for belongs to another application.

-or-

usernameToMatch is an empty string.

See Also