Add project files.
This commit is contained in:
18
WinGreedWPF/StartupHelpers/AbstractFactory.cs
Normal file
18
WinGreedWPF/StartupHelpers/AbstractFactory.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace WinGreedWPF.StartupHelpers;
|
||||
|
||||
public class AbstractFactory<T> : IAbstractFactory<T>
|
||||
{
|
||||
private readonly Func<T> _factory;
|
||||
|
||||
public AbstractFactory(Func<T> factory)
|
||||
{
|
||||
_factory = factory;
|
||||
}
|
||||
|
||||
public T Create()
|
||||
{
|
||||
return _factory();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user