1 implementation of Services
Microsoft.Maui (1)
MauiContext.cs (1)
37 public IServiceProvider Services => _services;
39 references to Services
Microsoft.AspNetCore.Components.WebView.Maui (1)
BlazorWebViewHandler.cs (1)
45 internal BlazorWebViewDeveloperTools DeveloperTools => MauiContext!.Services.GetRequiredService<BlazorWebViewDeveloperTools>();
Microsoft.Maui (17)
Handlers\Application\ApplicationHandler.cs (1)
60 _logger ??= MauiContext?.Services.CreateLogger<ApplicationHandler>();
Handlers\Element\ElementHandler.cs (1)
29 public IServiceProvider? Services => MauiContext?.Services;
Handlers\ElementHandlerExtensions.cs (1)
30 var services = context?.Services ??
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
91 internal HybridWebViewDeveloperTools DeveloperTools => MauiContext?.Services.GetService<HybridWebViewDeveloperTools>() ?? new HybridWebViewDeveloperTools();
Hosting\ServiceProviderExtensions.cs (2)
11 context.Services.CreateLogger<T>(); 17 context.Services.CreateLogger(loggerName);
ImageSources\ImageSourceExtensions.cs (2)
26 .FireAndForget(mauiContext.Services.CreateLogger<IImageSource>(), nameof(LoadImage)); 40 var services = mauiContext.Services;
MauiContextExtensions.cs (7)
30 mauiContext.Services.GetRequiredService<IAnimationManager>(); 33 mauiContext.Services.GetRequiredService<IDispatcher>(); 36 mauiContext.Services.GetService<IDispatcher>(); 40 var scopedContext = new MauiContext(mauiContext.Services); 51 scope = mauiContext.Services.CreateScope(); 86 var scopedServices = scopedContext.Services.GetServices<IMauiInitializeScopedService>(); 91 service.Initialize(scopedContext.Services);
Platform\ElementExtensions.cs (1)
53 ActivatorUtilities.CreateInstance(mauiContext.Services, handlerType);
TaskExtensions.cs (1)
58 elementHandler?.MauiContext?.Services?.CreateLogger<T>();
Microsoft.Maui.Controls (16)
Application\Application.cs (1)
531 var windowCreator = activationState?.Context.Services.GetService<IWindowCreator>();
DispatcherExtensions.cs (3)
19 context.Services.GetService<IDispatcher>() is IDispatcher handlerDispatcher) 30 if (appMauiContext.Services.GetOptionalApplicationDispatcher() is IDispatcher appDispatcherServiceDispatcher) 34 if (appMauiContext.Services.GetService<IDispatcher>() is IDispatcher appHandlerDispatcher)
Element\Element.cs (1)
960 EffectsFactory EffectsFactory => _effectsFactory ??= Handler.MauiContext.Services.GetRequiredService<EffectsFactory>();
Layout\Layout.cs (1)
31 var factory = layout.FindMauiContext()?.Services?.GetService<ILayoutManagerFactory>();
Platform\ModalNavigationManager\ModalNavigationManager.cs (2)
99 var logger = _window.FindMauiContext(true)?.Services?.CreateLogger<ModalNavigationManager>(); 105 var logger = _window.FindMauiContext(true)?.Services?.CreateLogger<ModalNavigationManager>();
Registrar.cs (1)
465 fontRegistrar = Application.Current?.FindMauiContext()?.Services?.GetService<IFontRegistrar>();
Shell\ShellContent.cs (1)
75 var services = Parent?.FindMauiContext()?.Services;
Shell\ShellNavigationManager.cs (4)
118 await nextActiveSection.GoToAsync(navigationRequest, parameters, _shell.FindMauiContext()?.Services, isAnimated, isRelativePopping); 180 return _shell.CurrentItem.CurrentItem.GoToAsync(navigationRequest, parameters, _shell.FindMauiContext()?.Services, animate, isRelativePopping); 190 return _shell.CurrentItem.CurrentItem.GoToAsync(navigationRequest, parameters, _shell.FindMauiContext()?.Services, animate, isRelativePopping); 196 await _shell.CurrentItem.CurrentItem.GoToAsync(navigationRequest, parameters, _shell.FindMauiContext()?.Services, animate, isRelativePopping);
ViewExtensions.cs (2)
325 => element.RequireMauiContext(fallbackToAppMauiContext).Services.GetRequiredService<IFontManager>(); 328 => element.FindMauiContext()?.Services?.GetService<IFontManager>()?.DefaultFontSize ?? 0d;
Microsoft.Maui.Controls.Foldable (2)
DualScreenInfo.cs (1)
50 _dualScreenService ?? Element?.Handler?.MauiContext?.Services?.GetService<IFoldableService>();
TwoPaneViewLayoutGuide.cs (1)
25 _dualScreenService = _layout?.Handler?.MauiContext?.Services?.GetService<IFoldableService>();
Microsoft.Maui.Maps (3)
src\Core\src\Hosting\ServiceProviderExtensions.cs (2)
11 context.Services.CreateLogger<T>(); 17 context.Services.CreateLogger(loggerName);
src\Core\src\TaskExtensions.cs (1)
58 elementHandler?.MauiContext?.Services?.CreateLogger<T>();