@@ -42,58 +42,58 @@ static Function()
42
42
Services . Init ( ) ;
43
43
}
44
44
45
- [ BatchProcessor ( RecordHandler = typeof ( CustomDynamoDbStreamRecordHandler ) ) ]
46
45
[ Logging ( LogEvent = true ) ]
46
+ [ BatchProcessor ( RecordHandler = typeof ( CustomDynamoDbStreamRecordHandler ) ) ]
47
47
public BatchItemFailuresResponse DynamoDbStreamHandlerUsingAttribute ( DynamoDBEvent _ )
48
48
{
49
49
return DynamoDbStreamBatchProcessor . Result . BatchItemFailuresResponse ;
50
50
}
51
-
52
- [ BatchProcessor ( RecordHandler = typeof ( CustomKinesisEventRecordHandler ) ) ]
51
+
53
52
[ Logging ( LogEvent = true ) ]
53
+ [ BatchProcessor ( RecordHandler = typeof ( CustomKinesisEventRecordHandler ) ) ]
54
54
public BatchItemFailuresResponse KinesisEventHandlerUsingAttribute ( KinesisEvent _ )
55
55
{
56
56
return KinesisEventBatchProcessor . Result . BatchItemFailuresResponse ;
57
57
}
58
58
59
- [ BatchProcessor ( RecordHandler = typeof ( CustomSqsRecordHandler ) ) ]
60
59
[ Logging ( LogEvent = true ) ]
60
+ [ BatchProcessor ( RecordHandler = typeof ( CustomSqsRecordHandler ) ) ]
61
61
public BatchItemFailuresResponse SqsHandlerUsingAttribute ( SQSEvent _ )
62
62
{
63
63
return SqsBatchProcessor . Result . BatchItemFailuresResponse ;
64
64
}
65
-
66
- [ BatchProcessor ( RecordHandler = typeof ( CustomSqsRecordHandler ) , ErrorHandlingPolicy = BatchProcessorErrorHandlingPolicy . StopOnFirstBatchItemFailure ) ]
65
+
67
66
[ Logging ( LogEvent = true ) ]
67
+ [ BatchProcessor ( RecordHandler = typeof ( CustomSqsRecordHandler ) , ErrorHandlingPolicy = BatchProcessorErrorHandlingPolicy . StopOnFirstBatchItemFailure ) ]
68
68
public BatchItemFailuresResponse SqsHandlerUsingAttributeWithErrorPolicy ( SQSEvent _ )
69
69
{
70
70
return SqsBatchProcessor . Result . BatchItemFailuresResponse ;
71
71
}
72
72
73
73
#region More example handlers...
74
-
75
- [ BatchProcessor ( RecordHandlerProvider = typeof ( CustomSqsRecordHandlerProvider ) , BatchProcessor = typeof ( CustomSqsBatchProcessor ) ) ]
74
+
76
75
[ Logging ( LogEvent = true ) ]
76
+ [ BatchProcessor ( RecordHandlerProvider = typeof ( CustomSqsRecordHandlerProvider ) , BatchProcessor = typeof ( CustomSqsBatchProcessor ) ) ]
77
77
public BatchItemFailuresResponse HandlerUsingAttributeAndCustomRecordHandlerProvider ( SQSEvent _ )
78
78
{
79
79
return SqsBatchProcessor . Result . BatchItemFailuresResponse ;
80
- }
81
-
82
- [ BatchProcessor ( RecordHandler = typeof ( CustomSqsRecordHandler ) , BatchProcessor = typeof ( CustomSqsBatchProcessor ) ) ]
80
+ }
81
+
83
82
[ Logging ( LogEvent = true ) ]
83
+ [ BatchProcessor ( RecordHandler = typeof ( CustomSqsRecordHandler ) , BatchProcessor = typeof ( CustomSqsBatchProcessor ) ) ]
84
84
public BatchItemFailuresResponse HandlerUsingAttributeAndCustomBatchProcessor ( SQSEvent _ )
85
85
{
86
86
return SqsBatchProcessor . Result . BatchItemFailuresResponse ;
87
87
}
88
-
89
- [ BatchProcessor ( RecordHandler = typeof ( CustomSqsRecordHandler ) , BatchProcessorProvider = typeof ( CustomSqsBatchProcessorProvider ) ) ]
88
+
90
89
[ Logging ( LogEvent = true ) ]
90
+ [ BatchProcessor ( RecordHandler = typeof ( CustomSqsRecordHandler ) , BatchProcessorProvider = typeof ( CustomSqsBatchProcessorProvider ) ) ]
91
91
public BatchItemFailuresResponse HandlerUsingAttributeAndCustomBatchProcessorProvider ( SQSEvent _ )
92
92
{
93
93
var batchProcessor = Services . Provider . GetRequiredService < ISqsBatchProcessor > ( ) ;
94
94
return batchProcessor . ProcessingResult . BatchItemFailuresResponse ;
95
95
}
96
-
96
+
97
97
[ Logging ( LogEvent = true ) ]
98
98
public async Task < BatchItemFailuresResponse > HandlerUsingUtility ( SQSEvent sqsEvent )
99
99
{
@@ -103,7 +103,7 @@ public async Task<BatchItemFailuresResponse> HandlerUsingUtility(SQSEvent sqsEve
103
103
} ) ) ;
104
104
return result . BatchItemFailuresResponse ;
105
105
}
106
-
106
+
107
107
[ Logging ( LogEvent = true ) ]
108
108
public async Task < BatchItemFailuresResponse > HandlerUsingUtilityFromIoc ( SQSEvent sqsEvent )
109
109
{
@@ -112,6 +112,6 @@ public async Task<BatchItemFailuresResponse> HandlerUsingUtilityFromIoc(SQSEvent
112
112
var result = await batchProcessor . ProcessAsync ( sqsEvent , recordHandler ) ;
113
113
return result . BatchItemFailuresResponse ;
114
114
}
115
-
115
+
116
116
#endregion
117
117
}
0 commit comments