diff --git a/Directory.Build.props b/Directory.Build.props index 0c236eb7..ff7ad827 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 2.1.43 + 2.1.44 Pure.DI latest net9.0 diff --git a/readme/Avalonia.md b/readme/Avalonia.md index ab835259..70757567 100644 --- a/readme/Avalonia.md +++ b/readme/Avalonia.md @@ -176,7 +176,7 @@ The [project file](/samples/AvaloniaApp/AvaloniaApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/BlazorServerApp.md b/readme/BlazorServerApp.md index 958bdbc4..b61e316a 100644 --- a/readme/BlazorServerApp.md +++ b/readme/BlazorServerApp.md @@ -70,7 +70,7 @@ The [project file](/samples/BlazorServerApp/BlazorServerApp.csproj) looks like t - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/BlazorWebAssemblyApp.md b/readme/BlazorWebAssemblyApp.md index 488ed242..555452fc 100644 --- a/readme/BlazorWebAssemblyApp.md +++ b/readme/BlazorWebAssemblyApp.md @@ -69,7 +69,7 @@ The [project file](/samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj) lo - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Console.md b/readme/Console.md index ddfcdb76..0860b40d 100644 --- a/readme/Console.md +++ b/readme/Console.md @@ -89,7 +89,7 @@ The [project file](/samples/ShroedingersCat/ShroedingersCat.csproj) looks like t - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/ConsoleNativeAOT.md b/readme/ConsoleNativeAOT.md index d38e48d8..753c7db7 100644 --- a/readme/ConsoleNativeAOT.md +++ b/readme/ConsoleNativeAOT.md @@ -16,7 +16,7 @@ The [project file](/samples/ShroedingersCatNativeAOT/ShroedingersCatNativeAOT.cs - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/ConsoleTopLevelStatements.md b/readme/ConsoleTopLevelStatements.md index d9908c81..66448c45 100644 --- a/readme/ConsoleTopLevelStatements.md +++ b/readme/ConsoleTopLevelStatements.md @@ -74,7 +74,7 @@ The [project file](/samples/ShroedingersCatTopLevelStatements/ShroedingersCatTop - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/GrpcService.md b/readme/GrpcService.md index 4b2533ab..705adc32 100644 --- a/readme/GrpcService.md +++ b/readme/GrpcService.md @@ -55,7 +55,7 @@ The [project file](/samples/GrpcService/GrpcService.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Maui.md b/readme/Maui.md index a2004b88..1701c766 100644 --- a/readme/Maui.md +++ b/readme/Maui.md @@ -211,7 +211,7 @@ The [project file](/samples/MAUIApp/MAUIApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/MinimalWebAPI.md b/readme/MinimalWebAPI.md index 90fce8e7..9146bbd4 100644 --- a/readme/MinimalWebAPI.md +++ b/readme/MinimalWebAPI.md @@ -78,7 +78,7 @@ The [project file](/samples/WebAPI/WebAPI.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/SingletonDetails.md b/readme/SingletonDetails.md index 2b2b9672..1d16261c 100644 --- a/readme/SingletonDetails.md +++ b/readme/SingletonDetails.md @@ -100,10 +100,10 @@ partial class Singleton _scopedService444 = new Service4(); } - _scopedService141 = new Service1(new Service2(new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!))); + _scopedService141 = new Service1(new Service2(new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444))); } - return new CompositionRoot(_scopedService141!, new Service2(new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!)), new Service2(new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!)), new Service2(new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!), new Service3(_scopedService444!, _scopedService444!)), new Service3(_scopedService444!, _scopedService444!), _scopedService444!, _scopedService444!); + return new CompositionRoot(_scopedService141, new Service2(new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444)), new Service2(new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444)), new Service2(new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444), new Service3(_scopedService444, _scopedService444)), new Service3(_scopedService444, _scopedService444), _scopedService444, _scopedService444); } [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/readme/WebAPI.md b/readme/WebAPI.md index 0e8494f3..d34876cf 100644 --- a/readme/WebAPI.md +++ b/readme/WebAPI.md @@ -53,7 +53,7 @@ The [project file](/samples/WebAPI/WebAPI.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WebApp.md b/readme/WebApp.md index f3af2b8d..0d6e58f1 100644 --- a/readme/WebApp.md +++ b/readme/WebApp.md @@ -53,7 +53,7 @@ The [project file](/samples/WebApp/WebApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WinFormsApp.md b/readme/WinFormsApp.md index 5bf1b8b2..34b9ba6e 100644 --- a/readme/WinFormsApp.md +++ b/readme/WinFormsApp.md @@ -60,7 +60,7 @@ The [project file](/samples/WinFormsApp/WinFormsApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WinFormsAppNetCore.md b/readme/WinFormsAppNetCore.md index 8de73b42..02274bfe 100644 --- a/readme/WinFormsAppNetCore.md +++ b/readme/WinFormsAppNetCore.md @@ -66,7 +66,7 @@ The [project file](/samples/WinFormsAppNetCore/WinFormsAppNetCore.csproj) looks - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Wpf.md b/readme/Wpf.md index a380391a..7c6487c9 100644 --- a/readme/Wpf.md +++ b/readme/Wpf.md @@ -112,7 +112,7 @@ The [project file](/samples/WpfAppNetCore/WpfAppNetCore.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/accumulators.md b/readme/accumulators.md index 7cae7ee9..a89f5f28 100644 --- a/readme/accumulators.md +++ b/readme/accumulators.md @@ -91,7 +91,7 @@ partial class Composition { accumulator48.Add(transientAbcDependency3); } - Service transientService1 = new Service(transientAbcDependency3, _root._singletonXyzDependency45!, perBlockAbcDependency4); + Service transientService1 = new Service(transientAbcDependency3, _root._singletonXyzDependency45, perBlockAbcDependency4); using (_lock.EnterScope()) { accumulator48.Add(transientService1); diff --git a/readme/async-disposable-scope.md b/readme/async-disposable-scope.md index 4e58cbda..d603cf7d 100644 --- a/readme/async-disposable-scope.md +++ b/readme/async-disposable-scope.md @@ -127,7 +127,7 @@ partial class Composition: IDisposable, IAsyncDisposable } } - return new Service(_scopedDependency43!); + return new Service(_scopedDependency43); } } diff --git a/readme/async-disposable-singleton.md b/readme/async-disposable-singleton.md index 5ca012b6..589cf159 100644 --- a/readme/async-disposable-singleton.md +++ b/readme/async-disposable-singleton.md @@ -93,7 +93,7 @@ partial class Composition: IDisposable, IAsyncDisposable } } - return new Service(_root._singletonDependency43!); + return new Service(_root._singletonDependency43); } } diff --git a/readme/auto-scoped.md b/readme/auto-scoped.md index c754ff1b..40eecf8b 100644 --- a/readme/auto-scoped.md +++ b/readme/auto-scoped.md @@ -124,7 +124,7 @@ partial class Composition } } - return new Service(_scopedDependency43!); + return new Service(_scopedDependency43); } } } diff --git a/readme/bind-attribute-for-a-generic-type.md b/readme/bind-attribute-for-a-generic-type.md index 8187583f..6ba89adf 100644 --- a/readme/bind-attribute-for-a-generic-type.md +++ b/readme/bind-attribute-for-a-generic-type.md @@ -84,7 +84,7 @@ partial class Composition } IDependency transientIDependency1; - Facade localInstance_1182D12744 = _root._singletonFacade43!; + Facade localInstance_1182D12744 = _root._singletonFacade43; transientIDependency1 = localInstance_1182D12744.GetDependency(); return new Service(transientIDependency1); } diff --git a/readme/bind-attribute-with-lifetime-and-tag.md b/readme/bind-attribute-with-lifetime-and-tag.md index bed7d79c..89ac5bc6 100644 --- a/readme/bind-attribute-with-lifetime-and-tag.md +++ b/readme/bind-attribute-with-lifetime-and-tag.md @@ -84,13 +84,13 @@ partial class Composition _root._singletonFacade43 = new Facade(); } - Facade localInstance_1182D12746 = _root._singletonFacade43!; + Facade localInstance_1182D12746 = _root._singletonFacade43; _root._singletonIDependency0 = localInstance_1182D12746.Dependency; } } } - return new Service(_root._singletonIDependency0!); + return new Service(_root._singletonIDependency0); } } } diff --git a/readme/bind-attribute.md b/readme/bind-attribute.md index 08e1af82..5f604526 100644 --- a/readme/bind-attribute.md +++ b/readme/bind-attribute.md @@ -88,7 +88,7 @@ partial class Composition } IDependency transientIDependency1; - Facade localInstance_1182D12745 = _root._singletonFacade43!; + Facade localInstance_1182D12745 = _root._singletonFacade43; transientIDependency1 = localInstance_1182D12745.Dependency; return new Service(transientIDependency1); } diff --git a/readme/default-lifetime-for-a-type-and-a-tag.md b/readme/default-lifetime-for-a-type-and-a-tag.md index f27bbd72..6dceefe1 100644 --- a/readme/default-lifetime-for-a-type-and-a-tag.md +++ b/readme/default-lifetime-for-a-type-and-a-tag.md @@ -96,7 +96,7 @@ partial class Composition } } - return new Service(_root._singletonDependency43!, _root._singletonDependency44!); + return new Service(_root._singletonDependency43, _root._singletonDependency44); } } } diff --git a/readme/default-lifetime-for-a-type.md b/readme/default-lifetime-for-a-type.md index d8812a40..ecd14d94 100644 --- a/readme/default-lifetime-for-a-type.md +++ b/readme/default-lifetime-for-a-type.md @@ -83,7 +83,7 @@ partial class Composition } } - return new Service(_root._singletonDependency43!, _root._singletonDependency43!); + return new Service(_root._singletonDependency43, _root._singletonDependency43); } } } diff --git a/readme/default-lifetime.md b/readme/default-lifetime.md index 09e71231..a4d85501 100644 --- a/readme/default-lifetime.md +++ b/readme/default-lifetime.md @@ -86,12 +86,12 @@ partial class Composition _root._singletonDependency43 = new Dependency(); } - _root._singletonService44 = new Service(_root._singletonDependency43!, _root._singletonDependency43!); + _root._singletonService44 = new Service(_root._singletonDependency43, _root._singletonDependency43); } } } - return _root._singletonService44!; + return _root._singletonService44; } } } diff --git a/readme/disposable-singleton.md b/readme/disposable-singleton.md index 7a0c7dde..6b55b707 100644 --- a/readme/disposable-singleton.md +++ b/readme/disposable-singleton.md @@ -91,7 +91,7 @@ partial class Composition: IDisposable } } - return new Service(_root._singletonDependency43!); + return new Service(_root._singletonDependency43); } } diff --git a/readme/exposed-generic-roots-with-args.md b/readme/exposed-generic-roots-with-args.md index 5969357f..5c9499ee 100644 --- a/readme/exposed-generic-roots-with-args.md +++ b/readme/exposed-generic-roots-with-args.md @@ -74,7 +74,7 @@ partial class Composition Integration.IMyGenericService transientIMyGenericService1; int localId3 = id; - Integration.CompositionWithGenericRootsAndArgsInOtherProject localInstance_1182D1274 = _root._singletonCompositionWithGenericRootsAndArgsInOtherProject44!; + Integration.CompositionWithGenericRootsAndArgsInOtherProject localInstance_1182D1274 = _root._singletonCompositionWithGenericRootsAndArgsInOtherProject44; transientIMyGenericService1 = localInstance_1182D1274.GetMyService(localId3); return new Program(transientIMyGenericService1); } diff --git a/readme/exposed-generic-roots.md b/readme/exposed-generic-roots.md index 6ebe88a2..cd0c96ea 100644 --- a/readme/exposed-generic-roots.md +++ b/readme/exposed-generic-roots.md @@ -76,7 +76,7 @@ partial class Composition } Integration.IMyGenericService transientIMyGenericService1; - Integration.CompositionWithGenericRootsInOtherProject localInstance_1182D1272 = _root._singletonCompositionWithGenericRootsInOtherProject43!; + Integration.CompositionWithGenericRootsInOtherProject localInstance_1182D1272 = _root._singletonCompositionWithGenericRootsInOtherProject43; transientIMyGenericService1 = localInstance_1182D1272.GetMyService(); return new Program(transientIMyGenericService1); } diff --git a/readme/exposed-roots-with-tags.md b/readme/exposed-roots-with-tags.md index 91a941ee..3c3e4a7e 100644 --- a/readme/exposed-roots-with-tags.md +++ b/readme/exposed-roots-with-tags.md @@ -71,7 +71,7 @@ partial class Composition } Integration.IMyService transientIMyService1; - Integration.CompositionWithTagsInOtherProject localInstance_1182D1278 = _root._singletonCompositionWithTagsInOtherProject43!; + Integration.CompositionWithTagsInOtherProject localInstance_1182D1278 = _root._singletonCompositionWithTagsInOtherProject43; transientIMyService1 = localInstance_1182D1278.MyService; return new Program(transientIMyService1); } diff --git a/readme/exposed-roots.md b/readme/exposed-roots.md index a08ab849..bb8721d8 100644 --- a/readme/exposed-roots.md +++ b/readme/exposed-roots.md @@ -74,7 +74,7 @@ partial class Composition } Integration.IMyService transientIMyService1; - Integration.CompositionInOtherProject localInstance_1182D1275 = _root._singletonCompositionInOtherProject43!; + Integration.CompositionInOtherProject localInstance_1182D1275 = _root._singletonCompositionInOtherProject43; transientIMyService1 = localInstance_1182D1275.MyService; return new Program(transientIMyService1); } diff --git a/readme/func-with-arguments.md b/readme/func-with-arguments.md index 1359860b..fb429aa0 100644 --- a/readme/func-with-arguments.md +++ b/readme/func-with-arguments.md @@ -128,7 +128,7 @@ partial class Composition } } - Dependency localDependency56 = new Dependency(_root._singletonClock43!, transientInt323, transientInt324); + Dependency localDependency56 = new Dependency(_root._singletonClock43, transientInt323, transientInt324); return localDependency56; }; return new Service(transientFunc1); diff --git a/readme/keyed-service-provider.md b/readme/keyed-service-provider.md index 8115b78e..1f86d87e 100644 --- a/readme/keyed-service-provider.md +++ b/readme/keyed-service-provider.md @@ -84,7 +84,7 @@ partial class Composition } } - return _root._singletonDependency43!; + return _root._singletonDependency43; } } @@ -104,7 +104,7 @@ partial class Composition } } - return new Service(_root._singletonDependency43!); + return new Service(_root._singletonDependency43); } } diff --git a/readme/onnewinstance-hint.md b/readme/onnewinstance-hint.md index 27aecbeb..d4e8b28e 100644 --- a/readme/onnewinstance-hint.md +++ b/readme/onnewinstance-hint.md @@ -105,7 +105,7 @@ partial class Composition } } - Service transientService0 = new Service(_root._singletonDependency43!); + Service transientService0 = new Service(_root._singletonDependency43); OnNewInstance(ref transientService0, null, Lifetime.Transient); return transientService0; } diff --git a/readme/perresolve.md b/readme/perresolve.md index d0714622..626249e8 100644 --- a/readme/perresolve.md +++ b/readme/perresolve.md @@ -85,7 +85,7 @@ partial class Composition perResolveDependency43 = new Dependency(); } - _root._singletonValueTuple44 = (perResolveDependency43!, perResolveDependency43!); + _root._singletonValueTuple44 = (perResolveDependency43, perResolveDependency43); Thread.MemoryBarrier(); _root._singletonValueTuple44Created = true; } @@ -103,7 +103,7 @@ partial class Composition } } - return new Service(perResolveDependency43!, perResolveDependency43!, _root._singletonValueTuple44); + return new Service(perResolveDependency43, perResolveDependency43, _root._singletonValueTuple44); } } } diff --git a/readme/root-binding.md b/readme/root-binding.md index 969aa596..98cf00cb 100644 --- a/readme/root-binding.md +++ b/readme/root-binding.md @@ -64,7 +64,7 @@ partial class Composition } } - return new Service(_root._singletonDependency43!); + return new Service(_root._singletonDependency43); } } } diff --git a/readme/scope.md b/readme/scope.md index 34cdd749..42d5b668 100644 --- a/readme/scope.md +++ b/readme/scope.md @@ -125,7 +125,7 @@ partial class Composition: IDisposable } } - return new Service(_scopedDependency43!); + return new Service(_scopedDependency43); } } diff --git a/readme/service-collection.md b/readme/service-collection.md index 0ab5377b..8397cf9f 100644 --- a/readme/service-collection.md +++ b/readme/service-collection.md @@ -81,7 +81,7 @@ partial class Composition } } - return _root._singletonDependency43!; + return _root._singletonDependency43; } } @@ -101,7 +101,7 @@ partial class Composition } } - return new Service(_root._singletonDependency43!); + return new Service(_root._singletonDependency43); } } diff --git a/readme/service-provider-with-scope.md b/readme/service-provider-with-scope.md index 3be477c6..bdcde7a8 100644 --- a/readme/service-provider-with-scope.md +++ b/readme/service-provider-with-scope.md @@ -115,7 +115,7 @@ partial class Composition: IDisposable } } - return _root._singletonDependency43!; + return _root._singletonDependency43; } } @@ -135,13 +135,13 @@ partial class Composition: IDisposable _root._singletonDependency43 = new Dependency(); } - _scopedService44 = new Service(_root._singletonDependency43!); + _scopedService44 = new Service(_root._singletonDependency43); _disposables[_disposeIndex++] = _scopedService44; } } } - return _scopedService44!; + return _scopedService44; } } diff --git a/readme/service-provider.md b/readme/service-provider.md index dd2dbad0..b0ef8239 100644 --- a/readme/service-provider.md +++ b/readme/service-provider.md @@ -79,7 +79,7 @@ partial class Composition } } - return _root._singletonDependency43!; + return _root._singletonDependency43; } } @@ -99,7 +99,7 @@ partial class Composition } } - return new Service(_root._singletonDependency43!); + return new Service(_root._singletonDependency43); } } diff --git a/readme/singleton.md b/readme/singleton.md index 498db4b7..0a11fce5 100644 --- a/readme/singleton.md +++ b/readme/singleton.md @@ -94,7 +94,7 @@ partial class Composition } } - return new Service(_root._singletonDependency43!, _root._singletonDependency43!); + return new Service(_root._singletonDependency43, _root._singletonDependency43); } } } diff --git a/readme/smart-tags.md b/readme/smart-tags.md index 89350367..a2dbc9df 100644 --- a/readme/smart-tags.md +++ b/readme/smart-tags.md @@ -114,7 +114,7 @@ partial class Composition } } - return _root._singletonXyzDependency44!; + return _root._singletonXyzDependency44; } } @@ -134,7 +134,7 @@ partial class Composition } } - return new Service(new AbcDependency(), _root._singletonXyzDependency44!, new AbcDependency()); + return new Service(new AbcDependency(), _root._singletonXyzDependency44, new AbcDependency()); } } } diff --git a/readme/tag-type.md b/readme/tag-type.md index 57cb22e5..f26d0a76 100644 --- a/readme/tag-type.md +++ b/readme/tag-type.md @@ -96,7 +96,7 @@ partial class Composition } } - return _root._singletonXyzDependency44!; + return _root._singletonXyzDependency44; } } @@ -116,7 +116,7 @@ partial class Composition } } - return new Service(new AbcDependency(), _root._singletonXyzDependency44!, new AbcDependency()); + return new Service(new AbcDependency(), _root._singletonXyzDependency44, new AbcDependency()); } } diff --git a/readme/tags.md b/readme/tags.md index 26eb6da4..e2a79cca 100644 --- a/readme/tags.md +++ b/readme/tags.md @@ -100,7 +100,7 @@ partial class Composition } } - return _root._singletonXyzDependency44!; + return _root._singletonXyzDependency44; } } @@ -120,7 +120,7 @@ partial class Composition } } - return new Service(new AbcDependency(), _root._singletonXyzDependency44!, new AbcDependency()); + return new Service(new AbcDependency(), _root._singletonXyzDependency44, new AbcDependency()); } } } diff --git a/readme/threadsafe-hint.md b/readme/threadsafe-hint.md index 854c3380..d260e91d 100644 --- a/readme/threadsafe-hint.md +++ b/readme/threadsafe-hint.md @@ -64,7 +64,7 @@ partial class Composition _root._singletonService44 = new Service(perBlockFunc0); } - return _root._singletonService44!; + return _root._singletonService44; } } } diff --git a/readme/tracking-disposable-instances-using-pre-built-classes.md b/readme/tracking-disposable-instances-using-pre-built-classes.md index 136f390c..ae63ca97 100644 --- a/readme/tracking-disposable-instances-using-pre-built-classes.md +++ b/readme/tracking-disposable-instances-using-pre-built-classes.md @@ -148,7 +148,7 @@ partial class Composition: IDisposable Abstractions.Own perBlockOwn3; // Creates the owner of an instance Abstractions.Own localOwn24 = accumulator50; - IDependency localValue25 = _root._singletonDependency44!; + IDependency localValue25 = _root._singletonDependency44; perBlockOwn3 = new Abstractions.Own(localValue25, localOwn24); using (_lock.EnterScope()) { diff --git a/readme/tracking-disposable-instances-with-different-lifetimes.md b/readme/tracking-disposable-instances-with-different-lifetimes.md index 41752782..46338754 100644 --- a/readme/tracking-disposable-instances-with-different-lifetimes.md +++ b/readme/tracking-disposable-instances-with-different-lifetimes.md @@ -145,7 +145,7 @@ partial class Composition: IDisposable Owned perBlockOwned3; // Creates the owner of an instance IOwned localOwned31 = transientOwned4; - IDependency localValue32 = _root._singletonDependency44!; + IDependency localValue32 = _root._singletonDependency44; perBlockOwned3 = new Owned(localValue32, localOwned31); using (_lock.EnterScope()) { diff --git a/src/Pure.DI.Core/Components/Api.g.cs b/src/Pure.DI.Core/Components/Api.g.cs index 6449d9ce..fd8f3efa 100644 --- a/src/Pure.DI.Core/Components/Api.g.cs +++ b/src/Pure.DI.Core/Components/Api.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 #pragma warning disable #if !PUREDI_API_FUNC_SUPPRESSION diff --git a/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs b/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs index a2433b61..5e7bdbc7 100644 --- a/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs +++ b/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 #pragma warning disable namespace Pure.DI { diff --git a/src/Pure.DI.Core/Core/BindingBuilder.cs b/src/Pure.DI.Core/Core/BindingBuilder.cs index deceb25d..84b06788 100644 --- a/src/Pure.DI.Core/Core/BindingBuilder.cs +++ b/src/Pure.DI.Core/Core/BindingBuilder.cs @@ -3,8 +3,10 @@ namespace Pure.DI.Core; +using static Tag; + internal class BindingBuilder( - [Tag("UniqueTags")] IIdGenerator idGenerator, + [Tag(Tag.UniqueTag)] IIdGenerator idGenerator, IBaseSymbolsProvider baseSymbolsProvider) : IBindingBuilder { @@ -162,12 +164,12 @@ private static MdTag BuildTag(MdTag tag, ITypeSymbol? type, Lazy id) if (tag.Value is Tag tagVal) { // ReSharper disable once SwitchStatementHandlesSomeKnownEnumValuesWithDefault - if (tagVal == Tag.Type) + if (tagVal == Type) { return MdTag.CreateTypeTag(tag, type); } - if (tagVal == Tag.Unique) + if (tagVal == Unique) { return MdTag.CreateUniqueTag(tag, id.Value); } diff --git a/src/Pure.DI.Core/Core/Code/BuildTools.cs b/src/Pure.DI.Core/Core/Code/BuildTools.cs index 543a38d5..e3246d24 100644 --- a/src/Pure.DI.Core/Core/Code/BuildTools.cs +++ b/src/Pure.DI.Core/Core/Code/BuildTools.cs @@ -3,11 +3,13 @@ namespace Pure.DI.Core.Code; +using static Tag; + internal class BuildTools( IFilter filter, ITypeResolver typeResolver, IBaseSymbolsProvider baseSymbolsProvider, - [Tag("Injection")] IIdGenerator idGenerator, + [Tag(Injection)] IIdGenerator idGenerator, ILocks locks) : IBuildTools { diff --git a/src/Pure.DI.Core/Core/Code/TypeResolver.cs b/src/Pure.DI.Core/Core/Code/TypeResolver.cs index 8dc8e887..c16bddf6 100644 --- a/src/Pure.DI.Core/Core/Code/TypeResolver.cs +++ b/src/Pure.DI.Core/Core/Code/TypeResolver.cs @@ -2,9 +2,11 @@ namespace Pure.DI.Core.Code; +using static Tag; + internal class TypeResolver( IMarker marker, - [Tag("GenericType")] IIdGenerator idGenerator) + [Tag(GenericType)] IIdGenerator idGenerator) : ITypeResolver { private readonly Dictionary _names = new(SymbolEqualityComparer.Default); diff --git a/src/Pure.DI.Core/Features/Default.g.cs b/src/Pure.DI.Core/Features/Default.g.cs index 4034b827..2c15a295 100644 --- a/src/Pure.DI.Core/Features/Default.g.cs +++ b/src/Pure.DI.Core/Features/Default.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 #pragma warning disable namespace Pure.DI diff --git a/src/Pure.DI.Core/Generator.cs b/src/Pure.DI.Core/Generator.cs index 60788afe..2e798076 100644 --- a/src/Pure.DI.Core/Generator.cs +++ b/src/Pure.DI.Core/Generator.cs @@ -149,9 +149,9 @@ private void Setup() => DI.Setup() .Bind().To() .Bind().To() .Bind().To() - .Bind("UniqueTags").To() - .Bind("GenericType").To() - .Bind("Injection").To() + .Bind(UniqueTag).To() + .Bind(GenericType).To() + .Bind(Injection).To() .Bind().To() .Bind().To>() .Bind().To() diff --git a/src/Pure.DI.Core/Pure.DI.Core.csproj b/src/Pure.DI.Core/Pure.DI.Core.csproj index 02ce8e54..ccb232ab 100644 --- a/src/Pure.DI.Core/Pure.DI.Core.csproj +++ b/src/Pure.DI.Core/Pure.DI.Core.csproj @@ -3,8 +3,7 @@ netstandard2.0 $(BasePackageId) - $(DefineConstants);PUREDI_API_SUPPRESSION;PUREDI_API_V2 - $(NoWarn);CS8619 + $(DefineConstants);PUREDI_API_SUPPRESSION;PUREDI_API_V1