static void Main(string[] args)
 {
     using (var host = new LambdaHost(new Function(), new Dictionary <string, string>()))
     {
         host.Wait();
     }
 }
Ejemplo n.º 2
0
        public string Handler(string input)
        {
            var host     = new LambdaHost(null);
            var services = host.HostBuilder.Build().Services;
            var app      = services.GetService <LambdaApplication>();

            return(app.DoTheJob(input));
        }
        public void ShouldUpperCaseOurInput()
        {
            var host     = new LambdaHost(null);
            var services = host.HostBuilder.Build().Services;
            var app      = services.GetService <LambdaApplication>();

            var input = "hello testing";

            app.DoTheJob(input).ShouldBe(input.ToUpper());
        }
Ejemplo n.º 4
0
 public void Setup()
 {
     _LambdaHost = new LambdaHost();;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// The main entry point for the custom runtime.
 /// </summary>
 /// <param name="args"></param>
 public static async Task Main(string[] args)
 {
     await LambdaHost <string, string>
     .UseHandler <Handler>()
     .RunAsync();
 }