Try our conversational search powered by Generative AI!

Class MapUserKey

Manages mapping of ProviderUserKey to/from string representation.

Inheritance
System.Object
MapUserKey
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: Mediachase.Commerce.Customers
Assembly: Mediachase.Commerce.dll
Version: 12.17.2
Syntax
public class MapUserKey

Constructors

MapUserKey()

Initializes a new instance of the MapUserKey class with the registered IUserKeyConverter implementations from EPiServer.ServiceLocation.ServiceLocator.

Declaration
public MapUserKey()

MapUserKey(IEnumerable<IUserKeyConverter>)

Initializes a new instance of the MapUserKey class.

Declaration
public MapUserKey(IEnumerable<IUserKeyConverter> converters)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IUserKeyConverter> converters

The user key converters.

Methods

GetUserKeyConverter(String)

Gets a converter for user key of specified type.

Declaration
protected virtual IUserKeyConverter GetUserKeyConverter(string typeName)
Parameters
Type Name Description
System.String typeName

Name of the type.

Returns
Type Description
IUserKeyConverter

A matching implementation of the IUserKeyConverter, or null if none is found.

ToTypedString(Object)

Converts a ProviderUserKey to string with embedded type information.

Declaration
public virtual string ToTypedString(object userKey)
Parameters
Type Name Description
System.Object userKey

The user key.

Returns
Type Description
System.String

A string that can be used as input to the ToUserKey method.

ToUserKey(String)

Converts a string to a provider user key.

Declaration
public virtual object ToUserKey(string typedUserKey)
Parameters
Type Name Description
System.String typedUserKey

The typed user key.

Returns
Type Description
System.Object

An object that can be used as ProviderUserKey for a membership provider.