Skip to content

Instantly share code, notes, and snippets.


justinyoo/FunctionFactory.cs Secret

Created Jul 19, 2017
What would you like to do?
Testing Serverless Applications - Part 1
public class FunctionFactory
public FunctionFactory()
: this(null)
public FunctionFactory(RegistrationHandler handler = null)
this.ServiceLocator = new ServiceLocatorBuilder().RegisterModule<AppModule>(handler).Build();
public virtual IServiceLocator ServiceLocator { get; set; }
public virtual TFunction Create<TFunction>(ILogger log)
where TFunction : IFunction
var function = this.ServiceLocator.GetInstance<TFunction>();
function.Log = log;
function.ServiceLocator = this.ServiceLocator;
return function;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.