November Happy Hour will be moved to Thursday December 5th.

Class ContentMediaResolver

Resolves matching IContentMedia types for extensions.

Inheritance
System.Object
ContentMediaResolver
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.Core
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
[ServiceConfiguration(typeof(ContentMediaResolver), Lifecycle = ServiceInstanceScope.Singleton)]
public class ContentMediaResolver

Constructors

ContentMediaResolver()

Declaration
public ContentMediaResolver()

Methods

GetFirstMatching(String)

Gets the first matching type assignable to IContentMedia.

Declaration
public virtual Type GetFirstMatching(string extension)
Parameters
Type Name Description
System.String extension

The extension.

Returns
Type Description
System.Type
Remarks

Types registered for extension will be preffered before types registered for no/all extensions.

Exceptions
Type Condition
System.ArgumentException

extension must be given

Initialize(ContentTypeModelRepository)

Initializes the specified media resolver with mappings from model repository.

Declaration
public virtual void Initialize(ContentTypeModelRepository modelRepository)
Parameters
Type Name Description
ContentTypeModelRepository modelRepository

The model repository.

ListAllMatching(String)

Lists all matching types assignable to IContentMedia.

Declaration
public virtual IEnumerable<Type> ListAllMatching(string extension)
Parameters
Type Name Description
System.String extension

The extension.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.Type>
Remarks

List is oredered so types registered for extension will be inserted before types registered for no/all extensions.

Exceptions
Type Condition
System.ArgumentException

extension must be given

Extension Methods