Exemplo n.º 1
0
 protected override async Task OnAfterRenderAsync(bool firstRender)
 {
     if (firstRender)
     {
         await MediaQueryList.Initialize(this);
     }
 }
Exemplo n.º 2
0
 public async ValueTask DisposeAsync()
 {
     if (MediaQueryList == null)
     {
         return;
     }
     await MediaQueryList.RemoveQuery(this);
 }
Exemplo n.º 3
0
 protected override void OnInitialized()
 {
     if (MediaQueryList == null)
     {
         throw new Exception("MediaQueryList is null. The MediaQueryList component should be added to the root or MainLayout of your applicaiton.");
     }
     else
     {
         MediaQueryList.AddQuery(this);
     }
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     MediaQueryList.RemoveQuery(this);
 }
Exemplo n.º 5
0
 public async ValueTask DisposeAsync()
 {
     await MediaQueryList.RemoveQuery(this);
 }