Class PropertyControlClassFactory
Repository for IProperty
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7Syntax
[ServiceConfiguration(typeof(IPropertyControlFactory), Lifecycle = ServiceInstanceScope.Singleton, IncludeServiceAccessor = false, FactoryMember = "Instance")]
public class PropertyControlClassFactory : IPropertyControlFactory
Constructors
PropertyControlClassFactory()
Initializes a new instance of the Property
Declaration
public PropertyControlClassFactory()
Properties
Instance
Gets the global instance of PropertyControlClassFactory.
Declaration
public static PropertyControlClassFactory Instance { get; }
Property Value
Type | Description |
---|---|
Property |
PropertyDataSettingsHelper
Gets or sets the template control loaderk.
Declaration
public virtual Injected<IPropertyDataSettingsHelper> PropertyDataSettingsHelper { get; set; }
Property Value
Type | Description |
---|---|
Injected<IProperty |
PropertyDefinitionRepository
Gets or sets the property definition repository.
Declaration
public Injected<IPropertyDefinitionRepository> PropertyDefinitionRepository { get; set; }
Property Value
Type | Description |
---|---|
Injected<IProperty |
The property definition repository. |
TemplateControlLoaderService
Gets or sets the template control loaderk.
Declaration
public virtual Injected<ITemplateControlLoader> TemplateControlLoaderService { get; set; }
Property Value
Type | Description |
---|---|
Injected<ITemplate |
Methods
ClearRegistrations()
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public virtual void ClearRegistrations()
CreateInstance(Type, Object[])
Declaration
[Obsolete("Method is no longer supported, use Activator.CreateInstance to create instances of types")]
public object CreateInstance(Type baseType, params object[] constructorArguments)
Parameters
Type | Name | Description |
---|---|---|
System. |
baseType | |
System. |
constructorArguments |
Returns
Type | Description |
---|---|
System. |
CreatePropertyControl(PropertyData)
Creates an IPropertyControl for a given PropertyData.
Declaration
public virtual IPropertyControl CreatePropertyControl(PropertyData propertyData)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyData | The PropertyData. |
Returns
Type | Description |
---|---|
IProperty |
A IPropertyControl that can be used to render an user interface for the PropertyData. |
CreatePropertyControl(PropertyData, HttpContextBase, TemplateControl, String)
Creates an IPropertyControl for a given PropertyData.
Declaration
public virtual IPropertyControl CreatePropertyControl(PropertyData propertyData, HttpContextBase httpContext, TemplateControl templateControl, string tag)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyData | The PropertyData. |
System. |
httpContext | The HTTP context. |
System. |
templateControl | The template control. |
System. |
tag | The tag used to resolve the template. |
Returns
Type | Description |
---|---|
IProperty |
A IPropertyControl that can be used to render an user interface for the PropertyData. |
GetControls(Type)
Declaration
public ReadOnlyCollection<Type> GetControls(Type propertyType)
Parameters
Type | Name | Description |
---|---|---|
System. |
propertyType |
Returns
Type | Description |
---|---|
System. |
IsRegistered(Type)
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Declaration
public virtual bool IsRegistered(Type baseType)
Parameters
Type | Name | Description |
---|---|---|
System. |
baseType |
Returns
Type | Description |
---|---|
System. |
IsRegistered<TPropertyData>()
Check if a Property
Declaration
public bool IsRegistered<TPropertyData>()
where TPropertyData : PropertyData
Returns
Type | Description |
---|---|
System. |
Type Parameters
Name | Description |
---|---|
TPropertyData | The PropertyData |
Register<TPropertyData>(Func<IPropertyControl>)
Registers an IProperty
Declaration
public IPropertyControlFactory Register<TPropertyData>(Func<IPropertyControl> controlFactory)
where TPropertyData : PropertyData
Parameters
Type | Name | Description |
---|---|---|
System. |
controlFactory | The control factory to register with the property data instance |
Returns
Type | Description |
---|---|
IProperty |
Type Parameters
Name | Description |
---|---|
TPropertyData | The PropertyData |
Register<TPropertyData, TPropertyControl>()
Registers an IProperty
Declaration
public IPropertyControlFactory Register<TPropertyData, TPropertyControl>()
where TPropertyData : PropertyData where TPropertyControl : IPropertyControl
Returns
Type | Description |
---|---|
IProperty |
Type Parameters
Name | Description |
---|---|
TPropertyData | The PropertyData |
TPropertyControl | The property control |
RegisterClass(Type, Type)
Registers a class mapping (this legacy method never overrides existing registrations)
Declaration
public virtual void RegisterClass(Type baseType, Type mappedType)
Parameters
Type | Name | Description |
---|---|---|
System. |
baseType | Type of the base class. |
System. |
mappedType | Type of the mapped class. |
Remarks
The first registered control always wins, use Unregister to unregister an existing registration
TypeStringFromArguments(Object[])
Declaration
[Obsolete("Method is no longer supported")]
public static string TypeStringFromArguments(params object[] constructorArguments)
Parameters
Type | Name | Description |
---|---|---|
System. |
constructorArguments |
Returns
Type | Description |
---|---|
System. |
Unregister<TPropertyData>()
Unregister a Property
Declaration
public IPropertyControlFactory Unregister<TPropertyData>()
where TPropertyData : PropertyData
Returns
Type | Description |
---|---|
IProperty |
Type Parameters
Name | Description |
---|---|
TPropertyData | The PropertyData |