@@ -67,7 +67,7 @@ public bool IsRegistered<TMessage, TToken>(object recipient, TToken token)
6767 return
6868 this . recipientsMap . TryGetValue ( type2 , out RecipientsTable ? table ) &&
6969 table ! . TryGetValue ( recipient , out IDictionarySlim ? mapping ) &&
70- Unsafe . As < DictionarySlim < TToken , object > > ( mapping ) . ContainsKey ( token ) ;
70+ Unsafe . As < DictionarySlim < TToken , object > > ( mapping ) ! . ContainsKey ( token ) ;
7171 }
7272 }
7373
@@ -133,9 +133,9 @@ public void UnregisterAll<TToken>(object recipient, TToken token)
133133 while ( enumerator . MoveNext ( ) )
134134 {
135135 if ( enumerator . Key . TToken == typeof ( TToken ) &&
136- enumerator . Value . TryGetValue ( recipient , out IDictionarySlim mapping ) )
136+ enumerator . Value . TryGetValue ( recipient , out IDictionarySlim ? mapping ) )
137137 {
138- Unsafe . As < DictionarySlim < TToken , object > > ( mapping ) . TryRemove ( token , out _ ) ;
138+ Unsafe . As < DictionarySlim < TToken , object > > ( mapping ) ! . TryRemove ( token , out _ ) ;
139139 }
140140 }
141141 }
@@ -156,9 +156,9 @@ public void Unregister<TMessage, TToken>(object recipient, TToken token)
156156 while ( enumerator . MoveNext ( ) )
157157 {
158158 if ( enumerator . Key . Equals ( type2 ) &&
159- enumerator . Value . TryGetValue ( recipient , out IDictionarySlim mapping ) )
159+ enumerator . Value . TryGetValue ( recipient , out IDictionarySlim ? mapping ) )
160160 {
161- Unsafe . As < DictionarySlim < TToken , object > > ( mapping ) . TryRemove ( token , out _ ) ;
161+ Unsafe . As < DictionarySlim < TToken , object > > ( mapping ) ! . TryRemove ( token , out _ ) ;
162162 }
163163 }
164164 }
@@ -311,7 +311,7 @@ internal sealed class ConditionalWeakTable<TKey, TValue>
311311 private readonly LinkedList < WeakReference < TKey > > keys = new ( ) ;
312312
313313 /// <inheritdoc cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey,TValue}.TryGetValue"/>
314- public bool TryGetValue ( TKey key , out TValue value )
314+ public bool TryGetValue ( TKey key , out TValue ? value )
315315 {
316316 return this . table . TryGetValue ( key , out value ) ;
317317 }
0 commit comments