Interface IConstructorParameterResolver
Signature for component that resolves dependencies to use in construction of types.
Namespace: EPiServer.Construction
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public interface IConstructorParameterResolver
Remarks
This is used when resolving dependencies during creation of IContent implementations (like PageData, BlockData) and PropertyData implementations.
Methods
TryResolveArguments(Type, Type[], out Object[])
Called when an instance of typeToConstruct
is to be created using a constructor
with dependencies according to constructorArguments
.
Declaration
bool TryResolveArguments(Type typeToConstruct, Type[] constructorArguments, out object[] instances)
Parameters
Type | Name | Description |
---|---|---|
System.Type | typeToConstruct | The type to construct. |
System.Type[] | constructorArguments | The constructor arguments. |
System.Object[] | instances | The instances. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
The implementation is expected to return true if the dependencies could be resolved else false should be returned.
The returned dependencies instances
must match constructorArguments
both
in type and number.