diff --git a/Libraries/src/Amazon.Lambda.CloudWatchEvents/Amazon.Lambda.CloudWatchEvents.csproj b/Libraries/src/Amazon.Lambda.CloudWatchEvents/Amazon.Lambda.CloudWatchEvents.csproj index 3130bd9eb..08fa14f57 100644 --- a/Libraries/src/Amazon.Lambda.CloudWatchEvents/Amazon.Lambda.CloudWatchEvents.csproj +++ b/Libraries/src/Amazon.Lambda.CloudWatchEvents/Amazon.Lambda.CloudWatchEvents.csproj @@ -6,7 +6,7 @@ netstandard2.0;netcoreapp3.1;net8.0 Amazon Lambda .NET Core support - CloudWatchEvents package. Amazon.Lambda.CloudWatchEvents - 4.4.0 + 4.4.1 Amazon.Lambda.CloudWatchEvents Amazon.Lambda.CloudWatchEvents AWS;Amazon;Lambda diff --git a/Libraries/src/Amazon.Lambda.Serialization.Json/AwsResolver.cs b/Libraries/src/Amazon.Lambda.Serialization.Json/AwsResolver.cs index 5b528cbf6..056b954db 100644 --- a/Libraries/src/Amazon.Lambda.Serialization.Json/AwsResolver.cs +++ b/Libraries/src/Amazon.Lambda.Serialization.Json/AwsResolver.cs @@ -130,8 +130,9 @@ protected override IList CreateProperties(Type type, MemberSeriali } } } + // If user is directly using CloudWatchEvent class or using a derived type created in custom namespace. else if (type.FullName.StartsWith("Amazon.Lambda.CloudWatchEvents.") - && (type.GetTypeInfo().BaseType?.FullName?.StartsWith("Amazon.Lambda.CloudWatchEvents.CloudWatchEvent`", + || (type.GetTypeInfo().BaseType?.FullName?.StartsWith("Amazon.Lambda.CloudWatchEvents.CloudWatchEvent`", StringComparison.Ordinal) ?? false)) { foreach (JsonProperty property in properties)