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

Class MetadataHandlerRegistry

Registry that holds all metadataHandlers for entity types.

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

Constructors

MetadataHandlerRegistry(EditorDescriptor[], IModelAccessorCreator[])

Initializes a new instance of the MetadataHandlerRegistry class.

Declaration
public MetadataHandlerRegistry(EditorDescriptor[] descriptors, IModelAccessorCreator[] modelAccessorCreators)
Parameters
Type Name Description
EditorDescriptor[] descriptors

An array of EditorDescriptor objects to register target types for

IModelAccessorCreator[] modelAccessorCreators

An array of IModelAccessorCreator objects to register target type for

Methods

GetMetadataHandlers(Type)

Gets the metadata handlers.

Declaration
public IEnumerable<IMetadataHandler> GetMetadataHandlers(Type type)
Parameters
Type Name Description
System.Type type

The type.

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

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 type

The type.

System.String uiHint

The type override.

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

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 type

The type

System.Collections.Generic.Dictionary<System.String, System.String> arguments

Arguments to be sent to the model accessor creator

Returns
Type Description
System.Func<System.Object>

RegisterMetadataHandler(Type, IMetadataHandler)

Registers the metadata handler.

Declaration
public void RegisterMetadataHandler(Type type, IMetadataHandler metadataHandler)
Parameters
Type Name Description
System.Type type

The type.

IMetadataHandler 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 type

The type.

IMetadataHandler metadataHandler

The metadataHandler.

System.String 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 type

The type.

IMetadataHandler metadataHandler

The metadataHandler.

System.String uiHint

The type override.

EditorDescriptorBehavior 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.Type[] types

The types.

IMetadataHandler 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 type

The type

IModelAccessorCreator accessorCreator

The accessor creator

Extension Methods