From 6aeababb306a3e90799fd7529e28c69871e2e70d Mon Sep 17 00:00:00 2001 From: Simon Gockner Date: Wed, 17 Jul 2019 16:49:38 +0200 Subject: [PATCH] - add iMultitonRegistration and links from RegistrationFactory --- IRegistrationBase.md | 10 +++++++++- RegistrationFactory.md | 8 ++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/IRegistrationBase.md b/IRegistrationBase.md index 775af59..7bbc055 100644 --- a/IRegistrationBase.md +++ b/IRegistrationBase.md @@ -22,7 +22,7 @@ Type InterfaceType { get; } This is the default registration that is used to register a `Type` for the interface it implements. `TInterface` is the `Type` of the interface. -In addition to the implemented properties from the `IRegistrationBase` the `IDefaultRegistration` adds the following properties and methods: +In addition to the implemented properties from the [`IRegistrationBase`](IRegistrationBase) the `IDefaultRegistration` adds the following properties and methods: - The Type that implements the `IRegistrationBase.InterfaceType` that gets registered @@ -50,4 +50,12 @@ In addition to the implemented properties from the `IRegistrationBase` the `IDef ## `IMultitonRegistration` +The `IMultitonRegistration` is derived from the [`IDefaultRegistration`](IRegistrationBase#IDefaultRegistrationTInterface) and is used to register a `Type` that is of the [`Lifestyle.Multiton`](Lifestyles#lifestylemultiton). + +It adds only one property to the already overridden ones, the `Type` of the multiton scope: + +```c# +Type Scope { get; } +``` + ## `ITypedFactoryRegistration` diff --git a/RegistrationFactory.md b/RegistrationFactory.md index 27ee041..198ed1f 100644 --- a/RegistrationFactory.md +++ b/RegistrationFactory.md @@ -6,7 +6,7 @@ The way classes are registered depends on their [`Lifestyle`](Lifestyles). ### Register `Transient` classes -To register `Transient` classes, an `IDefaultRegistration` has to be created. The preferred way to do so is to use the generic method `Register()`: +To register `Transient` classes, an [`IDefaultRegistration`](IRegistrationBase#IDefaultRegistrationTInterface) has to be created. The preferred way to do so is to use the generic method `Register()`: ```c# RegistrationFactory.Register(); @@ -20,7 +20,7 @@ RegistrationFactory.Register(typeof(IFoo), typeof(Foo)); ### Register `Singleton` classes -To register `Singleton` classes, there has to be a `IDefaultRegistration` created as well. Similar to the registration of `Transient` classes, the preferred way to register `Singleton` classes is to use the generic method `Register()`: +To register `Singleton` classes, there has to be a [`IDefaultRegistration`](IRegistrationBase#IDefaultRegistrationTInterface) created as well. Similar to the registration of `Transient` classes, the preferred way to register `Singleton` classes is to use the generic method `Register()`: ```c# RegistrationFactory.Register(Lifestyle.Singleton); @@ -34,7 +34,7 @@ RegistrationFactory.Register(typeof(IFoo), typeof(Foo), Lifestyle.Singleton); ### Register `Multiton` classes -To register `Multiton` classes, an `IMultitonRegistration` has to be created. The preferred way to do so is to use the generic method `Register()`: +To register `Multiton` classes, an [`IMultitonRegistration`](IRegistrationBase#IMultitonRegistrationTInterface) has to be created. The preferred way to do so is to use the generic method `Register()`: ```c# RegistrationFactory.Register(); @@ -48,7 +48,7 @@ RegistrationFactory.Register(typeof(IFoo), typeof(Foo), typeof(TScope)); ## Registering factories -To register [abstract factories](Abstract-factories), an `ITypedFactoryRegistration` has to be created. The preferred way to do so is to use the generic method `RegisterFactory()`: +To register [abstract factories](Abstract-factories), an [`ITypedFactoryRegistration`](IRegistrationBase#ITypedFactoryRegistrationTFactory) has to be created. The preferred way to do so is to use the generic method `RegisterFactory()`: ```c# RegistrationFactory.RegisterFactory(container);