From f20a9ae585c6bb189caa14627bf90e31e3f597ef Mon Sep 17 00:00:00 2001 From: Nikolay Pianikov Date: Wed, 3 Apr 2024 21:43:36 +0300 Subject: [PATCH] Updating internal Pure.DI to 2.1.8 --- README.md | 32 ++--- build/build.csproj | 2 +- readme/ArrayDetails.md | 46 +++---- readme/Avalonia.md | 2 +- readme/BlazorServerApp.md | 4 +- readme/BlazorWebAssemblyApp.md | 4 +- readme/Console.md | 2 +- readme/ConsoleNativeAOT.md | 2 +- readme/ConsoleTopLevelStatements.md | 2 +- readme/EnumDetails.md | 52 ++++---- readme/FuncDetails.md | 54 ++++---- readme/GrpcService.md | 4 +- readme/Maui.md | 4 +- readme/MinimalWebAPI.md | 4 +- readme/SingletonDetails.md | 60 ++++----- readme/TransientDetails.md | 46 +++---- readme/WebAPI.md | 4 +- readme/WebApp.md | 4 +- readme/WinFormsApp.md | 2 +- readme/WinFormsAppNetCore.md | 2 +- readme/Wpf.md | 2 +- readme/a-few-partial-classes.md | 46 +++---- readme/accumulators.md | 84 ++++++------ readme/advanced-interception.md | 46 +++---- readme/arguments.md | 60 ++++----- readme/array.md | 46 +++---- readme/async-enumerable.md | 52 ++++---- readme/auto-bindings.md | 6 +- readme/auto-scoped.md | 92 ++++++------- readme/check-for-a-root.md | 62 ++++----- readme/complex-generics.md | 46 +++---- readme/composition-root-kinds.md | 54 ++++---- readme/composition-roots-simplified.md | 50 +++---- readme/composition-roots.md | 60 ++++----- readme/constructor-ordinal-attribute.md | 54 ++++---- readme/custom-attributes.md | 60 ++++----- readme/decorator.md | 46 +++---- readme/default-lifetime.md | 74 +++++------ readme/default-values.md | 46 +++---- readme/dependent-compositions.md | 100 +++++++------- readme/disposable-singleton.md | 82 ++++++------ readme/enumerable-generics.md | 66 +++++----- readme/enumerable.md | 52 ++++---- readme/factory.md | 58 ++++---- readme/field-injection.md | 52 ++++---- readme/func-with-arguments.md | 74 +++++------ readme/func-with-tag.md | 62 ++++----- readme/func.md | 62 ++++----- ...eric-composition-roots-with-constraints.md | 14 +- readme/generic-composition-roots.md | 14 +- readme/generics.md | 46 +++---- readme/injection.md | 54 ++++---- readme/injections-of-abstractions.md | 6 +- readme/instance-initialization.md | 62 ++++----- readme/interception.md | 46 +++---- readme/keyed-service-provider.md | 94 ++++++------- readme/lazy.md | 68 +++++----- readme/manually-started-tasks.md | 30 ++--- readme/member-ordinal-attribute.md | 74 +++++------ readme/method-injection.md | 52 ++++---- readme/multi-contract-bindings.md | 46 +++---- readme/oncannotresolve-hint.md | 50 +++---- readme/ondependencyinjection-hint.md | 46 +++---- readme/onnewinstance-hint.md | 76 +++++------ readme/overriding-the-bcl-binding.md | 50 +++---- readme/partial-class.md | 54 ++++---- readme/perblock.md | 72 +++++----- readme/perresolve.md | 86 ++++++------ readme/property-injection.md | 52 ++++---- readme/required-properties-or-fields.md | 54 ++++---- readme/resolve-hint.md | 6 +- readme/resolve-methods.md | 66 +++++----- readme/root-arguments.md | 6 +- readme/rootbind.md | 46 +++---- readme/scope.md | 102 +++++++------- readme/service-collection.md | 100 +++++++------- readme/service-provider-with-scope.md | 124 +++++++++--------- readme/service-provider.md | 98 +++++++------- readme/simplified-binding.md | 10 +- readme/singleton.md | 66 +++++----- readme/span-and-readonlyspan.md | 50 +++---- readme/tag-attribute.md | 46 +++---- readme/tag-type.md | 86 ++++++------ readme/tag-unique.md | 52 ++++---- readme/tags.md | 86 ++++++------ readme/task.md | 48 +++---- readme/threadsafe-hint.md | 46 +++---- readme/tostring-hint.md | 46 +++---- ...cking-disposable-instances-in-delegates.md | 78 +++++------ ...osable-instances-per-a-composition-root.md | 32 ++--- readme/transient.md | 46 +++---- readme/tuple.md | 50 +++---- readme/type-attribute.md | 46 +++---- readme/valuetask.md | 54 ++++---- readme/weak-reference.md | 46 +++---- src/Pure.DI.Core/Components/Api.g.cs | 2 +- .../Components/GenericTypeArguments.g.cs | 2 +- src/Pure.DI.Core/Features/Default.g.cs | 2 +- src/Pure.DI.Core/Pure.DI.Core.csproj | 4 +- 99 files changed, 2257 insertions(+), 2261 deletions(-) diff --git a/README.md b/README.md index 48d46ad2a..265603df8 100644 --- a/README.md +++ b/README.md @@ -90,24 +90,20 @@ Add the _Pure.DI_ package to your project: Let's bind the abstractions to their implementations and set up the creation of the object graph: ```c# -partial class Composition -{ - void Setup() => - DI.Setup(nameof(Composition)) - // Models a random subatomic event that may or may not occur - .Bind().As(Singleton).To() - // Represents a quantum superposition of 2 states: Alive or Dead - .Bind().To(ctx => - { - ctx.Inject(out var random); - return (State)random.Next(2); - }) - .Bind().To() - // Represents a cardboard box with any contents - .Bind().To>() - // Composition Root - .Root("Root"); -} +DI.Setup(nameof(Composition)) + // Models a random subatomic event that may or may not occur + .Bind().As(Singleton).To() + // Represents a quantum superposition of 2 states: Alive or Dead + .Bind().To(ctx => + { + ctx.Inject(out var random); + return (State)random.Next(2); + }) + .Bind().To() + // Represents a cardboard box with any contents + .Bind().To>() + // Composition Root + .Root("Root"); ``` The above code specifies the generation of a partial class named *__Composition__*, this name is defined in the `DI.Setup(nameof(Composition))` call. This class contains a *__Root__* property that returns a graph of objects with an object of type *__Program__* as the root. The type and name of the property is defined by calling `Root("Root")`. The code of the generated class looks as follows: diff --git a/build/build.csproj b/build/build.csproj index c5875de31..773be1fd3 100644 --- a/build/build.csproj +++ b/build/build.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/ArrayDetails.md b/readme/ArrayDetails.md index efbe701dd..0e600352f 100644 --- a/readme/ArrayDetails.md +++ b/readme/ArrayDetails.md @@ -88,16 +88,16 @@ classDiagram ```c# partial class Array { - private readonly Array _rootM03D28di; + private readonly Array _rootM04D03di; public Array() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Array(Array baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() @@ -107,21 +107,21 @@ partial class Array public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -132,11 +132,11 @@ partial class Array public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -224,25 +224,25 @@ partial class Array " Array ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Array() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Array composite) { @@ -255,7 +255,7 @@ partial class Array } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Array composition) { diff --git a/readme/Avalonia.md b/readme/Avalonia.md index 3af394e04..c8258c7bf 100644 --- a/readme/Avalonia.md +++ b/readme/Avalonia.md @@ -107,7 +107,7 @@ The [project file](/samples/AvaloniaApp/AvaloniaApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/BlazorServerApp.md b/readme/BlazorServerApp.md index 75e6bc171..b5800cd87 100644 --- a/readme/BlazorServerApp.md +++ b/readme/BlazorServerApp.md @@ -68,11 +68,11 @@ The [project file](/samples/BlazorServerApp/BlazorServerApp.csproj) looks like t - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/readme/BlazorWebAssemblyApp.md b/readme/BlazorWebAssemblyApp.md index 959bbbc17..008f0e535 100644 --- a/readme/BlazorWebAssemblyApp.md +++ b/readme/BlazorWebAssemblyApp.md @@ -67,11 +67,11 @@ The [project file](/samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj) lo - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/readme/Console.md b/readme/Console.md index 56b462b4e..c4f34b3c0 100644 --- a/readme/Console.md +++ b/readme/Console.md @@ -90,7 +90,7 @@ The [project file](/samples/ShroedingersCat/ShroedingersCat.csproj) looks like t - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/ConsoleNativeAOT.md b/readme/ConsoleNativeAOT.md index 7da496158..cd6ed4ad3 100644 --- a/readme/ConsoleNativeAOT.md +++ b/readme/ConsoleNativeAOT.md @@ -16,7 +16,7 @@ The [project file](/samples/ShroedingersCatNativeAOT/ShroedingersCatNativeAOT.cs - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/ConsoleTopLevelStatements.md b/readme/ConsoleTopLevelStatements.md index 034a288d4..06565308d 100644 --- a/readme/ConsoleTopLevelStatements.md +++ b/readme/ConsoleTopLevelStatements.md @@ -78,7 +78,7 @@ The [project file](/samples/ShroedingersCatTopLevelStatements/ShroedingersCatTop - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/EnumDetails.md b/readme/EnumDetails.md index 8bedfd44e..aeba5c686 100644 --- a/readme/EnumDetails.md +++ b/readme/EnumDetails.md @@ -88,49 +88,49 @@ classDiagram ```c# partial class Enum { - private readonly Enum _rootM03D28di; + private readonly Enum _rootM04D03di; public Enum() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Enum(Enum baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable LocalperBlockM03D28di10_IEnumerable() + System.Collections.Generic.IEnumerable LocalperBlockM04D03di10_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()); } - System.Collections.Generic.IEnumerable perBlockM03D28di10_IEnumerable = LocalperBlockM03D28di10_IEnumerable(); - return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D28di10_IEnumerable)), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D28di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D28di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D28di10_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()); + System.Collections.Generic.IEnumerable perBlockM04D03di10_IEnumerable = LocalperBlockM04D03di10_IEnumerable(); + return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM04D03di10_IEnumerable)), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM04D03di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM04D03di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM04D03di10_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()); } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -141,11 +141,11 @@ partial class Enum public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -233,25 +233,25 @@ partial class Enum " Enum ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Enum() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Enum composite) { @@ -264,7 +264,7 @@ partial class Enum } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 4f67f6f45..84c4657ae 100644 --- a/readme/FuncDetails.md +++ b/readme/FuncDetails.md @@ -67,47 +67,47 @@ classDiagram ```c# partial class Func { - private readonly Func _rootM03D28di; + private readonly Func _rootM04D03di; public Func() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Func(Func baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { - System.Func perBlockM03D28di10_Func = new Func( + System.Func perBlockM04D03di10_Func = new Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var value_M03D28di1 = new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); - return value_M03D28di1; + var value_M04D03di1 = new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); + return value_M04D03di1; }); - return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D28di10_Func)), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D28di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D28di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D28di10_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(perBlockM04D03di10_Func)), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM04D03di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM04D03di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM04D03di10_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()); } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -118,11 +118,11 @@ partial class Func public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -189,25 +189,25 @@ partial class Func " FuncᐸIService3ᐳ *-- Service3 : IService3"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Func() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Func composite) { @@ -220,7 +220,7 @@ partial class Func } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Func composition) { diff --git a/readme/GrpcService.md b/readme/GrpcService.md index ac2959acf..83d12586a 100644 --- a/readme/GrpcService.md +++ b/readme/GrpcService.md @@ -53,11 +53,11 @@ The [project file](/samples/GrpcService/GrpcService.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/readme/Maui.md b/readme/Maui.md index 34a65b464..c576028c2 100644 --- a/readme/Maui.md +++ b/readme/Maui.md @@ -208,11 +208,11 @@ The [project file](/samples/MAUIApp/MAUIApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/readme/MinimalWebAPI.md b/readme/MinimalWebAPI.md index e94f76293..5d1e055f3 100644 --- a/readme/MinimalWebAPI.md +++ b/readme/MinimalWebAPI.md @@ -76,11 +76,11 @@ The [project file](/samples/WebAPI/WebAPI.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/readme/SingletonDetails.md b/readme/SingletonDetails.md index 92f4953a0..fd936aaa5 100644 --- a/readme/SingletonDetails.md +++ b/readme/SingletonDetails.md @@ -69,50 +69,50 @@ classDiagram ```c# partial class Singleton { - private readonly Singleton _rootM03D28di; - private Pure.DI.Benchmarks.Model.Service1 _scopedM03D28di37_Service1; - private Pure.DI.Benchmarks.Model.Service4 _scopedM03D28di40_Service4; + private readonly Singleton _rootM04D03di; + private Pure.DI.Benchmarks.Model.Service1 _scopedM04D03di37_Service1; + private Pure.DI.Benchmarks.Model.Service4 _scopedM04D03di40_Service4; public Singleton() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Singleton(Singleton baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { - if (ReferenceEquals(_scopedM03D28di40_Service4, null)) + if (_scopedM04D03di40_Service4 == null) { - _scopedM03D28di40_Service4 = new Pure.DI.Benchmarks.Model.Service4(); + _scopedM04D03di40_Service4 = new Pure.DI.Benchmarks.Model.Service4(); } - if (ReferenceEquals(_scopedM03D28di37_Service1, null)) + if (_scopedM04D03di37_Service1 == null) { - _scopedM03D28di37_Service1 = new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4))); + _scopedM04D03di37_Service1 = new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4))); } - return new Pure.DI.Benchmarks.Model.CompositionRoot(_scopedM03D28di37_Service1, new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4)), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D28di40_Service4, _scopedM03D28di40_Service4), _scopedM03D28di40_Service4, _scopedM03D28di40_Service4); + return new Pure.DI.Benchmarks.Model.CompositionRoot(_scopedM04D03di37_Service1, new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4)), new Pure.DI.Benchmarks.Model.Service3(_scopedM04D03di40_Service4, _scopedM04D03di40_Service4), _scopedM04D03di40_Service4, _scopedM04D03di40_Service4); } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -123,11 +123,11 @@ partial class Singleton public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -196,25 +196,25 @@ partial class Singleton " Singleton ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Singleton() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Singleton composite) { @@ -227,7 +227,7 @@ partial class Singleton } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 f1b0be39f..80169358d 100644 --- a/readme/TransientDetails.md +++ b/readme/TransientDetails.md @@ -69,16 +69,16 @@ classDiagram ```c# partial class Transient { - private readonly Transient _rootM03D28di; + private readonly Transient _rootM04D03di; public Transient() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Transient(Transient baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() @@ -88,21 +88,21 @@ partial class Transient public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -113,11 +113,11 @@ partial class Transient public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -186,25 +186,25 @@ partial class Transient " Transient ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Transient() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Transient composite) { @@ -217,7 +217,7 @@ partial class Transient } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Transient composition) { diff --git a/readme/WebAPI.md b/readme/WebAPI.md index 389913da7..7c9e9f435 100644 --- a/readme/WebAPI.md +++ b/readme/WebAPI.md @@ -51,11 +51,11 @@ The [project file](/samples/WebAPI/WebAPI.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/readme/WebApp.md b/readme/WebApp.md index 4ed6d88f9..8a33fc3a1 100644 --- a/readme/WebApp.md +++ b/readme/WebApp.md @@ -51,11 +51,11 @@ The [project file](/samples/WebApp/WebApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/readme/WinFormsApp.md b/readme/WinFormsApp.md index 6a79c962b..1a732608b 100644 --- a/readme/WinFormsApp.md +++ b/readme/WinFormsApp.md @@ -55,7 +55,7 @@ The [project file](/samples/WinFormsApp/WinFormsApp.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/WinFormsAppNetCore.md b/readme/WinFormsAppNetCore.md index c21aa630b..883c507a4 100644 --- a/readme/WinFormsAppNetCore.md +++ b/readme/WinFormsAppNetCore.md @@ -62,7 +62,7 @@ The [project file](/samples/WinFormsAppNetCore/WinFormsAppNetCore.csproj) looks - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/Wpf.md b/readme/Wpf.md index ec951d222..bf4fcb929 100644 --- a/readme/Wpf.md +++ b/readme/Wpf.md @@ -68,7 +68,7 @@ The [project file](/samples/WpfAppNetCore/WpfAppNetCore.csproj) looks like this: - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/readme/a-few-partial-classes.md b/readme/a-few-partial-classes.md index 7911841b5..25a0ef61a 100644 --- a/readme/a-few-partial-classes.md +++ b/readme/a-few-partial-classes.md @@ -79,16 +79,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Advanced.SeveralPartialClassesScenario.IService Root @@ -101,21 +101,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -126,11 +126,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -168,25 +168,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.SeveralPartialClassesScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.SeveralPartialClassesScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -199,7 +199,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.SeveralPartialClassesScenario.IService Resolve(Composition composition) { diff --git a/readme/accumulators.md b/readme/accumulators.md index 353ed5636..ad510014a 100644 --- a/readme/accumulators.md +++ b/readme/accumulators.md @@ -90,68 +90,68 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency _singletonM03D28di38_XyzDependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency _singletonM04D03di38_XyzDependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public (Pure.DI.UsageTests.Advanced.AccumulatorScenario.IService service, Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator accumulator) Root { get { - var accumulatorM03D28di41 = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator(); - Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency perBlockM03D28di4_AbcDependency = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency(); - if (ReferenceEquals(_rootM03D28di._singletonM03D28di38_XyzDependency, null)) + var accumulatorM04D03di41 = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator(); + Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency perBlockM04D03di4_AbcDependency = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency(); + if (_rootM04D03di._singletonM04D03di38_XyzDependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di38_XyzDependency, null)) + if (_rootM04D03di._singletonM04D03di38_XyzDependency == null) { - Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency _singletonM03D28di38_XyzDependencyTemp; - _singletonM03D28di38_XyzDependencyTemp = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency(); - accumulatorM03D28di41.Add(_singletonM03D28di38_XyzDependencyTemp); + Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency _singletonM04D03di38_XyzDependencyTemp; + _singletonM04D03di38_XyzDependencyTemp = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency(); + accumulatorM04D03di41.Add(_singletonM04D03di38_XyzDependencyTemp); global::System.Threading.Thread.MemoryBarrier(); - _singletonM03D28di38_XyzDependency = _singletonM03D28di38_XyzDependencyTemp; - _rootM03D28di._singletonM03D28di38_XyzDependency = _singletonM03D28di38_XyzDependency; + _singletonM04D03di38_XyzDependency = _singletonM04D03di38_XyzDependencyTemp; + _rootM04D03di._singletonM04D03di38_XyzDependency = _singletonM04D03di38_XyzDependency; } } } - Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency transientM03D28di3_AbcDependency = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency(); - accumulatorM03D28di41.Add(transientM03D28di3_AbcDependency); - Pure.DI.UsageTests.Advanced.AccumulatorScenario.Service transientM03D28di1_Service = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.Service(transientM03D28di3_AbcDependency, _rootM03D28di._singletonM03D28di38_XyzDependency, perBlockM03D28di4_AbcDependency); - accumulatorM03D28di41.Add(transientM03D28di1_Service); - return (transientM03D28di1_Service, accumulatorM03D28di41); + Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency transientM04D03di3_AbcDependency = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency(); + accumulatorM04D03di41.Add(transientM04D03di3_AbcDependency); + Pure.DI.UsageTests.Advanced.AccumulatorScenario.Service transientM04D03di1_Service = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.Service(transientM04D03di3_AbcDependency, _rootM04D03di._singletonM04D03di38_XyzDependency, perBlockM04D03di4_AbcDependency); + accumulatorM04D03di41.Add(transientM04D03di1_Service); + return (transientM04D03di1_Service, accumulatorM04D03di41); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -162,11 +162,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -216,25 +216,25 @@ partial class Composition " Composition ..> ValueTupleᐸIServiceˏMyAccumulatorᐳ : ValueTupleᐸIServiceˏMyAccumulatorᐳ Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di<(Pure.DI.UsageTests.Advanced.AccumulatorScenario.IService service, Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator accumulator)>.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di<(Pure.DI.UsageTests.Advanced.AccumulatorScenario.IService service, Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator accumulator)>.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof((Pure.DI.UsageTests.Advanced.AccumulatorScenario.IService service, Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator accumulator)), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof((Pure.DI.UsageTests.Advanced.AccumulatorScenario.IService service, Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator accumulator)), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -247,7 +247,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver, global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver, global::Pure.DI.IResolver { public (Pure.DI.UsageTests.Advanced.AccumulatorScenario.IService service, Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator accumulator) Resolve(Composition composition) { diff --git a/readme/advanced-interception.md b/readme/advanced-interception.md index 1949b0703..a6317301c 100644 --- a/readme/advanced-interception.md +++ b/readme/advanced-interception.md @@ -147,16 +147,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService Root @@ -169,21 +169,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -194,11 +194,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -238,25 +238,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -269,7 +269,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 59ea01314..26f12b51f 100644 --- a/readme/arguments.md +++ b/readme/arguments.md @@ -96,54 +96,54 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly int _argM03D28di_id; - private readonly string _argM03D28di_serviceName; + private readonly Composition _rootM04D03di; + private readonly int _argM04D03di_id; + private readonly string _argM04D03di_serviceName; public Composition(int id, string serviceName) { - _rootM03D28di = this; + _rootM04D03di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D28di_id = id; - _argM03D28di_serviceName = serviceName; + _argM04D03di_id = id; + _argM04D03di_serviceName = serviceName; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _argM03D28di_id = baseComposition._argM03D28di_id; - _argM03D28di_serviceName = baseComposition._argM03D28di_serviceName; + _rootM04D03di = baseComposition._rootM04D03di; + _argM04D03di_id = baseComposition._argM04D03di_id; + _argM04D03di_serviceName = baseComposition._argM04D03di_serviceName; } public Pure.DI.UsageTests.Basics.ArgumentsScenario.IService Root { get { - return new Pure.DI.UsageTests.Basics.ArgumentsScenario.Service(_argM03D28di_serviceName, new Pure.DI.UsageTests.Basics.ArgumentsScenario.Dependency(_argM03D28di_id)); + return new Pure.DI.UsageTests.Basics.ArgumentsScenario.Service(_argM04D03di_serviceName, new Pure.DI.UsageTests.Basics.ArgumentsScenario.Dependency(_argM04D03di_id)); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -154,11 +154,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -200,25 +200,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ArgumentsScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ArgumentsScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -231,7 +231,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 a76301ecd..69f2bd114 100644 --- a/readme/array.md +++ b/readme/array.md @@ -107,16 +107,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.BCL.ArrayScenario.IService Root @@ -129,21 +129,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -154,11 +154,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -203,25 +203,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ArrayScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ArrayScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -234,7 +234,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 a886fd253..a06e5e1dd 100644 --- a/readme/async-enumerable.md +++ b/readme/async-enumerable.md @@ -90,16 +90,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService Root @@ -107,33 +107,33 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - async System.Collections.Generic.IAsyncEnumerable LocaltransientM03D28di1_IAsyncEnumerable() + async System.Collections.Generic.IAsyncEnumerable LocaltransientM04D03di1_IAsyncEnumerable() { yield return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.XyzDependency(); } - System.Collections.Generic.IAsyncEnumerable transientM03D28di1_IAsyncEnumerable = LocaltransientM03D28di1_IAsyncEnumerable(); - return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.Service(transientM03D28di1_IAsyncEnumerable); + System.Collections.Generic.IAsyncEnumerable transientM04D03di1_IAsyncEnumerable = LocaltransientM04D03di1_IAsyncEnumerable(); + return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.Service(transientM04D03di1_IAsyncEnumerable); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -144,11 +144,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -193,25 +193,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -224,7 +224,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 468ffa743..70db588b7 100644 --- a/readme/auto-bindings.md +++ b/readme/auto-bindings.md @@ -51,16 +51,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.AutoBindingsScenario.Service MyService diff --git a/readme/auto-scoped.md b/readme/auto-scoped.md index c0d998c58..ac50937a7 100644 --- a/readme/auto-scoped.md +++ b/readme/auto-scoped.md @@ -106,37 +106,37 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency _scopedM03D28di36_Dependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency _scopedM04D03di36_Dependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service SessionRoot { get { - if (ReferenceEquals(_scopedM03D28di36_Dependency, null)) + if (_scopedM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_scopedM03D28di36_Dependency, null)) + if (_scopedM04D03di36_Dependency == null) { - _scopedM03D28di36_Dependency = new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency(); + _scopedM04D03di36_Dependency = new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency(); } } } - return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service(_scopedM03D28di36_Dependency); + return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service(_scopedM04D03di36_Dependency); } } @@ -144,43 +144,43 @@ partial class Composition { get { - var perResolveM03D28di41_Func = default(System.Func); - perResolveM03D28di41_Func = new global::System.Func( + var perResolveM04D03di41_Func = default(System.Func); + perResolveM04D03di41_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Composition transientM03D28di2_Composition = this; - Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.IService transientM03D28di1_IService; + Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Composition transientM04D03di2_Composition = this; + Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.IService transientM04D03di1_IService; { - var baseComposition_M03D28di2 = transientM03D28di2_Composition; + var baseComposition_M04D03di2 = transientM04D03di2_Composition; // Creates a session - var session_M03D28di3 = new Composition(baseComposition_M03D28di2); - transientM03D28di1_IService = session_M03D28di3.SessionRoot; + var session_M04D03di3 = new Composition(baseComposition_M04D03di2); + transientM04D03di1_IService = session_M04D03di3.SessionRoot; } - var factory_M03D28di1 = transientM03D28di1_IService; - return factory_M03D28di1; + var factory_M04D03di1 = transientM04D03di1_IService; + return factory_M04D03di1; }); - return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program(perResolveM03D28di41_Func); + return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program(perResolveM04D03di41_Func); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -191,11 +191,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -240,28 +240,28 @@ partial class Composition " FuncᐸIServiceᐳ *-- IService : IService"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -274,7 +274,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service Resolve(Composition composition) { @@ -292,7 +292,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 6bad453ab..b294aa188 100644 --- a/readme/check-for-a-root.md +++ b/readme/check-for-a-root.md @@ -99,16 +99,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Hints.CheckForRootScenario.IService Root @@ -122,7 +122,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency RootM03D28di0001 + public Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency RootM04D03di0001 { get { @@ -132,21 +132,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -157,11 +157,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -202,32 +202,32 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; private static partial void OnNewRoot(global::Pure.DI.IResolver resolver, string name, object? tag, global::Pure.DI.Lifetime lifetime); static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - OnNewRoot(valResolverM03D28di_0000, "Root", null, Pure.DI.Lifetime.Transient); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - OnNewRoot(valResolverM03D28di_0001, "RootM03D28di0001", "MyDep", Pure.DI.Lifetime.Transient); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + OnNewRoot(valResolverM04D03di_0000, "Root", null, Pure.DI.Lifetime.Transient); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + OnNewRoot(valResolverM04D03di_0001, "RootM04D03di0001", "MyDep", Pure.DI.Lifetime.Transient); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.CheckForRootScenario.IService), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.CheckForRootScenario.IService), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -240,7 +240,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.CheckForRootScenario.IService Resolve(Composition composition) { @@ -258,7 +258,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency Resolve(Composition composition) { @@ -270,7 +270,7 @@ partial class Composition switch (tag) { case "MyDep": - return composition.RootM03D28di0001; + return composition.RootM04D03di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency."); } diff --git a/readme/complex-generics.md b/readme/complex-generics.md index 5c4ff44a4..84d826caf 100644 --- a/readme/complex-generics.md +++ b/readme/complex-generics.md @@ -110,16 +110,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Generics.ComplexGenericsScenario.Program Root @@ -132,21 +132,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -157,11 +157,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -211,25 +211,25 @@ partial class Composition " ServiceᐸStringˏInt32ˏListᐸStringᐳˏDictionaryᐸStringˏInt32ᐳᐳ *-- DependencyStructᐸInt32ᐳ : \"value type\" IDependencyᐸInt32ᐳ"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di>.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di>.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Generics.ComplexGenericsScenario.Program), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Generics.ComplexGenericsScenario.Program), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -242,7 +242,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.Generics.ComplexGenericsScenario.Program Resolve(Composition composition) { diff --git a/readme/composition-root-kinds.md b/readme/composition-root-kinds.md index f036cd87e..659850315 100644 --- a/readme/composition-root-kinds.md +++ b/readme/composition-root-kinds.md @@ -90,16 +90,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } private partial Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IService GetRoot() @@ -122,21 +122,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -147,11 +147,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -197,28 +197,28 @@ partial class Composition " Composition ..> Dependency : IDependency Dependency"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IService), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IDependency), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IService), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IDependency), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -231,7 +231,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IService Resolve(Composition composition) { @@ -251,7 +251,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IDependency Resolve(Composition composition) { diff --git a/readme/composition-roots-simplified.md b/readme/composition-roots-simplified.md index ba50618c1..1a50be747 100644 --- a/readme/composition-roots-simplified.md +++ b/readme/composition-roots-simplified.md @@ -83,16 +83,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService MyRoot @@ -103,7 +103,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService RootM03D28di0002 + public Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService RootM04D03di0002 { get { @@ -113,21 +113,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -138,11 +138,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -186,25 +186,25 @@ partial class Composition " Composition ..> OtherService : IService _"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -217,7 +217,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService Resolve(Composition composition) { @@ -229,7 +229,7 @@ partial class Composition switch (tag) { case "Other": - return composition.RootM03D28di0002; + return composition.RootM04D03di0002; case null: return composition.MyRoot; } diff --git a/readme/composition-roots.md b/readme/composition-roots.md index 2f1786766..3b8117cd1 100644 --- a/readme/composition-roots.md +++ b/readme/composition-roots.md @@ -109,16 +109,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService MyRoot @@ -137,7 +137,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency RootM03D28di0003 + public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency RootM04D03di0003 { get { @@ -147,21 +147,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -172,11 +172,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -222,28 +222,28 @@ partial class Composition " Composition ..> Dependency : IDependency _"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -256,7 +256,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService Resolve(Composition composition) { @@ -276,11 +276,11 @@ partial class Composition } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D28di0003; + return composition.RootM04D03di0003; } public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -288,7 +288,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D28di0003; + return composition.RootM04D03di0003; } 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 60b753d57..ca59084e7 100644 --- a/readme/constructor-ordinal-attribute.md +++ b/readme/constructor-ordinal-attribute.md @@ -74,51 +74,51 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly string _argM03D28di_serviceName; + private readonly Composition _rootM04D03di; + private readonly string _argM04D03di_serviceName; public Composition(string serviceName) { - _rootM03D28di = this; + _rootM04D03di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D28di_serviceName = serviceName; + _argM04D03di_serviceName = serviceName; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _argM03D28di_serviceName = baseComposition._argM03D28di_serviceName; + _rootM04D03di = baseComposition._rootM04D03di; + _argM04D03di_serviceName = baseComposition._argM04D03di_serviceName; } public Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService Root { get { - return new Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.Service(_argM03D28di_serviceName); + return new Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.Service(_argM04D03di_serviceName); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -129,11 +129,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -165,25 +165,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -196,7 +196,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 ecf502231..24a337d19 100644 --- a/readme/custom-attributes.md +++ b/readme/custom-attributes.md @@ -90,49 +90,49 @@ classDiagram ```c# partial class PersonComposition { - private readonly PersonComposition _rootM03D28di; - private readonly int _argM03D28di_personId; + private readonly PersonComposition _rootM04D03di; + private readonly int _argM04D03di_personId; public PersonComposition(int personId) { - _rootM03D28di = this; - _argM03D28di_personId = personId; + _rootM04D03di = this; + _argM04D03di_personId = personId; } internal PersonComposition(PersonComposition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _argM03D28di_personId = baseComposition._argM03D28di_personId; + _rootM04D03di = baseComposition._rootM04D03di; + _argM04D03di_personId = baseComposition._argM04D03di_personId; } public Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson Person { get { - string transientM03D28di1_String = "Nik"; - Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person transientM03D28di0_Person = new Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person(transientM03D28di1_String); - transientM03D28di0_Person.Id = _argM03D28di_personId; - return transientM03D28di0_Person; + string transientM04D03di1_String = "Nik"; + Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person transientM04D03di0_Person = new Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person(transientM04D03di1_String); + transientM04D03di0_Person.Id = _argM04D03di_personId; + return transientM04D03di0_Person; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -143,11 +143,11 @@ partial class PersonComposition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -182,25 +182,25 @@ partial class PersonComposition " PersonComposition ..> Person : IPerson Person"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static PersonComposition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(PersonComposition composite) { @@ -213,7 +213,7 @@ partial class PersonComposition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 56e7c4404..28a51af70 100644 --- a/readme/decorator.md +++ b/readme/decorator.md @@ -64,16 +64,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Interception.DecoratorScenario.IService Root @@ -86,21 +86,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -111,11 +111,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -150,25 +150,25 @@ partial class Composition " Composition ..> GreetingService : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.DecoratorScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.DecoratorScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -181,7 +181,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 99f390df6..f1629ad81 100644 --- a/readme/default-lifetime.md +++ b/readme/default-lifetime.md @@ -77,64 +77,64 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service _singletonM03D28di37_Service; - private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency _singletonM03D28di36_Dependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service _singletonM04D03di37_Service; + private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency _singletonM04D03di36_Dependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService Root { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di37_Service, null)) + if (_rootM04D03di._singletonM04D03di37_Service == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di37_Service, null)) + if (_rootM04D03di._singletonM04D03di37_Service == null) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } - _singletonM03D28di37_Service = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service(_singletonM03D28di36_Dependency, _rootM03D28di._singletonM03D28di36_Dependency); - _rootM03D28di._singletonM03D28di37_Service = _singletonM03D28di37_Service; + _singletonM04D03di37_Service = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service(_singletonM04D03di36_Dependency, _rootM04D03di._singletonM04D03di36_Dependency); + _rootM04D03di._singletonM04D03di37_Service = _singletonM04D03di37_Service; } } } - return _rootM03D28di._singletonM03D28di37_Service; + return _rootM04D03di._singletonM04D03di37_Service; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -145,11 +145,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -188,25 +188,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -219,7 +219,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 cef1f6727..5972a1078 100644 --- a/readme/default-values.md +++ b/readme/default-values.md @@ -73,16 +73,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService Root @@ -98,21 +98,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -123,11 +123,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -166,25 +166,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -197,7 +197,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 8068247eb..7b305e6e1 100644 --- a/readme/dependent-compositions.md +++ b/readme/dependent-compositions.md @@ -90,16 +90,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService Root @@ -112,21 +112,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -137,11 +137,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -179,25 +179,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -210,7 +210,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService Resolve(Composition composition) { @@ -238,16 +238,16 @@ partial class Composition ```c# partial class OtherComposition { - private readonly OtherComposition _rootM03D28di; + private readonly OtherComposition _rootM04D03di; public OtherComposition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal OtherComposition(OtherComposition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService Root @@ -268,21 +268,21 @@ partial class OtherComposition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -293,11 +293,11 @@ partial class OtherComposition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -341,28 +341,28 @@ partial class OtherComposition " OtherComposition ..> Program : Program Program"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static OtherComposition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.Program), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.Program), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(OtherComposition composite) { @@ -375,7 +375,7 @@ partial class OtherComposition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService Resolve(OtherComposition composition) { @@ -393,7 +393,7 @@ partial class OtherComposition } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.Program Resolve(OtherComposition composition) { diff --git a/readme/disposable-singleton.md b/readme/disposable-singleton.md index 7451c49a4..355d3340e 100644 --- a/readme/disposable-singleton.md +++ b/readme/disposable-singleton.md @@ -82,62 +82,62 @@ classDiagram ```c# partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private readonly global::System.IDisposable[] _disposablesM03D28di; - private int _disposeIndexM03D28di; - private Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency _singletonM03D28di36_Dependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private readonly global::System.IDisposable[] _disposablesM04D03di; + private int _disposeIndexM04D03di; + private Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency _singletonM04D03di36_Dependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); - _disposablesM03D28di = new global::System.IDisposable[1]; + _rootM04D03di = this; + _lockM04D03di = new object(); + _disposablesM04D03di = new global::System.IDisposable[1]; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService Root { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; - _rootM03D28di._disposablesM03D28di[_rootM03D28di._disposeIndexM03D28di++] = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; + _rootM04D03di._disposablesM04D03di[_rootM04D03di._disposeIndexM04D03di++] = _singletonM04D03di36_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Service(_rootM03D28di._singletonM03D28di36_Dependency); + return new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Service(_rootM04D03di._singletonM04D03di36_Dependency); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -148,11 +148,11 @@ partial class Composition: global::System.IDisposable public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -164,11 +164,11 @@ partial class Composition: global::System.IDisposable public void Dispose() { - lock (_lockM03D28di) + lock (_lockM04D03di) { - while (_disposeIndexM03D28di > 0) + while (_disposeIndexM04D03di > 0) { - var disposableInstance = _disposablesM03D28di[--_disposeIndexM03D28di]; + var disposableInstance = _disposablesM04D03di[--_disposeIndexM04D03di]; try { disposableInstance.Dispose(); @@ -179,7 +179,7 @@ partial class Composition: global::System.IDisposable } } - _singletonM03D28di36_Dependency = null; + _singletonM04D03di36_Dependency = null; } } @@ -215,25 +215,25 @@ partial class Composition: global::System.IDisposable " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -246,7 +246,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 3095de7c7..05de4e687 100644 --- a/readme/enumerable-generics.md +++ b/readme/enumerable-generics.md @@ -111,16 +111,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService IntRoot @@ -128,13 +128,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D28di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM04D03di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.XyzDependency(); } - System.Collections.Generic.IEnumerable> perBlockM03D28di1_IEnumerable = LocalperBlockM03D28di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D28di1_IEnumerable); + System.Collections.Generic.IEnumerable> perBlockM04D03di1_IEnumerable = LocalperBlockM04D03di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM04D03di1_IEnumerable); } } @@ -143,33 +143,33 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D28di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM04D03di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.XyzDependency(); } - System.Collections.Generic.IEnumerable> perBlockM03D28di1_IEnumerable = LocalperBlockM03D28di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D28di1_IEnumerable); + System.Collections.Generic.IEnumerable> perBlockM04D03di1_IEnumerable = LocalperBlockM04D03di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM04D03di1_IEnumerable); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -180,11 +180,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -253,28 +253,28 @@ partial class Composition " ServiceᐸStringᐳ o-- \"PerBlock\" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di>.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di>.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di>.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di>.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -287,7 +287,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService Resolve(Composition composition) { @@ -305,7 +305,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver> + private sealed class ResolverM04D03di_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 8eade333f..cf970d8c7 100644 --- a/readme/enumerable.md +++ b/readme/enumerable.md @@ -82,16 +82,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.BCL.EnumerableScenario.IService Root @@ -99,33 +99,33 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable LocalperBlockM03D28di1_IEnumerable() + System.Collections.Generic.IEnumerable LocalperBlockM04D03di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableScenario.XyzDependency(); } - System.Collections.Generic.IEnumerable perBlockM03D28di1_IEnumerable = LocalperBlockM03D28di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableScenario.Service(perBlockM03D28di1_IEnumerable); + System.Collections.Generic.IEnumerable perBlockM04D03di1_IEnumerable = LocalperBlockM04D03di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableScenario.Service(perBlockM04D03di1_IEnumerable); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -136,11 +136,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -185,25 +185,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -216,7 +216,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 ec460756b..3fe8ca98d 100644 --- a/readme/factory.md +++ b/readme/factory.md @@ -125,50 +125,50 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.FactoryScenario.IService Root { get { - System.DateTimeOffset transientM03D28di3_DateTimeOffset = DateTimeOffset.Now; - Pure.DI.UsageTests.Basics.FactoryScenario.Dependency transientM03D28di1_Dependency; + System.DateTimeOffset transientM04D03di3_DateTimeOffset = DateTimeOffset.Now; + Pure.DI.UsageTests.Basics.FactoryScenario.Dependency transientM04D03di1_Dependency; { - var dependency_M03D28di1 = new Pure.DI.UsageTests.Basics.FactoryScenario.Dependency(transientM03D28di3_DateTimeOffset); - dependency_M03D28di1.Initialize(); - transientM03D28di1_Dependency = dependency_M03D28di1; + var dependency_M04D03di1 = new Pure.DI.UsageTests.Basics.FactoryScenario.Dependency(transientM04D03di3_DateTimeOffset); + dependency_M04D03di1.Initialize(); + transientM04D03di1_Dependency = dependency_M04D03di1; } - return new Pure.DI.UsageTests.Basics.FactoryScenario.Service(transientM03D28di1_Dependency); + return new Pure.DI.UsageTests.Basics.FactoryScenario.Service(transientM04D03di1_Dependency); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -179,11 +179,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -259,25 +259,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FactoryScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FactoryScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -290,7 +290,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 e1e0e3582..df0fc2ee7 100644 --- a/readme/field-injection.md +++ b/readme/field-injection.md @@ -73,45 +73,45 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService Root { get { - Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service transientM03D28di0_Service = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service(); - transientM03D28di0_Service.DependencyVal = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Dependency(); - return transientM03D28di0_Service; + Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service transientM04D03di0_Service = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service(); + transientM04D03di0_Service.DependencyVal = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Dependency(); + return transientM04D03di0_Service; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -122,11 +122,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -165,25 +165,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -196,7 +196,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 84aace104..dfcbf13e9 100644 --- a/readme/func-with-arguments.md +++ b/readme/func-with-arguments.md @@ -110,64 +110,64 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock _singletonM03D28di36_Clock; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock _singletonM04D03di36_Clock; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService Root { get { - System.Func transientM03D28di1_Func = dependencyId => + System.Func transientM04D03di1_Func = dependencyId => { - int transientM03D28di3_Int32 = dependencyId; - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Clock, null)) + int transientM04D03di3_Int32 = dependencyId; + if (_rootM04D03di._singletonM04D03di36_Clock == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Clock, null)) + if (_rootM04D03di._singletonM04D03di36_Clock == null) { - _singletonM03D28di36_Clock = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock(); - _rootM03D28di._singletonM03D28di36_Clock = _singletonM03D28di36_Clock; + _singletonM04D03di36_Clock = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock(); + _rootM04D03di._singletonM04D03di36_Clock = _singletonM04D03di36_Clock; } } } - var dependency_M03D28di1 = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Dependency(_rootM03D28di._singletonM03D28di36_Clock, transientM03D28di3_Int32); - return dependency_M03D28di1; + var dependency_M04D03di1 = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Dependency(_rootM04D03di._singletonM04D03di36_Clock, transientM04D03di3_Int32); + return dependency_M04D03di1; }; - return new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Service(transientM03D28di1_Func); + return new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Service(transientM04D03di1_Func); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -178,11 +178,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -228,25 +228,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -259,7 +259,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService Resolve(Composition composition) { diff --git a/readme/func-with-tag.md b/readme/func-with-tag.md index cf76492b6..17e8b161c 100644 --- a/readme/func-with-tag.md +++ b/readme/func-with-tag.md @@ -74,54 +74,54 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.BCL.FuncWithTagScenario.IService Root { get { - var perResolveM03D28di38_Func = default(System.Func); - perResolveM03D28di38_Func = new global::System.Func( + var perResolveM04D03di38_Func = default(System.Func); + perResolveM04D03di38_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D28di1 = new Pure.DI.UsageTests.BCL.FuncWithTagScenario.Dependency(); - return factory_M03D28di1; + var factory_M04D03di1 = new Pure.DI.UsageTests.BCL.FuncWithTagScenario.Dependency(); + return factory_M04D03di1; }); - return new Pure.DI.UsageTests.BCL.FuncWithTagScenario.Service(perResolveM03D28di38_Func); + return new Pure.DI.UsageTests.BCL.FuncWithTagScenario.Service(perResolveM04D03di38_Func); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -132,11 +132,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -176,25 +176,25 @@ partial class Composition " FuncᐸIDependencyᐳ *-- Dependency : \"my tag\" IDependency"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithTagScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithTagScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -207,7 +207,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.FuncWithTagScenario.IService Resolve(Composition composition) { diff --git a/readme/func.md b/readme/func.md index f2b542f79..8ad14fb3a 100644 --- a/readme/func.md +++ b/readme/func.md @@ -77,54 +77,54 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.BCL.FuncScenario.IService Root { get { - var perResolveM03D28di38_Func = default(System.Func); - perResolveM03D28di38_Func = new global::System.Func( + var perResolveM04D03di38_Func = default(System.Func); + perResolveM04D03di38_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D28di1 = new Pure.DI.UsageTests.BCL.FuncScenario.Dependency(); - return factory_M03D28di1; + var factory_M04D03di1 = new Pure.DI.UsageTests.BCL.FuncScenario.Dependency(); + return factory_M04D03di1; }); - return new Pure.DI.UsageTests.BCL.FuncScenario.Service(perResolveM03D28di38_Func); + return new Pure.DI.UsageTests.BCL.FuncScenario.Service(perResolveM04D03di38_Func); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -135,11 +135,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -179,25 +179,25 @@ partial class Composition " FuncᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -210,7 +210,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.FuncScenario.IService Resolve(Composition composition) { diff --git a/readme/generic-composition-roots-with-constraints.md b/readme/generic-composition-roots-with-constraints.md index 9fdd26814..251172205 100644 --- a/readme/generic-composition-roots-with-constraints.md +++ b/readme/generic-composition-roots-with-constraints.md @@ -95,16 +95,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Generics.GenericCompositionRootsWithConstraintsScenario.IService GetMyRoot() @@ -117,12 +117,12 @@ partial class Composition public Pure.DI.UsageTests.Generics.GenericCompositionRootsWithConstraintsScenario.IService GetOtherService() where T: System.IDisposable { - Pure.DI.UsageTests.Generics.GenericCompositionRootsWithConstraintsScenario.OtherService transientM03D28di0_OtherService; + Pure.DI.UsageTests.Generics.GenericCompositionRootsWithConstraintsScenario.OtherService transientM04D03di0_OtherService; { - var dependency_M03D28di1 = new Pure.DI.UsageTests.Generics.GenericCompositionRootsWithConstraintsScenario.Dependency(); - transientM03D28di0_OtherService = new OtherService(dependency_M03D28di1); + var dependency_M04D03di1 = new Pure.DI.UsageTests.Generics.GenericCompositionRootsWithConstraintsScenario.Dependency(); + transientM04D03di0_OtherService = new OtherService(dependency_M04D03di1); } - return transientM03D28di0_OtherService; + return transientM04D03di0_OtherService; } public override string ToString() diff --git a/readme/generic-composition-roots.md b/readme/generic-composition-roots.md index 362f85501..13d8fd579 100644 --- a/readme/generic-composition-roots.md +++ b/readme/generic-composition-roots.md @@ -89,16 +89,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Generics.GenericsCompositionRootsScenario.IService GetMyRoot() @@ -108,12 +108,12 @@ partial class Composition public Pure.DI.UsageTests.Generics.GenericsCompositionRootsScenario.IService GetOtherService() { - Pure.DI.UsageTests.Generics.GenericsCompositionRootsScenario.OtherService transientM03D28di0_OtherService; + Pure.DI.UsageTests.Generics.GenericsCompositionRootsScenario.OtherService transientM04D03di0_OtherService; { - var dependency_M03D28di1 = new Pure.DI.UsageTests.Generics.GenericsCompositionRootsScenario.Dependency(); - transientM03D28di0_OtherService = new OtherService(dependency_M03D28di1); + var dependency_M04D03di1 = new Pure.DI.UsageTests.Generics.GenericsCompositionRootsScenario.Dependency(); + transientM04D03di0_OtherService = new OtherService(dependency_M04D03di1); } - return transientM03D28di0_OtherService; + return transientM04D03di0_OtherService; } public override string ToString() diff --git a/readme/generics.md b/readme/generics.md index 592e72dc5..31123b34f 100644 --- a/readme/generics.md +++ b/readme/generics.md @@ -96,16 +96,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Generics.GenericsScenario.IService Root @@ -118,21 +118,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -143,11 +143,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -193,25 +193,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Generics.GenericsScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Generics.GenericsScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -224,7 +224,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Generics.GenericsScenario.IService Resolve(Composition composition) { diff --git a/readme/injection.md b/readme/injection.md index 0b3d1df5d..7b8b9924d 100644 --- a/readme/injection.md +++ b/readme/injection.md @@ -73,48 +73,48 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.InjectionScenario.IService Root { get { - Pure.DI.UsageTests.Basics.InjectionScenario.Service transientM03D28di0_Service; + Pure.DI.UsageTests.Basics.InjectionScenario.Service transientM04D03di0_Service; { - var dependency_M03D28di1 = new Pure.DI.UsageTests.Basics.InjectionScenario.Dependency(); - transientM03D28di0_Service = new Service(dependency_M03D28di1); + var dependency_M04D03di1 = new Pure.DI.UsageTests.Basics.InjectionScenario.Dependency(); + transientM04D03di0_Service = new Service(dependency_M04D03di1); } - return transientM03D28di0_Service; + return transientM04D03di0_Service; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -125,11 +125,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -165,25 +165,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InjectionScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InjectionScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -196,7 +196,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 70ad195d4..b375e6a31 100644 --- a/readme/injections-of-abstractions.md +++ b/readme/injections-of-abstractions.md @@ -79,16 +79,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.InjectionsOfAbstractionsScenario.Program Root diff --git a/readme/instance-initialization.md b/readme/instance-initialization.md index 397c61547..8b9266394 100644 --- a/readme/instance-initialization.md +++ b/readme/instance-initialization.md @@ -89,57 +89,57 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly string _argM03D28di_serviceName; + private readonly Composition _rootM04D03di; + private readonly string _argM04D03di_serviceName; public Composition(string serviceName) { - _rootM03D28di = this; + _rootM04D03di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D28di_serviceName = serviceName; + _argM04D03di_serviceName = serviceName; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _argM03D28di_serviceName = baseComposition._argM03D28di_serviceName; + _rootM04D03di = baseComposition._rootM04D03di; + _argM04D03di_serviceName = baseComposition._argM04D03di_serviceName; } public Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.IService Root { get { - Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Service transientM03D28di0_Service; + Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Service transientM04D03di0_Service; { - var service_M03D28di1 = new Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Service(_argM03D28di_serviceName, new Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Dependency()); - service_M03D28di1.Initialize(); - transientM03D28di0_Service = service_M03D28di1; + var service_M04D03di1 = new Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Service(_argM04D03di_serviceName, new Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Dependency()); + service_M04D03di1.Initialize(); + transientM04D03di0_Service = service_M04D03di1; } - return transientM03D28di0_Service; + return transientM04D03di0_Service; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -150,11 +150,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -190,25 +190,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -221,7 +221,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.IService Resolve(Composition composition) { diff --git a/readme/interception.md b/readme/interception.md index a26856e95..6902258e3 100644 --- a/readme/interception.md +++ b/readme/interception.md @@ -83,16 +83,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Interception.InterceptionScenario.IService Root @@ -105,21 +105,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -130,11 +130,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -166,25 +166,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.InterceptionScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.InterceptionScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -197,7 +197,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 d39bb6700..7ec0dcebc 100644 --- a/readme/keyed-service-provider.md +++ b/readme/keyed-service-provider.md @@ -84,77 +84,77 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency _singletonM03D28di36_Dependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency _singletonM04D03di36_Dependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } - public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency RootM03D28di0001 + public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency RootM04D03di0001 { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } } } - return _rootM03D28di._singletonM03D28di36_Dependency; + return _rootM04D03di._singletonM04D03di36_Dependency; } } - public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService RootM03D28di0002 + public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService RootM04D03di0002 { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } } } - return new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Service(_rootM03D28di._singletonM03D28di36_Dependency); + return new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Service(_rootM04D03di._singletonM04D03di36_Dependency); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -165,11 +165,11 @@ partial class Composition public object GetRequiredKeyedService(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -209,28 +209,28 @@ partial class Composition " Composition ..> Service : IService _"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -243,7 +243,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency Resolve(Composition composition) { @@ -255,13 +255,13 @@ partial class Composition switch (tag) { case "Dependency Key": - return composition.RootM03D28di0001; + return composition.RootM04D03di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency."); } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService Resolve(Composition composition) { @@ -273,7 +273,7 @@ partial class Composition switch (tag) { case "Service Key": - return composition.RootM03D28di0002; + return composition.RootM04D03di0002; } 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 c993a2045..3e90da33e 100644 --- a/readme/lazy.md +++ b/readme/lazy.md @@ -71,59 +71,59 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.BCL.LazyScenario.IService Root { get { - var perResolveM03D28di39_Func = default(System.Func); - perResolveM03D28di39_Func = new global::System.Func( + var perResolveM04D03di39_Func = default(System.Func); + perResolveM04D03di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D28di1 = new Pure.DI.UsageTests.BCL.LazyScenario.Dependency(); - return factory_M03D28di1; + var factory_M04D03di1 = new Pure.DI.UsageTests.BCL.LazyScenario.Dependency(); + return factory_M04D03di1; }); - System.Lazy transientM03D28di1_Lazy; + System.Lazy transientM04D03di1_Lazy; { - var factory_M03D28di2 = perResolveM03D28di39_Func; - transientM03D28di1_Lazy = new global::System.Lazy(factory_M03D28di2, true); + var factory_M04D03di2 = perResolveM04D03di39_Func; + transientM04D03di1_Lazy = new global::System.Lazy(factory_M04D03di2, true); } - return new Pure.DI.UsageTests.BCL.LazyScenario.Service(transientM03D28di1_Lazy); + return new Pure.DI.UsageTests.BCL.LazyScenario.Service(transientM04D03di1_Lazy); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -134,11 +134,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -180,25 +180,25 @@ partial class Composition " FuncᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.LazyScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.LazyScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -211,7 +211,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 7fe1ecb96..9e419b740 100644 --- a/readme/manually-started-tasks.md +++ b/readme/manually-started-tasks.md @@ -111,38 +111,38 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.BCL.ManualTaskScenario.IService GetRoot(System.Threading.CancellationToken cancellationToken) { - var perResolveM03D28di41_Func = default(System.Func); - perResolveM03D28di41_Func = new global::System.Func( + var perResolveM04D03di41_Func = default(System.Func); + perResolveM04D03di41_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D28di1 = new Pure.DI.UsageTests.BCL.ManualTaskScenario.Dependency(); - return factory_M03D28di1; + var factory_M04D03di1 = new Pure.DI.UsageTests.BCL.ManualTaskScenario.Dependency(); + return factory_M04D03di1; }); - System.Threading.Tasks.Task transientM03D28di1_Task; + System.Threading.Tasks.Task transientM04D03di1_Task; { - var factory_M03D28di2 = perResolveM03D28di41_Func; - var cancellationToken_M03D28di3 = cancellationToken; - transientM03D28di1_Task = new Task(factory_M03D28di2, cancellationToken_M03D28di3); + var factory_M04D03di2 = perResolveM04D03di41_Func; + var cancellationToken_M04D03di3 = cancellationToken; + transientM04D03di1_Task = new Task(factory_M04D03di2, cancellationToken_M04D03di3); } - return new Pure.DI.UsageTests.BCL.ManualTaskScenario.Service(transientM03D28di1_Task); + return new Pure.DI.UsageTests.BCL.ManualTaskScenario.Service(transientM04D03di1_Task); } public override string ToString() diff --git a/readme/member-ordinal-attribute.md b/readme/member-ordinal-attribute.md index 2daa7bcf5..2149979c9 100644 --- a/readme/member-ordinal-attribute.md +++ b/readme/member-ordinal-attribute.md @@ -100,61 +100,61 @@ classDiagram ```c# partial class PersonComposition { - private readonly PersonComposition _rootM03D28di; - private readonly int _argM03D28di_personId; - private readonly string _argM03D28di_personName; - private readonly System.DateTime _argM03D28di_personBirthday; + private readonly PersonComposition _rootM04D03di; + private readonly int _argM04D03di_personId; + private readonly string _argM04D03di_personName; + private readonly System.DateTime _argM04D03di_personBirthday; public PersonComposition(int personId, string personName, System.DateTime personBirthday) { - _rootM03D28di = this; + _rootM04D03di = this; if (ReferenceEquals(personName, null)) { throw new global::System.ArgumentNullException("personName"); } - _argM03D28di_personId = personId; - _argM03D28di_personName = personName; - _argM03D28di_personBirthday = personBirthday; + _argM04D03di_personId = personId; + _argM04D03di_personName = personName; + _argM04D03di_personBirthday = personBirthday; } internal PersonComposition(PersonComposition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _argM03D28di_personId = baseComposition._argM03D28di_personId; - _argM03D28di_personName = baseComposition._argM03D28di_personName; - _argM03D28di_personBirthday = baseComposition._argM03D28di_personBirthday; + _rootM04D03di = baseComposition._rootM04D03di; + _argM04D03di_personId = baseComposition._argM04D03di_personId; + _argM04D03di_personName = baseComposition._argM04D03di_personName; + _argM04D03di_personBirthday = baseComposition._argM04D03di_personBirthday; } public Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson Person { get { - Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person transientM03D28di0_Person = new Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person(); - transientM03D28di0_Person.Id = _argM03D28di_personId; - transientM03D28di0_Person.FirstName = _argM03D28di_personName; - transientM03D28di0_Person.Birthday = _argM03D28di_personBirthday; - return transientM03D28di0_Person; + Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person transientM04D03di0_Person = new Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person(); + transientM04D03di0_Person.Id = _argM04D03di_personId; + transientM04D03di0_Person.FirstName = _argM04D03di_personName; + transientM04D03di0_Person.Birthday = _argM04D03di_personBirthday; + return transientM04D03di0_Person; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -165,11 +165,11 @@ partial class PersonComposition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -208,25 +208,25 @@ partial class PersonComposition " PersonComposition ..> Person : IPerson Person"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static PersonComposition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(PersonComposition composite) { @@ -239,7 +239,7 @@ partial class PersonComposition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 3bbf682fd..d09c008fa 100644 --- a/readme/method-injection.md +++ b/readme/method-injection.md @@ -74,45 +74,45 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService Root { get { - Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service transientM03D28di0_Service = new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service(); - transientM03D28di0_Service.SetDependency(new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Dependency()); - return transientM03D28di0_Service; + Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service transientM04D03di0_Service = new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service(); + transientM04D03di0_Service.SetDependency(new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Dependency()); + return transientM04D03di0_Service; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -123,11 +123,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -166,25 +166,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -197,7 +197,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 77663b017..37544bb8d 100644 --- a/readme/multi-contract-bindings.md +++ b/readme/multi-contract-bindings.md @@ -74,16 +74,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService Root @@ -96,21 +96,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -121,11 +121,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -168,25 +168,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -199,7 +199,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 ca1aa1361..07dc6db3a 100644 --- a/readme/oncannotresolve-hint.md +++ b/readme/oncannotresolve-hint.md @@ -96,44 +96,44 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService Root { get { - string transientM03D28di2_String = OnCannotResolve(null, Pure.DI.Lifetime.Transient); - return new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Service(new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Dependency(transientM03D28di2_String)); + string transientM04D03di2_String = OnCannotResolve(null, Pure.DI.Lifetime.Transient); + return new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Service(new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Dependency(transientM04D03di2_String)); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -144,11 +144,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -190,25 +190,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -221,7 +221,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 1bb308c72..f4551265f 100644 --- a/readme/ondependencyinjection-hint.md +++ b/readme/ondependencyinjection-hint.md @@ -93,16 +93,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService Root @@ -115,21 +115,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -140,11 +140,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -184,25 +184,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -215,7 +215,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 67a942996..45c671d9b 100644 --- a/readme/onnewinstance-hint.md +++ b/readme/onnewinstance-hint.md @@ -95,64 +95,64 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D28di36_Dependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM04D03di36_Dependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService Root { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D28di36_DependencyTemp; - _singletonM03D28di36_DependencyTemp = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency(); - OnNewInstance(ref _singletonM03D28di36_DependencyTemp, null, Pure.DI.Lifetime.Singleton); + Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM04D03di36_DependencyTemp; + _singletonM04D03di36_DependencyTemp = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency(); + OnNewInstance(ref _singletonM04D03di36_DependencyTemp, null, Pure.DI.Lifetime.Singleton); global::System.Threading.Thread.MemoryBarrier(); - _singletonM03D28di36_Dependency = _singletonM03D28di36_DependencyTemp; - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = _singletonM04D03di36_DependencyTemp; + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } } } - Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service transientM03D28di0_Service = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service(_rootM03D28di._singletonM03D28di36_Dependency); - OnNewInstance(ref transientM03D28di0_Service, null, Pure.DI.Lifetime.Transient); - return transientM03D28di0_Service; + Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service transientM04D03di0_Service = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service(_rootM04D03di._singletonM04D03di36_Dependency); + OnNewInstance(ref transientM04D03di0_Service, null, Pure.DI.Lifetime.Transient); + return transientM04D03di0_Service; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -163,11 +163,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -207,25 +207,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -238,7 +238,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 977963ac6..6a68fcf45 100644 --- a/readme/overriding-the-bcl-binding.md +++ b/readme/overriding-the-bcl-binding.md @@ -73,49 +73,49 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService Root { get { - Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IDependency[] transientM03D28di1_ = new IDependency[] + Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IDependency[] transientM04D03di1_ = new IDependency[] { new AbcDependency(), new XyzDependency(), new AbcDependency() }; - return new Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.Service(transientM03D28di1_); + return new Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.Service(transientM04D03di1_); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -126,11 +126,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -162,25 +162,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -193,7 +193,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 e87bddf25..69825957f 100644 --- a/readme/partial-class.md +++ b/readme/partial-class.md @@ -104,46 +104,46 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } internal Pure.DI.UsageTests.Advanced.PartialClassScenario.Service Root { get { - long transientM03D28di5_Int64 = GenerateId(); - long transientM03D28di4_Int64 = GenerateId(); - string transientM03D28di1_String = $"{_serviceName}_{GenerateId()}"; - return new Pure.DI.UsageTests.Advanced.PartialClassScenario.Service(transientM03D28di1_String, new Pure.DI.UsageTests.Advanced.PartialClassScenario.Dependency(transientM03D28di5_Int64), new Pure.DI.UsageTests.Advanced.PartialClassScenario.Dependency(transientM03D28di4_Int64)); + long transientM04D03di5_Int64 = GenerateId(); + long transientM04D03di4_Int64 = GenerateId(); + string transientM04D03di1_String = $"{_serviceName}_{GenerateId()}"; + return new Pure.DI.UsageTests.Advanced.PartialClassScenario.Service(transientM04D03di1_String, new Pure.DI.UsageTests.Advanced.PartialClassScenario.Dependency(transientM04D03di5_Int64), new Pure.DI.UsageTests.Advanced.PartialClassScenario.Dependency(transientM04D03di4_Int64)); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -154,11 +154,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -197,25 +197,25 @@ partial class Composition " Composition ..> Service : Service Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.PartialClassScenario.Service), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.PartialClassScenario.Service), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -228,7 +228,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.PartialClassScenario.Service Resolve(Composition composition) { diff --git a/readme/perblock.md b/readme/perblock.md index 8c8bd64ed..1af16a861 100644 --- a/readme/perblock.md +++ b/readme/perblock.md @@ -85,61 +85,61 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service Root { get { - var perResolveM03D28di42_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>); - perResolveM03D28di42_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>( + var perResolveM04D03di42_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>); + perResolveM04D03di42_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)] () => { - Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency perBlockM03D28di4_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); - var factory_M03D28di1 = (perBlockM03D28di4_Dependency, perBlockM03D28di4_Dependency); - return factory_M03D28di1; + Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency perBlockM04D03di4_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); + var factory_M04D03di1 = (perBlockM04D03di4_Dependency, perBlockM04D03di4_Dependency); + return factory_M04D03di1; }); - System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)> transientM03D28di2_Lazy; + System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)> transientM04D03di2_Lazy; { - var factory_M03D28di2 = perResolveM03D28di42_Func; - transientM03D28di2_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>(factory_M03D28di2, true); + var factory_M04D03di2 = perResolveM04D03di42_Func; + transientM04D03di2_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>(factory_M04D03di2, true); } - Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency perBlockM03D28di1_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); - return new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service(perBlockM03D28di1_Dependency, perBlockM03D28di1_Dependency, transientM03D28di2_Lazy); + Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency perBlockM04D03di1_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); + return new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service(perBlockM04D03di1_Dependency, perBlockM04D03di1_Dependency, transientM04D03di2_Lazy); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -150,11 +150,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -199,25 +199,25 @@ partial class Composition " FuncᐸValueTupleᐸIDependencyˏIDependencyᐳᐳ *-- ValueTupleᐸIDependencyˏIDependencyᐳ : ValueTupleᐸIDependencyˏIDependencyᐳ"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -230,7 +230,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 d46d4af2d..c43c31858 100644 --- a/readme/perresolve.md +++ b/readme/perresolve.md @@ -85,80 +85,80 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service Root { get { - var perResolveM03D28di36_Dependency = default(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency); - var perResolveM03D28di42_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>); - perResolveM03D28di42_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>( + var perResolveM04D03di36_Dependency = default(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency); + var perResolveM04D03di42_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>); + perResolveM04D03di42_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(perResolveM03D28di36_Dependency, null)) + if (perResolveM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(perResolveM03D28di36_Dependency, null)) + if (perResolveM04D03di36_Dependency == null) { - perResolveM03D28di36_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); + perResolveM04D03di36_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); } } } - var factory_M03D28di1 = (perResolveM03D28di36_Dependency, perResolveM03D28di36_Dependency); - return factory_M03D28di1; + var factory_M04D03di1 = (perResolveM04D03di36_Dependency, perResolveM04D03di36_Dependency); + return factory_M04D03di1; }); - System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)> transientM03D28di1_Lazy; + System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)> transientM04D03di1_Lazy; { - var factory_M03D28di2 = perResolveM03D28di42_Func; - transientM03D28di1_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>(factory_M03D28di2, true); + var factory_M04D03di2 = perResolveM04D03di42_Func; + transientM04D03di1_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>(factory_M04D03di2, true); } - if (ReferenceEquals(perResolveM03D28di36_Dependency, null)) + if (perResolveM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(perResolveM03D28di36_Dependency, null)) + if (perResolveM04D03di36_Dependency == null) { - perResolveM03D28di36_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); + perResolveM04D03di36_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); } } } - return new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service(perResolveM03D28di36_Dependency, perResolveM03D28di36_Dependency, transientM03D28di1_Lazy); + return new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service(perResolveM04D03di36_Dependency, perResolveM04D03di36_Dependency, transientM04D03di1_Lazy); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -169,11 +169,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -218,25 +218,25 @@ partial class Composition " FuncᐸValueTupleᐸIDependencyˏIDependencyᐳᐳ *-- ValueTupleᐸIDependencyˏIDependencyᐳ : ValueTupleᐸIDependencyˏIDependencyᐳ"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -249,7 +249,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 3e88a4e46..41c4e3111 100644 --- a/readme/property-injection.md +++ b/readme/property-injection.md @@ -71,45 +71,45 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService Root { get { - Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service transientM03D28di0_Service = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service(); - transientM03D28di0_Service.Dependency = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Dependency(); - return transientM03D28di0_Service; + Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service transientM04D03di0_Service = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service(); + transientM04D03di0_Service.Dependency = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Dependency(); + return transientM04D03di0_Service; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -120,11 +120,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -163,25 +163,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -194,7 +194,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 d283d4896..a4af13170 100644 --- a/readme/required-properties-or-fields.md +++ b/readme/required-properties-or-fields.md @@ -81,24 +81,24 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly string _argM03D28di_name; + private readonly Composition _rootM04D03di; + private readonly string _argM04D03di_name; public Composition(string name) { - _rootM03D28di = this; + _rootM04D03di = this; if (ReferenceEquals(name, null)) { throw new global::System.ArgumentNullException("name"); } - _argM03D28di_name = name; + _argM04D03di_name = name; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _argM03D28di_name = baseComposition._argM03D28di_name; + _rootM04D03di = baseComposition._rootM04D03di; + _argM04D03di_name = baseComposition._argM04D03di_name; } public Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService Root @@ -107,7 +107,7 @@ partial class Composition { return new Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.Service() { - ServiceNameField = _argM03D28di_name, + ServiceNameField = _argM04D03di_name, Dependency = new Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.Dependency() }; } @@ -115,21 +115,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -140,11 +140,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -186,25 +186,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -217,7 +217,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 7737631ef..e667d06a3 100644 --- a/readme/resolve-hint.md +++ b/readme/resolve-hint.md @@ -64,16 +64,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Hints.ResolveHintScenario.IDependency DependencyRoot diff --git a/readme/resolve-methods.md b/readme/resolve-methods.md index d7a65b2da..4b8688346 100644 --- a/readme/resolve-methods.md +++ b/readme/resolve-methods.md @@ -88,16 +88,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.ResolveScenario.IService OtherService @@ -108,7 +108,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency RootM03D28di0001 + public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency RootM04D03di0001 { get { @@ -116,7 +116,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Basics.ResolveScenario.IService RootM03D28di0002 + public Pure.DI.UsageTests.Basics.ResolveScenario.IService RootM04D03di0002 { get { @@ -126,21 +126,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -151,11 +151,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -201,28 +201,28 @@ partial class Composition " Composition ..> OtherService : IService OtherService"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IService), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IDependency), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IService), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IDependency), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -235,11 +235,11 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ResolveScenario.IService Resolve(Composition composition) { - return composition.RootM03D28di0002; + return composition.RootM04D03di0002; } public Pure.DI.UsageTests.Basics.ResolveScenario.IService ResolveByTag(Composition composition, object tag) @@ -249,17 +249,17 @@ partial class Composition case "Other": return composition.OtherService; case null: - return composition.RootM03D28di0002; + return composition.RootM04D03di0002; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.Basics.ResolveScenario.IService."); } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D28di0001; + return composition.RootM04D03di0001; } public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -267,7 +267,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D28di0001; + return composition.RootM04D03di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.Basics.ResolveScenario.IDependency."); } diff --git a/readme/root-arguments.md b/readme/root-arguments.md index 385e833ed..e642e72c0 100644 --- a/readme/root-arguments.md +++ b/readme/root-arguments.md @@ -104,16 +104,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.RootArgumentsScenario.IService CreateService(int id, string dependencyName, string serviceName) diff --git a/readme/rootbind.md b/readme/rootbind.md index 0ff24b04e..b5ad4305c 100644 --- a/readme/rootbind.md +++ b/readme/rootbind.md @@ -46,16 +46,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.RootBindScenario.IService Root @@ -68,21 +68,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -93,11 +93,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -127,25 +127,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RootBindScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RootBindScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -158,7 +158,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.RootBindScenario.IService Resolve(Composition composition) { diff --git a/readme/scope.md b/readme/scope.md index 099b9243a..67826341a 100644 --- a/readme/scope.md +++ b/readme/scope.md @@ -129,42 +129,42 @@ classDiagram ```c# partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private readonly global::System.IDisposable[] _disposablesM03D28di; - private int _disposeIndexM03D28di; - private Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency _scopedM03D28di36_Dependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private readonly global::System.IDisposable[] _disposablesM04D03di; + private int _disposeIndexM04D03di; + private Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency _scopedM04D03di36_Dependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); - _disposablesM03D28di = new global::System.IDisposable[1]; + _rootM04D03di = this; + _lockM04D03di = new object(); + _disposablesM04D03di = new global::System.IDisposable[1]; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; - _disposablesM03D28di = new global::System.IDisposable[1]; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; + _disposablesM04D03di = new global::System.IDisposable[1]; } public Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService SessionRoot { get { - if (ReferenceEquals(_scopedM03D28di36_Dependency, null)) + if (_scopedM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_scopedM03D28di36_Dependency, null)) + if (_scopedM04D03di36_Dependency == null) { - _scopedM03D28di36_Dependency = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency(); - _disposablesM03D28di[_disposeIndexM03D28di++] = _scopedM03D28di36_Dependency; + _scopedM04D03di36_Dependency = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency(); + _disposablesM04D03di[_disposeIndexM04D03di++] = _scopedM04D03di36_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Service(_scopedM03D28di36_Dependency); + return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Service(_scopedM04D03di36_Dependency); } } @@ -172,36 +172,36 @@ partial class Composition: global::System.IDisposable { get { - var perResolveM03D28di42_Func = default(System.Func); - perResolveM03D28di42_Func = new global::System.Func( + var perResolveM04D03di42_Func = default(System.Func); + perResolveM04D03di42_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - Pure.DI.UsageTests.Lifetimes.ScopeScenario.Composition transientM03D28di2_Composition = this; - var factory_M03D28di1 = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Session(transientM03D28di2_Composition); - return factory_M03D28di1; + Pure.DI.UsageTests.Lifetimes.ScopeScenario.Composition transientM04D03di2_Composition = this; + var factory_M04D03di1 = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Session(transientM04D03di2_Composition); + return factory_M04D03di1; }); - return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program(perResolveM03D28di42_Func); + return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program(perResolveM04D03di42_Func); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -212,11 +212,11 @@ partial class Composition: global::System.IDisposable public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -228,11 +228,11 @@ partial class Composition: global::System.IDisposable public void Dispose() { - lock (_lockM03D28di) + lock (_lockM04D03di) { - while (_disposeIndexM03D28di > 0) + while (_disposeIndexM04D03di > 0) { - var disposableInstance = _disposablesM03D28di[--_disposeIndexM03D28di]; + var disposableInstance = _disposablesM04D03di[--_disposeIndexM04D03di]; try { disposableInstance.Dispose(); @@ -243,7 +243,7 @@ partial class Composition: global::System.IDisposable } } - _scopedM03D28di36_Dependency = null; + _scopedM04D03di36_Dependency = null; } } @@ -292,28 +292,28 @@ partial class Composition: global::System.IDisposable " FuncᐸSessionᐳ *-- Session : Session"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -326,7 +326,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService Resolve(Composition composition) { @@ -344,7 +344,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 dc95dd2d4..2f702ed3b 100644 --- a/readme/service-collection.md +++ b/readme/service-collection.md @@ -81,77 +81,77 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency _singletonM03D28di36_Dependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency _singletonM04D03di36_Dependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } - public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency RootM03D28di0001 + public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency RootM04D03di0001 { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } } } - return _rootM03D28di._singletonM03D28di36_Dependency; + return _rootM04D03di._singletonM04D03di36_Dependency; } } - public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService RootM03D28di0002 + public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService RootM04D03di0002 { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } } } - return new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Service(_rootM03D28di._singletonM03D28di36_Dependency); + return new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Service(_rootM04D03di._singletonM04D03di36_Dependency); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -162,11 +162,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -206,30 +206,30 @@ partial class Composition " Composition ..> Service : IService _"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - OnNewRoot(valResolverM03D28di_0000, "RootM03D28di0001", "Dependency Key", Pure.DI.Lifetime.Singleton); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - OnNewRoot(valResolverM03D28di_0001, "RootM03D28di0002", null, Pure.DI.Lifetime.Transient); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + OnNewRoot(valResolverM04D03di_0000, "RootM04D03di0001", "Dependency Key", Pure.DI.Lifetime.Singleton); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + OnNewRoot(valResolverM04D03di_0001, "RootM04D03di0002", null, Pure.DI.Lifetime.Transient); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -242,7 +242,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency Resolve(Composition composition) { @@ -254,17 +254,17 @@ partial class Composition switch (tag) { case "Dependency Key": - return composition.RootM03D28di0001; + return composition.RootM04D03di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency."); } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService Resolve(Composition composition) { - return composition.RootM03D28di0002; + return composition.RootM04D03di0002; } public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService ResolveByTag(Composition composition, object tag) @@ -272,7 +272,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D28di0002; + return composition.RootM04D03di0002; } 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 4aa07eb29..0fe0d43a5 100644 --- a/readme/service-provider-with-scope.md +++ b/readme/service-provider-with-scope.md @@ -110,87 +110,87 @@ classDiagram ```c# partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private readonly global::System.IDisposable[] _disposablesM03D28di; - private int _disposeIndexM03D28di; - private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency _singletonM03D28di36_Dependency; - private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service _scopedM03D28di37_Service; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private readonly global::System.IDisposable[] _disposablesM04D03di; + private int _disposeIndexM04D03di; + private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency _singletonM04D03di36_Dependency; + private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service _scopedM04D03di37_Service; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); - _disposablesM03D28di = new global::System.IDisposable[1]; + _rootM04D03di = this; + _lockM04D03di = new object(); + _disposablesM04D03di = new global::System.IDisposable[1]; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; - _disposablesM03D28di = new global::System.IDisposable[1]; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; + _disposablesM04D03di = new global::System.IDisposable[1]; } - public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency RootM03D28di0001 + public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency RootM04D03di0001 { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } } } - return _rootM03D28di._singletonM03D28di36_Dependency; + return _rootM04D03di._singletonM04D03di36_Dependency; } } - public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService RootM03D28di0002 + public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService RootM04D03di0002 { get { - if (ReferenceEquals(_scopedM03D28di37_Service, null)) + if (_scopedM04D03di37_Service == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_scopedM03D28di37_Service, null)) + if (_scopedM04D03di37_Service == null) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } - _scopedM03D28di37_Service = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service(_rootM03D28di._singletonM03D28di36_Dependency); - _disposablesM03D28di[_disposeIndexM03D28di++] = _scopedM03D28di37_Service; + _scopedM04D03di37_Service = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service(_rootM04D03di._singletonM04D03di36_Dependency); + _disposablesM04D03di[_disposeIndexM04D03di++] = _scopedM04D03di37_Service; } } } - return _scopedM03D28di37_Service; + return _scopedM04D03di37_Service; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -201,11 +201,11 @@ partial class Composition: global::System.IDisposable public object GetRequiredKeyedService(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -217,11 +217,11 @@ partial class Composition: global::System.IDisposable public void Dispose() { - lock (_lockM03D28di) + lock (_lockM04D03di) { - while (_disposeIndexM03D28di > 0) + while (_disposeIndexM04D03di > 0) { - var disposableInstance = _disposablesM03D28di[--_disposeIndexM03D28di]; + var disposableInstance = _disposablesM04D03di[--_disposeIndexM04D03di]; try { disposableInstance.Dispose(); @@ -232,8 +232,8 @@ partial class Composition: global::System.IDisposable } } - _singletonM03D28di36_Dependency = null; - _scopedM03D28di37_Service = null; + _singletonM04D03di36_Dependency = null; + _scopedM04D03di37_Service = null; } } @@ -271,28 +271,28 @@ partial class Composition: global::System.IDisposable " Composition ..> Service : IService _"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -305,11 +305,11 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D28di0001; + return composition.RootM04D03di0001; } public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -317,17 +317,17 @@ partial class Composition: global::System.IDisposable switch (tag) { case null: - return composition.RootM03D28di0001; + return composition.RootM04D03di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency."); } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService Resolve(Composition composition) { - return composition.RootM03D28di0002; + return composition.RootM04D03di0002; } public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService ResolveByTag(Composition composition, object tag) @@ -335,7 +335,7 @@ partial class Composition: global::System.IDisposable switch (tag) { case null: - return composition.RootM03D28di0002; + return composition.RootM04D03di0002; } 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 eff9c0c2d..a3ef4bb55 100644 --- a/readme/service-provider.md +++ b/readme/service-provider.md @@ -79,77 +79,77 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency _singletonM03D28di36_Dependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency _singletonM04D03di36_Dependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } - public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency RootM03D28di0001 + public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency RootM04D03di0001 { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } } } - return _rootM03D28di._singletonM03D28di36_Dependency; + return _rootM04D03di._singletonM04D03di36_Dependency; } } - public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService RootM03D28di0002 + public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService RootM04D03di0002 { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } } } - return new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Service(_rootM03D28di._singletonM03D28di36_Dependency); + return new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Service(_rootM04D03di._singletonM04D03di36_Dependency); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -160,11 +160,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -204,28 +204,28 @@ partial class Composition " Composition ..> Service : IService _"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -238,11 +238,11 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D28di0001; + return composition.RootM04D03di0001; } public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -250,17 +250,17 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D28di0001; + return composition.RootM04D03di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency."); } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService Resolve(Composition composition) { - return composition.RootM03D28di0002; + return composition.RootM04D03di0002; } public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService ResolveByTag(Composition composition, object tag) @@ -268,7 +268,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D28di0002; + return composition.RootM04D03di0002; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService."); } diff --git a/readme/simplified-binding.md b/readme/simplified-binding.md index 12c3170cd..4a685d04d 100644 --- a/readme/simplified-binding.md +++ b/readme/simplified-binding.md @@ -88,24 +88,24 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Service MyService { get { - Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency perBlockM03D28di1_Dependency = new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency(); - return new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Service(perBlockM03D28di1_Dependency, perBlockM03D28di1_Dependency, perBlockM03D28di1_Dependency); + Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency perBlockM04D03di1_Dependency = new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency(); + return new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Service(perBlockM04D03di1_Dependency, perBlockM04D03di1_Dependency, perBlockM04D03di1_Dependency); } } diff --git a/readme/singleton.md b/readme/singleton.md index af8e32ddd..10c9747c3 100644 --- a/readme/singleton.md +++ b/readme/singleton.md @@ -76,58 +76,58 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency _singletonM03D28di36_Dependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency _singletonM04D03di36_Dependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService Root { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di36_Dependency, null)) + if (_rootM04D03di._singletonM04D03di36_Dependency == null) { - _singletonM03D28di36_Dependency = new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency(); - _rootM03D28di._singletonM03D28di36_Dependency = _singletonM03D28di36_Dependency; + _singletonM04D03di36_Dependency = new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency(); + _rootM04D03di._singletonM04D03di36_Dependency = _singletonM04D03di36_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Service(_singletonM03D28di36_Dependency, _rootM03D28di._singletonM03D28di36_Dependency); + return new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Service(_singletonM04D03di36_Dependency, _rootM04D03di._singletonM04D03di36_Dependency); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -138,11 +138,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -181,25 +181,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -212,7 +212,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 35a0202ef..170f9bf2d 100644 --- a/readme/span-and-readonlyspan.md +++ b/readme/span-and-readonlyspan.md @@ -81,49 +81,49 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.BCL.SpanScenario.IService Root { get { - System.ReadOnlySpan transientM03D28di1_ReadOnlySpan = stackalloc Pure.DI.UsageTests.BCL.SpanScenario.Dependency[3] + System.ReadOnlySpan transientM04D03di1_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(transientM03D28di1_ReadOnlySpan); + return new Pure.DI.UsageTests.BCL.SpanScenario.Service(transientM04D03di1_ReadOnlySpan); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -134,11 +134,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -176,25 +176,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.SpanScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.SpanScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -207,7 +207,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 904df8765..27f55c2ca 100644 --- a/readme/tag-attribute.md +++ b/readme/tag-attribute.md @@ -89,16 +89,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Basics.TagAttributeScenario.IService Root @@ -111,21 +111,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -136,11 +136,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -183,25 +183,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagAttributeScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagAttributeScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -214,7 +214,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 5089d1528..30d743cf8 100644 --- a/readme/tag-type.md +++ b/readme/tag-type.md @@ -101,38 +101,38 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency _singletonM03D28di37_XyzDependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency _singletonM04D03di37_XyzDependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.Advanced.TagTypeScenario.IDependency XyzRoot { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di37_XyzDependency, null)) + if (_rootM04D03di._singletonM04D03di37_XyzDependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di37_XyzDependency, null)) + if (_rootM04D03di._singletonM04D03di37_XyzDependency == null) { - _singletonM03D28di37_XyzDependency = new Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency(); - _rootM03D28di._singletonM03D28di37_XyzDependency = _singletonM03D28di37_XyzDependency; + _singletonM04D03di37_XyzDependency = new Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency(); + _rootM04D03di._singletonM04D03di37_XyzDependency = _singletonM04D03di37_XyzDependency; } } } - return _rootM03D28di._singletonM03D28di37_XyzDependency; + return _rootM04D03di._singletonM04D03di37_XyzDependency; } } @@ -140,38 +140,38 @@ partial class Composition { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di37_XyzDependency, null)) + if (_rootM04D03di._singletonM04D03di37_XyzDependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di37_XyzDependency, null)) + if (_rootM04D03di._singletonM04D03di37_XyzDependency == null) { - _singletonM03D28di37_XyzDependency = new Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency(); - _rootM03D28di._singletonM03D28di37_XyzDependency = _singletonM03D28di37_XyzDependency; + _singletonM04D03di37_XyzDependency = new Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency(); + _rootM04D03di._singletonM04D03di37_XyzDependency = _singletonM04D03di37_XyzDependency; } } } - return new Pure.DI.UsageTests.Advanced.TagTypeScenario.Service(new Pure.DI.UsageTests.Advanced.TagTypeScenario.AbcDependency(), _rootM03D28di._singletonM03D28di37_XyzDependency, new Pure.DI.UsageTests.Advanced.TagTypeScenario.AbcDependency()); + return new Pure.DI.UsageTests.Advanced.TagTypeScenario.Service(new Pure.DI.UsageTests.Advanced.TagTypeScenario.AbcDependency(), _rootM04D03di._singletonM04D03di37_XyzDependency, new Pure.DI.UsageTests.Advanced.TagTypeScenario.AbcDependency()); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -182,11 +182,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -233,28 +233,28 @@ partial class Composition " Composition ..> XyzDependency : IDependency XyzRoot"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagTypeScenario.IDependency), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagTypeScenario.IService), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagTypeScenario.IDependency), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagTypeScenario.IService), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -267,7 +267,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.TagTypeScenario.IDependency Resolve(Composition composition) { @@ -284,7 +284,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.TagTypeScenario.IService Resolve(Composition composition) { diff --git a/readme/tag-unique.md b/readme/tag-unique.md index c28220db9..eb661d971 100644 --- a/readme/tag-unique.md +++ b/readme/tag-unique.md @@ -80,16 +80,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Advanced.TagUniqueScenario.IService Root @@ -97,33 +97,33 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D28di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM04D03di1_IEnumerable() { yield return new Pure.DI.UsageTests.Advanced.TagUniqueScenario.AbcDependency(); yield return new Pure.DI.UsageTests.Advanced.TagUniqueScenario.XyzDependency(); } - System.Collections.Generic.IEnumerable> perBlockM03D28di1_IEnumerable = LocalperBlockM03D28di1_IEnumerable(); - return new Pure.DI.UsageTests.Advanced.TagUniqueScenario.Service(perBlockM03D28di1_IEnumerable); + System.Collections.Generic.IEnumerable> perBlockM04D03di1_IEnumerable = LocalperBlockM04D03di1_IEnumerable(); + return new Pure.DI.UsageTests.Advanced.TagUniqueScenario.Service(perBlockM04D03di1_IEnumerable); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -134,11 +134,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -183,25 +183,25 @@ partial class Composition " ServiceᐸStringᐳ o-- \"PerBlock\" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di>.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di>.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagUniqueScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagUniqueScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -214,7 +214,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.Advanced.TagUniqueScenario.IService Resolve(Composition composition) { diff --git a/readme/tags.md b/readme/tags.md index 6cdadc225..11509c321 100644 --- a/readme/tags.md +++ b/readme/tags.md @@ -105,38 +105,38 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; - private Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency _singletonM03D28di37_XyzDependency; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; + private Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency _singletonM04D03di37_XyzDependency; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.Basics.TagsScenario.IDependency XyzRoot { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di37_XyzDependency, null)) + if (_rootM04D03di._singletonM04D03di37_XyzDependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di37_XyzDependency, null)) + if (_rootM04D03di._singletonM04D03di37_XyzDependency == null) { - _singletonM03D28di37_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); - _rootM03D28di._singletonM03D28di37_XyzDependency = _singletonM03D28di37_XyzDependency; + _singletonM04D03di37_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); + _rootM04D03di._singletonM04D03di37_XyzDependency = _singletonM04D03di37_XyzDependency; } } } - return _rootM03D28di._singletonM03D28di37_XyzDependency; + return _rootM04D03di._singletonM04D03di37_XyzDependency; } } @@ -144,38 +144,38 @@ partial class Composition { get { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di37_XyzDependency, null)) + if (_rootM04D03di._singletonM04D03di37_XyzDependency == null) { - lock (_lockM03D28di) + lock (_lockM04D03di) { - if (ReferenceEquals(_rootM03D28di._singletonM03D28di37_XyzDependency, null)) + if (_rootM04D03di._singletonM04D03di37_XyzDependency == null) { - _singletonM03D28di37_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); - _rootM03D28di._singletonM03D28di37_XyzDependency = _singletonM03D28di37_XyzDependency; + _singletonM04D03di37_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); + _rootM04D03di._singletonM04D03di37_XyzDependency = _singletonM04D03di37_XyzDependency; } } } - return new Pure.DI.UsageTests.Basics.TagsScenario.Service(new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency(), _rootM03D28di._singletonM03D28di37_XyzDependency, new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency()); + return new Pure.DI.UsageTests.Basics.TagsScenario.Service(new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency(), _rootM04D03di._singletonM04D03di37_XyzDependency, new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency()); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -186,11 +186,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -237,28 +237,28 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - var valResolverM03D28di_0001 = new ResolverM03D28di_0001(); - ResolverM03D28di.Value = valResolverM03D28di_0001; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + var valResolverM04D03di_0001 = new ResolverM04D03di_0001(); + ResolverM04D03di.Value = valResolverM04D03di_0001; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IDependency), valResolverM03D28di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IService), valResolverM03D28di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IDependency), valResolverM04D03di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IService), valResolverM04D03di_0001) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -271,7 +271,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TagsScenario.IDependency Resolve(Composition composition) { @@ -289,7 +289,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0001: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 cce67f0dc..d49fd1540 100644 --- a/readme/task.md +++ b/readme/task.md @@ -110,49 +110,49 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.BCL.TaskScenario.IService GetRoot(System.Threading.CancellationToken cancellationToken) { - var perResolveM03D28di41_Func = default(System.Func); - System.Threading.Tasks.TaskScheduler transientM03D28di5_TaskScheduler = TaskScheduler.Current; - System.Threading.Tasks.TaskContinuationOptions transientM03D28di4_TaskContinuationOptions = global::System.Threading.Tasks.TaskContinuationOptions.None; - System.Threading.Tasks.TaskCreationOptions transientM03D28di3_TaskCreationOptions = global::System.Threading.Tasks.TaskCreationOptions.None; - System.Threading.Tasks.TaskFactory perBlockM03D28di2_TaskFactory; + var perResolveM04D03di41_Func = default(System.Func); + System.Threading.Tasks.TaskScheduler transientM04D03di5_TaskScheduler = TaskScheduler.Current; + System.Threading.Tasks.TaskContinuationOptions transientM04D03di4_TaskContinuationOptions = global::System.Threading.Tasks.TaskContinuationOptions.None; + System.Threading.Tasks.TaskCreationOptions transientM04D03di3_TaskCreationOptions = global::System.Threading.Tasks.TaskCreationOptions.None; + System.Threading.Tasks.TaskFactory perBlockM04D03di2_TaskFactory; { - var cancellationToken_M03D28di1 = cancellationToken; - var taskCreationOptions_M03D28di2 = transientM03D28di3_TaskCreationOptions; - var taskContinuationOptions_M03D28di3 = transientM03D28di4_TaskContinuationOptions; - var taskScheduler_M03D28di4 = transientM03D28di5_TaskScheduler; - perBlockM03D28di2_TaskFactory = new global::System.Threading.Tasks.TaskFactory(cancellationToken_M03D28di1, taskCreationOptions_M03D28di2, taskContinuationOptions_M03D28di3, taskScheduler_M03D28di4); + var cancellationToken_M04D03di1 = cancellationToken; + var taskCreationOptions_M04D03di2 = transientM04D03di3_TaskCreationOptions; + var taskContinuationOptions_M04D03di3 = transientM04D03di4_TaskContinuationOptions; + var taskScheduler_M04D03di4 = transientM04D03di5_TaskScheduler; + perBlockM04D03di2_TaskFactory = new global::System.Threading.Tasks.TaskFactory(cancellationToken_M04D03di1, taskCreationOptions_M04D03di2, taskContinuationOptions_M04D03di3, taskScheduler_M04D03di4); } - perResolveM03D28di41_Func = new global::System.Func( + perResolveM04D03di41_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D28di5 = new Pure.DI.UsageTests.BCL.TaskScenario.Dependency(); - return factory_M03D28di5; + var factory_M04D03di5 = new Pure.DI.UsageTests.BCL.TaskScenario.Dependency(); + return factory_M04D03di5; }); - System.Threading.Tasks.Task transientM03D28di1_Task; + System.Threading.Tasks.Task transientM04D03di1_Task; { - var factory_M03D28di6 = perResolveM03D28di41_Func; - var taskFactory_M03D28di7 = perBlockM03D28di2_TaskFactory; - transientM03D28di1_Task = taskFactory_M03D28di7.StartNew(factory_M03D28di6); + var factory_M04D03di6 = perResolveM04D03di41_Func; + var taskFactory_M04D03di7 = perBlockM04D03di2_TaskFactory; + transientM04D03di1_Task = taskFactory_M04D03di7.StartNew(factory_M04D03di6); } - return new Pure.DI.UsageTests.BCL.TaskScenario.Service(transientM03D28di1_Task); + return new Pure.DI.UsageTests.BCL.TaskScenario.Service(transientM04D03di1_Task); } public override string ToString() diff --git a/readme/threadsafe-hint.md b/readme/threadsafe-hint.md index abf802fe5..235bb0ae4 100644 --- a/readme/threadsafe-hint.md +++ b/readme/threadsafe-hint.md @@ -65,16 +65,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService Root @@ -87,21 +87,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -112,11 +112,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -154,25 +154,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -185,7 +185,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 b20273bf7..1a06a6490 100644 --- a/readme/tostring-hint.md +++ b/readme/tostring-hint.md @@ -63,16 +63,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Hints.ToStringHintScenario.IService MyService @@ -85,21 +85,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -110,11 +110,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -152,25 +152,25 @@ partial class Composition " Composition ..> Service : IService MyService"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ToStringHintScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ToStringHintScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -183,7 +183,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.ToStringHintScenario.IService Resolve(Composition composition) { diff --git a/readme/tracking-disposable-instances-in-delegates.md b/readme/tracking-disposable-instances-in-delegates.md index 1ca3364ad..d8c18fbef 100644 --- a/readme/tracking-disposable-instances-in-delegates.md +++ b/readme/tracking-disposable-instances-in-delegates.md @@ -106,64 +106,64 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; - private readonly object _lockM03D28di; + private readonly Composition _rootM04D03di; + private readonly object _lockM04D03di; public Composition() { - _rootM03D28di = this; - _lockM03D28di = new object(); + _rootM04D03di = this; + _lockM04D03di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; - _lockM03D28di = _rootM03D28di._lockM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; + _lockM04D03di = _rootM04D03di._lockM04D03di; } public Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service Root { get { - var perResolveM03D28di41_Func = default(System.Func>); - perResolveM03D28di41_Func = new global::System.Func>( + var perResolveM04D03di41_Func = default(System.Func>); + perResolveM04D03di41_Func = new global::System.Func>( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var accumulatorM03D28di40 = new Pure.DI.Owned(); - Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Dependency transientM03D28di3_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Dependency(); - accumulatorM03D28di40.Add(transientM03D28di3_Dependency); - Pure.DI.Owned perBlockM03D28di1_Owned; + var accumulatorM04D03di40 = new Pure.DI.Owned(); + Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Dependency transientM04D03di3_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Dependency(); + accumulatorM04D03di40.Add(transientM04D03di3_Dependency); + Pure.DI.Owned perBlockM04D03di1_Owned; { - var owned_M03D28di2 = accumulatorM03D28di40; - var value_M03D28di3 = transientM03D28di3_Dependency; - perBlockM03D28di1_Owned = new Owned(value_M03D28di3, owned_M03D28di2); + var owned_M04D03di2 = accumulatorM04D03di40; + var value_M04D03di3 = transientM04D03di3_Dependency; + perBlockM04D03di1_Owned = new Owned(value_M04D03di3, owned_M04D03di2); } - accumulatorM03D28di40.Add(perBlockM03D28di1_Owned); - var factory_M03D28di1 = perBlockM03D28di1_Owned; - return factory_M03D28di1; + accumulatorM04D03di40.Add(perBlockM04D03di1_Owned); + var factory_M04D03di1 = perBlockM04D03di1_Owned; + return factory_M04D03di1; }); - return new Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service(perResolveM03D28di41_Func); + return new Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service(perResolveM04D03di41_Func); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -174,11 +174,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -222,25 +222,25 @@ partial class Composition " OwnedᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -253,7 +253,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service Resolve(Composition composition) { diff --git a/readme/tracking-disposable-instances-per-a-composition-root.md b/readme/tracking-disposable-instances-per-a-composition-root.md index 6c7c2411a..56633d65f 100644 --- a/readme/tracking-disposable-instances-per-a-composition-root.md +++ b/readme/tracking-disposable-instances-per-a-composition-root.md @@ -99,44 +99,44 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.Owned Root { get { - var accumulatorM03D28di39 = new Pure.DI.Owned(); - Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Dependency transientM03D28di3_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Dependency(); - accumulatorM03D28di39.Add(transientM03D28di3_Dependency); - Pure.DI.Owned perBlockM03D28di0_Owned; + var accumulatorM04D03di39 = new Pure.DI.Owned(); + Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Dependency transientM04D03di3_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Dependency(); + accumulatorM04D03di39.Add(transientM04D03di3_Dependency); + Pure.DI.Owned perBlockM04D03di0_Owned; { - var owned_M03D28di1 = accumulatorM03D28di39; - var value_M03D28di2 = new Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Service(transientM03D28di3_Dependency); - perBlockM03D28di0_Owned = new Owned(value_M03D28di2, owned_M03D28di1); + var owned_M04D03di1 = accumulatorM04D03di39; + var value_M04D03di2 = new Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Service(transientM04D03di3_Dependency); + perBlockM04D03di0_Owned = new Owned(value_M04D03di2, owned_M04D03di1); } - accumulatorM03D28di39.Add(perBlockM03D28di0_Owned); - return perBlockM03D28di0_Owned; + accumulatorM04D03di39.Add(perBlockM04D03di0_Owned); + return perBlockM04D03di0_Owned; } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) @@ -182,9 +182,9 @@ partial class Composition } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { diff --git a/readme/transient.md b/readme/transient.md index d0adda74b..59246f78a 100644 --- a/readme/transient.md +++ b/readme/transient.md @@ -76,16 +76,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Lifetimes.TransientScenario.IService Root @@ -98,21 +98,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -123,11 +123,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -166,25 +166,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.TransientScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.TransientScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -197,7 +197,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 f1503d62c..c737c2d56 100644 --- a/readme/tuple.md +++ b/readme/tuple.md @@ -77,44 +77,44 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.BCL.TupleScenario.IService Root { get { - Pure.DI.UsageTests.BCL.TupleScenario.Point transientM03D28di2_Point = new Point(7, 9); - return new Pure.DI.UsageTests.BCL.TupleScenario.Service((transientM03D28di2_Point, new Pure.DI.UsageTests.BCL.TupleScenario.Dependency())); + Pure.DI.UsageTests.BCL.TupleScenario.Point transientM04D03di2_Point = new Point(7, 9); + return new Pure.DI.UsageTests.BCL.TupleScenario.Service((transientM04D03di2_Point, new Pure.DI.UsageTests.BCL.TupleScenario.Dependency())); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -125,11 +125,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -173,25 +173,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.TupleScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.TupleScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -204,7 +204,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 92cd6b253..b6fb8564f 100644 --- a/readme/type-attribute.md +++ b/readme/type-attribute.md @@ -80,16 +80,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService Root @@ -102,21 +102,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -127,11 +127,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -169,25 +169,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -200,7 +200,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 d32482326..64c8dbb4e 100644 --- a/readme/valuetask.md +++ b/readme/valuetask.md @@ -79,48 +79,48 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.BCL.ValueTaskScenario.IService Root { get { - System.Threading.Tasks.ValueTask transientM03D28di1_ValueTask; + System.Threading.Tasks.ValueTask transientM04D03di1_ValueTask; { - var value_M03D28di1 = new Pure.DI.UsageTests.BCL.ValueTaskScenario.Dependency(); - transientM03D28di1_ValueTask = new global::System.Threading.Tasks.ValueTask(value_M03D28di1); + var value_M04D03di1 = new Pure.DI.UsageTests.BCL.ValueTaskScenario.Dependency(); + transientM04D03di1_ValueTask = new global::System.Threading.Tasks.ValueTask(value_M04D03di1); } - return new Pure.DI.UsageTests.BCL.ValueTaskScenario.Service(transientM03D28di1_ValueTask); + return new Pure.DI.UsageTests.BCL.ValueTaskScenario.Service(transientM04D03di1_ValueTask); } } public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -131,11 +131,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -175,25 +175,25 @@ partial class Composition " ValueTaskᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ValueTaskScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ValueTaskScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -206,7 +206,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_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 972e6c7f9..08479dbe0 100644 --- a/readme/weak-reference.md +++ b/readme/weak-reference.md @@ -70,16 +70,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D28di; + private readonly Composition _rootM04D03di; public Composition() { - _rootM03D28di = this; + _rootM04D03di = this; } internal Composition(Composition baseComposition) { - _rootM03D28di = baseComposition._rootM03D28di; + _rootM04D03di = baseComposition._rootM04D03di; } public Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService Root @@ -92,21 +92,21 @@ partial class Composition public T Resolve() { - return ResolverM03D28di.Value.Resolve(this); + return ResolverM04D03di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D28di.Value.ResolveByTag(this, tag); + return ResolverM04D03di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.Resolve(this); } @@ -117,11 +117,11 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D28di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D28di; + var index = (int)(_bucketSizeM04D03di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM04D03di; do { - ref var pair = ref _bucketsM03D28di[index]; - if (ReferenceEquals(pair.Key, type)) + ref var pair = ref _bucketsM04D03di[index]; + if (pair.Key == type) { return pair.Value.ResolveByTag(this, tag); } @@ -163,25 +163,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D28di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D28di; + private readonly static int _bucketSizeM04D03di; + private readonly static global::Pure.DI.Pair>[] _bucketsM04D03di; static Composition() { - var valResolverM03D28di_0000 = new ResolverM03D28di_0000(); - ResolverM03D28di.Value = valResolverM03D28di_0000; - _bucketsM03D28di = global::Pure.DI.Buckets>.Create( + var valResolverM04D03di_0000 = new ResolverM04D03di_0000(); + ResolverM04D03di.Value = valResolverM04D03di_0000; + _bucketsM04D03di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D28di, + out _bucketSizeM04D03di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService), valResolverM03D28di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService), valResolverM04D03di_0000) }); } - private sealed class ResolverM03D28di: global::Pure.DI.IResolver + private sealed class ResolverM04D03di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D28di(); + public static global::Pure.DI.IResolver Value = new ResolverM04D03di(); public T Resolve(Composition composite) { @@ -194,7 +194,7 @@ partial class Composition } } - private sealed class ResolverM03D28di_0000: global::Pure.DI.IResolver + private sealed class ResolverM04D03di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService Resolve(Composition composition) { diff --git a/src/Pure.DI.Core/Components/Api.g.cs b/src/Pure.DI.Core/Components/Api.g.cs index 192a19ac1..718d7949e 100644 --- a/src/Pure.DI.Core/Components/Api.g.cs +++ b/src/Pure.DI.Core/Components/Api.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 #pragma warning disable #if !NET40_OR_GREATER && !NETSTANDARD2_0_OR_GREATER && !NETCOREAPP2_0_OR_GREATER diff --git a/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs b/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs index 62ddcf5be..5707dffbe 100644 --- a/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs +++ b/src/Pure.DI.Core/Components/GenericTypeArguments.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 #pragma warning disable namespace Pure.DI { diff --git a/src/Pure.DI.Core/Features/Default.g.cs b/src/Pure.DI.Core/Features/Default.g.cs index e1dab31ef..c28a3c5e4 100644 --- a/src/Pure.DI.Core/Features/Default.g.cs +++ b/src/Pure.DI.Core/Features/Default.g.cs @@ -1,5 +1,5 @@ // -#if !PUREDI_API_SUPPRESSION || PUREDI_API_V2 +#if !PUREDI_API_SUPPRESSION || PUREDI_API_V1 #pragma warning disable namespace Pure.DI diff --git a/src/Pure.DI.Core/Pure.DI.Core.csproj b/src/Pure.DI.Core/Pure.DI.Core.csproj index e5236ce9e..1bf3dfe01 100644 --- a/src/Pure.DI.Core/Pure.DI.Core.csproj +++ b/src/Pure.DI.Core/Pure.DI.Core.csproj @@ -2,11 +2,11 @@ $(BasePackageId) - $(DefineConstants);PUREDI_API_SUPPRESSION;PUREDI_API_V2 + $(DefineConstants);PUREDI_API_SUPPRESSION;PUREDI_API_V1 - + all runtime; build; native; contentfiles; analyzers; buildtransitive