Class ALambdaFunction<TRequest, TResponse>
The ALambdaFunction<TRequest, TResponse> builds on the ALambda
Implements
Inherited Members
Namespace: LambdaSharp
Assembly: LambdaSharp.dll
Syntax
public abstract class ALambdaFunction<TRequest, TResponse> : ALambdaFunction, ILambdaSharpLogger
Type Parameters
Name | Description |
---|---|
TRequest | The request payload type. |
TResponse | The response payload type. |
Constructors
ALambdaFunction(ILambdaJsonSerializer)
Initializes a new ALambdaFunction<TRequest, TResponse> instance using the default
implementation of ILambda
Declaration
protected ALambdaFunction(ILambdaJsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
ILambda |
serializer | Custom implementation of ILambda |
ALambdaFunction(ILambdaJsonSerializer, ILambdaFunctionDependencyProvider)
Initializes a new ALambdaFunction<TRequest, TResponse> instance using a
custom implementation of ILambda
Declaration
protected ALambdaFunction(ILambdaJsonSerializer serializer, ILambdaFunctionDependencyProvider provider)
Parameters
Type | Name | Description |
---|---|---|
ILambda |
serializer | Custom implementation of ILambda |
ILambda |
provider | Custom implementation of ILambda |
Properties
LambdaSerializer
An instance of ILambda
Declaration
protected ILambdaJsonSerializer LambdaSerializer { get; }
Property Value
Type | Description |
---|---|
ILambda |
The ILambda |
Provider
The ILambda
Declaration
protected ILambdaFunctionDependencyProvider Provider { get; }
Property Value
Type | Description |
---|---|
ILambda |
The ILambda |
Methods
ProcessMessageAsync(TRequest)
The Process
Declaration
public abstract Task<TResponse> ProcessMessageAsync(TRequest message)
Parameters
Type | Name | Description |
---|---|---|
TRequest | message | The deserialized request. |
Returns
Type | Description |
---|---|
System. |
The task object representing the asynchronous operation. |
ProcessMessageStreamAsync(Stream)
The ProcessTRequest
instance and invokes the Process
Declaration
public sealed override async Task<Stream> ProcessMessageStreamAsync(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System. |
stream | The stream with the request payload. |
Returns
Type | Description |
---|---|
System. |
The task object representing the asynchronous operation. |
Overrides
Remarks
This method is sealed
and cannot be overridden.