Clarify tutorial text a bit

This commit is contained in:
Mike Bierlee 2016-02-15 20:56:02 +01:00
parent e22801017f
commit fcf021cf74

View file

@ -131,12 +131,12 @@ dependencies.register!(Color, Blue);
dependencies.register!(Color, Red);
auto mixer = dependencies.resolve!ColorMixer;
```
Member `mixer.colors` will now contain instances of `Blue` and `Red`. The order of the instances is not guarenteed to be that of the order in which they were registered.
Member `mixer.colors` will now contain instances of `Blue` and `Red`. The order in which instances are resolved is not guarenteed to be that of the order in which they were registered.
Application Contexts
--------------------
You can fine-tune dependency configuration using application contexts. Application contexts allow you to centralize all dependency configuration as well as define
how instances of certain classes should be constructed using factory methods.
You can fine-tune dependency configuration using application contexts. Application contexts allow you to centralize all dependency configuration as well as define how instances of certain classes should be constructed using factory methods.
###Defining and using application contexts
An application context is defined as follows:
```d
@ -209,4 +209,4 @@ If you want registration options to be persistent (applicable for every call to
```d
dependencies.setPersistentRegistrationOptions(RegistrationOption.doNotAddConcreteTypeRegistration); // Sets the option
dependencies.unsetPersistentRegistrationOptions(); // Clears the persistentent options
```
```