Skip to content

Commit 3f4849d

Browse files
committed
Adding assertion and deconstruction.
1 parent 305d676 commit 3f4849d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Middleware/OutputCaching/src/Memory/MemoryOutputCacheStore.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,12 @@ void RemoveFromTags(object key, object? value, EvictionReason reason, object? st
136136
{
137137
Debug.Assert(state != null);
138138

139-
var stateTuple = ((string[] tags, Guid entryId))state;
140-
var tags = stateTuple.tags;
141-
var entryId = stateTuple.entryId;
139+
var (tags, entryId) = ((string[] tags, Guid entryId))state;
142140

143141
Debug.Assert(tags != null);
144142
Debug.Assert(tags.Length > 0);
145143
Debug.Assert(key is string);
144+
Debug.Assert(entryId != Guid.Empty);
146145

147146
lock (_tagsLock)
148147
{

0 commit comments

Comments
 (0)