public async Task <CustomerPocoOut> AsyncPocosContextDefaultSerializer(CustomerPocoIn data, ILambdaContext context) { Console.WriteLine($"Context.RemainingTime: '{context.RemainingTime}'"); Console.WriteLine($"Sleeping for {delayTime}..."); await Task.Delay(delayTime); Console.WriteLine($"Context.RemainingTime: '{context.RemainingTime}'"); return(new CustomerPocoOut($"Hi '{data.Data}'!")); }
public T Deserialize <T>(Stream requestStream) { var type = typeof(T); if (type == typeof(CustomerPoco)) { object poco = new CustomerPoco(Common.GetString(requestStream)); return((T)poco); } if (type == typeof(CustomerPocoIn)) { object poco = new CustomerPocoIn(Common.GetString(requestStream)); return((T)poco); } if (type == typeof(CustomerPocoOut)) { object poco = new CustomerPocoOut(Common.GetString(requestStream)); return((T)poco); } throw new InvalidCastException(); }
public CustomerPocoOut ErrorSerializerMethod(CustomerPocoIn input) { return(new CustomerPocoOut(input.Data)); }
public static CustomerPocoOut PocoInPocoOutStatic(CustomerPocoIn data) { Common.LogCommonData("PocoInPocoOutStatic", data.Data); return(new CustomerPocoOut("(([PocoInPocoOutStatic]))")); }