diff --git a/readme/BlazorServerApp.md b/readme/BlazorServerApp.md index 4db44697..cd57657c 100644 --- a/readme/BlazorServerApp.md +++ b/readme/BlazorServerApp.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // View Models .Bind().To() diff --git a/readme/BlazorServerAppPageTemplate.md b/readme/BlazorServerAppPageTemplate.md index 977f99b7..9598596a 100644 --- a/readme/BlazorServerAppPageTemplate.md +++ b/readme/BlazorServerAppPageTemplate.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // View Models .Bind().To() diff --git a/readme/BlazorWebAssemblyApp.md b/readme/BlazorWebAssemblyApp.md index fdbdd022..b0cfa461 100644 --- a/readme/BlazorWebAssemblyApp.md +++ b/readme/BlazorWebAssemblyApp.md @@ -15,6 +15,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // View Models .Bind().As(Singleton).To() diff --git a/readme/BlazorWebAssemblyAppPageTemplate.md b/readme/BlazorWebAssemblyAppPageTemplate.md index 95898b2f..132fa2e4 100644 --- a/readme/BlazorWebAssemblyAppPageTemplate.md +++ b/readme/BlazorWebAssemblyAppPageTemplate.md @@ -15,6 +15,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // View Models .Bind().As(Singleton).To() diff --git a/readme/GrpcService.md b/readme/GrpcService.md index dc958db4..f8c84412 100644 --- a/readme/GrpcService.md +++ b/readme/GrpcService.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // Provides the composition root for Greeter service .Root(); diff --git a/readme/GrpcServicePageTemplate.md b/readme/GrpcServicePageTemplate.md index ceac39d0..702818c2 100644 --- a/readme/GrpcServicePageTemplate.md +++ b/readme/GrpcServicePageTemplate.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // Provides the composition root for Greeter service .Root(); diff --git a/readme/Maui.md b/readme/Maui.md index 87642ad1..b48a227c 100644 --- a/readme/Maui.md +++ b/readme/Maui.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // Specifies not to attempt to resolve types whose fully qualified name // begins with Microsoft.Extensions., Microsoft.Maui. diff --git a/readme/MauiPageTemplate.md b/readme/MauiPageTemplate.md index a25487db..b811370b 100644 --- a/readme/MauiPageTemplate.md +++ b/readme/MauiPageTemplate.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // Specifies not to attempt to resolve types whose fully qualified name // begins with Microsoft.Extensions., Microsoft.Maui. diff --git a/readme/MinimalWebAPI.md b/readme/MinimalWebAPI.md index 70a07271..1d5ac4f9 100644 --- a/readme/MinimalWebAPI.md +++ b/readme/MinimalWebAPI.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind().As(Singleton).To() .Root() diff --git a/readme/MinimalWebAPIPageTemplate.md b/readme/MinimalWebAPIPageTemplate.md index 52d17a3c..ecd4a0a3 100644 --- a/readme/MinimalWebAPIPageTemplate.md +++ b/readme/MinimalWebAPIPageTemplate.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind().As(Singleton).To() .Root() diff --git a/readme/WebAPI.md b/readme/WebAPI.md index dc9607a8..ef13c5f2 100644 --- a/readme/WebAPI.md +++ b/readme/WebAPI.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind().As(Singleton).To() // Provides the composition root for Weather Forecast controller diff --git a/readme/WebAPIPageTemplate.md b/readme/WebAPIPageTemplate.md index bdf18ebd..3462d0ca 100644 --- a/readme/WebAPIPageTemplate.md +++ b/readme/WebAPIPageTemplate.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind().As(Singleton).To() // Provides the composition root for Weather Forecast controller diff --git a/readme/WebApp.md b/readme/WebApp.md index 4302cc95..500a7038 100644 --- a/readme/WebApp.md +++ b/readme/WebApp.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind().As(Singleton).To() // Provides the composition root for Home controller diff --git a/readme/WebAppPageTemplate.md b/readme/WebAppPageTemplate.md index dab62461..76fd82f8 100644 --- a/readme/WebAppPageTemplate.md +++ b/readme/WebAppPageTemplate.md @@ -13,6 +13,7 @@ using static Pure.DI.Lifetime; internal partial class Composition: ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind().As(Singleton).To() // Provides the composition root for Home controller diff --git a/readme/service-collection.md b/readme/service-collection.md index 95e496cb..5f5a4dee 100644 --- a/readme/service-collection.md +++ b/readme/service-collection.md @@ -39,6 +39,7 @@ partial class Composition : ServiceProviderFactory static void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind("Dependency Key").As(Lifetime.Singleton).To() .Bind().To() diff --git a/samples/BlazorServerApp/Composition.cs b/samples/BlazorServerApp/Composition.cs index eb0386f9..eb6bcea0 100644 --- a/samples/BlazorServerApp/Composition.cs +++ b/samples/BlazorServerApp/Composition.cs @@ -14,6 +14,7 @@ namespace BlazorServerApp; internal partial class Composition : ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // View Models .Bind().To() diff --git a/samples/BlazorWebAssemblyApp/Composition.cs b/samples/BlazorWebAssemblyApp/Composition.cs index f4054b22..f50fbdce 100644 --- a/samples/BlazorWebAssemblyApp/Composition.cs +++ b/samples/BlazorWebAssemblyApp/Composition.cs @@ -13,6 +13,7 @@ namespace BlazorWebAssemblyApp; internal partial class Composition : ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // View Models .Bind().As(Singleton).To() diff --git a/samples/GrpcService/Composition.cs b/samples/GrpcService/Composition.cs index 93c9f01c..01cb13f5 100644 --- a/samples/GrpcService/Composition.cs +++ b/samples/GrpcService/Composition.cs @@ -10,6 +10,7 @@ namespace GrpcService; internal partial class Composition : ServiceProviderFactory { static void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) // Provides the composition root for Greeter service .Root(); diff --git a/samples/MinimalWebAPI/Composition.cs b/samples/MinimalWebAPI/Composition.cs index cbbb5284..b1ea1958 100644 --- a/samples/MinimalWebAPI/Composition.cs +++ b/samples/MinimalWebAPI/Composition.cs @@ -11,6 +11,7 @@ namespace MinimalWebAPI; internal partial class Composition : ServiceProviderFactory { void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind().As(Singleton).To() .Root() diff --git a/samples/WebAPI/Composition.cs b/samples/WebAPI/Composition.cs index 37feee2b..6cbf4873 100644 --- a/samples/WebAPI/Composition.cs +++ b/samples/WebAPI/Composition.cs @@ -12,6 +12,7 @@ namespace WebAPI; internal partial class Composition : ServiceProviderFactory { static void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind().As(Singleton).To() // Provides the composition root for Weather Forecast controller diff --git a/samples/WebApp/Composition.cs b/samples/WebApp/Composition.cs index 1e4e1591..04147772 100644 --- a/samples/WebApp/Composition.cs +++ b/samples/WebApp/Composition.cs @@ -12,6 +12,7 @@ namespace WebApp; internal partial class Composition : ServiceProviderFactory { static void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind().As(Singleton).To() // Provides the composition root for Home controller diff --git a/src/Pure.DI.MS/any/Pure.DI/MS/ServiceProviderFactory.g.cs b/src/Pure.DI.MS/any/Pure.DI/MS/ServiceProviderFactory.g.cs index 50c34ae0..5159a7d9 100644 --- a/src/Pure.DI.MS/any/Pure.DI/MS/ServiceProviderFactory.g.cs +++ b/src/Pure.DI.MS/any/Pure.DI/MS/ServiceProviderFactory.g.cs @@ -18,6 +18,7 @@ namespace Pure.DI.MS /// { /// void Setup() => /// DI.Setup(nameof(Composition)) + /// // Use the DI setup from the base class /// .DependsOn(Base) /// .Root<HomeController>(); /// } @@ -42,7 +43,9 @@ public class ServiceProviderFactory: IServiceProviderFactory /// void Setup() =&gt; - /// DI.Setup(nameof(Composition)).DependsOn(Base); + /// DI.Setup(nameof(Composition)) + /// // Use the DI setup from the base class + /// .DependsOn(Base); /// /// /// diff --git a/tests/Pure.DI.UsageTests/BaseClassLibrary/ServiceCollectionScenario.cs b/tests/Pure.DI.UsageTests/BaseClassLibrary/ServiceCollectionScenario.cs index b66ea261..a6991d8b 100644 --- a/tests/Pure.DI.UsageTests/BaseClassLibrary/ServiceCollectionScenario.cs +++ b/tests/Pure.DI.UsageTests/BaseClassLibrary/ServiceCollectionScenario.cs @@ -65,6 +65,7 @@ partial class Composition : ServiceProviderFactory static void Setup() => DI.Setup() + // Use the DI setup from the base class .DependsOn(Base) .Bind("Dependency Key").As(Lifetime.Singleton).To() .Bind().To()