Class MetadataHandlerRegistry
Registry that holds all metadataHandlers for entity types.
Inheritance
Inherited Members
Namespace: EPiServer.Shell.ObjectEditing
Assembly: EPiServer.Shell.dll
Version: 7.19.2Syntax
[ServiceConfiguration(typeof(MetadataHandlerRegistry), Lifecycle = ServiceInstanceScope.Singleton)]
public class MetadataHandlerRegistry
Constructors
MetadataHandlerRegistry(EditorDescriptor[], IModelAccessorCreator[])
Initializes a new instance of the Metadata
Declaration
public MetadataHandlerRegistry(EditorDescriptor[] descriptors, IModelAccessorCreator[] modelAccessorCreators)
Parameters
Type | Name | Description |
---|---|---|
Editor |
descriptors | An array of Editor |
IModel |
modelAccessorCreators | An array of IModel |
Methods
GetMetadataHandlers(Type)
Gets the metadata handlers.
Declaration
public IEnumerable<IMetadataHandler> GetMetadataHandlers(Type type)
Parameters
Type | Name | Description |
---|---|---|
System. |
type | The type. |
Returns
Type | Description |
---|---|
System. |
A System.Collections.Generic.IEnumerable<T> with the registered handlers. |
GetMetadataHandlers(Type, String)
Gets all object metadataHandlers for a type.
Declaration
public IEnumerable<IMetadataHandler> GetMetadataHandlers(Type type, string uiHint)
Parameters
Type | Name | Description |
---|---|---|
System. |
type | The type. |
System. |
uiHint | The type override. |
Returns
Type | Description |
---|---|
System. |
A System.Collections.Generic.IEnumerable<T> with the registered handlers. |
GetModelAccessor(Type, Dictionary<String, String>)
Get model accessor for the given type
Declaration
public Func<object> GetModelAccessor(Type type, Dictionary<string, string> arguments)
Parameters
Type | Name | Description |
---|---|---|
System. |
type | The type |
System. |
arguments | Arguments to be sent to the model accessor creator |
Returns
Type | Description |
---|---|
System. |
RegisterMetadataHandler(Type, IMetadataHandler)
Registers the metadata handler.
Declaration
public void RegisterMetadataHandler(Type type, IMetadataHandler metadataHandler)
Parameters
Type | Name | Description |
---|---|---|
System. |
type | The type. |
IMetadata |
metadataHandler | The metadata handler. |
RegisterMetadataHandler(Type, IMetadataHandler, String)
Registers a metadataHandler for a type.
Declaration
public void RegisterMetadataHandler(Type type, IMetadataHandler metadataHandler, string typeOverride)
Parameters
Type | Name | Description |
---|---|---|
System. |
type | The type. |
IMetadata |
metadataHandler | The metadataHandler. |
System. |
typeOverride | The type override. |
RegisterMetadataHandler(Type, IMetadataHandler, String, EditorDescriptorBehavior)
Registers a metadataHandler for a type.
Declaration
public void RegisterMetadataHandler(Type type, IMetadataHandler metadataHandler, string uiHint, EditorDescriptorBehavior editorDescriptorBehavior)
Parameters
Type | Name | Description |
---|---|---|
System. |
type | The type. |
IMetadata |
metadataHandler | The metadataHandler. |
System. |
uiHint | The type override. |
Editor |
editorDescriptorBehavior | If the base handlers should be applied before specific handlers. |
RegisterMetadataHandler(Type[], IMetadataHandler)
Registers a metadataHandler for several types.
Declaration
public void RegisterMetadataHandler(Type[] types, IMetadataHandler metadataHandler)
Parameters
Type | Name | Description |
---|---|---|
System. |
types | The types. |
IMetadata |
metadataHandler | The metadataHandler. |
RegisterModelAccessorCreator(Type, IModelAccessorCreator)
Register a model accessor for the given type.
Declaration
public void RegisterModelAccessorCreator(Type type, IModelAccessorCreator accessorCreator)
Parameters
Type | Name | Description |
---|---|---|
System. |
type | The type |
IModel |
accessorCreator | The accessor creator |