Skip to content

Commit fcb3a21

Browse files
committed
Report correct stats
1 parent 2576eed commit fcb3a21

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/DynamoDBGenerator.SourceGenerator/DynamoDBDMarshaller.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static IEnumerable<DynamoDBMarshallerArguments> Arguments(
109109
return new DynamoDBMarshallerArguments(
110110
entityTypeSymbol,
111111
x.NamedArguments
112-
.Where(x => x.Key is ArgumentType)
112+
.Where(y => y.Key is ArgumentType)
113113
.Cast<KeyValuePair<string, TypedConstant>?>()
114114
.FirstOrDefault() is { } argumentType
115115
? argumentType.Value is { Value: INamedTypeSymbol namedTypeSymbol }

src/DynamoDBGenerator.SourceGenerator/MarshallerFactory.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ MarshallerOptions options
8585
using {Constants.DynamoDBGenerator.Namespace.ExceptionsFullName};
8686
using {Constants.DynamoDBGenerator.Namespace.InternalFullName};";
8787

88-
return originatingType
88+
var marshaller = originatingType
8989
.NamespaceDeclaration(
9090
originatingType
9191
.TypeDeclaration()
@@ -99,9 +99,12 @@ MarshallerOptions options
9999
.Concat(Marshaller.CreateClass(arguments, dynamoDbProperties, options))
100100
.Concat(UnMarshaller.CreateClass(arguments, dynamoDbProperties, options))
101101
)
102-
.Prepend(res)
103-
.Prepend(
104-
$"// <auto-generated | Duration {TimeSpan.FromTicks(Stopwatch.GetTimestamp() - timestamp)} | TimeStamp: {DateTime.Now:yyyy-MM-dd HH:mm:ss}>"
105-
);
102+
.Prepend(res);
103+
104+
105+
foreach (var x in marshaller)
106+
yield return x;
107+
yield return
108+
$"// <auto-generated | Duration {TimeSpan.FromTicks(Stopwatch.GetTimestamp() - timestamp)} | TimeStamp: {DateTime.Now:yyyy-MM-dd HH:mm:ss}>";
106109
}
107110
}

0 commit comments

Comments
 (0)