Class SecurityEntityProviderExtensions
Convenience extension methods for SecurityEntityProvider
Inheritance
Inherited Members
Namespace: EPiServer.Security
Assembly: EPiServer.Framework.dll
Version: 10.10.4Syntax
public static class SecurityEntityProviderExtensions
Methods
FindUsersInRole(SecurityEntityProvider, String, String)
Returns users that are part of given role.
Declaration
public static IEnumerable<string> FindUsersInRole(this SecurityEntityProvider securityEntityProvider, string roleName, string usernameToMatch)
Parameters
Type | Name | Description |
---|---|---|
SecurityEntityProvider | securityEntityProvider | The security entity provider that is extended |
System.String | roleName | The name of the role to get users for |
System.String | usernameToMatch | The username to match for. Pass in null to match all users. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | All matched users in role |
GetUsersInRole(SecurityEntityProvider, String)
Returns users that are part of given role.
Declaration
public static IEnumerable<string> GetUsersInRole(this SecurityEntityProvider securityEntityProvider, string roleName)
Parameters
Type | Name | Description |
---|---|---|
SecurityEntityProvider | securityEntityProvider | The security entity provider that is extended |
System.String | roleName | The name of the role to get users for |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | All users in role |
GetUsersInRole(SecurityEntityProvider, String, Int32, Int32, out Int32)
Returns users that are part of given role.
Declaration
public static IEnumerable<string> GetUsersInRole(this SecurityEntityProvider securityEntityProvider, string roleName, int startIndex, int maxRows, out int totalCount)
Parameters
Type | Name | Description |
---|---|---|
SecurityEntityProvider | securityEntityProvider | The security entity provider that is extended |
System.String | roleName | The name of the role to get users for |
System.Int32 | startIndex | The start index, used for paging |
System.Int32 | maxRows | The maximum number of rows returned |
System.Int32 | totalCount | The total amount of matched entites. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | Matching users |
SearchRoles(SecurityEntityProvider, String)
Search all roles matching partOfName
.
Declaration
public static IEnumerable<SecurityEntity> SearchRoles(this SecurityEntityProvider securityEntityProvider, string partOfName)
Parameters
Type | Name | Description |
---|---|---|
SecurityEntityProvider | securityEntityProvider | The provider that is extended |
System.String | partOfName | part of the role name to match. Null or String.Empty will return all roles. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SecurityEntity> | A list of matching roles. |
SearchRoles(SecurityEntityProvider, String, Int32, Int32, out Int32)
Search all roles matching partOfName
.
Declaration
public static IEnumerable<SecurityEntity> SearchRoles(this SecurityEntityProvider securityEntityProvider, string partOfName, int startIndex, int maxRows, out int totalCount)
Parameters
Type | Name | Description |
---|---|---|
SecurityEntityProvider | securityEntityProvider | The provider that is extended |
System.String | partOfName | part of the role name to match. Null or String.Empty will return all roles. |
System.Int32 | startIndex | The start index, used for paging |
System.Int32 | maxRows | The maximum number of rows returned |
System.Int32 | totalCount | The total amount of matched entites. Return -1 if provider does not support paging. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SecurityEntity> | A list of all matching entities or an empty list if no matches. |
SearchUsersByEmail(SecurityEntityProvider, String)
Search all users with an email matching partOfEmail
.
Declaration
public static IEnumerable<SecurityEntity> SearchUsersByEmail(this SecurityEntityProvider securityEntityProvider, string partOfEmail)
Parameters
Type | Name | Description |
---|---|---|
SecurityEntityProvider | securityEntityProvider | The provider that is extended |
System.String | partOfEmail | part of the email to match. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SecurityEntity> | A list of matching users. |
SearchUsersByName(SecurityEntityProvider, String)
Search all users with a matching partOfName
.
Declaration
public static IEnumerable<SecurityEntity> SearchUsersByName(this SecurityEntityProvider securityEntityProvider, string partOfName)
Parameters
Type | Name | Description |
---|---|---|
SecurityEntityProvider | securityEntityProvider | The provider that is extended |
System.String | partOfName | part of the user name to match. Null or String.Empty will return all users. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SecurityEntity> | A list of matching users. |
SearchUsersByName(SecurityEntityProvider, String, Int32, Int32, out Int32)
Search all users matching partOfName
.
Declaration
public static IEnumerable<SecurityEntity> SearchUsersByName(this SecurityEntityProvider securityEntityProvider, string partOfName, int startIndex, int maxRows, out int totalCount)
Parameters
Type | Name | Description |
---|---|---|
SecurityEntityProvider | securityEntityProvider | The provider that is extended |
System.String | partOfName | part of the user name to match. Null or String.Empty will return all users. |
System.Int32 | startIndex | The start index, used for paging |
System.Int32 | maxRows | The maximum number of rows returned |
System.Int32 | totalCount | The total amount of matched entites. Return -1 if provider does not support paging. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<SecurityEntity> | A list of all matching entities or an empty list if no matches. |