File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/Components/Shared/src Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 44using System . Collections . Concurrent ;
55using System . Diagnostics . CodeAnalysis ;
66using System . Reflection ;
7+ #if COMPONENTS
8+ using Microsoft . AspNetCore . Components . HotReload ;
9+ #endif
710
811#if COMPONENTS
912namespace Microsoft . AspNetCore . Components . Infrastructure ;
@@ -16,6 +19,16 @@ internal sealed class RootTypeCache
1619{
1720 private readonly ConcurrentDictionary < Key , Type ? > _typeToKeyLookUp = new ( ) ;
1821
22+ #if COMPONENTS
23+ static RootTypeCache ( )
24+ {
25+ if ( HotReloadManager . Default . MetadataUpdateSupported )
26+ {
27+ HotReloadManager . Default . OnDeltaApplied += ClearCache ;
28+ }
29+ }
30+ #endif
31+
1932 public Type ? GetRootType ( string assembly , string type )
2033 {
2134 var key = new Key ( assembly , type ) ;
You can’t perform that action at this time.
0 commit comments