Class ProviderFacade

This a helper class that is used to get provider information.

Inheritance
System.Object
ProviderFacade
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.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class ProviderFacade
Remarks

The primary purpose is to hide all complexities related to working with the multiplexing role / membership providers.

Constructors

ProviderFacade()

Declaration
public ProviderFacade()

Methods

GetDefaultMembershipProvider(MembershipProvider)

Gets the default membership provider.

Declaration
public static MembershipProvider GetDefaultMembershipProvider(MembershipProvider provider)
Parameters
Type Name Description
System.Web.Security.MembershipProvider provider

The provider to check.

Returns
Type Description
System.Web.Security.MembershipProvider

It is recommended that you use this method when you want to extract a membership provider for manipulating users, since it will "bypass" the multiplexing membership provider in case it is currently in use. If the multiplexing membership provider is not used, this method will do nothing. I e it will return the provider passed in.

GetDefaultMembershipProviderName()

Gets the name of the default membership provider.

Declaration
public static string GetDefaultMembershipProviderName()
Returns
Type Description
System.String

Name of provider

Remarks

If provider is multiplexing provider the method returns DefaultProviderName

GetDefaultMembershipProviderName(MembershipProvider)

Gets the name of the default membership provider.

Declaration
public static string GetDefaultMembershipProviderName(MembershipProvider provider)
Parameters
Type Name Description
System.Web.Security.MembershipProvider provider

The provider.

Returns
Type Description
System.String

Name of provider

Remarks

If provider is multiplexing provider the method returns the name of the Default Provider for the multiplexing provider.

GetDefaultRoleProvider(RoleProvider)

Gets the default role provider.

Declaration
public static RoleProvider GetDefaultRoleProvider(RoleProvider provider)
Parameters
Type Name Description
System.Web.Security.RoleProvider provider

The provider to check.

Returns
Type Description
System.Web.Security.RoleProvider

It is recommended that you use this method when you want to extract a role provider for manipulating roles, since it will "bypass" the multiplexing role provider in case it is currently in use. If the multiplexing role provider is not used, this method will do nothing. I e it will return the provider passed in.

GetDefaultRoleProvider(RoleProvider, String)

Gets the default role provider.

Declaration
public static RoleProvider GetDefaultRoleProvider(RoleProvider provider, string membershipProviderName)
Parameters
Type Name Description
System.Web.Security.RoleProvider provider

The provider to check.

System.String membershipProviderName

The membership provider that is currently in use or null if the membership provider shouldn't be taken into account.

Returns
Type Description
System.Web.Security.RoleProvider

It is recommended that you use this method when you want to extract a role provider for manipulating roles, since it will "bypass" the multiplexing role provider in case it is currently in use. If the multiplexing role provider is not used, this method will do nothing. I e it will return the provider passed in.

GetDefaultRoleProviderName()

Gets the name of the default role provider.

Declaration
public static string GetDefaultRoleProviderName()
Returns
Type Description
System.String

Name of provider

Remarks

If provider is multiplexing provider the method returns DefaultProviderName

GetDefaultRoleProviderName(String)

Gets the name of the default role provider.

Declaration
public static string GetDefaultRoleProviderName(string membershipProviderName)
Parameters
Type Name Description
System.String membershipProviderName

The membership provider that is currently in use or null if the membership provider shouldn't be taken into account.

Returns
Type Description
System.String

Name of provider

Remarks

If provider is multiplexing provider the method returns DefaultProviderName

GetDefaultRoleProviderName(RoleProvider)

Gets the name of the default role provider.

Declaration
public static string GetDefaultRoleProviderName(RoleProvider provider)
Parameters
Type Name Description
System.Web.Security.RoleProvider provider

The provider.

Returns
Type Description
System.String

Name of provider

Remarks

If provider is multiplexing provider the method returns the name of the Default Provider for the multiplexing provider

GetDefaultRoleProviderName(RoleProvider, String)

Gets the name of the default role provider.

Declaration
public static string GetDefaultRoleProviderName(RoleProvider provider, string membershipProviderName)
Parameters
Type Name Description
System.Web.Security.RoleProvider provider

The provider.

System.String membershipProviderName

The membership provider that is currently in use or null if the membership provider shouldn't be taken into account.

Returns
Type Description
System.String

Name of provider

Remarks

If provider is multiplexing provider the method returns DefaultProviderName

Extension Methods