diff --git a/src/CommunityToolkit.Maui/Extensions/ServiceCollectionExtensions.shared.cs b/src/CommunityToolkit.Maui/Extensions/ServiceCollectionExtensions.shared.cs index 405d40a698..cfce3353ed 100644 --- a/src/CommunityToolkit.Maui/Extensions/ServiceCollectionExtensions.shared.cs +++ b/src/CommunityToolkit.Maui/Extensions/ServiceCollectionExtensions.shared.cs @@ -17,11 +17,11 @@ public static class ServiceCollectionExtensions /// Adds a of the type specified in /// with lifetime. /// - /// The type of the Popup to add. Constrained to + /// The type of the Popup to add. Constrained to /// The to add the service to. /// A reference to this instance after the operation has completed. public static IServiceCollection AddTransientPopup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TPopupView>(this IServiceCollection services) - where TPopupView : IView + where TPopupView : View { PopupService.AddPopup(services, ServiceLifetime.Transient); @@ -33,13 +33,13 @@ public static class ServiceCollectionExtensions /// of the type specified in to the specified /// with lifetime. /// - /// The type of the Popup to add. Constrained to + /// The type of the Popup to add. Constrained to /// The type of the ViewModel to add. Constrained to /// /// The to add the service to. /// A reference to this instance after the operation has completed. public static IServiceCollection AddTransientPopup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TPopupView, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TPopupViewModel>(this IServiceCollection services) - where TPopupView : IView + where TPopupView : View where TPopupViewModel : notnull { PopupService.AddPopup(services, ServiceLifetime.Transient); @@ -51,11 +51,11 @@ public static class ServiceCollectionExtensions /// Adds a of the type specified in and a ViewModel /// with lifetime. /// - /// The type of the Popup to add. Constrained to + /// The type of the Popup to add. Constrained to /// The to add the service to. /// A reference to this instance after the operation has completed. public static IServiceCollection AddSingletonPopup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TPopupView>(this IServiceCollection services) - where TPopupView : IView + where TPopupView : View { PopupService.AddPopup(services, ServiceLifetime.Singleton); @@ -67,13 +67,13 @@ public static class ServiceCollectionExtensions /// of the type specified in to the specified /// with lifetime. /// - /// The type of the Popup to add. Constrained to + /// The type of the Popup to add. Constrained to /// The type of the ViewModel to add. Constrained to /// /// The to add the service to. /// A reference to this instance after the operation has completed. public static IServiceCollection AddSingletonPopup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TPopupView, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TPopupViewModel>(this IServiceCollection services) - where TPopupView : IView + where TPopupView : View where TPopupViewModel : notnull { PopupService.AddPopup(services, ServiceLifetime.Singleton); @@ -85,11 +85,11 @@ public static class ServiceCollectionExtensions /// Adds a of the type specified in and a ViewModel /// with lifetime. /// - /// The type of the Popup to add. Constrained to + /// The type of the Popup to add. Constrained to /// The to add the service to. /// A reference to this instance after the operation has completed. public static IServiceCollection AddScopedPopup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TPopupView>(this IServiceCollection services) - where TPopupView : IView + where TPopupView : View { PopupService.AddPopup(services, ServiceLifetime.Scoped); @@ -101,13 +101,13 @@ public static class ServiceCollectionExtensions /// of the type specified in to the specified /// with lifetime. /// - /// The type of the Popup to add. Constrained to + /// The type of the Popup to add. Constrained to /// The type of the ViewModel to add. Constrained to /// /// The to add the service to. /// A reference to this instance after the operation has completed. public static IServiceCollection AddScopedPopup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TPopupView, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TPopupViewModel>(this IServiceCollection services) - where TPopupView : IView + where TPopupView : View where TPopupViewModel : notnull { PopupService.AddPopup(services, ServiceLifetime.Scoped);