File tree Expand file tree Collapse file tree 3 files changed +126
-0
lines changed
AWS.Lambda.Powertools.Kafka.Avro/build
AWS.Lambda.Powertools.Kafka.Json/build
AWS.Lambda.Powertools.Kafka.Protobuf/build Expand file tree Collapse file tree 3 files changed +126
-0
lines changed Original file line number Diff line number Diff line change 1+ <Project >
2+
3+ <!-- Automatically inject a module initializer for the Kafka.Avro library -->
4+ <Target Name =" InjectKafkaAvroAutoInitializer" BeforeTargets =" BeforeCompile" >
5+
6+ <!-- Generate the C# content directly -->
7+ <PropertyGroup >
8+ <GeneratedFileContent >// Generated by AWS Lambda Powertools Auto-Initializer
9+ using System.Runtime.CompilerServices%3B
10+
11+ internal static class PowertoolsKafkaAvroAutoInitializer
12+ {
13+ [ModuleInitializer]
14+ internal static void Initialize()
15+ {
16+ try
17+ {
18+ // Force load the Powertools assembly by calling its initialization method
19+ AWS.Lambda.Powertools.Kafka.Avro.Internal.EnvWrapper.SetExecutionEnvironment()%3B
20+ }
21+ catch
22+ {
23+ // Ignore errors - the assembly might not be available in all scenarios
24+ }
25+ }
26+ }</GeneratedFileContent >
27+ </PropertyGroup >
28+
29+ <!-- Write the generated file -->
30+ <WriteLinesToFile
31+ File =" $(IntermediateOutputPath)PowertoolsKafkaAvroAutoInitializer.g.cs"
32+ Lines =" $(GeneratedFileContent)"
33+ Overwrite =" true" />
34+
35+ <!-- Include the generated file in compilation -->
36+ <ItemGroup >
37+ <Compile Include =" $(IntermediateOutputPath)PowertoolsKafkaAvroAutoInitializer.g.cs" />
38+ </ItemGroup >
39+
40+ </Target >
41+
42+ </Project >
Original file line number Diff line number Diff line change 1+ <Project >
2+
3+ <!-- Automatically inject a module initializer for the Kafka.Json library -->
4+ <Target Name =" InjectKafkaJsonAutoInitializer" BeforeTargets =" BeforeCompile" >
5+
6+ <!-- Generate the C# content directly -->
7+ <PropertyGroup >
8+ <GeneratedFileContent >// Generated by AWS Lambda Powertools Auto-Initializer
9+ using System.Runtime.CompilerServices%3B
10+
11+ internal static class PowertoolsKafkaJsonAutoInitializer
12+ {
13+ [ModuleInitializer]
14+ internal static void Initialize()
15+ {
16+ try
17+ {
18+ // Force load the Powertools assembly by calling its initialization method
19+ AWS.Lambda.Powertools.Kafka.Json.Internal.EnvWrapper.SetExecutionEnvironment()%3B
20+ }
21+ catch
22+ {
23+ // Ignore errors - the assembly might not be available in all scenarios
24+ }
25+ }
26+ }</GeneratedFileContent >
27+ </PropertyGroup >
28+
29+ <!-- Write the generated file -->
30+ <WriteLinesToFile
31+ File =" $(IntermediateOutputPath)PowertoolsKafkaJsonAutoInitializer.g.cs"
32+ Lines =" $(GeneratedFileContent)"
33+ Overwrite =" true" />
34+
35+ <!-- Include the generated file in compilation -->
36+ <ItemGroup >
37+ <Compile Include =" $(IntermediateOutputPath)PowertoolsKafkaJsonAutoInitializer.g.cs" />
38+ </ItemGroup >
39+
40+ </Target >
41+
42+ </Project >
Original file line number Diff line number Diff line change 1+ <Project >
2+
3+ <!-- Automatically inject a module initializer for the Kafka.Protobuf library -->
4+ <Target Name =" InjectKafkaProtobufAutoInitializer" BeforeTargets =" BeforeCompile" >
5+
6+ <!-- Generate the C# content directly -->
7+ <PropertyGroup >
8+ <GeneratedFileContent >// Generated by AWS Lambda Powertools Auto-Initializer
9+ using System.Runtime.CompilerServices%3B
10+
11+ internal static class PowertoolsKafkaProtobufAutoInitializer
12+ {
13+ [ModuleInitializer]
14+ internal static void Initialize()
15+ {
16+ try
17+ {
18+ // Force load the Powertools assembly by calling its initialization method
19+ AWS.Lambda.Powertools.Kafka.Protobuf.Internal.EnvWrapper.SetExecutionEnvironment()%3B
20+ }
21+ catch
22+ {
23+ // Ignore errors - the assembly might not be available in all scenarios
24+ }
25+ }
26+ }</GeneratedFileContent >
27+ </PropertyGroup >
28+
29+ <!-- Write the generated file -->
30+ <WriteLinesToFile
31+ File =" $(IntermediateOutputPath)PowertoolsKafkaProtobufAutoInitializer.g.cs"
32+ Lines =" $(GeneratedFileContent)"
33+ Overwrite =" true" />
34+
35+ <!-- Include the generated file in compilation -->
36+ <ItemGroup >
37+ <Compile Include =" $(IntermediateOutputPath)PowertoolsKafkaProtobufAutoInitializer.g.cs" />
38+ </ItemGroup >
39+
40+ </Target >
41+
42+ </Project >
You can’t perform that action at this time.
0 commit comments