namespace Amazon.Lambda.Core { using System.IO; /// /// Interface that must be implemented by custom serializers that /// may need to be called during execution. /// public interface ILambdaSerializer { /// /// This method is called to deserialize the request payload from Invoke API /// into the object that is passed to the Lambda function handler. /// /// Type of object to deserialize to. /// Stream to serialize. /// Deserialized object from stream. T Deserialize(Stream requestStream); /// /// This method is called to serialize the result returned from /// a Lambda function handler into the response payload /// that is returned by the Invoke API. /// /// Type of object to serialize. /// Object to serialize. /// Output stream. void Serialize(T response, Stream responseStream); } }