Class VirtualRoleBuilder
A builder used to build virtual roles
Inheritance
Namespace: EPiServer.Security
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
public class VirtualRoleBuilder : Object
Constructors
VirtualRoleBuilder(String, Type)
Initializes a new instance of the Virtual
Declaration
public VirtualRoleBuilder(string name, Type roleType)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | |
System. |
roleType |
Properties
Name
Gets the name of the Virtual
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System. |
RoleType
Gets the type of the Virtual
Declaration
public Type RoleType { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
Build(IServiceProvider)
Builds a new Virtual
Declaration
public VirtualRoleProviderBase Build(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
System. |
serviceProvider | The service provider used to create virtual role instances. |
Returns
Type | Description |
---|---|
Virtual |
A new Virtual |
Configure<TRoleOptions>(Action<TRoleOptions>)
Adds a configuration of the role.
Declaration
public VirtualRoleBuilder Configure<TRoleOptions>(Action<TRoleOptions> configure)
where TRoleOptions : class, new()
Parameters
Type | Name | Description |
---|---|---|
System. |
configure | The method that will configure the options instance. |
Returns
Type | Description |
---|---|
Virtual |
Type Parameters
Name | Description |
---|---|
TRoleOptions | The type of option to configure. |
Create<TRole>(String)
Factory method for creating a new Virtual
Declaration
public static VirtualRoleBuilder Create<TRole>(string name)
where TRole : VirtualRoleProviderBase
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the Virtual |
Returns
Type | Description |
---|---|
Virtual |
A new Virtual |
Type Parameters
Name | Description |
---|---|
TRole | Type of the role instance. Must implement Virtual |