コード例 #1
0
 /// <summary>
 /// Adds a IResizeObserver as a Transient instance.
 /// </summary>
 /// <param name="services">IServiceCollection</param>
 /// <param name="options">Defines ResizeObserverOptions for this instance</param>
 /// <returns>Continues the IServiceCollection chain.</returns>
 public static IServiceCollection AddMudBlazorResizeObserver(this IServiceCollection services, ResizeObserverOptions options = null)
 {
     options ??= new ResizeObserverOptions();
     services.AddMudBlazorResizeObserver(o =>
     {
         o = options;
     });
     return(services);
 }
コード例 #2
0
 public IResizeObserver Create(ResizeObserverOptions options) =>
 new ResizeObserver(_provider.GetRequiredService <IJSRuntime>(), options);