Click or drag to resize

SingletonTInterfaceAs Method

Maps the interface to a concrete singleton type

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

Parameters

creator
Type: System.Linq.ExpressionsExpressionFuncTInterface
The func that creates the concrete type
rewritable (Optional)
Type: SystemBoolean
Pass in true to be able to change the mapping later
enabled (Optional)
Type: SystemBoolean
If false the mapping is disabled and the instance will not be created
properties (Optional)
Type: System.Collections.GenericIDictionaryString, Object
Lets you set custom properties as metadata for a mapping signature

Return Value

Type: Boolean
See Also