From ba90c57dd45b9f8418e5d9bb16faef24fa2a4ba7 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Sat, 3 Sep 2016 17:02:19 +0200 Subject: [PATCH] Add persistent resolve options to tutorial --- TUTORIAL.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/TUTORIAL.md b/TUTORIAL.md index c2d5fe4..7eba16b 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -244,10 +244,16 @@ class Context : ApplicationContext { } ``` -Persistent Registration Options +Persistent Registration and Resolve Options ------------------------------- If you want registration options to be persistent (applicable for every call to `register()`), you can use the container method `setPersistentRegistrationOptions()`: ```d -dependencies.setPersistentRegistrationOptions(RegistrationOption.doNotAddConcreteTypeRegistration); // Sets the option +dependencies.setPersistentRegistrationOptions(RegistrationOption.doNotAddConcreteTypeRegistration); // Sets the options dependencies.unsetPersistentRegistrationOptions(); // Clears the persistentent options ``` +Likewise, the same is possible for resolve options: +```d +dependencies.setPersistentResolveOptions(ResolveOption.registerBeforeResolving); // Sets the options +dependencies.unsetPersistentResolveOptions(); // Clears the persistentent options +``` +Please note that setting options will unset previously set options; the options specified will be the only ones in effect. \ No newline at end of file