Class VirtualRoleOptions

Specifies how Virtual roles should be setup.

Inheritance
System.Object
VirtualRoleOptions
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Security
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
[Options]
public class VirtualRoleOptions : IReplicationType

Constructors

VirtualRoleOptions()

Declaration
public VirtualRoleOptions()

Properties

Roles

List of all virtual roles that should be setup by the system.

Declaration
public IDictionary<string, VirtualRoleBuilder> Roles { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, VirtualRoleBuilder>

Methods

AddMappedRole(String, IEnumerable<String>)

Adds a mapping from one role to one or many other roles.

Declaration
public VirtualRoleOptions AddMappedRole(string name, IEnumerable<string> mappedRoles)
Parameters
Type Name Description
System.String name

The name of the role that should be mapped to the provided roles.

System.Collections.Generic.IEnumerable<System.String> mappedRoles

All roles that should be mapped to the name.

Returns
Type Description
VirtualRoleOptions

AddMappedRole(String, String)

Adds a mapping from one role to one or many other roles.

Declaration
public VirtualRoleOptions AddMappedRole(string name, string mappedRole)
Parameters
Type Name Description
System.String name

The name of the role that should be mapped to the provided roles.

System.String mappedRole

A role that should be mapped to the name.

Returns
Type Description
VirtualRoleOptions

AddRole<TRole>(String)

Adds a VirtualRoleProviderBase of the given type.

Declaration
public VirtualRoleOptions AddRole<TRole>(string name)
    where TRole : VirtualRoleProviderBase
Parameters
Type Name Description
System.String name

The name of the role to add.

Returns
Type Description
VirtualRoleOptions
Type Parameters
Name Description
TRole

The type of VirtualRoleProviderBase to add.

AddRole<TRole, TRoleOptions>(String, Action<TRoleOptions>)

Adds a VirtualRoleProviderBase of the given type using the provided method to configure the role options.

Declaration
public VirtualRoleOptions AddRole<TRole, TRoleOptions>(string name, Action<TRoleOptions> configure)
    where TRole : VirtualRoleProviderBase where TRoleOptions : class, new()
Parameters
Type Name Description
System.String name

The name of the role to add.

System.Action<TRoleOptions> configure

Configuration method for setting up role options.

Returns
Type Description
VirtualRoleOptions
Type Parameters
Name Description
TRole

The type of VirtualRoleProviderBase to add.

TRoleOptions

The type of the options class expected by the specific role type.

Explicit Interface Implementations

IReplicationType.ReplicationType

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.

Declaration
string IReplicationType.ReplicationType { get; set; }
Returns
Type Description
System.String

Implements

Extension Methods