From b568366c5acab52a7d015ce4b099936643658052 Mon Sep 17 00:00:00 2001 From: Simon Gockner Date: Tue, 4 Jun 2019 22:31:16 +0200 Subject: [PATCH] - add typedFactory --- .../Factories/TypedFactory.cs | 20 +++++++++++++++++++ .../Interfaces/Factories/ITypedFactory.cs | 18 +++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 LightweightIocContainer/Factories/TypedFactory.cs create mode 100644 LightweightIocContainer/Interfaces/Factories/ITypedFactory.cs diff --git a/LightweightIocContainer/Factories/TypedFactory.cs b/LightweightIocContainer/Factories/TypedFactory.cs new file mode 100644 index 0000000..c452c33 --- /dev/null +++ b/LightweightIocContainer/Factories/TypedFactory.cs @@ -0,0 +1,20 @@ +// Author: simon.gockner +// Created: 2019-05-20 +// Copyright(c) 2019 SimonG. All Rights Reserved. + +using LightweightIocContainer.Interfaces.Factories; + +namespace LightweightIocContainer.Factories +{ + /// + /// Class to help implement an abstract typed factory + /// + /// The type of the abstract factory + public class TypedFactory : ITypedFactory + { + /// + /// The implemented abstract typed factory/> + /// + public TFactory Factory { get; set; } + } +} \ No newline at end of file diff --git a/LightweightIocContainer/Interfaces/Factories/ITypedFactory.cs b/LightweightIocContainer/Interfaces/Factories/ITypedFactory.cs new file mode 100644 index 0000000..b4b127c --- /dev/null +++ b/LightweightIocContainer/Interfaces/Factories/ITypedFactory.cs @@ -0,0 +1,18 @@ +// Author: simon.gockner +// Created: 2019-05-20 +// Copyright(c) 2019 SimonG. All Rights Reserved. + +namespace LightweightIocContainer.Interfaces.Factories +{ + /// + /// Class to help implement an abstract typed factory + /// + /// The type of the abstract factory + public interface ITypedFactory + { + /// + /// The implemented abstract typed factory/> + /// + TFactory Factory { get; set; } + } +} \ No newline at end of file