From 8a6a14669d551a78e309656f70ebc3a2a1aa8493 Mon Sep 17 00:00:00 2001 From: Simon Gockner Date: Fri, 5 Jul 2019 14:23:48 +0200 Subject: [PATCH] use Foo as name of class --- Simple-Usage-of-Lightweight-IOC-Container.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Simple-Usage-of-Lightweight-IOC-Container.md b/Simple-Usage-of-Lightweight-IOC-Container.md index 508fe15..dd7a41d 100644 --- a/Simple-Usage-of-Lightweight-IOC-Container.md +++ b/Simple-Usage-of-Lightweight-IOC-Container.md @@ -15,13 +15,13 @@ There are multiple ways to accomplish this and the best solution depends on the In this simple usage guide we will only take a look at the most straightforward way that is to just register the interfaces and their classes with the `IocContainer`: ```c# -container.Register(new DefaultRegistration(typeof(IInterface), typeof(Implementation), Lifestyle.Transient)); +container.Register(new DefaultRegistration(typeof(IFoo), typeof(Foo), Lifestyle.Transient)); ``` To make this even easier there is a [`RegistrationFactory`](RegistrationFactory) that helps you create the `IRegistrationBase` you need: ```c# -container.Register(RegistrationFactory.Register()); +container.Register(RegistrationFactory.Register()); ``` There are multiple [[lifestyles|Lifestyles]] available, make sure you choose the correct one for your need. @@ -31,7 +31,7 @@ There are multiple [[lifestyles|Lifestyles]] available, make sure you choose the To resolve an instance with the `IocContainer`, do the following: ```c# -IInterface interface = container.Resolve(); +IFoo interface = container.Resolve(); ``` ## Disposing Container