Skip to content

Commit 40c3692

Browse files
Andreas Gehrkechristianhelle
Andreas Gehrke
authored andcommitted
Fix Warning S6612 : Use the lambda parameter instead of capturing the argument 'name'
1 parent a177714 commit 40c3692

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Atc.Cosmos.EventStore/InMemory/InMemoryStore.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ public Task WriteAsync(
8484
.GetOrAdd(streamId, new ConcurrentDictionary<string, CheckpointDocument>())
8585
.AddOrUpdate(
8686
name,
87-
key => new CheckpointDocument(name, streamId, streamVersion, dateTimeProvider.GetDateTime(), state),
88-
(key, doc) => new CheckpointDocument(name, streamId, streamVersion, dateTimeProvider.GetDateTime(), state));
87+
static (key, arg) => new CheckpointDocument(key, arg.streamId, arg.streamVersion, arg.currentTime, arg.state),
88+
static (key, doc, arg) => new CheckpointDocument(key, arg.streamId, arg.streamVersion, arg.currentTime, arg),
89+
(streamId, streamVersion, state, currentTime: dateTimeProvider.GetDateTime()));
8990

9091
return Task.CompletedTask;
9192
}

0 commit comments

Comments
 (0)