Click or drag to resize

ManyTInterfaceAdd Method

Add a new transient mapping

Namespace:  Crosser.Resolve
Assembly:  Crosser.Resolver (in Crosser.Resolver.dll) Version: 0.0.9.1
Syntax
C#
public static bool Add(
	Expression<Func<TInterface>> creator,
	bool rewritable = false,
	bool enabled = true,
	string namedInstance = null,
	IDictionary<string, Object> properties = null
)

Parameters

creator
Type: System.Linq.ExpressionsExpressionFuncTInterface
The Func that creates your instance in the mapping
rewritable (Optional)
Type: SystemBoolean
If true the mapping will be overwritten if a new mapping with the same signature is added. If false there can be multiple mappings with the same signature
enabled (Optional)
Type: SystemBoolean
If false the mapping is disabled and the instance will not be created
namedInstance (Optional)
Type: SystemString
Will allow to get a transient instance by a custom name
properties (Optional)
Type: System.Collections.GenericIDictionaryString, Object
Lets you set custom properties as metadata for a mapping signature

Return Value

Type: Boolean
See Also