injected ~master (2016-08-11T06:02:17Z)
Dub
Repo
Container.factory
injected
container
Container
Register a factory function for a type.
void
factory
(Flag!"asSingleton" asSingleton)
void
factory
(string name, Flag!"asSingleton" asSingleton)
void
factory
(F func, Flag!"asSingleton" asSingleton)
void
factory
(string name, F func, Flag!"asSingleton" asSingleton)
interface
Container
final
void
factory
(
T
F
)
(
string
name
,
F
func
,
Flag
!"asSingleton"
asSingleton
=
Yes.asSingleton
)
if
(
(
is
(
F
==
delegate
) ||
is
(
F
==
function
)
)
&&
is
(
ReturnType
!
F
:
T
)
)
void
addProvider
(TypeInfo type, Provider provider)
void
addProvider
(TypeInfo type, string name, Provider provider)
Meta
Source
See Implementation
injected
container
Container
functions
addProvider
factory
provider
register
value
Register a factory function for a type.