Пример #1
0
        public async Task <LambdaProxyResponse> FunctionHandler(ApiGatewayProxyRequest request, ILambdaContext context)
        {
            _context = context;

            LambdaProxyResponse response;

            try {
                context.Logger.LogLine(SerializerUtil.Serialize(request));
                response = await ExecutionFunction((ApiGatewayProxyRequest)request);

                _context?.Logger.LogLine(UtilityLibrary.Serialize(response));
            } catch (Exception e) {
                _context?.Logger.LogLine(UtilityLibrary.Serialize(e));
                return(new LambdaProxyResponse {
                    statusCode = HttpStatusCode.InternalServerError,
                    body = "Server Error",
                });
            }
            return(response);
        }
 public override string ToString()
 {
     return(SerializerUtil.Serialize(this));
 }