-
-
Save jrob5756/ee5467c4c8b4af87eb29c5ad4b854fc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Factory<T> : IFactory<T> | |
{ | |
private readonly Func<T> _initFunc; | |
public Factory(Func<T> initFunc) | |
{ | |
_initFunc = initFunc; | |
} | |
public T Create() | |
{ | |
return _initFunc(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment