diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 61bfb88aa..1b710a729 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,8 +15,8 @@ jobs: with: dotnet-version: '8.0.x' - #- name: Build and check - #run: dotnet run --project ./build -- check + - name: Build and check + run: dotnet run --project ./build -- check - name: Publish Blazor example run: dotnet run --project ./build -- publish diff --git a/readme/ArrayDetails.md b/readme/ArrayDetails.md index ff34c7d2b..8dcac4151 100644 --- a/readme/ArrayDetails.md +++ b/readme/ArrayDetails.md @@ -116,14 +116,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Array { - private readonly Array _rootM03D08di; + private readonly Array _rootM03D09di; /// /// This constructor creates a new instance of . /// public Array() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -132,7 +132,7 @@ partial class Array /// Base composition. internal Array(Array baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -156,7 +156,7 @@ partial class Array #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -170,7 +170,7 @@ partial class Array #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -183,10 +183,10 @@ partial class Array #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -207,10 +207,10 @@ partial class Array #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -303,26 +303,26 @@ partial class Array " Array ..> CompositionRoot : CompositionRoot PureDIByCR"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Array() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Array composite) { @@ -335,7 +335,7 @@ partial class Array } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Array composition) { diff --git a/readme/BlazorWebAssemblyApp.md b/readme/BlazorWebAssemblyApp.md index f79b3905a..aa241455c 100644 --- a/readme/BlazorWebAssemblyApp.md +++ b/readme/BlazorWebAssemblyApp.md @@ -2,6 +2,8 @@ [![CSharp](https://img.shields.io/badge/C%23-code-blue.svg)](/samples/BlazorServerApp) +[Here's an example](https://devteam.github.io/Pure.DI/) on github.io + This example demonstrates the creation of a [Blazor WebAssembly](https://learn.microsoft.com/en-us/aspnet/core/blazor/hosting-models#blazor-webassembly) application in the pure DI paradigm using the _Pure.DI_ code generator. Composition setup file is [Composition.cs](/samples/BlazorWebAssemblyApp/Composition.cs): diff --git a/readme/EnumDetails.md b/readme/EnumDetails.md index e2892dbd0..aee53e585 100644 --- a/readme/EnumDetails.md +++ b/readme/EnumDetails.md @@ -116,14 +116,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Enum { - private readonly Enum _rootM03D08di; + private readonly Enum _rootM03D09di; /// /// This constructor creates a new instance of . /// public Enum() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -132,7 +132,7 @@ partial class Enum /// Base composition. internal Enum(Enum baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -142,15 +142,15 @@ partial class Enum public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable LocalperBlockM03D08di10_IEnumerable() + System.Collections.Generic.IEnumerable LocalperBlockM03D09di10_IEnumerable() { yield return new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); yield return new Pure.DI.Benchmarks.Model.Service3v2(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); yield return new Pure.DI.Benchmarks.Model.Service3v3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); yield return new Pure.DI.Benchmarks.Model.Service3v4(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); } - var perBlockM03D08di10_IEnumerable = LocalperBlockM03D08di10_IEnumerable(); - return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D08di10_IEnumerable)), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D08di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D08di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D08di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()), new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); + var perBlockM03D09di10_IEnumerable = LocalperBlockM03D09di10_IEnumerable(); + return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D09di10_IEnumerable)), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D09di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D09di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D09di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()), new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); } #endregion @@ -165,7 +165,7 @@ partial class Enum #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -179,7 +179,7 @@ partial class Enum #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -192,10 +192,10 @@ partial class Enum #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -216,10 +216,10 @@ partial class Enum #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -312,26 +312,26 @@ partial class Enum " Enum ..> CompositionRoot : CompositionRoot PureDIByCR"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Enum() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Enum composite) { @@ -344,7 +344,7 @@ partial class Enum } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Enum composition) { diff --git a/readme/FuncDetails.md b/readme/FuncDetails.md index bc188c21b..eb86fc067 100644 --- a/readme/FuncDetails.md +++ b/readme/FuncDetails.md @@ -95,14 +95,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Func { - private readonly Func _rootM03D08di; + private readonly Func _rootM03D09di; /// /// This constructor creates a new instance of . /// public Func() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -111,7 +111,7 @@ partial class Func /// Base composition. internal Func(Func baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -120,14 +120,14 @@ partial class Func #endif public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { - System.Func perBlockM03D08di10_Func = new Func( + System.Func perBlockM03D09di10_Func = new Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var value_M03D08di1 = new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); - return value_M03D08di1; + var value_M03D09di1 = new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); + return value_M03D09di1; }); - return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D08di10_Func)), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D08di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D08di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D08di10_Func), new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()), new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); + return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D09di10_Func)), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D09di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D09di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D09di10_Func), new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()), new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); } #endregion @@ -142,7 +142,7 @@ partial class Func #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -156,7 +156,7 @@ partial class Func #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -169,10 +169,10 @@ partial class Func #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -193,10 +193,10 @@ partial class Func #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -268,26 +268,26 @@ partial class Func " FuncᐸIService3ᐳ *-- Service3 : IService3"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Func() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Func composite) { @@ -300,7 +300,7 @@ partial class Func } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Func composition) { diff --git a/readme/SingletonDetails.md b/readme/SingletonDetails.md index da6db8ea2..cfe513c19 100644 --- a/readme/SingletonDetails.md +++ b/readme/SingletonDetails.md @@ -97,16 +97,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Singleton { - private readonly Singleton _rootM03D08di; - private Pure.DI.Benchmarks.Model.Service1 _scopedM03D08di35_Service1; - private Pure.DI.Benchmarks.Model.Service4 _scopedM03D08di38_Service4; + private readonly Singleton _rootM03D09di; + private Pure.DI.Benchmarks.Model.Service1 _scopedM03D09di35_Service1; + private Pure.DI.Benchmarks.Model.Service4 _scopedM03D09di38_Service4; /// /// This constructor creates a new instance of . /// public Singleton() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -115,7 +115,7 @@ partial class Singleton /// Base composition. internal Singleton(Singleton baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -124,15 +124,15 @@ partial class Singleton #endif public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { - if (ReferenceEquals(_scopedM03D08di38_Service4, null)) + if (ReferenceEquals(_scopedM03D09di38_Service4, null)) { - _scopedM03D08di38_Service4 = new Pure.DI.Benchmarks.Model.Service4(); + _scopedM03D09di38_Service4 = new Pure.DI.Benchmarks.Model.Service4(); } - if (ReferenceEquals(_scopedM03D08di35_Service1, null)) + if (ReferenceEquals(_scopedM03D09di35_Service1, null)) { - _scopedM03D08di35_Service1 = new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4))); + _scopedM03D09di35_Service1 = new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4))); } - return new Pure.DI.Benchmarks.Model.CompositionRoot(_scopedM03D08di35_Service1, new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4)), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D08di38_Service4, _scopedM03D08di38_Service4), _scopedM03D08di38_Service4, _scopedM03D08di38_Service4); + return new Pure.DI.Benchmarks.Model.CompositionRoot(_scopedM03D09di35_Service1, new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4)), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D09di38_Service4, _scopedM03D09di38_Service4), _scopedM03D09di38_Service4, _scopedM03D09di38_Service4); } #endregion @@ -147,7 +147,7 @@ partial class Singleton #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -161,7 +161,7 @@ partial class Singleton #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -174,10 +174,10 @@ partial class Singleton #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -198,10 +198,10 @@ partial class Singleton #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -275,26 +275,26 @@ partial class Singleton " Singleton ..> CompositionRoot : CompositionRoot PureDIByCR"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Singleton() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Singleton composite) { @@ -307,7 +307,7 @@ partial class Singleton } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Singleton composition) { diff --git a/readme/TransientDetails.md b/readme/TransientDetails.md index 82c6f1f2c..f95645964 100644 --- a/readme/TransientDetails.md +++ b/readme/TransientDetails.md @@ -97,14 +97,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Transient { - private readonly Transient _rootM03D08di; + private readonly Transient _rootM03D09di; /// /// This constructor creates a new instance of . /// public Transient() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -113,7 +113,7 @@ partial class Transient /// Base composition. internal Transient(Transient baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -137,7 +137,7 @@ partial class Transient #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -151,7 +151,7 @@ partial class Transient #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -164,10 +164,10 @@ partial class Transient #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -188,10 +188,10 @@ partial class Transient #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -265,26 +265,26 @@ partial class Transient " Transient ..> CompositionRoot : CompositionRoot PureDIByCR"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Transient() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Transient composite) { @@ -297,7 +297,7 @@ partial class Transient } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Transient composition) { diff --git a/readme/a-few-partial-classes.md b/readme/a-few-partial-classes.md index f627c5159..54d2c9974 100644 --- a/readme/a-few-partial-classes.md +++ b/readme/a-few-partial-classes.md @@ -107,14 +107,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -123,7 +123,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -150,7 +150,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -164,7 +164,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -177,10 +177,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -201,10 +201,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -247,26 +247,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.SeveralPartialClassesScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.SeveralPartialClassesScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -279,7 +279,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.SeveralPartialClassesScenario.IService Resolve(Composition composition) { diff --git a/readme/abstractions-binding.md b/readme/abstractions-binding.md index f50395bfc..0fedc462d 100644 --- a/readme/abstractions-binding.md +++ b/readme/abstractions-binding.md @@ -118,14 +118,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -134,7 +134,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -148,8 +148,8 @@ partial class Composition #endif get { - var perBlockM03D08di1_Dependency = new Pure.DI.UsageTests.Basics.SimpleBindingScenario.Dependency(); - return new Pure.DI.UsageTests.Basics.SimpleBindingScenario.Service(perBlockM03D08di1_Dependency, perBlockM03D08di1_Dependency, perBlockM03D08di1_Dependency); + var perBlockM03D09di1_Dependency = new Pure.DI.UsageTests.Basics.SimpleBindingScenario.Dependency(); + return new Pure.DI.UsageTests.Basics.SimpleBindingScenario.Service(perBlockM03D09di1_Dependency, perBlockM03D09di1_Dependency, perBlockM03D09di1_Dependency); } } #endregion diff --git a/readme/advanced-interception.md b/readme/advanced-interception.md index 98a3c3abb..068a13ce0 100644 --- a/readme/advanced-interception.md +++ b/readme/advanced-interception.md @@ -175,14 +175,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -191,7 +191,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -218,7 +218,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -232,7 +232,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -245,10 +245,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -269,10 +269,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -317,26 +317,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -349,7 +349,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService Resolve(Composition composition) { diff --git a/readme/arguments.md b/readme/arguments.md index b964cc14c..3ccd6a6b9 100644 --- a/readme/arguments.md +++ b/readme/arguments.md @@ -120,9 +120,9 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly int _argM03D08di_id; - private readonly string _argM03D08di_serviceName; + private readonly Composition _rootM03D09di; + private readonly int _argM03D09di_id; + private readonly string _argM03D09di_serviceName; /// /// This parameterized constructor creates a new instance of with arguments. @@ -136,14 +136,14 @@ partial class Composition /// public Composition(int id, string serviceName) { - _rootM03D08di = this; + _rootM03D09di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D08di_id = id; - _argM03D08di_serviceName = serviceName; + _argM03D09di_id = id; + _argM03D09di_serviceName = serviceName; } /// @@ -152,9 +152,9 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _argM03D08di_id = baseComposition._argM03D08di_id; - _argM03D08di_serviceName = baseComposition._argM03D08di_serviceName; + _rootM03D09di = baseComposition._rootM03D09di; + _argM03D09di_id = baseComposition._argM03D09di_id; + _argM03D09di_serviceName = baseComposition._argM03D09di_serviceName; } #region Composition Roots @@ -165,7 +165,7 @@ partial class Composition #endif get { - return new Pure.DI.UsageTests.Basics.ArgumentsScenario.Service(_argM03D08di_serviceName, new Pure.DI.UsageTests.Basics.ArgumentsScenario.Dependency(_argM03D08di_id)); + return new Pure.DI.UsageTests.Basics.ArgumentsScenario.Service(_argM03D09di_serviceName, new Pure.DI.UsageTests.Basics.ArgumentsScenario.Dependency(_argM03D09di_id)); } } #endregion @@ -181,7 +181,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -195,7 +195,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -208,10 +208,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -232,10 +232,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -282,26 +282,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ArgumentsScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ArgumentsScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -314,7 +314,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ArgumentsScenario.IService Resolve(Composition composition) { diff --git a/readme/array.md b/readme/array.md index c7c5267a2..22ced43c6 100644 --- a/readme/array.md +++ b/readme/array.md @@ -132,14 +132,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -148,7 +148,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -175,7 +175,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -189,7 +189,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -202,10 +202,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -226,10 +226,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -279,26 +279,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ArrayScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ArrayScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -311,7 +311,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ArrayScenario.IService Resolve(Composition composition) { diff --git a/readme/async-enumerable.md b/readme/async-enumerable.md index bf8393670..fb5681d06 100644 --- a/readme/async-enumerable.md +++ b/readme/async-enumerable.md @@ -115,14 +115,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -131,7 +131,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -143,13 +143,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - async System.Collections.Generic.IAsyncEnumerable LocaltransientM03D08di1_IAsyncEnumerable() + async System.Collections.Generic.IAsyncEnumerable LocaltransientM03D09di1_IAsyncEnumerable() { yield return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.XyzDependency(); } - var transientM03D08di1_IAsyncEnumerable = LocaltransientM03D08di1_IAsyncEnumerable(); - return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.Service(transientM03D08di1_IAsyncEnumerable); + var transientM03D09di1_IAsyncEnumerable = LocaltransientM03D09di1_IAsyncEnumerable(); + return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.Service(transientM03D09di1_IAsyncEnumerable); } } #endregion @@ -165,7 +165,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -179,7 +179,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -192,10 +192,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -216,10 +216,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -269,26 +269,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -301,7 +301,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService Resolve(Composition composition) { diff --git a/readme/auto-bindings.md b/readme/auto-bindings.md index 42782dca0..024009865 100644 --- a/readme/auto-bindings.md +++ b/readme/auto-bindings.md @@ -82,14 +82,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -98,7 +98,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots diff --git a/readme/auto-scoped.md b/readme/auto-scoped.md index dd390f2c4..cba1cf79e 100644 --- a/readme/auto-scoped.md +++ b/readme/auto-scoped.md @@ -142,17 +142,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency _scopedM03D08di34_Dependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency _scopedM03D09di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -161,8 +161,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -176,17 +176,17 @@ partial class Composition #endif get { - if (ReferenceEquals(_scopedM03D08di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_scopedM03D08di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D09di34_Dependency, null)) { - _scopedM03D08di34_Dependency = new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency(); + _scopedM03D09di34_Dependency = new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency(); } } } - return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service(_scopedM03D08di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service(_scopedM03D09di34_Dependency); } } @@ -200,23 +200,23 @@ partial class Composition #endif get { - var perResolveM03D08di39_Func = default(System.Func); - perResolveM03D08di39_Func = new global::System.Func( + var perResolveM03D09di39_Func = default(System.Func); + perResolveM03D09di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var transientM03D08di2_Composition = this; - Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.IService transientM03D08di1_IService; + var transientM03D09di2_Composition = this; + Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.IService transientM03D09di1_IService; { - var baseComposition_M03D08di2 = transientM03D08di2_Composition; + var baseComposition_M03D09di2 = transientM03D09di2_Composition; // Creates a session - var session_M03D08di3 = new Composition(baseComposition_M03D08di2); - transientM03D08di1_IService = session_M03D08di3.SessionRoot; + var session_M03D09di3 = new Composition(baseComposition_M03D09di2); + transientM03D09di1_IService = session_M03D09di3.SessionRoot; } - var factory_M03D08di1 = transientM03D08di1_IService; - return factory_M03D08di1; + var factory_M03D09di1 = transientM03D09di1_IService; + return factory_M03D09di1; }); - return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program(perResolveM03D08di39_Func); + return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program(perResolveM03D09di39_Func); } } #endregion @@ -232,7 +232,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -246,7 +246,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -259,10 +259,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -283,10 +283,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -336,29 +336,29 @@ partial class Composition " FuncᐸIServiceᐳ *-- IService : IService"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -371,7 +371,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service Resolve(Composition composition) { @@ -389,7 +389,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program Resolve(Composition composition) { diff --git a/readme/check-for-a-root.md b/readme/check-for-a-root.md index f3199cc36..10755a02c 100644 --- a/readme/check-for-a-root.md +++ b/readme/check-for-a-root.md @@ -64,7 +64,7 @@ Composition.HasRoot(typeof(IComparable)).ShouldBeFalse(); classDiagram class Composition { +IService Root - -IDependency RootM03D08di0001 + -IDependency RootM03D09di0001 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -86,7 +86,7 @@ classDiagram <> } Service *-- Dependency : "MyDep" IDependency - Composition ..> Dependency : "MyDep" IDependency RootM03D08di0001 + Composition ..> Dependency : "MyDep" IDependency RootM03D09di0001 Composition ..> Service : IService Root ``` @@ -126,21 +126,21 @@ classDiagram /// var instance = composition.Root; /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. ///
/// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -149,7 +149,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -167,7 +167,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency RootM03D08di0001 + public Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency RootM03D09di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] @@ -190,7 +190,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -204,7 +204,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -217,10 +217,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -241,10 +241,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -264,7 +264,7 @@ partial class Composition "classDiagram\n" + " class Composition {\n" + " +IService Root\n" + - " -IDependency RootM03D08di0001\n" + + " -IDependency RootM03D09di0001\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -286,37 +286,37 @@ partial class Composition " <>\n" + " }\n" + " Service *-- Dependency : \"MyDep\" IDependency\n" + - " Composition ..> Dependency : \"MyDep\" IDependency RootM03D08di0001\n" + + " Composition ..> Dependency : \"MyDep\" IDependency RootM03D09di0001\n" + " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; private static partial void OnNewRoot(global::Pure.DI.IResolver resolver, string name, object? tag, global::Pure.DI.Lifetime lifetime); static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - OnNewRoot(valResolverM03D08di_0000, "Root", null, Pure.DI.Lifetime.Transient); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - OnNewRoot(valResolverM03D08di_0001, "RootM03D08di0001", "MyDep", Pure.DI.Lifetime.Transient); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + OnNewRoot(valResolverM03D09di_0000, "Root", null, Pure.DI.Lifetime.Transient); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + OnNewRoot(valResolverM03D09di_0001, "RootM03D09di0001", "MyDep", Pure.DI.Lifetime.Transient); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CheckForRootScenario.IService), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CheckForRootScenario.IService), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -329,7 +329,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CheckForRootScenario.IService Resolve(Composition composition) { @@ -347,7 +347,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency Resolve(Composition composition) { @@ -359,7 +359,7 @@ partial class Composition switch (tag) { case "MyDep": - return composition.RootM03D08di0001; + return composition.RootM03D09di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency."); } diff --git a/readme/complex-generics.md b/readme/complex-generics.md index 79dee2dbe..ae865754c 100644 --- a/readme/complex-generics.md +++ b/readme/complex-generics.md @@ -136,14 +136,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -152,7 +152,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -179,7 +179,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -193,7 +193,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -206,10 +206,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -230,10 +230,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -288,26 +288,26 @@ partial class Composition " ServiceᐸStringˏInt32ˏListᐸStringᐳˏDictionaryᐸStringˏInt32ᐳᐳ *-- DependencyStructᐸInt32ᐳ : \"value type\" IDependencyᐸInt32ᐳ"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di>.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di>.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ComplexGenericsScenario.Program), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ComplexGenericsScenario.Program), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -320,7 +320,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.Basics.ComplexGenericsScenario.Program Resolve(Composition composition) { diff --git a/readme/composition-root-kinds.md b/readme/composition-root-kinds.md index 436314f03..1ad852c89 100644 --- a/readme/composition-root-kinds.md +++ b/readme/composition-root-kinds.md @@ -132,14 +132,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -148,7 +148,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -200,7 +200,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -214,7 +214,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -227,10 +227,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -251,10 +251,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -305,29 +305,29 @@ partial class Composition " Composition ..> Dependency : IDependency Dependency"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IService), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IDependency), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IService), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IDependency), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -340,7 +340,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IService Resolve(Composition composition) { @@ -360,7 +360,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IDependency Resolve(Composition composition) { diff --git a/readme/composition-roots.md b/readme/composition-roots.md index 57fc8032d..98cf09e52 100644 --- a/readme/composition-roots.md +++ b/readme/composition-roots.md @@ -68,7 +68,7 @@ classDiagram class Composition { +IService MyRoot +IService SomeOtherService - -IDependency RootM03D08di0003 + -IDependency RootM03D09di0003 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -95,7 +95,7 @@ classDiagram Service *-- Dependency : IDependency Composition ..> Service : IService MyRoot Composition ..> OtherService : "Other" IService SomeOtherService - Composition ..> Dependency : IDependency RootM03D08di0003 + Composition ..> Dependency : IDependency RootM03D09di0003 ``` @@ -148,21 +148,21 @@ classDiagram /// var instance = composition.MyRoot; /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. ///
/// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -171,7 +171,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -210,7 +210,7 @@ partial class Composition /// Specifies to create a private composition root
/// that is only accessible from "Resolve()" methods ///
- public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency RootM03D08di0003 + public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency RootM03D09di0003 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] @@ -233,7 +233,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -247,7 +247,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -260,10 +260,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -284,10 +284,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -308,7 +308,7 @@ partial class Composition " class Composition {\n" + " +IService MyRoot\n" + " +IService SomeOtherService\n" + - " -IDependency RootM03D08di0003\n" + + " -IDependency RootM03D09di0003\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -335,32 +335,32 @@ partial class Composition " Service *-- Dependency : IDependency\n" + " Composition ..> Service : IService MyRoot\n" + " Composition ..> OtherService : \"Other\" IService SomeOtherService\n" + - " Composition ..> Dependency : IDependency RootM03D08di0003"; + " Composition ..> Dependency : IDependency RootM03D09di0003"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -373,7 +373,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService Resolve(Composition composition) { @@ -393,11 +393,11 @@ partial class Composition } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D08di0003; + return composition.RootM03D09di0003; } public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -405,7 +405,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D08di0003; + return composition.RootM03D09di0003; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency."); } diff --git a/readme/constructor-ordinal-attribute.md b/readme/constructor-ordinal-attribute.md index b00a0d16c..78cb1e394 100644 --- a/readme/constructor-ordinal-attribute.md +++ b/readme/constructor-ordinal-attribute.md @@ -99,8 +99,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly string _argM03D08di_serviceName; + private readonly Composition _rootM03D09di; + private readonly string _argM03D09di_serviceName; /// /// This parameterized constructor creates a new instance of with arguments. @@ -108,13 +108,13 @@ partial class Composition /// The composition argument of type . public Composition(string serviceName) { - _rootM03D08di = this; + _rootM03D09di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D08di_serviceName = serviceName; + _argM03D09di_serviceName = serviceName; } /// @@ -123,8 +123,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _argM03D08di_serviceName = baseComposition._argM03D08di_serviceName; + _rootM03D09di = baseComposition._rootM03D09di; + _argM03D09di_serviceName = baseComposition._argM03D09di_serviceName; } #region Composition Roots @@ -135,7 +135,7 @@ partial class Composition #endif get { - return new Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.Service(_argM03D08di_serviceName); + return new Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.Service(_argM03D09di_serviceName); } } #endregion @@ -151,7 +151,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -165,7 +165,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -178,10 +178,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -202,10 +202,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -242,26 +242,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -274,7 +274,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService Resolve(Composition composition) { diff --git a/readme/custom-attributes.md b/readme/custom-attributes.md index a11025120..279910347 100644 --- a/readme/custom-attributes.md +++ b/readme/custom-attributes.md @@ -115,8 +115,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class PersonComposition { - private readonly PersonComposition _rootM03D08di; - private readonly int _argM03D08di_personId; + private readonly PersonComposition _rootM03D09di; + private readonly int _argM03D09di_personId; /// /// This parameterized constructor creates a new instance of with arguments. @@ -124,8 +124,8 @@ partial class PersonComposition /// The composition argument of type . public PersonComposition(int personId) { - _rootM03D08di = this; - _argM03D08di_personId = personId; + _rootM03D09di = this; + _argM03D09di_personId = personId; } /// @@ -134,8 +134,8 @@ partial class PersonComposition /// Base composition. internal PersonComposition(PersonComposition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _argM03D08di_personId = baseComposition._argM03D08di_personId; + _rootM03D09di = baseComposition._rootM03D09di; + _argM03D09di_personId = baseComposition._argM03D09di_personId; } #region Composition Roots @@ -146,10 +146,10 @@ partial class PersonComposition #endif get { - string transientM03D08di1_String = "Nik"; - var transientM03D08di0_Person = new Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person(transientM03D08di1_String); - transientM03D08di0_Person.Id = _argM03D08di_personId; - return transientM03D08di0_Person; + string transientM03D09di1_String = "Nik"; + var transientM03D09di0_Person = new Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person(transientM03D09di1_String); + transientM03D09di0_Person.Id = _argM03D09di_personId; + return transientM03D09di0_Person; } } #endregion @@ -165,7 +165,7 @@ partial class PersonComposition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -179,7 +179,7 @@ partial class PersonComposition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -192,10 +192,10 @@ partial class PersonComposition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -216,10 +216,10 @@ partial class PersonComposition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -259,26 +259,26 @@ partial class PersonComposition " PersonComposition ..> Person : IPerson Person"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static PersonComposition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(PersonComposition composite) { @@ -291,7 +291,7 @@ partial class PersonComposition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson Resolve(PersonComposition composition) { diff --git a/readme/decorator.md b/readme/decorator.md index 4f8764345..e7f7760ab 100644 --- a/readme/decorator.md +++ b/readme/decorator.md @@ -92,14 +92,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -108,7 +108,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -135,7 +135,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -149,7 +149,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -162,10 +162,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -186,10 +186,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -229,26 +229,26 @@ partial class Composition " Composition ..> GreetingService : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.DecoratorScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.DecoratorScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -261,7 +261,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Interception.DecoratorScenario.IService Resolve(Composition composition) { diff --git a/readme/default-lifetime.md b/readme/default-lifetime.md index da64bdd20..0ff98f18f 100644 --- a/readme/default-lifetime.md +++ b/readme/default-lifetime.md @@ -105,18 +105,18 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service _singletonM03D08di35_Service; - private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency _singletonM03D08di34_Dependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service _singletonM03D09di35_Service; + private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency _singletonM03D09di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -125,8 +125,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -137,23 +137,23 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di35_Service, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di35_Service, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di35_Service, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di35_Service, null)) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } - _singletonM03D08di35_Service = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service(_singletonM03D08di34_Dependency, _rootM03D08di._singletonM03D08di34_Dependency); - _rootM03D08di._singletonM03D08di35_Service = _singletonM03D08di35_Service; + _singletonM03D09di35_Service = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service(_singletonM03D09di34_Dependency, _rootM03D09di._singletonM03D09di34_Dependency); + _rootM03D09di._singletonM03D09di35_Service = _singletonM03D09di35_Service; } } } - return _rootM03D08di._singletonM03D08di35_Service; + return _rootM03D09di._singletonM03D09di35_Service; } } #endregion @@ -169,7 +169,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -183,7 +183,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -196,10 +196,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -220,10 +220,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -267,26 +267,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -299,7 +299,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService Resolve(Composition composition) { diff --git a/readme/default-values.md b/readme/default-values.md index 0cf40a1af..c7c42cb7c 100644 --- a/readme/default-values.md +++ b/readme/default-values.md @@ -98,14 +98,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -114,7 +114,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -144,7 +144,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -158,7 +158,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -171,10 +171,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -195,10 +195,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -242,26 +242,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -274,7 +274,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService Resolve(Composition composition) { diff --git a/readme/dependent-compositions.md b/readme/dependent-compositions.md index 1279d406e..c9eb588c5 100644 --- a/readme/dependent-compositions.md +++ b/readme/dependent-compositions.md @@ -120,14 +120,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -136,7 +136,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -163,7 +163,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -177,7 +177,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -190,10 +190,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -214,10 +214,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -260,26 +260,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -292,7 +292,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService Resolve(Composition composition) { @@ -360,14 +360,14 @@ partial class Composition [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class OtherComposition { - private readonly OtherComposition _rootM03D08di; + private readonly OtherComposition _rootM03D09di; /// /// This constructor creates a new instance of . /// public OtherComposition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -376,7 +376,7 @@ partial class OtherComposition /// Base composition. internal OtherComposition(OtherComposition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -414,7 +414,7 @@ partial class OtherComposition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -428,7 +428,7 @@ partial class OtherComposition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -441,10 +441,10 @@ partial class OtherComposition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -465,10 +465,10 @@ partial class OtherComposition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -517,29 +517,29 @@ partial class OtherComposition " OtherComposition ..> Program : Program Program"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static OtherComposition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.Program), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.Program), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(OtherComposition composite) { @@ -552,7 +552,7 @@ partial class OtherComposition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService Resolve(OtherComposition composition) { @@ -570,7 +570,7 @@ partial class OtherComposition } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.DependentCompositionsScenario.Program Resolve(OtherComposition composition) { diff --git a/readme/disposable-singleton.md b/readme/disposable-singleton.md index f613381c3..e90e4a4d2 100644 --- a/readme/disposable-singleton.md +++ b/readme/disposable-singleton.md @@ -111,20 +111,20 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private readonly global::System.IDisposable[] _disposablesM03D08di; - private int _disposeIndexM03D08di; - private Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency _singletonM03D08di34_Dependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private readonly global::System.IDisposable[] _disposablesM03D09di; + private int _disposeIndexM03D09di; + private Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency _singletonM03D09di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); - _disposablesM03D08di = new global::System.IDisposable[1]; + _rootM03D09di = this; + _lockM03D09di = new object(); + _disposablesM03D09di = new global::System.IDisposable[1]; } /// @@ -133,8 +133,8 @@ partial class Composition: global::System.IDisposable /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -145,19 +145,19 @@ partial class Composition: global::System.IDisposable #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; - _rootM03D08di._disposablesM03D08di[_rootM03D08di._disposeIndexM03D08di++] = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; + _rootM03D09di._disposablesM03D09di[_rootM03D09di._disposeIndexM03D09di++] = _singletonM03D09di34_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Service(_rootM03D08di._singletonM03D08di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Service(_rootM03D09di._singletonM03D09di34_Dependency); } } #endregion @@ -173,7 +173,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -187,7 +187,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -200,10 +200,10 @@ partial class Composition: global::System.IDisposable #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -224,10 +224,10 @@ partial class Composition: global::System.IDisposable #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -244,11 +244,11 @@ partial class Composition: global::System.IDisposable /// public void Dispose() { - lock (_lockM03D08di) + lock (_lockM03D09di) { - while (_disposeIndexM03D08di > 0) + while (_disposeIndexM03D09di > 0) { - var disposableInstance = _disposablesM03D08di[--_disposeIndexM03D08di]; + var disposableInstance = _disposablesM03D09di[--_disposeIndexM03D09di]; try { disposableInstance.Dispose(); @@ -259,7 +259,7 @@ partial class Composition: global::System.IDisposable } } - _singletonM03D08di34_Dependency = null; + _singletonM03D09di34_Dependency = null; } } @@ -298,26 +298,26 @@ partial class Composition: global::System.IDisposable " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -330,7 +330,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService Resolve(Composition composition) { diff --git a/readme/enumerable-generics.md b/readme/enumerable-generics.md index f88a5ac02..1b83fae77 100644 --- a/readme/enumerable-generics.md +++ b/readme/enumerable-generics.md @@ -144,14 +144,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -160,7 +160,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -172,13 +172,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D08di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D09di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.XyzDependency(); } - var perBlockM03D08di1_IEnumerable = LocalperBlockM03D08di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D08di1_IEnumerable); + var perBlockM03D09di1_IEnumerable = LocalperBlockM03D09di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D09di1_IEnumerable); } } @@ -190,13 +190,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D08di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D09di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.XyzDependency(); } - var perBlockM03D08di1_IEnumerable = LocalperBlockM03D08di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D08di1_IEnumerable); + var perBlockM03D09di1_IEnumerable = LocalperBlockM03D09di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D09di1_IEnumerable); } } #endregion @@ -212,7 +212,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -226,7 +226,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -239,10 +239,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -263,10 +263,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -340,29 +340,29 @@ partial class Composition " ServiceᐸStringᐳ o-- \"PerBlock\" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di>.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di>.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di>.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di>.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -375,7 +375,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService Resolve(Composition composition) { @@ -393,7 +393,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver> + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService Resolve(Composition composition) { diff --git a/readme/enumerable.md b/readme/enumerable.md index 53538fe58..78f23a0e5 100644 --- a/readme/enumerable.md +++ b/readme/enumerable.md @@ -107,14 +107,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -123,7 +123,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -135,13 +135,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable LocalperBlockM03D08di1_IEnumerable() + System.Collections.Generic.IEnumerable LocalperBlockM03D09di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableScenario.XyzDependency(); } - var perBlockM03D08di1_IEnumerable = LocalperBlockM03D08di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableScenario.Service(perBlockM03D08di1_IEnumerable); + var perBlockM03D09di1_IEnumerable = LocalperBlockM03D09di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableScenario.Service(perBlockM03D09di1_IEnumerable); } } #endregion @@ -157,7 +157,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -171,7 +171,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -184,10 +184,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -208,10 +208,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -261,26 +261,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -293,7 +293,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.EnumerableScenario.IService Resolve(Composition composition) { diff --git a/readme/factory.md b/readme/factory.md index 83001c4b1..5fc2a8031 100644 --- a/readme/factory.md +++ b/readme/factory.md @@ -109,14 +109,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -125,7 +125,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -136,13 +136,13 @@ partial class Composition #endif get { - Pure.DI.UsageTests.Basics.FactoryScenario.Dependency transientM03D08di1_Dependency; + Pure.DI.UsageTests.Basics.FactoryScenario.Dependency transientM03D09di1_Dependency; { - var dependency_M03D08di1 = new Dependency(DateTimeOffset.Now); - dependency_M03D08di1.Initialize(); - transientM03D08di1_Dependency = dependency_M03D08di1; + var dependency_M03D09di1 = new Dependency(DateTimeOffset.Now); + dependency_M03D09di1.Initialize(); + transientM03D09di1_Dependency = dependency_M03D09di1; } - return new Pure.DI.UsageTests.Basics.FactoryScenario.Service(transientM03D08di1_Dependency); + return new Pure.DI.UsageTests.Basics.FactoryScenario.Service(transientM03D09di1_Dependency); } } #endregion @@ -158,7 +158,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -172,7 +172,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -185,10 +185,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -209,10 +209,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -253,26 +253,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FactoryScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FactoryScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -285,7 +285,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.FactoryScenario.IService Resolve(Composition composition) { diff --git a/readme/field-injection.md b/readme/field-injection.md index 78a7848c4..a6c9b7540 100644 --- a/readme/field-injection.md +++ b/readme/field-injection.md @@ -98,14 +98,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -114,7 +114,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -125,9 +125,9 @@ partial class Composition #endif get { - var transientM03D08di0_Service = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service(); - transientM03D08di0_Service.DependencyVal = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Dependency(); - return transientM03D08di0_Service; + var transientM03D09di0_Service = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service(); + transientM03D09di0_Service.DependencyVal = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Dependency(); + return transientM03D09di0_Service; } } #endregion @@ -143,7 +143,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -157,7 +157,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -170,10 +170,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -194,10 +194,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -241,26 +241,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -273,7 +273,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService Resolve(Composition composition) { diff --git a/readme/func-with-arguments.md b/readme/func-with-arguments.md index 04dd2efe2..29bfb30f4 100644 --- a/readme/func-with-arguments.md +++ b/readme/func-with-arguments.md @@ -135,17 +135,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock _singletonM03D08di34_Clock; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock _singletonM03D09di34_Clock; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -154,8 +154,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -166,24 +166,24 @@ partial class Composition #endif get { - System.Func transientM03D08di1_Func = dependencyId => + System.Func transientM03D09di1_Func = dependencyId => { - int transientM03D08di3_Int32 = dependencyId; - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Clock, null)) + int transientM03D09di3_Int32 = dependencyId; + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Clock, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Clock, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Clock, null)) { - _singletonM03D08di34_Clock = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock(); - _rootM03D08di._singletonM03D08di34_Clock = _singletonM03D08di34_Clock; + _singletonM03D09di34_Clock = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock(); + _rootM03D09di._singletonM03D09di34_Clock = _singletonM03D09di34_Clock; } } } - var dependency_M03D08di1 = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Dependency(_rootM03D08di._singletonM03D08di34_Clock, transientM03D08di3_Int32); - return dependency_M03D08di1; + var dependency_M03D09di1 = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Dependency(_rootM03D09di._singletonM03D09di34_Clock, transientM03D09di3_Int32); + return dependency_M03D09di1; }; - return new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Service(transientM03D08di1_Func); + return new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Service(transientM03D09di1_Func); } } #endregion @@ -199,7 +199,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -213,7 +213,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -226,10 +226,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -250,10 +250,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -304,26 +304,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -336,7 +336,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService Resolve(Composition composition) { diff --git a/readme/func.md b/readme/func.md index d68ecf538..62b37a8f4 100644 --- a/readme/func.md +++ b/readme/func.md @@ -102,16 +102,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -120,8 +120,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -132,15 +132,15 @@ partial class Composition #endif get { - var perResolveM03D08di36_Func = default(System.Func); - perResolveM03D08di36_Func = new global::System.Func( + var perResolveM03D09di36_Func = default(System.Func); + perResolveM03D09di36_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D08di1 = new Pure.DI.UsageTests.BCL.FuncScenario.Dependency(); - return factory_M03D08di1; + var factory_M03D09di1 = new Pure.DI.UsageTests.BCL.FuncScenario.Dependency(); + return factory_M03D09di1; }); - return new Pure.DI.UsageTests.BCL.FuncScenario.Service(perResolveM03D08di36_Func); + return new Pure.DI.UsageTests.BCL.FuncScenario.Service(perResolveM03D09di36_Func); } } #endregion @@ -156,7 +156,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -170,7 +170,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -183,10 +183,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -207,10 +207,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -255,26 +255,26 @@ partial class Composition " FuncᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -287,7 +287,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.FuncScenario.IService Resolve(Composition composition) { diff --git a/readme/generics.md b/readme/generics.md index 0156b629d..7bcca83d1 100644 --- a/readme/generics.md +++ b/readme/generics.md @@ -121,14 +121,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -137,7 +137,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -164,7 +164,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -178,7 +178,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -191,10 +191,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -215,10 +215,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -269,26 +269,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.GenericsScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.GenericsScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -301,7 +301,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.GenericsScenario.IService Resolve(Composition composition) { diff --git a/readme/injection.md b/readme/injection.md index 4b5a55973..4d8d5bb23 100644 --- a/readme/injection.md +++ b/readme/injection.md @@ -99,14 +99,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -115,7 +115,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -126,12 +126,12 @@ partial class Composition #endif get { - Pure.DI.UsageTests.Basics.InjectionScenario.Service transientM03D08di0_Service; + Pure.DI.UsageTests.Basics.InjectionScenario.Service transientM03D09di0_Service; { - var dependency_M03D08di1 = new Pure.DI.UsageTests.Basics.InjectionScenario.Dependency(); - transientM03D08di0_Service = new Service(dependency_M03D08di1); + var dependency_M03D09di1 = new Pure.DI.UsageTests.Basics.InjectionScenario.Dependency(); + transientM03D09di0_Service = new Service(dependency_M03D09di1); } - return transientM03D08di0_Service; + return transientM03D09di0_Service; } } #endregion @@ -147,7 +147,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -161,7 +161,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -174,10 +174,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -198,10 +198,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -242,26 +242,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InjectionScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InjectionScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -274,7 +274,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.InjectionScenario.IService Resolve(Composition composition) { diff --git a/readme/injections-of-abstractions.md b/readme/injections-of-abstractions.md index 1a2fdb528..6cc5045fb 100644 --- a/readme/injections-of-abstractions.md +++ b/readme/injections-of-abstractions.md @@ -108,14 +108,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -124,7 +124,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots diff --git a/readme/instance-initialization.md b/readme/instance-initialization.md index b494e586c..2202fd1da 100644 --- a/readme/instance-initialization.md +++ b/readme/instance-initialization.md @@ -115,8 +115,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly string _argM03D08di_serviceName; + private readonly Composition _rootM03D09di; + private readonly string _argM03D09di_serviceName; /// /// This parameterized constructor creates a new instance of with arguments. @@ -124,13 +124,13 @@ partial class Composition /// The composition argument of type . public Composition(string serviceName) { - _rootM03D08di = this; + _rootM03D09di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D08di_serviceName = serviceName; + _argM03D09di_serviceName = serviceName; } /// @@ -139,8 +139,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _argM03D08di_serviceName = baseComposition._argM03D08di_serviceName; + _rootM03D09di = baseComposition._rootM03D09di; + _argM03D09di_serviceName = baseComposition._argM03D09di_serviceName; } #region Composition Roots @@ -151,13 +151,13 @@ partial class Composition #endif get { - Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service transientM03D08di0_Service; + Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service transientM03D09di0_Service; { - var service_M03D08di1 = new Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service(_argM03D08di_serviceName, new Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Dependency()); - service_M03D08di1.Initialize(); - transientM03D08di0_Service = service_M03D08di1; + var service_M03D09di1 = new Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service(_argM03D09di_serviceName, new Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Dependency()); + service_M03D09di1.Initialize(); + transientM03D09di0_Service = service_M03D09di1; } - return transientM03D08di0_Service; + return transientM03D09di0_Service; } } #endregion @@ -173,7 +173,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -187,7 +187,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -200,10 +200,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -224,10 +224,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -268,26 +268,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InstanceInitializationScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InstanceInitializationScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -300,7 +300,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.InstanceInitializationScenario.IService Resolve(Composition composition) { diff --git a/readme/interception.md b/readme/interception.md index 3735d9ad7..e19eddc02 100644 --- a/readme/interception.md +++ b/readme/interception.md @@ -111,14 +111,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -127,7 +127,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -154,7 +154,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -168,7 +168,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -181,10 +181,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -205,10 +205,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -245,26 +245,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.InterceptionScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.InterceptionScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -277,7 +277,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Interception.InterceptionScenario.IService Resolve(Composition composition) { diff --git a/readme/keyed-service-provider.md b/readme/keyed-service-provider.md index 4acf46fed..9778f3b30 100644 --- a/readme/keyed-service-provider.md +++ b/readme/keyed-service-provider.md @@ -50,8 +50,8 @@ service.Dependency.ShouldBe(dependency); ```mermaid classDiagram class Composition { - -IDependency RootM03D08di0001 - -IService RootM03D08di0002 + -IDependency RootM03D09di0001 + -IService RootM03D09di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object GetService(Type type) @@ -72,8 +72,8 @@ classDiagram <> } Service o-- "Singleton" Dependency : "Dependency Key" IDependency - Composition ..> Dependency : "Dependency Key" IDependency RootM03D08di0001 - Composition ..> Service : "Service Key" IService RootM03D08di0002 + Composition ..> Dependency : "Dependency Key" IDependency RootM03D09di0001 + Composition ..> Service : "Service Key" IService RootM03D09di0002 ``` @@ -105,24 +105,24 @@ classDiagram /// /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. ///
/// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency _singletonM03D08di34_Dependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency _singletonM03D09di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -131,52 +131,52 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots - public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency RootM03D08di0001 + public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency RootM03D09di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } } } - return _rootM03D08di._singletonM03D08di34_Dependency; + return _rootM03D09di._singletonM03D09di34_Dependency; } } - public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService RootM03D08di0002 + public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService RootM03D09di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } } } - return new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Service(_rootM03D08di._singletonM03D08di34_Dependency); + return new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Service(_rootM03D09di._singletonM03D09di34_Dependency); } } #endregion @@ -192,7 +192,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -206,7 +206,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -219,10 +219,10 @@ partial class Composition #endif public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -243,10 +243,10 @@ partial class Composition #endif public object GetRequiredKeyedService(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -265,8 +265,8 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D08di0001\n" + - " -IService RootM03D08di0002\n" + + " -IDependency RootM03D09di0001\n" + + " -IService RootM03D09di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object GetService(Type type)\n" + @@ -287,33 +287,33 @@ partial class Composition " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : \"Dependency Key\" IDependency\n" + - " Composition ..> Dependency : \"Dependency Key\" IDependency RootM03D08di0001\n" + - " Composition ..> Service : \"Service Key\" IService RootM03D08di0002"; + " Composition ..> Dependency : \"Dependency Key\" IDependency RootM03D09di0001\n" + + " Composition ..> Service : \"Service Key\" IService RootM03D09di0002"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -326,7 +326,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency Resolve(Composition composition) { @@ -338,13 +338,13 @@ partial class Composition switch (tag) { case "Dependency Key": - return composition.RootM03D08di0001; + return composition.RootM03D09di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency."); } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService Resolve(Composition composition) { @@ -356,7 +356,7 @@ partial class Composition switch (tag) { case "Service Key": - return composition.RootM03D08di0002; + return composition.RootM03D09di0002; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService."); } diff --git a/readme/lazy.md b/readme/lazy.md index 8fbb3648e..046a9e236 100644 --- a/readme/lazy.md +++ b/readme/lazy.md @@ -96,16 +96,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -114,8 +114,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -126,20 +126,20 @@ partial class Composition #endif get { - var perResolveM03D08di37_Func = default(System.Func); - perResolveM03D08di37_Func = new global::System.Func( + var perResolveM03D09di37_Func = default(System.Func); + perResolveM03D09di37_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D08di1 = new Pure.DI.UsageTests.BCL.LazyScenario.Dependency(); - return factory_M03D08di1; + var factory_M03D09di1 = new Pure.DI.UsageTests.BCL.LazyScenario.Dependency(); + return factory_M03D09di1; }); - System.Lazy transientM03D08di1_Lazy; + System.Lazy transientM03D09di1_Lazy; { - var factory_M03D08di2 = perResolveM03D08di37_Func; - transientM03D08di1_Lazy = new global::System.Lazy(factory_M03D08di2, true); + var factory_M03D09di2 = perResolveM03D09di37_Func; + transientM03D09di1_Lazy = new global::System.Lazy(factory_M03D09di2, true); } - return new Pure.DI.UsageTests.BCL.LazyScenario.Service(transientM03D08di1_Lazy); + return new Pure.DI.UsageTests.BCL.LazyScenario.Service(transientM03D09di1_Lazy); } } #endregion @@ -155,7 +155,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -169,7 +169,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -182,10 +182,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -206,10 +206,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -256,26 +256,26 @@ partial class Composition " FuncᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.LazyScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.LazyScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -288,7 +288,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.LazyScenario.IService Resolve(Composition composition) { diff --git a/readme/manually-started-tasks.md b/readme/manually-started-tasks.md index ac5b9843d..813137cce 100644 --- a/readme/manually-started-tasks.md +++ b/readme/manually-started-tasks.md @@ -137,16 +137,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; /// /// This parameterized constructor creates a new instance of with arguments. /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -155,8 +155,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -165,21 +165,21 @@ partial class Composition #endif public Pure.DI.UsageTests.BCL.ManualTaskScenario.IService GetRoot(System.Threading.CancellationToken cancellationToken) { - var perResolveM03D08di39_Func = default(System.Func); - perResolveM03D08di39_Func = new global::System.Func( + var perResolveM03D09di39_Func = default(System.Func); + perResolveM03D09di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D08di1 = new Pure.DI.UsageTests.BCL.ManualTaskScenario.Dependency(); - return factory_M03D08di1; + var factory_M03D09di1 = new Pure.DI.UsageTests.BCL.ManualTaskScenario.Dependency(); + return factory_M03D09di1; }); - System.Threading.Tasks.Task transientM03D08di1_Task; + System.Threading.Tasks.Task transientM03D09di1_Task; { - var factory_M03D08di2 = perResolveM03D08di39_Func; - var cancellationToken_M03D08di3 = cancellationToken; - transientM03D08di1_Task = new Task(factory_M03D08di2, cancellationToken_M03D08di3); + var factory_M03D09di2 = perResolveM03D09di39_Func; + var cancellationToken_M03D09di3 = cancellationToken; + transientM03D09di1_Task = new Task(factory_M03D09di2, cancellationToken_M03D09di3); } - return new Pure.DI.UsageTests.BCL.ManualTaskScenario.Service(transientM03D08di1_Task); + return new Pure.DI.UsageTests.BCL.ManualTaskScenario.Service(transientM03D09di1_Task); } #endregion diff --git a/readme/member-ordinal-attribute.md b/readme/member-ordinal-attribute.md index 32c1e0890..2e8fed2e4 100644 --- a/readme/member-ordinal-attribute.md +++ b/readme/member-ordinal-attribute.md @@ -125,10 +125,10 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class PersonComposition { - private readonly PersonComposition _rootM03D08di; - private readonly int _argM03D08di_personId; - private readonly string _argM03D08di_personName; - private readonly System.DateTime _argM03D08di_personBirthday; + private readonly PersonComposition _rootM03D09di; + private readonly int _argM03D09di_personId; + private readonly string _argM03D09di_personName; + private readonly System.DateTime _argM03D09di_personBirthday; /// /// This parameterized constructor creates a new instance of with arguments. @@ -138,15 +138,15 @@ partial class PersonComposition /// The composition argument of type . public PersonComposition(int personId, string personName, System.DateTime personBirthday) { - _rootM03D08di = this; + _rootM03D09di = this; if (ReferenceEquals(personName, null)) { throw new global::System.ArgumentNullException("personName"); } - _argM03D08di_personId = personId; - _argM03D08di_personName = personName; - _argM03D08di_personBirthday = personBirthday; + _argM03D09di_personId = personId; + _argM03D09di_personName = personName; + _argM03D09di_personBirthday = personBirthday; } /// @@ -155,10 +155,10 @@ partial class PersonComposition /// Base composition. internal PersonComposition(PersonComposition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _argM03D08di_personId = baseComposition._argM03D08di_personId; - _argM03D08di_personName = baseComposition._argM03D08di_personName; - _argM03D08di_personBirthday = baseComposition._argM03D08di_personBirthday; + _rootM03D09di = baseComposition._rootM03D09di; + _argM03D09di_personId = baseComposition._argM03D09di_personId; + _argM03D09di_personName = baseComposition._argM03D09di_personName; + _argM03D09di_personBirthday = baseComposition._argM03D09di_personBirthday; } #region Composition Roots @@ -169,11 +169,11 @@ partial class PersonComposition #endif get { - var transientM03D08di0_Person = new Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person(); - transientM03D08di0_Person.Id = _argM03D08di_personId; - transientM03D08di0_Person.FirstName = _argM03D08di_personName; - transientM03D08di0_Person.Birthday = _argM03D08di_personBirthday; - return transientM03D08di0_Person; + var transientM03D09di0_Person = new Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person(); + transientM03D09di0_Person.Id = _argM03D09di_personId; + transientM03D09di0_Person.FirstName = _argM03D09di_personName; + transientM03D09di0_Person.Birthday = _argM03D09di_personBirthday; + return transientM03D09di0_Person; } } #endregion @@ -189,7 +189,7 @@ partial class PersonComposition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -203,7 +203,7 @@ partial class PersonComposition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -216,10 +216,10 @@ partial class PersonComposition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -240,10 +240,10 @@ partial class PersonComposition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -287,26 +287,26 @@ partial class PersonComposition " PersonComposition ..> Person : IPerson Person"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static PersonComposition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(PersonComposition composite) { @@ -319,7 +319,7 @@ partial class PersonComposition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson Resolve(PersonComposition composition) { diff --git a/readme/method-injection.md b/readme/method-injection.md index 3ad957360..7bff03968 100644 --- a/readme/method-injection.md +++ b/readme/method-injection.md @@ -99,14 +99,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -115,7 +115,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -126,9 +126,9 @@ partial class Composition #endif get { - var transientM03D08di0_Service = new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service(); - transientM03D08di0_Service.SetDependency(new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Dependency()); - return transientM03D08di0_Service; + var transientM03D09di0_Service = new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service(); + transientM03D09di0_Service.SetDependency(new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Dependency()); + return transientM03D09di0_Service; } } #endregion @@ -144,7 +144,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -158,7 +158,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -171,10 +171,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -195,10 +195,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -242,26 +242,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -274,7 +274,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService Resolve(Composition composition) { diff --git a/readme/multi-contract-bindings.md b/readme/multi-contract-bindings.md index d0c62ccec..126b81048 100644 --- a/readme/multi-contract-bindings.md +++ b/readme/multi-contract-bindings.md @@ -99,14 +99,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -115,7 +115,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -142,7 +142,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -156,7 +156,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -169,10 +169,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -193,10 +193,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -244,26 +244,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -276,7 +276,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService Resolve(Composition composition) { diff --git a/readme/oncannotresolve-hint.md b/readme/oncannotresolve-hint.md index c415c2fe4..5f24d431e 100644 --- a/readme/oncannotresolve-hint.md +++ b/readme/oncannotresolve-hint.md @@ -124,14 +124,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -140,7 +140,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -151,8 +151,8 @@ partial class Composition #endif get { - var transientM03D08di2_String = OnCannotResolve(null, Pure.DI.Lifetime.Transient); - return new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Service(new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Dependency(transientM03D08di2_String)); + var transientM03D09di2_String = OnCannotResolve(null, Pure.DI.Lifetime.Transient); + return new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Service(new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Dependency(transientM03D09di2_String)); } } #endregion @@ -168,7 +168,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -182,7 +182,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -195,10 +195,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -219,10 +219,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -269,26 +269,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -301,7 +301,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService Resolve(Composition composition) { diff --git a/readme/ondependencyinjection-hint.md b/readme/ondependencyinjection-hint.md index 8fd5fee2f..c0afd471e 100644 --- a/readme/ondependencyinjection-hint.md +++ b/readme/ondependencyinjection-hint.md @@ -121,14 +121,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -137,7 +137,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -164,7 +164,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -178,7 +178,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -191,10 +191,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -215,10 +215,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -263,26 +263,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -295,7 +295,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService Resolve(Composition composition) { diff --git a/readme/onnewinstance-hint.md b/readme/onnewinstance-hint.md index edd2b3a72..e8dcb7a5a 100644 --- a/readme/onnewinstance-hint.md +++ b/readme/onnewinstance-hint.md @@ -123,17 +123,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D08di34_Dependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D09di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -142,8 +142,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -154,24 +154,24 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D08di34_DependencyTemp; - _singletonM03D08di34_DependencyTemp = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency(); - OnNewInstance(ref _singletonM03D08di34_DependencyTemp, null, Pure.DI.Lifetime.Singleton); + Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D09di34_DependencyTemp; + _singletonM03D09di34_DependencyTemp = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency(); + OnNewInstance(ref _singletonM03D09di34_DependencyTemp, null, Pure.DI.Lifetime.Singleton); global::System.Threading.Thread.MemoryBarrier(); - _singletonM03D08di34_Dependency = _singletonM03D08di34_DependencyTemp; - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = _singletonM03D09di34_DependencyTemp; + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } } } - var transientM03D08di0_Service = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service(_rootM03D08di._singletonM03D08di34_Dependency); - OnNewInstance(ref transientM03D08di0_Service, null, Pure.DI.Lifetime.Transient); - return transientM03D08di0_Service; + var transientM03D09di0_Service = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service(_rootM03D09di._singletonM03D09di34_Dependency); + OnNewInstance(ref transientM03D09di0_Service, null, Pure.DI.Lifetime.Transient); + return transientM03D09di0_Service; } } #endregion @@ -187,7 +187,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -201,7 +201,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -214,10 +214,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -238,10 +238,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -286,26 +286,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -318,7 +318,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService Resolve(Composition composition) { diff --git a/readme/overriding-the-bcl-binding.md b/readme/overriding-the-bcl-binding.md index b55ac0815..0c9b172ae 100644 --- a/readme/overriding-the-bcl-binding.md +++ b/readme/overriding-the-bcl-binding.md @@ -98,14 +98,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -114,7 +114,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -125,13 +125,13 @@ partial class Composition #endif get { - Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IDependency[] transientM03D08di1_ = new IDependency[] + Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IDependency[] transientM03D09di1_ = new IDependency[] { new AbcDependency(), new XyzDependency(), new AbcDependency() }; - return new Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.Service(transientM03D08di1_); + return new Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.Service(transientM03D09di1_); } } #endregion @@ -147,7 +147,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -161,7 +161,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -174,10 +174,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -198,10 +198,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -238,26 +238,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -270,7 +270,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService Resolve(Composition composition) { diff --git a/readme/partial-class.md b/readme/partial-class.md index c7d0acfc7..dd6137879 100644 --- a/readme/partial-class.md +++ b/readme/partial-class.md @@ -132,14 +132,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -148,7 +148,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -159,10 +159,10 @@ partial class Composition #endif get { - long transientM03D08di5_Int64 = GenerateId(); - long transientM03D08di4_Int64 = GenerateId(); - string transientM03D08di1_String = $"{_serviceName}_{GenerateId()}"; - return new Pure.DI.UsageTests.Basics.PartialClassScenario.Service(transientM03D08di1_String, new Pure.DI.UsageTests.Basics.PartialClassScenario.Dependency(transientM03D08di5_Int64), new Pure.DI.UsageTests.Basics.PartialClassScenario.Dependency(transientM03D08di4_Int64)); + long transientM03D09di5_Int64 = GenerateId(); + long transientM03D09di4_Int64 = GenerateId(); + string transientM03D09di1_String = $"{_serviceName}_{GenerateId()}"; + return new Pure.DI.UsageTests.Basics.PartialClassScenario.Service(transientM03D09di1_String, new Pure.DI.UsageTests.Basics.PartialClassScenario.Dependency(transientM03D09di5_Int64), new Pure.DI.UsageTests.Basics.PartialClassScenario.Dependency(transientM03D09di4_Int64)); } } #endregion @@ -178,7 +178,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -192,7 +192,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -205,10 +205,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -229,10 +229,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -276,26 +276,26 @@ partial class Composition " Composition ..> Service : Service Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PartialClassScenario.Service), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PartialClassScenario.Service), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -308,7 +308,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.PartialClassScenario.Service Resolve(Composition composition) { diff --git a/readme/perblock.md b/readme/perblock.md index 3fab04843..4b3da2d69 100644 --- a/readme/perblock.md +++ b/readme/perblock.md @@ -111,16 +111,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -129,8 +129,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -141,22 +141,22 @@ partial class Composition #endif get { - var perResolveM03D08di40_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>); - perResolveM03D08di40_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>( + var perResolveM03D09di40_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>); + perResolveM03D09di40_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var perBlockM03D08di4_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); - var factory_M03D08di1 = (perBlockM03D08di4_Dependency, perBlockM03D08di4_Dependency); - return factory_M03D08di1; + var perBlockM03D09di4_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); + var factory_M03D09di1 = (perBlockM03D09di4_Dependency, perBlockM03D09di4_Dependency); + return factory_M03D09di1; }); - System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)> transientM03D08di2_Lazy; + System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)> transientM03D09di2_Lazy; { - var factory_M03D08di2 = perResolveM03D08di40_Func; - transientM03D08di2_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>(factory_M03D08di2, true); + var factory_M03D09di2 = perResolveM03D09di40_Func; + transientM03D09di2_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>(factory_M03D09di2, true); } - var perBlockM03D08di1_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); - return new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service(perBlockM03D08di1_Dependency, perBlockM03D08di1_Dependency, transientM03D08di2_Lazy); + var perBlockM03D09di1_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); + return new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service(perBlockM03D09di1_Dependency, perBlockM03D09di1_Dependency, transientM03D09di2_Lazy); } } #endregion @@ -172,7 +172,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -186,7 +186,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -199,10 +199,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -223,10 +223,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -276,26 +276,26 @@ partial class Composition " FuncᐸValueTupleᐸIDependencyˏIDependencyᐳᐳ *-- ValueTupleᐸIDependencyˏIDependencyᐳ : ValueTupleᐸIDependencyˏIDependencyᐳ"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -308,7 +308,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service Resolve(Composition composition) { diff --git a/readme/perresolve.md b/readme/perresolve.md index 39409a55a..43192609e 100644 --- a/readme/perresolve.md +++ b/readme/perresolve.md @@ -111,16 +111,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -129,8 +129,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -141,41 +141,41 @@ partial class Composition #endif get { - var perResolveM03D08di34_Dependency = default(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency); - var perResolveM03D08di40_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>); - perResolveM03D08di40_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>( + var perResolveM03D09di34_Dependency = default(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency); + var perResolveM03D09di40_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>); + perResolveM03D09di40_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - if (ReferenceEquals(perResolveM03D08di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(perResolveM03D08di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D09di34_Dependency, null)) { - perResolveM03D08di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); + perResolveM03D09di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); } } } - var factory_M03D08di1 = (perResolveM03D08di34_Dependency, perResolveM03D08di34_Dependency); - return factory_M03D08di1; + var factory_M03D09di1 = (perResolveM03D09di34_Dependency, perResolveM03D09di34_Dependency); + return factory_M03D09di1; }); - System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)> transientM03D08di1_Lazy; + System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)> transientM03D09di1_Lazy; { - var factory_M03D08di2 = perResolveM03D08di40_Func; - transientM03D08di1_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>(factory_M03D08di2, true); + var factory_M03D09di2 = perResolveM03D09di40_Func; + transientM03D09di1_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>(factory_M03D09di2, true); } - if (ReferenceEquals(perResolveM03D08di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(perResolveM03D08di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D09di34_Dependency, null)) { - perResolveM03D08di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); + perResolveM03D09di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); } } } - return new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service(perResolveM03D08di34_Dependency, perResolveM03D08di34_Dependency, transientM03D08di1_Lazy); + return new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service(perResolveM03D09di34_Dependency, perResolveM03D09di34_Dependency, transientM03D09di1_Lazy); } } #endregion @@ -191,7 +191,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -205,7 +205,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -218,10 +218,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -242,10 +242,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -295,26 +295,26 @@ partial class Composition " FuncᐸValueTupleᐸIDependencyˏIDependencyᐳᐳ *-- ValueTupleᐸIDependencyˏIDependencyᐳ : ValueTupleᐸIDependencyˏIDependencyᐳ"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -327,7 +327,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service Resolve(Composition composition) { diff --git a/readme/property-injection.md b/readme/property-injection.md index 458aa167d..ec9c0518b 100644 --- a/readme/property-injection.md +++ b/readme/property-injection.md @@ -96,14 +96,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -112,7 +112,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -123,9 +123,9 @@ partial class Composition #endif get { - var transientM03D08di0_Service = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service(); - transientM03D08di0_Service.Dependency = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Dependency(); - return transientM03D08di0_Service; + var transientM03D09di0_Service = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service(); + transientM03D09di0_Service.Dependency = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Dependency(); + return transientM03D09di0_Service; } } #endregion @@ -141,7 +141,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -155,7 +155,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -168,10 +168,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -192,10 +192,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -239,26 +239,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -271,7 +271,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService Resolve(Composition composition) { diff --git a/readme/required-properties-or-fields.md b/readme/required-properties-or-fields.md index 5694bc25f..463e36dcf 100644 --- a/readme/required-properties-or-fields.md +++ b/readme/required-properties-or-fields.md @@ -106,8 +106,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly string _argM03D08di_name; + private readonly Composition _rootM03D09di; + private readonly string _argM03D09di_name; /// /// This parameterized constructor creates a new instance of with arguments. @@ -115,13 +115,13 @@ partial class Composition /// The composition argument of type . public Composition(string name) { - _rootM03D08di = this; + _rootM03D09di = this; if (ReferenceEquals(name, null)) { throw new global::System.ArgumentNullException("name"); } - _argM03D08di_name = name; + _argM03D09di_name = name; } /// @@ -130,8 +130,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _argM03D08di_name = baseComposition._argM03D08di_name; + _rootM03D09di = baseComposition._rootM03D09di; + _argM03D09di_name = baseComposition._argM03D09di_name; } #region Composition Roots @@ -144,7 +144,7 @@ partial class Composition { return new Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.Service() { - ServiceNameField = _argM03D08di_name, + ServiceNameField = _argM03D09di_name, Dependency = new Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.Dependency() }; } @@ -162,7 +162,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -176,7 +176,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -189,10 +189,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -213,10 +213,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -263,26 +263,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -295,7 +295,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService Resolve(Composition composition) { diff --git a/readme/resolve-hint.md b/readme/resolve-hint.md index 8db28a18f..99c38e072 100644 --- a/readme/resolve-hint.md +++ b/readme/resolve-hint.md @@ -99,14 +99,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -115,7 +115,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots diff --git a/readme/resolve-methods.md b/readme/resolve-methods.md index 0e7818a2f..a37c35e88 100644 --- a/readme/resolve-methods.md +++ b/readme/resolve-methods.md @@ -47,7 +47,7 @@ classDiagram class Composition { +IDependency DependencySingleton +IService OtherService - -IService RootM03D08di0002 + -IService RootM03D09di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -73,7 +73,7 @@ classDiagram } Service *-- Dependency : IDependency Composition ..> Dependency : IDependency DependencySingleton - Composition ..> Service : IService RootM03D08di0002 + Composition ..> Service : IService RootM03D09di0002 Composition ..> OtherService : "Other" IService OtherService ``` @@ -126,21 +126,21 @@ classDiagram /// var instance = composition.DependencySingleton; /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. ///
/// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -149,7 +149,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -187,7 +187,7 @@ partial class Composition /// Specifies to create a private root
/// that is only accessible from _Resolve_ methods ///
- public Pure.DI.UsageTests.Basics.ResolveScenario.IService RootM03D08di0002 + public Pure.DI.UsageTests.Basics.ResolveScenario.IService RootM03D09di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] @@ -210,7 +210,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -224,7 +224,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -237,10 +237,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -261,10 +261,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -285,7 +285,7 @@ partial class Composition " class Composition {\n" + " +IDependency DependencySingleton\n" + " +IService OtherService\n" + - " -IService RootM03D08di0002\n" + + " -IService RootM03D09di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -311,33 +311,33 @@ partial class Composition " }\n" + " Service *-- Dependency : IDependency\n" + " Composition ..> Dependency : IDependency DependencySingleton\n" + - " Composition ..> Service : IService RootM03D08di0002\n" + + " Composition ..> Service : IService RootM03D09di0002\n" + " Composition ..> OtherService : \"Other\" IService OtherService"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IDependency), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IService), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IDependency), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IService), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -350,7 +350,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency Resolve(Composition composition) { @@ -368,11 +368,11 @@ partial class Composition } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ResolveScenario.IService Resolve(Composition composition) { - return composition.RootM03D08di0002; + return composition.RootM03D09di0002; } public Pure.DI.UsageTests.Basics.ResolveScenario.IService ResolveByTag(Composition composition, object tag) @@ -382,7 +382,7 @@ partial class Composition case "Other": return composition.OtherService; case null: - return composition.RootM03D08di0002; + return composition.RootM03D09di0002; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.Basics.ResolveScenario.IService."); } diff --git a/readme/root-arguments.md b/readme/root-arguments.md index 5bd0015b2..879710644 100644 --- a/readme/root-arguments.md +++ b/readme/root-arguments.md @@ -126,14 +126,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This parameterized constructor creates a new instance of with arguments. /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -142,7 +142,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots diff --git a/readme/scope.md b/readme/scope.md index e9f7a654d..c1e0bb12c 100644 --- a/readme/scope.md +++ b/readme/scope.md @@ -165,20 +165,20 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private readonly global::System.IDisposable[] _disposablesM03D08di; - private int _disposeIndexM03D08di; - private Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency _scopedM03D08di34_Dependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private readonly global::System.IDisposable[] _disposablesM03D09di; + private int _disposeIndexM03D09di; + private Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency _scopedM03D09di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); - _disposablesM03D08di = new global::System.IDisposable[1]; + _rootM03D09di = this; + _lockM03D09di = new object(); + _disposablesM03D09di = new global::System.IDisposable[1]; } /// @@ -187,9 +187,9 @@ partial class Composition: global::System.IDisposable /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; - _disposablesM03D08di = new global::System.IDisposable[1]; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; + _disposablesM03D09di = new global::System.IDisposable[1]; } #region Composition Roots @@ -203,18 +203,18 @@ partial class Composition: global::System.IDisposable #endif get { - if (ReferenceEquals(_scopedM03D08di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_scopedM03D08di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D09di34_Dependency, null)) { - _scopedM03D08di34_Dependency = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency(); - _disposablesM03D08di[_disposeIndexM03D08di++] = _scopedM03D08di34_Dependency; + _scopedM03D09di34_Dependency = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency(); + _disposablesM03D09di[_disposeIndexM03D09di++] = _scopedM03D09di34_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Service(_scopedM03D08di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Service(_scopedM03D09di34_Dependency); } } @@ -228,16 +228,16 @@ partial class Composition: global::System.IDisposable #endif get { - var perResolveM03D08di40_Func = default(System.Func); - perResolveM03D08di40_Func = new global::System.Func( + var perResolveM03D09di40_Func = default(System.Func); + perResolveM03D09di40_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var transientM03D08di2_Composition = this; - var factory_M03D08di1 = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Session(transientM03D08di2_Composition); - return factory_M03D08di1; + var transientM03D09di2_Composition = this; + var factory_M03D09di1 = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Session(transientM03D09di2_Composition); + return factory_M03D09di1; }); - return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program(perResolveM03D08di40_Func); + return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program(perResolveM03D09di40_Func); } } #endregion @@ -253,7 +253,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -267,7 +267,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -280,10 +280,10 @@ partial class Composition: global::System.IDisposable #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -304,10 +304,10 @@ partial class Composition: global::System.IDisposable #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -324,11 +324,11 @@ partial class Composition: global::System.IDisposable /// public void Dispose() { - lock (_lockM03D08di) + lock (_lockM03D09di) { - while (_disposeIndexM03D08di > 0) + while (_disposeIndexM03D09di > 0) { - var disposableInstance = _disposablesM03D08di[--_disposeIndexM03D08di]; + var disposableInstance = _disposablesM03D09di[--_disposeIndexM03D09di]; try { disposableInstance.Dispose(); @@ -339,7 +339,7 @@ partial class Composition: global::System.IDisposable } } - _scopedM03D08di34_Dependency = null; + _scopedM03D09di34_Dependency = null; } } @@ -391,29 +391,29 @@ partial class Composition: global::System.IDisposable " FuncᐸSessionᐳ *-- Session : Session"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -426,7 +426,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService Resolve(Composition composition) { @@ -444,7 +444,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program Resolve(Composition composition) { diff --git a/readme/service-collection.md b/readme/service-collection.md index bd5823884..519465b58 100644 --- a/readme/service-collection.md +++ b/readme/service-collection.md @@ -47,8 +47,8 @@ service.Dependency.ShouldBe(dependency); ```mermaid classDiagram class Composition { - -IDependency RootM03D08di0001 - -IService RootM03D08di0002 + -IDependency RootM03D09di0001 + -IService RootM03D09di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -69,8 +69,8 @@ classDiagram <> } Service o-- "Singleton" Dependency : "Dependency Key" IDependency - Composition ..> Dependency : "Dependency Key" IDependency RootM03D08di0001 - Composition ..> Service : IService RootM03D08di0002 + Composition ..> Dependency : "Dependency Key" IDependency RootM03D09di0001 + Composition ..> Service : IService RootM03D09di0002 ``` @@ -102,24 +102,24 @@ classDiagram /// /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. ///
/// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency _singletonM03D08di34_Dependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency _singletonM03D09di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -128,52 +128,52 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots - public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency RootM03D08di0001 + public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency RootM03D09di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } } } - return _rootM03D08di._singletonM03D08di34_Dependency; + return _rootM03D09di._singletonM03D09di34_Dependency; } } - public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService RootM03D08di0002 + public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService RootM03D09di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } } } - return new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Service(_rootM03D08di._singletonM03D08di34_Dependency); + return new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Service(_rootM03D09di._singletonM03D09di34_Dependency); } } #endregion @@ -189,7 +189,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -203,7 +203,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -216,10 +216,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -240,10 +240,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -262,8 +262,8 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D08di0001\n" + - " -IService RootM03D08di0002\n" + + " -IDependency RootM03D09di0001\n" + + " -IService RootM03D09di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -284,35 +284,35 @@ partial class Composition " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : \"Dependency Key\" IDependency\n" + - " Composition ..> Dependency : \"Dependency Key\" IDependency RootM03D08di0001\n" + - " Composition ..> Service : IService RootM03D08di0002"; + " Composition ..> Dependency : \"Dependency Key\" IDependency RootM03D09di0001\n" + + " Composition ..> Service : IService RootM03D09di0002"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - OnNewRoot(valResolverM03D08di_0000, "RootM03D08di0001", "Dependency Key", Pure.DI.Lifetime.Singleton); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - OnNewRoot(valResolverM03D08di_0001, "RootM03D08di0002", null, Pure.DI.Lifetime.Transient); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + OnNewRoot(valResolverM03D09di_0000, "RootM03D09di0001", "Dependency Key", Pure.DI.Lifetime.Singleton); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + OnNewRoot(valResolverM03D09di_0001, "RootM03D09di0002", null, Pure.DI.Lifetime.Transient); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -325,7 +325,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency Resolve(Composition composition) { @@ -337,17 +337,17 @@ partial class Composition switch (tag) { case "Dependency Key": - return composition.RootM03D08di0001; + return composition.RootM03D09di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency."); } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService Resolve(Composition composition) { - return composition.RootM03D08di0002; + return composition.RootM03D09di0002; } public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService ResolveByTag(Composition composition, object tag) @@ -355,7 +355,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D08di0002; + return composition.RootM03D09di0002; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService."); } diff --git a/readme/service-provider-with-scope.md b/readme/service-provider-with-scope.md index 68afbab35..52cf296f2 100644 --- a/readme/service-provider-with-scope.md +++ b/readme/service-provider-with-scope.md @@ -73,8 +73,8 @@ dependency1.ShouldBe(dependency2); ```mermaid classDiagram class Composition { - -IDependency RootM03D08di0001 - -IService RootM03D08di0002 + -IDependency RootM03D09di0001 + -IService RootM03D09di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object GetService(Type type) @@ -96,8 +96,8 @@ classDiagram <> } Service o-- "Singleton" Dependency : IDependency - Composition ..> Dependency : IDependency RootM03D08di0001 - Composition ..> Service : IService RootM03D08di0002 + Composition ..> Dependency : IDependency RootM03D09di0001 + Composition ..> Service : IService RootM03D09di0002 ``` @@ -134,28 +134,28 @@ classDiagram /// /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. ///
/// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private readonly global::System.IDisposable[] _disposablesM03D08di; - private int _disposeIndexM03D08di; - private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency _singletonM03D08di34_Dependency; - private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service _scopedM03D08di35_Service; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private readonly global::System.IDisposable[] _disposablesM03D09di; + private int _disposeIndexM03D09di; + private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency _singletonM03D09di34_Dependency; + private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service _scopedM03D09di35_Service; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); - _disposablesM03D08di = new global::System.IDisposable[1]; + _rootM03D09di = this; + _lockM03D09di = new object(); + _disposablesM03D09di = new global::System.IDisposable[1]; } /// @@ -164,58 +164,58 @@ partial class Composition: global::System.IDisposable /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; - _disposablesM03D08di = new global::System.IDisposable[1]; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; + _disposablesM03D09di = new global::System.IDisposable[1]; } #region Composition Roots - public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency RootM03D08di0001 + public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency RootM03D09di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } } } - return _rootM03D08di._singletonM03D08di34_Dependency; + return _rootM03D09di._singletonM03D09di34_Dependency; } } - public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService RootM03D08di0002 + public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService RootM03D09di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_scopedM03D08di35_Service, null)) + if (ReferenceEquals(_scopedM03D09di35_Service, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_scopedM03D08di35_Service, null)) + if (ReferenceEquals(_scopedM03D09di35_Service, null)) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } - _scopedM03D08di35_Service = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service(_rootM03D08di._singletonM03D08di34_Dependency); - _disposablesM03D08di[_disposeIndexM03D08di++] = _scopedM03D08di35_Service; + _scopedM03D09di35_Service = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service(_rootM03D09di._singletonM03D09di34_Dependency); + _disposablesM03D09di[_disposeIndexM03D09di++] = _scopedM03D09di35_Service; } } } - return _scopedM03D08di35_Service; + return _scopedM03D09di35_Service; } } #endregion @@ -231,7 +231,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -245,7 +245,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -258,10 +258,10 @@ partial class Composition: global::System.IDisposable #endif public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -282,10 +282,10 @@ partial class Composition: global::System.IDisposable #endif public object GetRequiredKeyedService(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -302,11 +302,11 @@ partial class Composition: global::System.IDisposable /// public void Dispose() { - lock (_lockM03D08di) + lock (_lockM03D09di) { - while (_disposeIndexM03D08di > 0) + while (_disposeIndexM03D09di > 0) { - var disposableInstance = _disposablesM03D08di[--_disposeIndexM03D08di]; + var disposableInstance = _disposablesM03D09di[--_disposeIndexM03D09di]; try { disposableInstance.Dispose(); @@ -317,8 +317,8 @@ partial class Composition: global::System.IDisposable } } - _singletonM03D08di34_Dependency = null; - _scopedM03D08di35_Service = null; + _singletonM03D09di34_Dependency = null; + _scopedM03D09di35_Service = null; } } @@ -332,8 +332,8 @@ partial class Composition: global::System.IDisposable return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D08di0001\n" + - " -IService RootM03D08di0002\n" + + " -IDependency RootM03D09di0001\n" + + " -IService RootM03D09di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object GetService(Type type)\n" + @@ -355,33 +355,33 @@ partial class Composition: global::System.IDisposable " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D08di0001\n" + - " Composition ..> Service : IService RootM03D08di0002"; + " Composition ..> Dependency : IDependency RootM03D09di0001\n" + + " Composition ..> Service : IService RootM03D09di0002"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -394,11 +394,11 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D08di0001; + return composition.RootM03D09di0001; } public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -406,17 +406,17 @@ partial class Composition: global::System.IDisposable switch (tag) { case null: - return composition.RootM03D08di0001; + return composition.RootM03D09di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency."); } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService Resolve(Composition composition) { - return composition.RootM03D08di0002; + return composition.RootM03D09di0002; } public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService ResolveByTag(Composition composition, object tag) @@ -424,7 +424,7 @@ partial class Composition: global::System.IDisposable switch (tag) { case null: - return composition.RootM03D08di0002; + return composition.RootM03D09di0002; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService."); } diff --git a/readme/service-provider.md b/readme/service-provider.md index 8aea6d5f2..85abeb640 100644 --- a/readme/service-provider.md +++ b/readme/service-provider.md @@ -45,8 +45,8 @@ service.Dependency.ShouldBe(dependency); ```mermaid classDiagram class Composition { - -IDependency RootM03D08di0001 - -IService RootM03D08di0002 + -IDependency RootM03D09di0001 + -IService RootM03D09di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object GetService(Type type) @@ -67,8 +67,8 @@ classDiagram <> } Service o-- "Singleton" Dependency : IDependency - Composition ..> Dependency : IDependency RootM03D08di0001 - Composition ..> Service : IService RootM03D08di0002 + Composition ..> Dependency : IDependency RootM03D09di0001 + Composition ..> Service : IService RootM03D09di0002 ``` @@ -100,24 +100,24 @@ classDiagram /// /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. ///
/// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency _singletonM03D08di34_Dependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency _singletonM03D09di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -126,52 +126,52 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots - public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency RootM03D08di0001 + public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency RootM03D09di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } } } - return _rootM03D08di._singletonM03D08di34_Dependency; + return _rootM03D09di._singletonM03D09di34_Dependency; } } - public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService RootM03D08di0002 + public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService RootM03D09di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } } } - return new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Service(_rootM03D08di._singletonM03D08di34_Dependency); + return new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Service(_rootM03D09di._singletonM03D09di34_Dependency); } } #endregion @@ -187,7 +187,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -201,7 +201,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -214,10 +214,10 @@ partial class Composition #endif public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -238,10 +238,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -260,8 +260,8 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D08di0001\n" + - " -IService RootM03D08di0002\n" + + " -IDependency RootM03D09di0001\n" + + " -IService RootM03D09di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object GetService(Type type)\n" + @@ -282,33 +282,33 @@ partial class Composition " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D08di0001\n" + - " Composition ..> Service : IService RootM03D08di0002"; + " Composition ..> Dependency : IDependency RootM03D09di0001\n" + + " Composition ..> Service : IService RootM03D09di0002"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -321,11 +321,11 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D08di0001; + return composition.RootM03D09di0001; } public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -333,17 +333,17 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D08di0001; + return composition.RootM03D09di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency."); } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService Resolve(Composition composition) { - return composition.RootM03D08di0002; + return composition.RootM03D09di0002; } public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService ResolveByTag(Composition composition, object tag) @@ -351,7 +351,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D08di0002; + return composition.RootM03D09di0002; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService."); } diff --git a/readme/singleton.md b/readme/singleton.md index 66b21e098..ea162ab77 100644 --- a/readme/singleton.md +++ b/readme/singleton.md @@ -104,17 +104,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency _singletonM03D08di34_Dependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency _singletonM03D09di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -123,8 +123,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -135,18 +135,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di34_Dependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di34_Dependency, null)) { - _singletonM03D08di34_Dependency = new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency(); - _rootM03D08di._singletonM03D08di34_Dependency = _singletonM03D08di34_Dependency; + _singletonM03D09di34_Dependency = new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency(); + _rootM03D09di._singletonM03D09di34_Dependency = _singletonM03D09di34_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Service(_singletonM03D08di34_Dependency, _rootM03D08di._singletonM03D08di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Service(_singletonM03D09di34_Dependency, _rootM03D09di._singletonM03D09di34_Dependency); } } #endregion @@ -162,7 +162,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -176,7 +176,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -189,10 +189,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -213,10 +213,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -260,26 +260,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -292,7 +292,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService Resolve(Composition composition) { diff --git a/readme/span-and-readonlyspan.md b/readme/span-and-readonlyspan.md index 3a547b54c..35de1b631 100644 --- a/readme/span-and-readonlyspan.md +++ b/readme/span-and-readonlyspan.md @@ -106,14 +106,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -122,7 +122,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -133,13 +133,13 @@ partial class Composition #endif get { - System.ReadOnlySpan transientM03D08di1_ReadOnlySpan = stackalloc Pure.DI.UsageTests.BCL.SpanScenario.Dependency[3] + System.ReadOnlySpan transientM03D09di1_ReadOnlySpan = stackalloc Pure.DI.UsageTests.BCL.SpanScenario.Dependency[3] { new Pure.DI.UsageTests.BCL.SpanScenario.Dependency(), new Pure.DI.UsageTests.BCL.SpanScenario.Dependency(), new Pure.DI.UsageTests.BCL.SpanScenario.Dependency() }; - return new Pure.DI.UsageTests.BCL.SpanScenario.Service(transientM03D08di1_ReadOnlySpan); + return new Pure.DI.UsageTests.BCL.SpanScenario.Service(transientM03D09di1_ReadOnlySpan); } } #endregion @@ -155,7 +155,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -169,7 +169,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -182,10 +182,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -206,10 +206,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -252,26 +252,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.SpanScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.SpanScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -284,7 +284,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.SpanScenario.IService Resolve(Composition composition) { diff --git a/readme/tag-attribute.md b/readme/tag-attribute.md index f3dd53537..13125bf8d 100644 --- a/readme/tag-attribute.md +++ b/readme/tag-attribute.md @@ -114,14 +114,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -130,7 +130,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -157,7 +157,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -171,7 +171,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -184,10 +184,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -208,10 +208,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -259,26 +259,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagAttributeScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagAttributeScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -291,7 +291,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TagAttributeScenario.IService Resolve(Composition composition) { diff --git a/readme/tag-type.md b/readme/tag-type.md index 43775bb2e..20afae218 100644 --- a/readme/tag-type.md +++ b/readme/tag-type.md @@ -135,17 +135,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency _singletonM03D08di35_XyzDependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency _singletonM03D09di35_XyzDependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -154,8 +154,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -169,18 +169,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di35_XyzDependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di35_XyzDependency, null)) { - _singletonM03D08di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); - _rootM03D08di._singletonM03D08di35_XyzDependency = _singletonM03D08di35_XyzDependency; + _singletonM03D09di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); + _rootM03D09di._singletonM03D09di35_XyzDependency = _singletonM03D09di35_XyzDependency; } } } - return _rootM03D08di._singletonM03D08di35_XyzDependency; + return _rootM03D09di._singletonM03D09di35_XyzDependency; } } @@ -191,18 +191,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di35_XyzDependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di35_XyzDependency, null)) { - _singletonM03D08di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); - _rootM03D08di._singletonM03D08di35_XyzDependency = _singletonM03D08di35_XyzDependency; + _singletonM03D09di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); + _rootM03D09di._singletonM03D09di35_XyzDependency = _singletonM03D09di35_XyzDependency; } } } - return new Pure.DI.UsageTests.Basics.TagTypeScenario.Service(new Pure.DI.UsageTests.Basics.TagTypeScenario.AbcDependency(), _rootM03D08di._singletonM03D08di35_XyzDependency, new Pure.DI.UsageTests.Basics.TagTypeScenario.AbcDependency()); + return new Pure.DI.UsageTests.Basics.TagTypeScenario.Service(new Pure.DI.UsageTests.Basics.TagTypeScenario.AbcDependency(), _rootM03D09di._singletonM03D09di35_XyzDependency, new Pure.DI.UsageTests.Basics.TagTypeScenario.AbcDependency()); } } #endregion @@ -218,7 +218,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -232,7 +232,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -245,10 +245,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -269,10 +269,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -324,29 +324,29 @@ partial class Composition " Composition ..> XyzDependency : typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency) IDependency XyzRoot"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.IDependency), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.IService), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.IDependency), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.IService), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -359,7 +359,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TagTypeScenario.IDependency Resolve(Composition composition) { @@ -376,7 +376,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TagTypeScenario.IService Resolve(Composition composition) { diff --git a/readme/tag-unique.md b/readme/tag-unique.md index 7342e2a33..2676f3975 100644 --- a/readme/tag-unique.md +++ b/readme/tag-unique.md @@ -46,11 +46,11 @@ classDiagram + object Resolve(Type type, object? tag) } class IEnumerableᐸIDependencyᐸStringᐳᐳ - AbcDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 820fcc63-557a-4a1b-a335-2175256bc47f + AbcDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 7621689e-f588-470f-af89-ef1757e49371 class AbcDependencyᐸStringᐳ { +AbcDependency() } - XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : bf97da8a-06b1-450b-b9a4-c783f29eecfa + XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 50a3b66e-4ea8-443b-a623-8038253d669a class XyzDependencyᐸStringᐳ { +XyzDependency() } @@ -64,8 +64,8 @@ classDiagram class IServiceᐸStringᐳ { <> } - IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : 820fcc63-557a-4a1b-a335-2175256bc47f IDependencyᐸStringᐳ - IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : bf97da8a-06b1-450b-b9a4-c783f29eecfa IDependencyᐸStringᐳ + IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : 7621689e-f588-470f-af89-ef1757e49371 IDependencyᐸStringᐳ + IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : 50a3b66e-4ea8-443b-a623-8038253d669a IDependencyᐸStringᐳ Composition ..> ServiceᐸStringᐳ : IServiceᐸStringᐳ Root ServiceᐸStringᐳ o-- "PerBlock" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ ``` @@ -99,21 +99,21 @@ classDiagram /// var instance = composition.Root; /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. ///
/// [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -122,7 +122,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -134,13 +134,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D08di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D09di1_IEnumerable() { yield return new Pure.DI.UsageTests.Basics.TagUniqueScenario.AbcDependency(); yield return new Pure.DI.UsageTests.Basics.TagUniqueScenario.XyzDependency(); } - var perBlockM03D08di1_IEnumerable = LocalperBlockM03D08di1_IEnumerable(); - return new Pure.DI.UsageTests.Basics.TagUniqueScenario.Service(perBlockM03D08di1_IEnumerable); + var perBlockM03D09di1_IEnumerable = LocalperBlockM03D09di1_IEnumerable(); + return new Pure.DI.UsageTests.Basics.TagUniqueScenario.Service(perBlockM03D09di1_IEnumerable); } } #endregion @@ -156,7 +156,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -170,7 +170,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -183,10 +183,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -207,10 +207,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -236,11 +236,11 @@ partial class Composition " + object Resolve(Type type, object? tag)\n" + " }\n" + " class IEnumerableᐸIDependencyᐸStringᐳᐳ\n" + - " AbcDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 820fcc63-557a-4a1b-a335-2175256bc47f \n" + + " AbcDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 7621689e-f588-470f-af89-ef1757e49371 \n" + " class AbcDependencyᐸStringᐳ {\n" + " +AbcDependency()\n" + " }\n" + - " XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : bf97da8a-06b1-450b-b9a4-c783f29eecfa \n" + + " XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 50a3b66e-4ea8-443b-a623-8038253d669a \n" + " class XyzDependencyᐸStringᐳ {\n" + " +XyzDependency()\n" + " }\n" + @@ -254,32 +254,32 @@ partial class Composition " class IServiceᐸStringᐳ {\n" + " <>\n" + " }\n" + - " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : 820fcc63-557a-4a1b-a335-2175256bc47f IDependencyᐸStringᐳ\n" + - " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : bf97da8a-06b1-450b-b9a4-c783f29eecfa IDependencyᐸStringᐳ\n" + + " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : 7621689e-f588-470f-af89-ef1757e49371 IDependencyᐸStringᐳ\n" + + " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : 50a3b66e-4ea8-443b-a623-8038253d669a IDependencyᐸStringᐳ\n" + " Composition ..> ServiceᐸStringᐳ : IServiceᐸStringᐳ Root\n" + " ServiceᐸStringᐳ o-- \"PerBlock\" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di>.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di>.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagUniqueScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagUniqueScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -292,7 +292,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.Basics.TagUniqueScenario.IService Resolve(Composition composition) { diff --git a/readme/tags.md b/readme/tags.md index 9af87705c..96a0759d5 100644 --- a/readme/tags.md +++ b/readme/tags.md @@ -137,17 +137,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; - private Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency _singletonM03D08di35_XyzDependency; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; + private Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency _singletonM03D09di35_XyzDependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -156,8 +156,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -171,18 +171,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di35_XyzDependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di35_XyzDependency, null)) { - _singletonM03D08di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); - _rootM03D08di._singletonM03D08di35_XyzDependency = _singletonM03D08di35_XyzDependency; + _singletonM03D09di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); + _rootM03D09di._singletonM03D09di35_XyzDependency = _singletonM03D09di35_XyzDependency; } } } - return _rootM03D08di._singletonM03D08di35_XyzDependency; + return _rootM03D09di._singletonM03D09di35_XyzDependency; } } @@ -193,18 +193,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di35_XyzDependency, null)) { - lock (_lockM03D08di) + lock (_lockM03D09di) { - if (ReferenceEquals(_rootM03D08di._singletonM03D08di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D09di._singletonM03D09di35_XyzDependency, null)) { - _singletonM03D08di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); - _rootM03D08di._singletonM03D08di35_XyzDependency = _singletonM03D08di35_XyzDependency; + _singletonM03D09di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); + _rootM03D09di._singletonM03D09di35_XyzDependency = _singletonM03D09di35_XyzDependency; } } } - return new Pure.DI.UsageTests.Basics.TagsScenario.Service(new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency(), _rootM03D08di._singletonM03D08di35_XyzDependency, new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency()); + return new Pure.DI.UsageTests.Basics.TagsScenario.Service(new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency(), _rootM03D09di._singletonM03D09di35_XyzDependency, new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency()); } } #endregion @@ -220,7 +220,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -234,7 +234,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -247,10 +247,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -271,10 +271,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -326,29 +326,29 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - var valResolverM03D08di_0001 = new ResolverM03D08di_0001(); - ResolverM03D08di.Value = valResolverM03D08di_0001; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + var valResolverM03D09di_0001 = new ResolverM03D09di_0001(); + ResolverM03D09di.Value = valResolverM03D09di_0001; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IDependency), valResolverM03D08di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IService), valResolverM03D08di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IDependency), valResolverM03D09di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IService), valResolverM03D09di_0001) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -361,7 +361,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TagsScenario.IDependency Resolve(Composition composition) { @@ -379,7 +379,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TagsScenario.IService Resolve(Composition composition) { diff --git a/readme/task.md b/readme/task.md index 4b75025d7..67b5bd7d6 100644 --- a/readme/task.md +++ b/readme/task.md @@ -135,16 +135,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; - private readonly object _lockM03D08di; + private readonly Composition _rootM03D09di; + private readonly object _lockM03D09di; /// /// This parameterized constructor creates a new instance of with arguments. /// public Composition() { - _rootM03D08di = this; - _lockM03D08di = new object(); + _rootM03D09di = this; + _lockM03D09di = new object(); } /// @@ -153,8 +153,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; - _lockM03D08di = _rootM03D08di._lockM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; + _lockM03D09di = _rootM03D09di._lockM03D09di; } #region Composition Roots @@ -163,32 +163,32 @@ partial class Composition #endif public Pure.DI.UsageTests.BCL.TaskScenario.IService GetRoot(System.Threading.CancellationToken cancellationToken) { - var perResolveM03D08di39_Func = default(System.Func); - System.Threading.Tasks.TaskScheduler transientM03D08di5_TaskScheduler = TaskScheduler.Current; - System.Threading.Tasks.TaskContinuationOptions transientM03D08di4_TaskContinuationOptions = global::System.Threading.Tasks.TaskContinuationOptions.None; - System.Threading.Tasks.TaskCreationOptions transientM03D08di3_TaskCreationOptions = global::System.Threading.Tasks.TaskCreationOptions.None; - System.Threading.Tasks.TaskFactory perBlockM03D08di2_TaskFactory; + var perResolveM03D09di39_Func = default(System.Func); + System.Threading.Tasks.TaskScheduler transientM03D09di5_TaskScheduler = TaskScheduler.Current; + System.Threading.Tasks.TaskContinuationOptions transientM03D09di4_TaskContinuationOptions = global::System.Threading.Tasks.TaskContinuationOptions.None; + System.Threading.Tasks.TaskCreationOptions transientM03D09di3_TaskCreationOptions = global::System.Threading.Tasks.TaskCreationOptions.None; + System.Threading.Tasks.TaskFactory perBlockM03D09di2_TaskFactory; { - var cancellationToken_M03D08di1 = cancellationToken; - var taskCreationOptions_M03D08di2 = transientM03D08di3_TaskCreationOptions; - var taskContinuationOptions_M03D08di3 = transientM03D08di4_TaskContinuationOptions; - var taskScheduler_M03D08di4 = transientM03D08di5_TaskScheduler; - perBlockM03D08di2_TaskFactory = new global::System.Threading.Tasks.TaskFactory(cancellationToken_M03D08di1, taskCreationOptions_M03D08di2, taskContinuationOptions_M03D08di3, taskScheduler_M03D08di4); + var cancellationToken_M03D09di1 = cancellationToken; + var taskCreationOptions_M03D09di2 = transientM03D09di3_TaskCreationOptions; + var taskContinuationOptions_M03D09di3 = transientM03D09di4_TaskContinuationOptions; + var taskScheduler_M03D09di4 = transientM03D09di5_TaskScheduler; + perBlockM03D09di2_TaskFactory = new global::System.Threading.Tasks.TaskFactory(cancellationToken_M03D09di1, taskCreationOptions_M03D09di2, taskContinuationOptions_M03D09di3, taskScheduler_M03D09di4); } - perResolveM03D08di39_Func = new global::System.Func( + perResolveM03D09di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D08di5 = new Pure.DI.UsageTests.BCL.TaskScenario.Dependency(); - return factory_M03D08di5; + var factory_M03D09di5 = new Pure.DI.UsageTests.BCL.TaskScenario.Dependency(); + return factory_M03D09di5; }); - System.Threading.Tasks.Task transientM03D08di1_Task; + System.Threading.Tasks.Task transientM03D09di1_Task; { - var factory_M03D08di6 = perResolveM03D08di39_Func; - var taskFactory_M03D08di7 = perBlockM03D08di2_TaskFactory; - transientM03D08di1_Task = taskFactory_M03D08di7.StartNew(factory_M03D08di6); + var factory_M03D09di6 = perResolveM03D09di39_Func; + var taskFactory_M03D09di7 = perBlockM03D09di2_TaskFactory; + transientM03D09di1_Task = taskFactory_M03D09di7.StartNew(factory_M03D09di6); } - return new Pure.DI.UsageTests.BCL.TaskScenario.Service(transientM03D08di1_Task); + return new Pure.DI.UsageTests.BCL.TaskScenario.Service(transientM03D09di1_Task); } #endregion diff --git a/readme/threadsafe-hint.md b/readme/threadsafe-hint.md index 91ba13fab..17f43e536 100644 --- a/readme/threadsafe-hint.md +++ b/readme/threadsafe-hint.md @@ -93,14 +93,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -109,7 +109,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -136,7 +136,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -150,7 +150,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -163,10 +163,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -187,10 +187,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -233,26 +233,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -265,7 +265,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService Resolve(Composition composition) { diff --git a/readme/tostring-hint.md b/readme/tostring-hint.md index 8cca4e5b1..764f6f6a8 100644 --- a/readme/tostring-hint.md +++ b/readme/tostring-hint.md @@ -91,14 +91,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -107,7 +107,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -134,7 +134,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -148,7 +148,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -161,10 +161,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -185,10 +185,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -231,26 +231,26 @@ partial class Composition " Composition ..> Service : IService MyService"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ToStringHintScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ToStringHintScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -263,7 +263,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.ToStringHintScenario.IService Resolve(Composition composition) { diff --git a/readme/tracking-disposable-instances.md b/readme/tracking-disposable-instances.md index 4ee46a3a4..bdb821d81 100644 --- a/readme/tracking-disposable-instances.md +++ b/readme/tracking-disposable-instances.md @@ -146,14 +146,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -162,7 +162,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -173,11 +173,11 @@ partial class Composition #endif get { - var transientM03D08di1_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.Dependency(); - OnNewInstance(ref transientM03D08di1_Dependency, null, Pure.DI.Lifetime.Transient); - var transientM03D08di0_Service = new Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.Service(transientM03D08di1_Dependency); - OnNewInstance(ref transientM03D08di0_Service, null, Pure.DI.Lifetime.Transient); - return transientM03D08di0_Service; + var transientM03D09di1_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.Dependency(); + OnNewInstance(ref transientM03D09di1_Dependency, null, Pure.DI.Lifetime.Transient); + var transientM03D09di0_Service = new Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.Service(transientM03D09di1_Dependency); + OnNewInstance(ref transientM03D09di0_Service, null, Pure.DI.Lifetime.Transient); + return transientM03D09di0_Service; } } #endregion @@ -193,7 +193,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -207,7 +207,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -220,10 +220,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -244,10 +244,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -292,26 +292,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -324,7 +324,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.IService Resolve(Composition composition) { diff --git a/readme/transient.md b/readme/transient.md index e7a0e81fa..4f41086d7 100644 --- a/readme/transient.md +++ b/readme/transient.md @@ -104,14 +104,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -120,7 +120,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -147,7 +147,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -161,7 +161,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -174,10 +174,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -198,10 +198,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -245,26 +245,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.TransientScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.TransientScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -277,7 +277,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.TransientScenario.IService Resolve(Composition composition) { diff --git a/readme/tuple.md b/readme/tuple.md index 6396076f7..f8775ede1 100644 --- a/readme/tuple.md +++ b/readme/tuple.md @@ -102,14 +102,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -118,7 +118,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -129,8 +129,8 @@ partial class Composition #endif get { - Pure.DI.UsageTests.BCL.TupleScenario.Point transientM03D08di2_Point = new Point(7, 9); - return new Pure.DI.UsageTests.BCL.TupleScenario.Service((transientM03D08di2_Point, new Pure.DI.UsageTests.BCL.TupleScenario.Dependency())); + Pure.DI.UsageTests.BCL.TupleScenario.Point transientM03D09di2_Point = new Point(7, 9); + return new Pure.DI.UsageTests.BCL.TupleScenario.Service((transientM03D09di2_Point, new Pure.DI.UsageTests.BCL.TupleScenario.Dependency())); } } #endregion @@ -146,7 +146,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -160,7 +160,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -173,10 +173,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -197,10 +197,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -249,26 +249,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.TupleScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.TupleScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -281,7 +281,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.TupleScenario.IService Resolve(Composition composition) { diff --git a/readme/type-attribute.md b/readme/type-attribute.md index b6a8c884f..2b41b9deb 100644 --- a/readme/type-attribute.md +++ b/readme/type-attribute.md @@ -105,14 +105,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -121,7 +121,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -148,7 +148,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -162,7 +162,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -175,10 +175,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -199,10 +199,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -245,26 +245,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -277,7 +277,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService Resolve(Composition composition) { diff --git a/readme/valuetask.md b/readme/valuetask.md index 86038c543..70e285965 100644 --- a/readme/valuetask.md +++ b/readme/valuetask.md @@ -104,14 +104,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -120,7 +120,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -131,12 +131,12 @@ partial class Composition #endif get { - System.Threading.Tasks.ValueTask transientM03D08di1_ValueTask; + System.Threading.Tasks.ValueTask transientM03D09di1_ValueTask; { - var value_M03D08di1 = new Pure.DI.UsageTests.BCL.ValueTaskScenario.Dependency(); - transientM03D08di1_ValueTask = new global::System.Threading.Tasks.ValueTask(value_M03D08di1); + var value_M03D09di1 = new Pure.DI.UsageTests.BCL.ValueTaskScenario.Dependency(); + transientM03D09di1_ValueTask = new global::System.Threading.Tasks.ValueTask(value_M03D09di1); } - return new Pure.DI.UsageTests.BCL.ValueTaskScenario.Service(transientM03D08di1_ValueTask); + return new Pure.DI.UsageTests.BCL.ValueTaskScenario.Service(transientM03D09di1_ValueTask); } } #endregion @@ -152,7 +152,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -166,7 +166,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -179,10 +179,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -203,10 +203,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -251,26 +251,26 @@ partial class Composition " ValueTaskᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ValueTaskScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ValueTaskScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -283,7 +283,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ValueTaskScenario.IService Resolve(Composition composition) { diff --git a/readme/weak-reference.md b/readme/weak-reference.md index 0aec04922..9dd8c6163 100644 --- a/readme/weak-reference.md +++ b/readme/weak-reference.md @@ -95,14 +95,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D08di; + private readonly Composition _rootM03D09di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D08di = this; + _rootM03D09di = this; } /// @@ -111,7 +111,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D08di = baseComposition._rootM03D08di; + _rootM03D09di = baseComposition._rootM03D09di; } #region Composition Roots @@ -138,7 +138,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D08di.Value.Resolve(this); + return ResolverM03D09di.Value.Resolve(this); } /// @@ -152,7 +152,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D08di.Value.ResolveByTag(this, tag); + return ResolverM03D09di.Value.ResolveByTag(this, tag); } /// @@ -165,10 +165,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -189,10 +189,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D08di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D08di; + var index = (int)(_bucketSizeM03D09di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D09di; do { - ref var pair = ref _bucketsM03D08di[index]; + ref var pair = ref _bucketsM03D09di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -239,26 +239,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D08di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D08di; + private readonly static int _bucketSizeM03D09di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D09di; static Composition() { - var valResolverM03D08di_0000 = new ResolverM03D08di_0000(); - ResolverM03D08di.Value = valResolverM03D08di_0000; - _bucketsM03D08di = global::Pure.DI.Buckets>.Create( + var valResolverM03D09di_0000 = new ResolverM03D09di_0000(); + ResolverM03D09di.Value = valResolverM03D09di_0000; + _bucketsM03D09di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D08di, + out _bucketSizeM03D09di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService), valResolverM03D08di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService), valResolverM03D09di_0000) }); } #region Resolvers - private sealed class ResolverM03D08di: global::Pure.DI.IResolver + private sealed class ResolverM03D09di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D08di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D09di(); public T Resolve(Composition composite) { @@ -271,7 +271,7 @@ partial class Composition } } - private sealed class ResolverM03D08di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D09di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService Resolve(Composition composition) {