@@ -14,7 +14,7 @@ public class BootstrapBlazorRootRegisterService
1414 private readonly Dictionary < object , List < BootstrapBlazorRootContent > > _providersByIdentifier = [ ] ;
1515
1616 /// <summary>
17- /// add provider
17+ /// Add provider
1818 /// </summary>
1919 /// <param name="identifier"></param>
2020 /// <param name="provider"></param>
@@ -30,7 +30,7 @@ public void AddProvider(object identifier, BootstrapBlazorRootContent provider)
3030 }
3131
3232 /// <summary>
33- /// remove provider
33+ /// Remove provider
3434 /// </summary>
3535 /// <param name="identifier"></param>
3636 /// <param name="provider"></param>
@@ -58,7 +58,7 @@ public void RemoveProvider(object identifier, BootstrapBlazorRootContent provide
5858 }
5959
6060 /// <summary>
61- /// get all providers by identifier
61+ /// Get all providers by identifier
6262 /// </summary>
6363 /// <param name="identifier"></param>
6464 /// <returns></returns>
@@ -69,30 +69,27 @@ public List<BootstrapBlazorRootContent> GetProviders(object identifier)
6969 }
7070
7171 /// <summary>
72- /// subscribe
72+ /// Subscribe
7373 /// </summary>
7474 /// <param name="identifier"></param>
7575 /// <param name="subscriber"></param>
7676 public void Subscribe ( object identifier , BootstrapBlazorRootOutlet subscriber )
7777 {
7878 if ( _subscribersByIdentifier . ContainsKey ( identifier ) )
7979 {
80- throw new InvalidOperationException ( $ "There is already a subscriber to the content with the given root ID ' { identifier } '." ) ;
80+ return ;
8181 }
8282
8383 _subscribersByIdentifier . Add ( identifier , subscriber ) ;
8484 }
8585
8686 /// <summary>
87- /// 取消订阅
87+ /// Unsubscribe
8888 /// </summary>
8989 /// <param name="identifier"></param>
9090 public void Unsubscribe ( object identifier )
9191 {
92- if ( ! _subscribersByIdentifier . Remove ( identifier ) )
93- {
94- throw new InvalidOperationException ( $ "The subscriber with the given root ID '{ identifier } ' is already unsubscribed.") ;
95- }
92+ _subscribersByIdentifier . Remove ( identifier ) ;
9693 }
9794
9895 /// <summary>
0 commit comments