File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
tests/Microsoft.Identity.Web.Test Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,12 @@ private byte[] GetFirstCacheValue(MemoryCache memoryCache)
7979 . GetType ( )
8080 . GetField ( "_coherentState" , System . Reflection . BindingFlags . Instance | System . Reflection . BindingFlags . NonPublic ) !
8181 . GetValue ( memoryCache ) ! ;
82- memoryCacheContent = ( content1 ?
83- . GetType ( )
84- . GetProperty ( "EntriesCollection" , System . Reflection . BindingFlags . Instance | System . Reflection . BindingFlags . NonPublic )
82+ Type ? content1Type = content1 ? . GetType ( ) ;
83+ // The internals of CoherentState seem to change between .NET 9 RCs
84+ memoryCacheContent = ( (
85+ content1Type ? . GetProperty ( "_entries" , System . Reflection . BindingFlags . Instance | System . Reflection . BindingFlags . NonPublic ) ??
86+ content1Type ? . GetProperty ( "_stringEntries" , System . Reflection . BindingFlags . Instance | System . Reflection . BindingFlags . NonPublic )
87+ )
8588 . GetValue ( content1 ) as IDictionary ) ! ;
8689#else
8790 memoryCacheContent = ( memoryCache
You can’t perform that action at this time.
0 commit comments