Class ContentMediaResolver
Resolves matching IContentMedia types for extensions.
Inheritance
System.Object
ContentMediaResolver
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class ContentMediaResolver : Object
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 |