- add typedFactory

pull/32/head
Simon Gockner 7 years ago
parent cf5980863a
commit b568366c5a
  1. 20
      LightweightIocContainer/Factories/TypedFactory.cs
  2. 18
      LightweightIocContainer/Interfaces/Factories/ITypedFactory.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
{
/// <summary>
/// Class to help implement an abstract typed factory
/// </summary>
/// <typeparam name="TFactory">The type of the abstract factory</typeparam>
public class TypedFactory<TFactory> : ITypedFactory<TFactory>
{
/// <summary>
/// The implemented abstract typed factory/>
/// </summary>
public TFactory Factory { get; set; }
}
}

@ -0,0 +1,18 @@
// Author: simon.gockner
// Created: 2019-05-20
// Copyright(c) 2019 SimonG. All Rights Reserved.
namespace LightweightIocContainer.Interfaces.Factories
{
/// <summary>
/// Class to help implement an abstract typed factory
/// </summary>
/// <typeparam name="TFactory">The type of the abstract factory</typeparam>
public interface ITypedFactory<TFactory>
{
/// <summary>
/// The implemented abstract typed factory/>
/// </summary>
TFactory Factory { get; set; }
}
}
Loading…
Cancel
Save