Skip to content

Instantly share code, notes, and snippets.

@jrob5756
Created September 29, 2018 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jrob5756/ee5467c4c8b4af87eb29c5ad4b854fc5 to your computer and use it in GitHub Desktop.
Save jrob5756/ee5467c4c8b4af87eb29c5ad4b854fc5 to your computer and use it in GitHub Desktop.
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