From 981470a9b11325cdd97f54f8e0742d8aaa330154 Mon Sep 17 00:00:00 2001 From: Nikolay Pianikov Date: Tue, 26 Mar 2024 19:43:44 +0300 Subject: [PATCH] Update README.md --- readme/ArrayDetails.md | 42 +++--- readme/EnumDetails.md | 48 +++---- readme/FuncDetails.md | 50 +++---- readme/SingletonDetails.md | 56 ++++---- readme/TransientDetails.md | 42 +++--- readme/a-few-partial-classes.md | 42 +++--- readme/accumulators.md | 80 +++++------ readme/advanced-interception.md | 44 +++--- readme/arguments.md | 56 ++++---- readme/array.md | 42 +++--- readme/async-enumerable.md | 48 +++---- readme/auto-bindings.md | 6 +- readme/auto-scoped.md | 88 ++++++------ readme/check-for-a-root.md | 66 ++++----- readme/complex-generics.md | 42 +++--- readme/composition-root-kinds.md | 50 +++---- readme/composition-roots-simplified.md | 54 +++---- readme/composition-roots.md | 64 ++++----- readme/constructor-ordinal-attribute.md | 50 +++---- readme/custom-attributes.md | 56 ++++---- readme/decorator.md | 42 +++--- readme/default-lifetime.md | 70 ++++----- readme/default-values.md | 42 +++--- readme/dependent-compositions.md | 92 ++++++------ readme/disposable-singleton.md | 78 +++++----- readme/enumerable-generics.md | 62 ++++---- readme/enumerable.md | 48 +++---- readme/factory.md | 52 +++---- readme/field-injection.md | 48 +++---- readme/func-with-arguments.md | 70 ++++----- readme/func-with-tag.md | 58 ++++---- readme/func.md | 58 ++++---- ...eric-composition-roots-with-constraints.md | 14 +- readme/generic-composition-roots.md | 14 +- readme/generics.md | 42 +++--- readme/injection.md | 50 +++---- readme/injections-of-abstractions.md | 6 +- readme/instance-initialization.md | 58 ++++---- readme/interception.md | 42 +++--- readme/keyed-service-provider.md | 106 +++++++------- readme/lazy.md | 64 ++++----- readme/manually-started-tasks.md | 30 ++-- readme/member-ordinal-attribute.md | 70 ++++----- readme/method-injection.md | 48 +++---- readme/multi-contract-bindings.md | 42 +++--- readme/oncannotresolve-hint.md | 48 +++---- readme/ondependencyinjection-hint.md | 44 +++--- readme/onnewinstance-hint.md | 72 +++++----- readme/overriding-the-bcl-binding.md | 46 +++--- readme/partial-class.md | 50 +++---- readme/perblock.md | 68 ++++----- readme/perresolve.md | 82 +++++------ readme/property-injection.md | 48 +++---- readme/required-properties-or-fields.md | 50 +++---- readme/resolve-hint.md | 6 +- readme/resolve-methods.md | 78 +++++----- readme/root-arguments.md | 6 +- readme/rootbind.md | 42 +++--- readme/scope.md | 98 ++++++------- readme/service-collection.md | 112 +++++++-------- readme/service-provider-with-scope.md | 136 +++++++++--------- readme/service-provider.md | 110 +++++++------- readme/simplified-binding.md | 10 +- readme/singleton.md | 62 ++++---- readme/span-and-readonlyspan.md | 46 +++--- readme/tag-attribute.md | 42 +++--- readme/tag-type.md | 82 +++++------ readme/tag-unique.md | 48 +++---- readme/tags.md | 82 +++++------ readme/task.md | 48 +++---- readme/threadsafe-hint.md | 42 +++--- readme/tostring-hint.md | 42 +++--- ...cking-disposable-instances-in-delegates.md | 74 +++++----- ...osable-instances-per-a-composition-root.md | 32 ++--- readme/transient.md | 42 +++--- readme/tuple.md | 46 +++--- readme/type-attribute.md | 42 +++--- readme/valuetask.md | 50 +++---- readme/weak-reference.md | 42 +++--- 79 files changed, 2130 insertions(+), 2130 deletions(-) diff --git a/readme/ArrayDetails.md b/readme/ArrayDetails.md index ef8debd02..212257a52 100644 --- a/readme/ArrayDetails.md +++ b/readme/ArrayDetails.md @@ -88,16 +88,16 @@ classDiagram ```c# partial class Array { - private readonly Array _rootM03D24di; + private readonly Array _rootM03D26di; public Array() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Array(Array baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() @@ -107,20 +107,20 @@ partial class Array public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -132,10 +132,10 @@ partial class Array public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -224,25 +224,25 @@ partial class Array " Array ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Array() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Array composite) { @@ -255,7 +255,7 @@ partial class Array } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Array composition) { diff --git a/readme/EnumDetails.md b/readme/EnumDetails.md index 089c85c3f..071c27fbb 100644 --- a/readme/EnumDetails.md +++ b/readme/EnumDetails.md @@ -88,48 +88,48 @@ classDiagram ```c# partial class Enum { - private readonly Enum _rootM03D24di; + private readonly Enum _rootM03D26di; public Enum() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Enum(Enum baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable LocalperBlockM03D24di10_IEnumerable() + System.Collections.Generic.IEnumerable LocalperBlockM03D26di10_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 perBlockM03D24di10_IEnumerable = LocalperBlockM03D24di10_IEnumerable(); - return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D24di10_IEnumerable)), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D24di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D24di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D24di10_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 perBlockM03D26di10_IEnumerable = LocalperBlockM03D26di10_IEnumerable(); + return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D26di10_IEnumerable)), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D26di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D26di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D26di10_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 ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -141,10 +141,10 @@ partial class Enum public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -233,25 +233,25 @@ partial class Enum " Enum ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Enum() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Enum composite) { @@ -264,7 +264,7 @@ partial class Enum } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 89635834f..d474a0ecb 100644 --- a/readme/FuncDetails.md +++ b/readme/FuncDetails.md @@ -67,46 +67,46 @@ classDiagram ```c# partial class Func { - private readonly Func _rootM03D24di; + private readonly Func _rootM03D26di; public Func() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Func(Func baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { - System.Func perBlockM03D24di10_Func = new Func( + System.Func perBlockM03D26di10_Func = new Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var value_M03D24di1 = new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); - return value_M03D24di1; + var value_M03D26di1 = new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); + return value_M03D26di1; }); - return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D24di10_Func)), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D24di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D24di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D24di10_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(perBlockM03D26di10_Func)), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D26di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D26di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D26di10_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 ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -118,10 +118,10 @@ partial class Func public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -189,25 +189,25 @@ partial class Func " FuncᐸIService3ᐳ *-- Service3 : IService3"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Func() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Func composite) { @@ -220,7 +220,7 @@ partial class Func } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Func composition) { diff --git a/readme/SingletonDetails.md b/readme/SingletonDetails.md index c923685ce..87b8fdfe8 100644 --- a/readme/SingletonDetails.md +++ b/readme/SingletonDetails.md @@ -69,49 +69,49 @@ classDiagram ```c# partial class Singleton { - private readonly Singleton _rootM03D24di; - private Pure.DI.Benchmarks.Model.Service1 _scopedM03D24di37_Service1; - private Pure.DI.Benchmarks.Model.Service4 _scopedM03D24di40_Service4; + private readonly Singleton _rootM03D26di; + private Pure.DI.Benchmarks.Model.Service1 _scopedM03D26di37_Service1; + private Pure.DI.Benchmarks.Model.Service4 _scopedM03D26di40_Service4; public Singleton() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Singleton(Singleton baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { - if (ReferenceEquals(_scopedM03D24di40_Service4, null)) + if (ReferenceEquals(_scopedM03D26di40_Service4, null)) { - _scopedM03D24di40_Service4 = new Pure.DI.Benchmarks.Model.Service4(); + _scopedM03D26di40_Service4 = new Pure.DI.Benchmarks.Model.Service4(); } - if (ReferenceEquals(_scopedM03D24di37_Service1, null)) + if (ReferenceEquals(_scopedM03D26di37_Service1, null)) { - _scopedM03D24di37_Service1 = new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4))); + _scopedM03D26di37_Service1 = new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4))); } - return new Pure.DI.Benchmarks.Model.CompositionRoot(_scopedM03D24di37_Service1, new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4)), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D24di40_Service4, _scopedM03D24di40_Service4), _scopedM03D24di40_Service4, _scopedM03D24di40_Service4); + return new Pure.DI.Benchmarks.Model.CompositionRoot(_scopedM03D26di37_Service1, new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4)), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D26di40_Service4, _scopedM03D26di40_Service4), _scopedM03D26di40_Service4, _scopedM03D26di40_Service4); } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -123,10 +123,10 @@ partial class Singleton public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -196,25 +196,25 @@ partial class Singleton " Singleton ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Singleton() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Singleton composite) { @@ -227,7 +227,7 @@ partial class Singleton } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 a06348acf..bc57a6ae2 100644 --- a/readme/TransientDetails.md +++ b/readme/TransientDetails.md @@ -69,16 +69,16 @@ classDiagram ```c# partial class Transient { - private readonly Transient _rootM03D24di; + private readonly Transient _rootM03D26di; public Transient() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Transient(Transient baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() @@ -88,20 +88,20 @@ partial class Transient public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -113,10 +113,10 @@ partial class Transient public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -186,25 +186,25 @@ partial class Transient " Transient ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Transient() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Transient composite) { @@ -217,7 +217,7 @@ partial class Transient } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.Benchmarks.Model.CompositionRoot Resolve(Transient composition) { diff --git a/readme/a-few-partial-classes.md b/readme/a-few-partial-classes.md index a2e715082..c4c3e5077 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 _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Advanced.SeveralPartialClassesScenario.IService Root @@ -101,20 +101,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -126,10 +126,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -168,25 +168,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.SeveralPartialClassesScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.SeveralPartialClassesScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -199,7 +199,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 9d77ded27..76b348598 100644 --- a/readme/accumulators.md +++ b/readme/accumulators.md @@ -90,67 +90,67 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency _singletonM03D24di38_XyzDependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency _singletonM03D26di38_XyzDependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public (Pure.DI.UsageTests.Advanced.AccumulatorScenario.IService service, Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator accumulator) Root { get { - var accumulatorM03D24di41 = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator(); - Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency perBlockM03D24di4_AbcDependency = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency(); - if (ReferenceEquals(_rootM03D24di._singletonM03D24di38_XyzDependency, null)) + var accumulatorM03D26di41 = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator(); + Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency perBlockM03D26di4_AbcDependency = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency(); + if (ReferenceEquals(_rootM03D26di._singletonM03D26di38_XyzDependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di38_XyzDependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di38_XyzDependency, null)) { - Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency _singletonM03D24di38_XyzDependencyTemp; - _singletonM03D24di38_XyzDependencyTemp = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency(); - accumulatorM03D24di41.Add(_singletonM03D24di38_XyzDependencyTemp); + Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency _singletonM03D26di38_XyzDependencyTemp; + _singletonM03D26di38_XyzDependencyTemp = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency(); + accumulatorM03D26di41.Add(_singletonM03D26di38_XyzDependencyTemp); global::System.Threading.Thread.MemoryBarrier(); - _singletonM03D24di38_XyzDependency = _singletonM03D24di38_XyzDependencyTemp; - _rootM03D24di._singletonM03D24di38_XyzDependency = _singletonM03D24di38_XyzDependency; + _singletonM03D26di38_XyzDependency = _singletonM03D26di38_XyzDependencyTemp; + _rootM03D26di._singletonM03D26di38_XyzDependency = _singletonM03D26di38_XyzDependency; } } } - Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency transientM03D24di3_AbcDependency = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency(); - accumulatorM03D24di41.Add(transientM03D24di3_AbcDependency); - Pure.DI.UsageTests.Advanced.AccumulatorScenario.Service transientM03D24di1_Service = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.Service(transientM03D24di3_AbcDependency, _rootM03D24di._singletonM03D24di38_XyzDependency, perBlockM03D24di4_AbcDependency); - accumulatorM03D24di41.Add(transientM03D24di1_Service); - return (transientM03D24di1_Service, accumulatorM03D24di41); + Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency transientM03D26di3_AbcDependency = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency(); + accumulatorM03D26di41.Add(transientM03D26di3_AbcDependency); + Pure.DI.UsageTests.Advanced.AccumulatorScenario.Service transientM03D26di1_Service = new Pure.DI.UsageTests.Advanced.AccumulatorScenario.Service(transientM03D26di3_AbcDependency, _rootM03D26di._singletonM03D26di38_XyzDependency, perBlockM03D26di4_AbcDependency); + accumulatorM03D26di41.Add(transientM03D26di1_Service); + return (transientM03D26di1_Service, accumulatorM03D26di41); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -162,10 +162,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(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 _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di<(Pure.DI.UsageTests.Advanced.AccumulatorScenario.IService service, Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator accumulator)>.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di<(Pure.DI.UsageTests.Advanced.AccumulatorScenario.IService service, Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator accumulator)>.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, 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)), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof((Pure.DI.UsageTests.Advanced.AccumulatorScenario.IService service, Pure.DI.UsageTests.Advanced.AccumulatorScenario.MyAccumulator accumulator)), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -247,7 +247,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver, global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 127d6ee17..d61f7c0fe 100644 --- a/readme/advanced-interception.md +++ b/readme/advanced-interception.md @@ -94,7 +94,7 @@ internal partial class Composition: IInterceptor // OnDependencyInjection = On DI.Setup(nameof(Composition)) .Bind().To() - .Bind().Tags().To().Root("Root"); + .RootBind("Root").To(); var log = new List(); var composition = new Composition(log); @@ -147,16 +147,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService Root @@ -169,20 +169,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -194,10 +194,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -238,25 +238,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -269,7 +269,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 b4be96ee0..ce64038f8 100644 --- a/readme/arguments.md +++ b/readme/arguments.md @@ -92,53 +92,53 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly int _argM03D24di_id; - private readonly string _argM03D24di_serviceName; + private readonly Composition _rootM03D26di; + private readonly int _argM03D26di_id; + private readonly string _argM03D26di_serviceName; public Composition(int id, string serviceName) { - _rootM03D24di = this; + _rootM03D26di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D24di_id = id; - _argM03D24di_serviceName = serviceName; + _argM03D26di_id = id; + _argM03D26di_serviceName = serviceName; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _argM03D24di_id = baseComposition._argM03D24di_id; - _argM03D24di_serviceName = baseComposition._argM03D24di_serviceName; + _rootM03D26di = baseComposition._rootM03D26di; + _argM03D26di_id = baseComposition._argM03D26di_id; + _argM03D26di_serviceName = baseComposition._argM03D26di_serviceName; } public Pure.DI.UsageTests.Basics.ArgumentsScenario.IService Root { get { - return new Pure.DI.UsageTests.Basics.ArgumentsScenario.Service(_argM03D24di_serviceName, new Pure.DI.UsageTests.Basics.ArgumentsScenario.Dependency(_argM03D24di_id)); + return new Pure.DI.UsageTests.Basics.ArgumentsScenario.Service(_argM03D26di_serviceName, new Pure.DI.UsageTests.Basics.ArgumentsScenario.Dependency(_argM03D26di_id)); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -150,10 +150,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -196,25 +196,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ArgumentsScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ArgumentsScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -227,7 +227,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 e2472c7f3..01717abdf 100644 --- a/readme/array.md +++ b/readme/array.md @@ -104,16 +104,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.BCL.ArrayScenario.IService Root @@ -126,20 +126,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -151,10 +151,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -200,25 +200,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ArrayScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ArrayScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -231,7 +231,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 24c6cde1e..16fa84bfa 100644 --- a/readme/async-enumerable.md +++ b/readme/async-enumerable.md @@ -87,16 +87,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService Root @@ -104,32 +104,32 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - async System.Collections.Generic.IAsyncEnumerable LocaltransientM03D24di1_IAsyncEnumerable() + async System.Collections.Generic.IAsyncEnumerable LocaltransientM03D26di1_IAsyncEnumerable() { yield return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.XyzDependency(); } - System.Collections.Generic.IAsyncEnumerable transientM03D24di1_IAsyncEnumerable = LocaltransientM03D24di1_IAsyncEnumerable(); - return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.Service(transientM03D24di1_IAsyncEnumerable); + System.Collections.Generic.IAsyncEnumerable transientM03D26di1_IAsyncEnumerable = LocaltransientM03D26di1_IAsyncEnumerable(); + return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.Service(transientM03D26di1_IAsyncEnumerable); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -141,10 +141,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -190,25 +190,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -221,7 +221,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 ec8fe90f5..c6b04f560 100644 --- a/readme/auto-bindings.md +++ b/readme/auto-bindings.md @@ -50,16 +50,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.AutoBindingsScenario.Service MyService diff --git a/readme/auto-scoped.md b/readme/auto-scoped.md index d81e7e270..6b03acfd4 100644 --- a/readme/auto-scoped.md +++ b/readme/auto-scoped.md @@ -105,37 +105,37 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency _scopedM03D24di36_Dependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency _scopedM03D26di36_Dependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service SessionRoot { get { - if (ReferenceEquals(_scopedM03D24di36_Dependency, null)) + if (ReferenceEquals(_scopedM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_scopedM03D24di36_Dependency, null)) + if (ReferenceEquals(_scopedM03D26di36_Dependency, null)) { - _scopedM03D24di36_Dependency = new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency(); + _scopedM03D26di36_Dependency = new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency(); } } } - return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service(_scopedM03D24di36_Dependency); + return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service(_scopedM03D26di36_Dependency); } } @@ -143,42 +143,42 @@ partial class Composition { get { - var perResolveM03D24di41_Func = default(System.Func); - perResolveM03D24di41_Func = new global::System.Func( + var perResolveM03D26di41_Func = default(System.Func); + perResolveM03D26di41_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Composition transientM03D24di2_Composition = this; - Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.IService transientM03D24di1_IService; + Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Composition transientM03D26di2_Composition = this; + Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.IService transientM03D26di1_IService; { - var baseComposition_M03D24di2 = transientM03D24di2_Composition; + var baseComposition_M03D26di2 = transientM03D26di2_Composition; // Creates a session - var session_M03D24di3 = new Composition(baseComposition_M03D24di2); - transientM03D24di1_IService = session_M03D24di3.SessionRoot; + var session_M03D26di3 = new Composition(baseComposition_M03D26di2); + transientM03D26di1_IService = session_M03D26di3.SessionRoot; } - var factory_M03D24di1 = transientM03D24di1_IService; - return factory_M03D24di1; + var factory_M03D26di1 = transientM03D26di1_IService; + return factory_M03D26di1; }); - return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program(perResolveM03D24di41_Func); + return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program(perResolveM03D26di41_Func); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -190,10 +190,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -239,28 +239,28 @@ partial class Composition " FuncᐸIServiceᐳ *-- IService : IService"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -273,7 +273,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service Resolve(Composition composition) { @@ -291,7 +291,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 21f1028e1..b6075e86e 100644 --- a/readme/check-for-a-root.md +++ b/readme/check-for-a-root.md @@ -64,7 +64,7 @@ Composition.HasRoot(typeof(IComparable)).ShouldBeFalse(); classDiagram class Composition { +IService Root - -IDependency RootM03D24di0001 + -IDependency RootM03D26di0001 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -86,7 +86,7 @@ classDiagram <> } Service *-- Dependency : "MyDep" IDependency - Composition ..> Dependency : IDependency RootM03D24di0001 + Composition ..> Dependency : IDependency RootM03D26di0001 Composition ..> Service : IService Root ``` @@ -98,16 +98,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Hints.CheckForRootScenario.IService Root @@ -121,7 +121,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency RootM03D24di0001 + public Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency RootM03D26di0001 { get { @@ -131,20 +131,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -156,10 +156,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -175,7 +175,7 @@ partial class Composition "classDiagram\n" + " class Composition {\n" + " +IService Root\n" + - " -IDependency RootM03D24di0001\n" + + " -IDependency RootM03D26di0001\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -197,36 +197,36 @@ partial class Composition " <>\n" + " }\n" + " Service *-- Dependency : \"MyDep\" IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D24di0001\n" + + " Composition ..> Dependency : IDependency RootM03D26di0001\n" + " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; private static partial void OnNewRoot(global::Pure.DI.IResolver resolver, string name, object? tag, global::Pure.DI.Lifetime lifetime); static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - OnNewRoot(valResolverM03D24di_0000, "Root", null, Pure.DI.Lifetime.Transient); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - OnNewRoot(valResolverM03D24di_0001, "RootM03D24di0001", "MyDep", Pure.DI.Lifetime.Transient); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + OnNewRoot(valResolverM03D26di_0000, "Root", null, Pure.DI.Lifetime.Transient); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + OnNewRoot(valResolverM03D26di_0001, "RootM03D26di0001", "MyDep", Pure.DI.Lifetime.Transient); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.CheckForRootScenario.IService), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.CheckForRootScenario.IService), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -239,7 +239,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.CheckForRootScenario.IService Resolve(Composition composition) { @@ -257,7 +257,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.CheckForRootScenario.IDependency Resolve(Composition composition) { @@ -269,7 +269,7 @@ partial class Composition switch (tag) { case "MyDep": - return composition.RootM03D24di0001; + return composition.RootM03D26di0001; } 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 f403cdd62..7fb8ae399 100644 --- a/readme/complex-generics.md +++ b/readme/complex-generics.md @@ -108,16 +108,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Generics.ComplexGenericsScenario.Program Root @@ -130,20 +130,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -155,10 +155,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -209,25 +209,25 @@ partial class Composition " ServiceᐸStringˏInt32ˏListᐸStringᐳˏDictionaryᐸStringˏInt32ᐳᐳ *-- DependencyStructᐸInt32ᐳ : \"value type\" IDependencyᐸInt32ᐳ"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di>.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di>.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Generics.ComplexGenericsScenario.Program), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Generics.ComplexGenericsScenario.Program), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -240,7 +240,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D26di_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 c293cb6d7..eb417d099 100644 --- a/readme/composition-root-kinds.md +++ b/readme/composition-root-kinds.md @@ -87,16 +87,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } private partial Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IService GetRoot() @@ -119,20 +119,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -144,10 +144,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -194,28 +194,28 @@ partial class Composition " Composition ..> Dependency : IDependency Dependency"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IService), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IDependency), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IService), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IDependency), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -228,7 +228,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.CompositionRootKindsScenario.IService Resolve(Composition composition) { @@ -248,7 +248,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 3fac9e07b..9d8c88904 100644 --- a/readme/composition-roots-simplified.md +++ b/readme/composition-roots-simplified.md @@ -44,7 +44,7 @@ var someOtherService = composition.Resolve("Other"); classDiagram class Composition { +IService MyRoot - -IService RootM03D24di0002 + -IService RootM03D26di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -70,7 +70,7 @@ classDiagram } Service *-- Dependency : IDependency Composition ..> Service : IService MyRoot - Composition ..> OtherService : IService RootM03D24di0002 + Composition ..> OtherService : IService RootM03D26di0002 ``` @@ -81,16 +81,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService MyRoot @@ -101,7 +101,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService RootM03D24di0002 + public Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService RootM03D26di0002 { get { @@ -111,20 +111,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -136,10 +136,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -155,7 +155,7 @@ partial class Composition "classDiagram\n" + " class Composition {\n" + " +IService MyRoot\n" + - " -IService RootM03D24di0002\n" + + " -IService RootM03D26di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -181,28 +181,28 @@ partial class Composition " }\n" + " Service *-- Dependency : IDependency\n" + " Composition ..> Service : IService MyRoot\n" + - " Composition ..> OtherService : IService RootM03D24di0002"; + " Composition ..> OtherService : IService RootM03D26di0002"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -215,7 +215,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootsSimplifiedScenario.IService Resolve(Composition composition) { @@ -227,7 +227,7 @@ partial class Composition switch (tag) { case "Other": - return composition.RootM03D24di0002; + return composition.RootM03D26di0002; case null: return composition.MyRoot; } diff --git a/readme/composition-roots.md b/readme/composition-roots.md index 523408291..45ae8267b 100644 --- a/readme/composition-roots.md +++ b/readme/composition-roots.md @@ -71,7 +71,7 @@ classDiagram class Composition { +IService MyRoot +IService SomeOtherService - -IDependency RootM03D24di0003 + -IDependency RootM03D26di0003 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -98,7 +98,7 @@ classDiagram Service *-- Dependency : IDependency Composition ..> OtherService : IService SomeOtherService Composition ..> Service : IService MyRoot - Composition ..> Dependency : IDependency RootM03D24di0003 + Composition ..> Dependency : IDependency RootM03D26di0003 ``` @@ -109,16 +109,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService MyRoot @@ -137,7 +137,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency RootM03D24di0003 + public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency RootM03D26di0003 { get { @@ -147,20 +147,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -172,10 +172,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -192,7 +192,7 @@ partial class Composition " class Composition {\n" + " +IService MyRoot\n" + " +IService SomeOtherService\n" + - " -IDependency RootM03D24di0003\n" + + " -IDependency RootM03D26di0003\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -219,31 +219,31 @@ partial class Composition " Service *-- Dependency : IDependency\n" + " Composition ..> OtherService : IService SomeOtherService\n" + " Composition ..> Service : IService MyRoot\n" + - " Composition ..> Dependency : IDependency RootM03D24di0003"; + " Composition ..> Dependency : IDependency RootM03D26di0003"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -256,7 +256,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D24di0003; + return composition.RootM03D26di0003; } 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.RootM03D24di0003; + return composition.RootM03D26di0003; } 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 5fe4258d1..10b1b3525 100644 --- a/readme/constructor-ordinal-attribute.md +++ b/readme/constructor-ordinal-attribute.md @@ -71,50 +71,50 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly string _argM03D24di_serviceName; + private readonly Composition _rootM03D26di; + private readonly string _argM03D26di_serviceName; public Composition(string serviceName) { - _rootM03D24di = this; + _rootM03D26di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D24di_serviceName = serviceName; + _argM03D26di_serviceName = serviceName; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _argM03D24di_serviceName = baseComposition._argM03D24di_serviceName; + _rootM03D26di = baseComposition._rootM03D26di; + _argM03D26di_serviceName = baseComposition._argM03D26di_serviceName; } public Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService Root { get { - return new Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.Service(_argM03D24di_serviceName); + return new Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.Service(_argM03D26di_serviceName); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -126,10 +126,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -162,25 +162,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -193,7 +193,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 25ac13480..fadd0d65e 100644 --- a/readme/custom-attributes.md +++ b/readme/custom-attributes.md @@ -87,48 +87,48 @@ classDiagram ```c# partial class PersonComposition { - private readonly PersonComposition _rootM03D24di; - private readonly int _argM03D24di_personId; + private readonly PersonComposition _rootM03D26di; + private readonly int _argM03D26di_personId; public PersonComposition(int personId) { - _rootM03D24di = this; - _argM03D24di_personId = personId; + _rootM03D26di = this; + _argM03D26di_personId = personId; } internal PersonComposition(PersonComposition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _argM03D24di_personId = baseComposition._argM03D24di_personId; + _rootM03D26di = baseComposition._rootM03D26di; + _argM03D26di_personId = baseComposition._argM03D26di_personId; } public Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson Person { get { - string transientM03D24di1_String = "Nik"; - Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person transientM03D24di0_Person = new Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person(transientM03D24di1_String); - transientM03D24di0_Person.Id = _argM03D24di_personId; - return transientM03D24di0_Person; + string transientM03D26di1_String = "Nik"; + Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person transientM03D26di0_Person = new Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person(transientM03D26di1_String); + transientM03D26di0_Person.Id = _argM03D26di_personId; + return transientM03D26di0_Person; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -140,10 +140,10 @@ partial class PersonComposition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -179,25 +179,25 @@ partial class PersonComposition " PersonComposition ..> Person : IPerson Person"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static PersonComposition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(PersonComposition composite) { @@ -210,7 +210,7 @@ partial class PersonComposition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 ec8ebeb7a..08c3b230d 100644 --- a/readme/decorator.md +++ b/readme/decorator.md @@ -64,16 +64,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Interception.DecoratorScenario.IService Root @@ -86,20 +86,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -111,10 +111,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -150,25 +150,25 @@ partial class Composition " Composition ..> GreetingService : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.DecoratorScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.DecoratorScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -181,7 +181,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 ca9f215aa..3980566b7 100644 --- a/readme/default-lifetime.md +++ b/readme/default-lifetime.md @@ -77,63 +77,63 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service _singletonM03D24di37_Service; - private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency _singletonM03D24di36_Dependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service _singletonM03D26di37_Service; + private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency _singletonM03D26di36_Dependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService Root { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di37_Service, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di37_Service, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di37_Service, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di37_Service, null)) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } - _singletonM03D24di37_Service = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service(_singletonM03D24di36_Dependency, _rootM03D24di._singletonM03D24di36_Dependency); - _rootM03D24di._singletonM03D24di37_Service = _singletonM03D24di37_Service; + _singletonM03D26di37_Service = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service(_singletonM03D26di36_Dependency, _rootM03D26di._singletonM03D26di36_Dependency); + _rootM03D26di._singletonM03D26di37_Service = _singletonM03D26di37_Service; } } } - return _rootM03D24di._singletonM03D24di37_Service; + return _rootM03D26di._singletonM03D26di37_Service; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -145,10 +145,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -188,25 +188,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -219,7 +219,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 66d26ec68..041cbcfa1 100644 --- a/readme/default-values.md +++ b/readme/default-values.md @@ -70,16 +70,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService Root @@ -95,20 +95,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -120,10 +120,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -163,25 +163,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -194,7 +194,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 8452aafab..aa891e0f6 100644 --- a/readme/dependent-compositions.md +++ b/readme/dependent-compositions.md @@ -89,16 +89,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService Root @@ -111,20 +111,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -136,10 +136,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -178,25 +178,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -209,7 +209,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService Resolve(Composition composition) { @@ -237,16 +237,16 @@ partial class Composition ```c# partial class OtherComposition { - private readonly OtherComposition _rootM03D24di; + private readonly OtherComposition _rootM03D26di; public OtherComposition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal OtherComposition(OtherComposition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService Root @@ -267,20 +267,20 @@ partial class OtherComposition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -292,10 +292,10 @@ partial class OtherComposition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -340,28 +340,28 @@ partial class OtherComposition " OtherComposition ..> Program : Program Program"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static OtherComposition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.Program), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.Program), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(OtherComposition composite) { @@ -374,7 +374,7 @@ partial class OtherComposition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.DependentCompositionsScenario.IService Resolve(OtherComposition composition) { @@ -392,7 +392,7 @@ partial class OtherComposition } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 80a35584e..4790143db 100644 --- a/readme/disposable-singleton.md +++ b/readme/disposable-singleton.md @@ -83,61 +83,61 @@ classDiagram ```c# partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private readonly global::System.IDisposable[] _disposablesM03D24di; - private int _disposeIndexM03D24di; - private Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency _singletonM03D24di36_Dependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private readonly global::System.IDisposable[] _disposablesM03D26di; + private int _disposeIndexM03D26di; + private Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency _singletonM03D26di36_Dependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); - _disposablesM03D24di = new global::System.IDisposable[1]; + _rootM03D26di = this; + _lockM03D26di = new object(); + _disposablesM03D26di = new global::System.IDisposable[1]; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService Root { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; - _rootM03D24di._disposablesM03D24di[_rootM03D24di._disposeIndexM03D24di++] = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; + _rootM03D26di._disposablesM03D26di[_rootM03D26di._disposeIndexM03D26di++] = _singletonM03D26di36_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Service(_rootM03D24di._singletonM03D24di36_Dependency); + return new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Service(_rootM03D26di._singletonM03D26di36_Dependency); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -149,10 +149,10 @@ partial class Composition: global::System.IDisposable public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -165,11 +165,11 @@ partial class Composition: global::System.IDisposable public void Dispose() { - lock (_lockM03D24di) + lock (_lockM03D26di) { - while (_disposeIndexM03D24di > 0) + while (_disposeIndexM03D26di > 0) { - var disposableInstance = _disposablesM03D24di[--_disposeIndexM03D24di]; + var disposableInstance = _disposablesM03D26di[--_disposeIndexM03D26di]; try { disposableInstance.Dispose(); @@ -180,7 +180,7 @@ partial class Composition: global::System.IDisposable } } - _singletonM03D24di36_Dependency = null; + _singletonM03D26di36_Dependency = null; } } @@ -216,25 +216,25 @@ partial class Composition: global::System.IDisposable " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -247,7 +247,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 16ea878dd..cde617d58 100644 --- a/readme/enumerable-generics.md +++ b/readme/enumerable-generics.md @@ -109,16 +109,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService IntRoot @@ -126,13 +126,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D24di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D26di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.XyzDependency(); } - System.Collections.Generic.IEnumerable> perBlockM03D24di1_IEnumerable = LocalperBlockM03D24di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D24di1_IEnumerable); + System.Collections.Generic.IEnumerable> perBlockM03D26di1_IEnumerable = LocalperBlockM03D26di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D26di1_IEnumerable); } } @@ -141,32 +141,32 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D24di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D26di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.XyzDependency(); } - System.Collections.Generic.IEnumerable> perBlockM03D24di1_IEnumerable = LocalperBlockM03D24di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D24di1_IEnumerable); + System.Collections.Generic.IEnumerable> perBlockM03D26di1_IEnumerable = LocalperBlockM03D26di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D26di1_IEnumerable); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -178,10 +178,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -251,28 +251,28 @@ partial class Composition " ServiceᐸStringᐳ o-- \"PerBlock\" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di>.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di>.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di>.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di>.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -285,7 +285,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService Resolve(Composition composition) { @@ -303,7 +303,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver> + private sealed class ResolverM03D26di_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 a56d295db..b82018560 100644 --- a/readme/enumerable.md +++ b/readme/enumerable.md @@ -79,16 +79,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.BCL.EnumerableScenario.IService Root @@ -96,32 +96,32 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable LocalperBlockM03D24di1_IEnumerable() + System.Collections.Generic.IEnumerable LocalperBlockM03D26di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableScenario.XyzDependency(); } - System.Collections.Generic.IEnumerable perBlockM03D24di1_IEnumerable = LocalperBlockM03D24di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableScenario.Service(perBlockM03D24di1_IEnumerable); + System.Collections.Generic.IEnumerable perBlockM03D26di1_IEnumerable = LocalperBlockM03D26di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableScenario.Service(perBlockM03D26di1_IEnumerable); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -133,10 +133,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -182,25 +182,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -213,7 +213,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 967765f95..7e9d1fc38 100644 --- a/readme/factory.md +++ b/readme/factory.md @@ -81,48 +81,48 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.FactoryScenario.IService Root { get { - Pure.DI.UsageTests.Basics.FactoryScenario.Dependency transientM03D24di1_Dependency; + Pure.DI.UsageTests.Basics.FactoryScenario.Dependency transientM03D26di1_Dependency; { - var dependency_M03D24di1 = new Dependency(DateTimeOffset.Now); - dependency_M03D24di1.Initialize(); - transientM03D24di1_Dependency = dependency_M03D24di1; + var dependency_M03D26di1 = new Dependency(DateTimeOffset.Now); + dependency_M03D26di1.Initialize(); + transientM03D26di1_Dependency = dependency_M03D26di1; } - return new Pure.DI.UsageTests.Basics.FactoryScenario.Service(transientM03D24di1_Dependency); + return new Pure.DI.UsageTests.Basics.FactoryScenario.Service(transientM03D26di1_Dependency); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -134,10 +134,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -174,25 +174,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FactoryScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FactoryScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -205,7 +205,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 3e29ea4f0..030564df3 100644 --- a/readme/field-injection.md +++ b/readme/field-injection.md @@ -70,44 +70,44 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService Root { get { - Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service transientM03D24di0_Service = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service(); - transientM03D24di0_Service.DependencyVal = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Dependency(); - return transientM03D24di0_Service; + Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service transientM03D26di0_Service = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service(); + transientM03D26di0_Service.DependencyVal = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Dependency(); + return transientM03D26di0_Service; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -119,10 +119,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -162,25 +162,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -193,7 +193,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 2fae7d97a..652424020 100644 --- a/readme/func-with-arguments.md +++ b/readme/func-with-arguments.md @@ -107,63 +107,63 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock _singletonM03D24di36_Clock; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock _singletonM03D26di36_Clock; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService Root { get { - System.Func transientM03D24di1_Func = dependencyId => + System.Func transientM03D26di1_Func = dependencyId => { - int transientM03D24di3_Int32 = dependencyId; - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Clock, null)) + int transientM03D26di3_Int32 = dependencyId; + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Clock, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Clock, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Clock, null)) { - _singletonM03D24di36_Clock = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock(); - _rootM03D24di._singletonM03D24di36_Clock = _singletonM03D24di36_Clock; + _singletonM03D26di36_Clock = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock(); + _rootM03D26di._singletonM03D26di36_Clock = _singletonM03D26di36_Clock; } } } - var dependency_M03D24di1 = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Dependency(_rootM03D24di._singletonM03D24di36_Clock, transientM03D24di3_Int32); - return dependency_M03D24di1; + var dependency_M03D26di1 = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Dependency(_rootM03D26di._singletonM03D26di36_Clock, transientM03D26di3_Int32); + return dependency_M03D26di1; }; - return new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Service(transientM03D24di1_Func); + return new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Service(transientM03D26di1_Func); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -175,10 +175,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -225,25 +225,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -256,7 +256,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 476f10b2d..d839efcd9 100644 --- a/readme/func-with-tag.md +++ b/readme/func-with-tag.md @@ -72,53 +72,53 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.BCL.FuncWithTagScenario.IService Root { get { - var perResolveM03D24di38_Func = default(System.Func); - perResolveM03D24di38_Func = new global::System.Func( + var perResolveM03D26di38_Func = default(System.Func); + perResolveM03D26di38_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D24di1 = new Pure.DI.UsageTests.BCL.FuncWithTagScenario.Dependency(); - return factory_M03D24di1; + var factory_M03D26di1 = new Pure.DI.UsageTests.BCL.FuncWithTagScenario.Dependency(); + return factory_M03D26di1; }); - return new Pure.DI.UsageTests.BCL.FuncWithTagScenario.Service(perResolveM03D24di38_Func); + return new Pure.DI.UsageTests.BCL.FuncWithTagScenario.Service(perResolveM03D26di38_Func); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -130,10 +130,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -174,25 +174,25 @@ partial class Composition " FuncᐸIDependencyᐳ *-- Dependency : \"my tag\" IDependency"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithTagScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithTagScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -205,7 +205,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 fd6ae67c0..f93db26bb 100644 --- a/readme/func.md +++ b/readme/func.md @@ -75,53 +75,53 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.BCL.FuncScenario.IService Root { get { - var perResolveM03D24di38_Func = default(System.Func); - perResolveM03D24di38_Func = new global::System.Func( + var perResolveM03D26di38_Func = default(System.Func); + perResolveM03D26di38_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D24di1 = new Pure.DI.UsageTests.BCL.FuncScenario.Dependency(); - return factory_M03D24di1; + var factory_M03D26di1 = new Pure.DI.UsageTests.BCL.FuncScenario.Dependency(); + return factory_M03D26di1; }); - return new Pure.DI.UsageTests.BCL.FuncScenario.Service(perResolveM03D24di38_Func); + return new Pure.DI.UsageTests.BCL.FuncScenario.Service(perResolveM03D26di38_Func); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -133,10 +133,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -177,25 +177,25 @@ partial class Composition " FuncᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -208,7 +208,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 d3b04ee46..a25209836 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 _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } 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 transientM03D24di0_OtherService; + Pure.DI.UsageTests.Generics.GenericCompositionRootsWithConstraintsScenario.OtherService transientM03D26di0_OtherService; { - var dependency_M03D24di1 = new Pure.DI.UsageTests.Generics.GenericCompositionRootsWithConstraintsScenario.Dependency(); - transientM03D24di0_OtherService = new OtherService(dependency_M03D24di1); + var dependency_M03D26di1 = new Pure.DI.UsageTests.Generics.GenericCompositionRootsWithConstraintsScenario.Dependency(); + transientM03D26di0_OtherService = new OtherService(dependency_M03D26di1); } - return transientM03D24di0_OtherService; + return transientM03D26di0_OtherService; } public override string ToString() diff --git a/readme/generic-composition-roots.md b/readme/generic-composition-roots.md index 7d6bdb6b8..67f6e1ce1 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 _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } 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 transientM03D24di0_OtherService; + Pure.DI.UsageTests.Generics.GenericsCompositionRootsScenario.OtherService transientM03D26di0_OtherService; { - var dependency_M03D24di1 = new Pure.DI.UsageTests.Generics.GenericsCompositionRootsScenario.Dependency(); - transientM03D24di0_OtherService = new OtherService(dependency_M03D24di1); + var dependency_M03D26di1 = new Pure.DI.UsageTests.Generics.GenericsCompositionRootsScenario.Dependency(); + transientM03D26di0_OtherService = new OtherService(dependency_M03D26di1); } - return transientM03D24di0_OtherService; + return transientM03D26di0_OtherService; } public override string ToString() diff --git a/readme/generics.md b/readme/generics.md index 9aa75d829..2adce2364 100644 --- a/readme/generics.md +++ b/readme/generics.md @@ -93,16 +93,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Generics.GenericsScenario.IService Root @@ -115,20 +115,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -140,10 +140,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -190,25 +190,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Generics.GenericsScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Generics.GenericsScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -221,7 +221,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 af628b25d..a2e1f30ed 100644 --- a/readme/injection.md +++ b/readme/injection.md @@ -71,47 +71,47 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.InjectionScenario.IService Root { get { - Pure.DI.UsageTests.Basics.InjectionScenario.Service transientM03D24di0_Service; + Pure.DI.UsageTests.Basics.InjectionScenario.Service transientM03D26di0_Service; { - var dependency_M03D24di1 = new Pure.DI.UsageTests.Basics.InjectionScenario.Dependency(); - transientM03D24di0_Service = new Service(dependency_M03D24di1); + var dependency_M03D26di1 = new Pure.DI.UsageTests.Basics.InjectionScenario.Dependency(); + transientM03D26di0_Service = new Service(dependency_M03D26di1); } - return transientM03D24di0_Service; + return transientM03D26di0_Service; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -123,10 +123,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -163,25 +163,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InjectionScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InjectionScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -194,7 +194,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 42eacfc68..15a96336a 100644 --- a/readme/injections-of-abstractions.md +++ b/readme/injections-of-abstractions.md @@ -78,16 +78,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.InjectionsOfAbstractionsScenario.Program Root diff --git a/readme/instance-initialization.md b/readme/instance-initialization.md index f8a887e00..116bdac61 100644 --- a/readme/instance-initialization.md +++ b/readme/instance-initialization.md @@ -87,56 +87,56 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly string _argM03D24di_serviceName; + private readonly Composition _rootM03D26di; + private readonly string _argM03D26di_serviceName; public Composition(string serviceName) { - _rootM03D24di = this; + _rootM03D26di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D24di_serviceName = serviceName; + _argM03D26di_serviceName = serviceName; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _argM03D24di_serviceName = baseComposition._argM03D24di_serviceName; + _rootM03D26di = baseComposition._rootM03D26di; + _argM03D26di_serviceName = baseComposition._argM03D26di_serviceName; } public Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.IService Root { get { - Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Service transientM03D24di0_Service; + Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Service transientM03D26di0_Service; { - var service_M03D24di1 = new Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Service(_argM03D24di_serviceName, new Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Dependency()); - service_M03D24di1.Initialize(); - transientM03D24di0_Service = service_M03D24di1; + var service_M03D26di1 = new Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Service(_argM03D26di_serviceName, new Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.Dependency()); + service_M03D26di1.Initialize(); + transientM03D26di0_Service = service_M03D26di1; } - return transientM03D24di0_Service; + return transientM03D26di0_Service; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -148,10 +148,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -188,25 +188,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.InstanceInitializationScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -219,7 +219,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 f531329bc..8d5d74296 100644 --- a/readme/interception.md +++ b/readme/interception.md @@ -83,16 +83,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Interception.InterceptionScenario.IService Root @@ -105,20 +105,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -130,10 +130,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -166,25 +166,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.InterceptionScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.InterceptionScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -197,7 +197,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 09d98b49d..1c53a1a87 100644 --- a/readme/keyed-service-provider.md +++ b/readme/keyed-service-provider.md @@ -50,8 +50,8 @@ service.Dependency.ShouldBe(dependency); ```mermaid classDiagram class Composition { - -IDependency RootM03D24di0001 - -IService RootM03D24di0002 + -IDependency RootM03D26di0001 + -IService RootM03D26di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object GetService(Type type) @@ -72,8 +72,8 @@ classDiagram <> } Service o-- "Singleton" Dependency : "Dependency Key" IDependency - Composition ..> Dependency : IDependency RootM03D24di0001 - Composition ..> Service : IService RootM03D24di0002 + Composition ..> Dependency : IDependency RootM03D26di0001 + Composition ..> Service : IService RootM03D26di0002 ``` @@ -84,76 +84,76 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency _singletonM03D24di36_Dependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency _singletonM03D26di36_Dependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } - public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency RootM03D24di0001 + public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency RootM03D26di0001 { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } } } - return _rootM03D24di._singletonM03D24di36_Dependency; + return _rootM03D26di._singletonM03D26di36_Dependency; } } - public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService RootM03D24di0002 + public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService RootM03D26di0002 { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } } } - return new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Service(_rootM03D24di._singletonM03D24di36_Dependency); + return new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Service(_rootM03D26di._singletonM03D26di36_Dependency); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -165,10 +165,10 @@ partial class Composition public object GetRequiredKeyedService(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -183,8 +183,8 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D24di0001\n" + - " -IService RootM03D24di0002\n" + + " -IDependency RootM03D26di0001\n" + + " -IService RootM03D26di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object GetService(Type type)\n" + @@ -205,32 +205,32 @@ partial class Composition " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : \"Dependency Key\" IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D24di0001\n" + - " Composition ..> Service : IService RootM03D24di0002"; + " Composition ..> Dependency : IDependency RootM03D26di0001\n" + + " Composition ..> Service : IService RootM03D26di0002"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -243,7 +243,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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.RootM03D24di0001; + return composition.RootM03D26di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency."); } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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.RootM03D24di0002; + return composition.RootM03D26di0002; } 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 5782ee2e8..3ca3e34bf 100644 --- a/readme/lazy.md +++ b/readme/lazy.md @@ -68,58 +68,58 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.BCL.LazyScenario.IService Root { get { - var perResolveM03D24di39_Func = default(System.Func); - perResolveM03D24di39_Func = new global::System.Func( + var perResolveM03D26di39_Func = default(System.Func); + perResolveM03D26di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D24di1 = new Pure.DI.UsageTests.BCL.LazyScenario.Dependency(); - return factory_M03D24di1; + var factory_M03D26di1 = new Pure.DI.UsageTests.BCL.LazyScenario.Dependency(); + return factory_M03D26di1; }); - System.Lazy transientM03D24di1_Lazy; + System.Lazy transientM03D26di1_Lazy; { - var factory_M03D24di2 = perResolveM03D24di39_Func; - transientM03D24di1_Lazy = new global::System.Lazy(factory_M03D24di2, true); + var factory_M03D26di2 = perResolveM03D26di39_Func; + transientM03D26di1_Lazy = new global::System.Lazy(factory_M03D26di2, true); } - return new Pure.DI.UsageTests.BCL.LazyScenario.Service(transientM03D24di1_Lazy); + return new Pure.DI.UsageTests.BCL.LazyScenario.Service(transientM03D26di1_Lazy); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -131,10 +131,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -177,25 +177,25 @@ partial class Composition " FuncᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.LazyScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.LazyScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -208,7 +208,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 e137ef172..b3d4e7130 100644 --- a/readme/manually-started-tasks.md +++ b/readme/manually-started-tasks.md @@ -109,38 +109,38 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.BCL.ManualTaskScenario.IService GetRoot(System.Threading.CancellationToken cancellationToken) { - var perResolveM03D24di41_Func = default(System.Func); - perResolveM03D24di41_Func = new global::System.Func( + var perResolveM03D26di41_Func = default(System.Func); + perResolveM03D26di41_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D24di1 = new Pure.DI.UsageTests.BCL.ManualTaskScenario.Dependency(); - return factory_M03D24di1; + var factory_M03D26di1 = new Pure.DI.UsageTests.BCL.ManualTaskScenario.Dependency(); + return factory_M03D26di1; }); - System.Threading.Tasks.Task transientM03D24di1_Task; + System.Threading.Tasks.Task transientM03D26di1_Task; { - var factory_M03D24di2 = perResolveM03D24di41_Func; - var cancellationToken_M03D24di3 = cancellationToken; - transientM03D24di1_Task = new Task(factory_M03D24di2, cancellationToken_M03D24di3); + var factory_M03D26di2 = perResolveM03D26di41_Func; + var cancellationToken_M03D26di3 = cancellationToken; + transientM03D26di1_Task = new Task(factory_M03D26di2, cancellationToken_M03D26di3); } - return new Pure.DI.UsageTests.BCL.ManualTaskScenario.Service(transientM03D24di1_Task); + return new Pure.DI.UsageTests.BCL.ManualTaskScenario.Service(transientM03D26di1_Task); } public override string ToString() diff --git a/readme/member-ordinal-attribute.md b/readme/member-ordinal-attribute.md index d95fc320c..57b505c5d 100644 --- a/readme/member-ordinal-attribute.md +++ b/readme/member-ordinal-attribute.md @@ -97,60 +97,60 @@ classDiagram ```c# partial class PersonComposition { - private readonly PersonComposition _rootM03D24di; - private readonly int _argM03D24di_personId; - private readonly string _argM03D24di_personName; - private readonly System.DateTime _argM03D24di_personBirthday; + private readonly PersonComposition _rootM03D26di; + private readonly int _argM03D26di_personId; + private readonly string _argM03D26di_personName; + private readonly System.DateTime _argM03D26di_personBirthday; public PersonComposition(int personId, string personName, System.DateTime personBirthday) { - _rootM03D24di = this; + _rootM03D26di = this; if (ReferenceEquals(personName, null)) { throw new global::System.ArgumentNullException("personName"); } - _argM03D24di_personId = personId; - _argM03D24di_personName = personName; - _argM03D24di_personBirthday = personBirthday; + _argM03D26di_personId = personId; + _argM03D26di_personName = personName; + _argM03D26di_personBirthday = personBirthday; } internal PersonComposition(PersonComposition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _argM03D24di_personId = baseComposition._argM03D24di_personId; - _argM03D24di_personName = baseComposition._argM03D24di_personName; - _argM03D24di_personBirthday = baseComposition._argM03D24di_personBirthday; + _rootM03D26di = baseComposition._rootM03D26di; + _argM03D26di_personId = baseComposition._argM03D26di_personId; + _argM03D26di_personName = baseComposition._argM03D26di_personName; + _argM03D26di_personBirthday = baseComposition._argM03D26di_personBirthday; } public Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson Person { get { - Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person transientM03D24di0_Person = new Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person(); - transientM03D24di0_Person.Id = _argM03D24di_personId; - transientM03D24di0_Person.FirstName = _argM03D24di_personName; - transientM03D24di0_Person.Birthday = _argM03D24di_personBirthday; - return transientM03D24di0_Person; + Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person transientM03D26di0_Person = new Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person(); + transientM03D26di0_Person.Id = _argM03D26di_personId; + transientM03D26di0_Person.FirstName = _argM03D26di_personName; + transientM03D26di0_Person.Birthday = _argM03D26di_personBirthday; + return transientM03D26di0_Person; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -162,10 +162,10 @@ partial class PersonComposition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -205,25 +205,25 @@ partial class PersonComposition " PersonComposition ..> Person : IPerson Person"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static PersonComposition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(PersonComposition composite) { @@ -236,7 +236,7 @@ partial class PersonComposition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 a5ed4b3df..236c34f1a 100644 --- a/readme/method-injection.md +++ b/readme/method-injection.md @@ -71,44 +71,44 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService Root { get { - Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service transientM03D24di0_Service = new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service(); - transientM03D24di0_Service.SetDependency(new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Dependency()); - return transientM03D24di0_Service; + Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service transientM03D26di0_Service = new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service(); + transientM03D26di0_Service.SetDependency(new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Dependency()); + return transientM03D26di0_Service; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -120,10 +120,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -163,25 +163,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -194,7 +194,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 2b0edf6f4..43772a892 100644 --- a/readme/multi-contract-bindings.md +++ b/readme/multi-contract-bindings.md @@ -71,16 +71,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService Root @@ -93,20 +93,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -118,10 +118,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -165,25 +165,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -196,7 +196,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 2adb04ff3..17d4d0eed 100644 --- a/readme/oncannotresolve-hint.md +++ b/readme/oncannotresolve-hint.md @@ -45,7 +45,7 @@ partial class Composition DI.Setup(nameof(Composition)) .Hint(OnCannotResolve, "On") .Bind().To() - .Bind().Tags().To().Root("Root"); + .RootBind("Root").To(); var composition = new Composition(); var service = composition.Root; @@ -96,43 +96,43 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService Root { get { - string transientM03D24di2_String = OnCannotResolve(null, Pure.DI.Lifetime.Transient); - return new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Service(new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Dependency(transientM03D24di2_String)); + string transientM03D26di2_String = OnCannotResolve(null, Pure.DI.Lifetime.Transient); + return new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Service(new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Dependency(transientM03D26di2_String)); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -144,10 +144,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -190,25 +190,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -221,7 +221,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 000dc5293..e69b847a8 100644 --- a/readme/ondependencyinjection-hint.md +++ b/readme/ondependencyinjection-hint.md @@ -43,7 +43,7 @@ partial class Composition DI.Setup(nameof(Composition)) .Hint(OnDependencyInjectionContractTypeNameRegularExpression, nameof(IDependency)) .Bind().To() - .Bind().Tags().To().Root("Root"); + .RootBind("Root").To(); var log = new List(); var composition = new Composition(log); @@ -93,16 +93,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService Root @@ -115,20 +115,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -140,10 +140,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -184,25 +184,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -215,7 +215,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 31d6d6337..bbecdc161 100644 --- a/readme/onnewinstance-hint.md +++ b/readme/onnewinstance-hint.md @@ -95,63 +95,63 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D24di36_Dependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D26di36_Dependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService Root { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D24di36_DependencyTemp; - _singletonM03D24di36_DependencyTemp = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency(); - OnNewInstance(ref _singletonM03D24di36_DependencyTemp, null, Pure.DI.Lifetime.Singleton); + Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D26di36_DependencyTemp; + _singletonM03D26di36_DependencyTemp = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency(); + OnNewInstance(ref _singletonM03D26di36_DependencyTemp, null, Pure.DI.Lifetime.Singleton); global::System.Threading.Thread.MemoryBarrier(); - _singletonM03D24di36_Dependency = _singletonM03D24di36_DependencyTemp; - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = _singletonM03D26di36_DependencyTemp; + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } } } - Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service transientM03D24di0_Service = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service(_rootM03D24di._singletonM03D24di36_Dependency); - OnNewInstance(ref transientM03D24di0_Service, null, Pure.DI.Lifetime.Transient); - return transientM03D24di0_Service; + Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service transientM03D26di0_Service = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service(_rootM03D26di._singletonM03D26di36_Dependency); + OnNewInstance(ref transientM03D26di0_Service, null, Pure.DI.Lifetime.Transient); + return transientM03D26di0_Service; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -163,10 +163,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -207,25 +207,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -238,7 +238,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 c6552b9e6..612fbbb64 100644 --- a/readme/overriding-the-bcl-binding.md +++ b/readme/overriding-the-bcl-binding.md @@ -70,48 +70,48 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService Root { get { - Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IDependency[] transientM03D24di1_ = new IDependency[] + Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IDependency[] transientM03D26di1_ = new IDependency[] { new AbcDependency(), new XyzDependency(), new AbcDependency() }; - return new Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.Service(transientM03D24di1_); + return new Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.Service(transientM03D26di1_); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -123,10 +123,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -159,25 +159,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -190,7 +190,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 bad312aa8..2faca913b 100644 --- a/readme/partial-class.md +++ b/readme/partial-class.md @@ -104,45 +104,45 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } internal Pure.DI.UsageTests.Advanced.PartialClassScenario.Service Root { get { - long transientM03D24di5_Int64 = GenerateId(); - long transientM03D24di4_Int64 = GenerateId(); - string transientM03D24di1_String = $"{_serviceName}_{GenerateId()}"; - return new Pure.DI.UsageTests.Advanced.PartialClassScenario.Service(transientM03D24di1_String, new Pure.DI.UsageTests.Advanced.PartialClassScenario.Dependency(transientM03D24di5_Int64), new Pure.DI.UsageTests.Advanced.PartialClassScenario.Dependency(transientM03D24di4_Int64)); + long transientM03D26di5_Int64 = GenerateId(); + long transientM03D26di4_Int64 = GenerateId(); + string transientM03D26di1_String = $"{_serviceName}_{GenerateId()}"; + return new Pure.DI.UsageTests.Advanced.PartialClassScenario.Service(transientM03D26di1_String, new Pure.DI.UsageTests.Advanced.PartialClassScenario.Dependency(transientM03D26di5_Int64), new Pure.DI.UsageTests.Advanced.PartialClassScenario.Dependency(transientM03D26di4_Int64)); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -154,10 +154,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -197,25 +197,25 @@ partial class Composition " Composition ..> Service : Service Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.PartialClassScenario.Service), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.PartialClassScenario.Service), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -228,7 +228,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 728fe1838..174e7b4e4 100644 --- a/readme/perblock.md +++ b/readme/perblock.md @@ -83,60 +83,60 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service Root { get { - var perResolveM03D24di42_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>); - perResolveM03D24di42_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>( + var perResolveM03D26di42_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>); + perResolveM03D26di42_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 perBlockM03D24di4_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); - var factory_M03D24di1 = (perBlockM03D24di4_Dependency, perBlockM03D24di4_Dependency); - return factory_M03D24di1; + Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency perBlockM03D26di4_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); + var factory_M03D26di1 = (perBlockM03D26di4_Dependency, perBlockM03D26di4_Dependency); + return factory_M03D26di1; }); - System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)> transientM03D24di2_Lazy; + System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)> transientM03D26di2_Lazy; { - var factory_M03D24di2 = perResolveM03D24di42_Func; - transientM03D24di2_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>(factory_M03D24di2, true); + var factory_M03D26di2 = perResolveM03D26di42_Func; + transientM03D26di2_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>(factory_M03D26di2, true); } - Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency perBlockM03D24di1_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); - return new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service(perBlockM03D24di1_Dependency, perBlockM03D24di1_Dependency, transientM03D24di2_Lazy); + Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency perBlockM03D26di1_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); + return new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service(perBlockM03D26di1_Dependency, perBlockM03D26di1_Dependency, transientM03D26di2_Lazy); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -148,10 +148,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -197,25 +197,25 @@ partial class Composition " FuncᐸValueTupleᐸIDependencyˏIDependencyᐳᐳ *-- ValueTupleᐸIDependencyˏIDependencyᐳ : ValueTupleᐸIDependencyˏIDependencyᐳ"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -228,7 +228,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 9ad3abfd2..764bf272c 100644 --- a/readme/perresolve.md +++ b/readme/perresolve.md @@ -83,79 +83,79 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service Root { get { - var perResolveM03D24di36_Dependency = default(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency); - var perResolveM03D24di42_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>); - perResolveM03D24di42_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>( + var perResolveM03D26di36_Dependency = default(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency); + var perResolveM03D26di42_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>); + perResolveM03D26di42_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(perResolveM03D24di36_Dependency, null)) + if (ReferenceEquals(perResolveM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(perResolveM03D24di36_Dependency, null)) + if (ReferenceEquals(perResolveM03D26di36_Dependency, null)) { - perResolveM03D24di36_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); + perResolveM03D26di36_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); } } } - var factory_M03D24di1 = (perResolveM03D24di36_Dependency, perResolveM03D24di36_Dependency); - return factory_M03D24di1; + var factory_M03D26di1 = (perResolveM03D26di36_Dependency, perResolveM03D26di36_Dependency); + return factory_M03D26di1; }); - System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)> transientM03D24di1_Lazy; + System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)> transientM03D26di1_Lazy; { - var factory_M03D24di2 = perResolveM03D24di42_Func; - transientM03D24di1_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>(factory_M03D24di2, true); + var factory_M03D26di2 = perResolveM03D26di42_Func; + transientM03D26di1_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>(factory_M03D26di2, true); } - if (ReferenceEquals(perResolveM03D24di36_Dependency, null)) + if (ReferenceEquals(perResolveM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(perResolveM03D24di36_Dependency, null)) + if (ReferenceEquals(perResolveM03D26di36_Dependency, null)) { - perResolveM03D24di36_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); + perResolveM03D26di36_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); } } } - return new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service(perResolveM03D24di36_Dependency, perResolveM03D24di36_Dependency, transientM03D24di1_Lazy); + return new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service(perResolveM03D26di36_Dependency, perResolveM03D26di36_Dependency, transientM03D26di1_Lazy); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -167,10 +167,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -216,25 +216,25 @@ partial class Composition " FuncᐸValueTupleᐸIDependencyˏIDependencyᐳᐳ *-- ValueTupleᐸIDependencyˏIDependencyᐳ : ValueTupleᐸIDependencyˏIDependencyᐳ"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -247,7 +247,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 a9144de86..4eab2a460 100644 --- a/readme/property-injection.md +++ b/readme/property-injection.md @@ -68,44 +68,44 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService Root { get { - Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service transientM03D24di0_Service = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service(); - transientM03D24di0_Service.Dependency = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Dependency(); - return transientM03D24di0_Service; + Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service transientM03D26di0_Service = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service(); + transientM03D26di0_Service.Dependency = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Dependency(); + return transientM03D26di0_Service; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -117,10 +117,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -160,25 +160,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -191,7 +191,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 67ad7b79c..e3e61f723 100644 --- a/readme/required-properties-or-fields.md +++ b/readme/required-properties-or-fields.md @@ -78,24 +78,24 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly string _argM03D24di_name; + private readonly Composition _rootM03D26di; + private readonly string _argM03D26di_name; public Composition(string name) { - _rootM03D24di = this; + _rootM03D26di = this; if (ReferenceEquals(name, null)) { throw new global::System.ArgumentNullException("name"); } - _argM03D24di_name = name; + _argM03D26di_name = name; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _argM03D24di_name = baseComposition._argM03D24di_name; + _rootM03D26di = baseComposition._rootM03D26di; + _argM03D26di_name = baseComposition._argM03D26di_name; } public Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService Root @@ -104,7 +104,7 @@ partial class Composition { return new Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.Service() { - ServiceNameField = _argM03D24di_name, + ServiceNameField = _argM03D26di_name, Dependency = new Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.Dependency() }; } @@ -112,20 +112,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -137,10 +137,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -183,25 +183,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -214,7 +214,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 d36b570e3..8c00f328d 100644 --- a/readme/resolve-hint.md +++ b/readme/resolve-hint.md @@ -64,16 +64,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Hints.ResolveHintScenario.IDependency DependencyRoot diff --git a/readme/resolve-methods.md b/readme/resolve-methods.md index 259850af0..0a114bbf9 100644 --- a/readme/resolve-methods.md +++ b/readme/resolve-methods.md @@ -46,8 +46,8 @@ var otherService2 = composition.Resolve(typeof(IService),"Other"); classDiagram class Composition { +IService OtherService - -IDependency RootM03D24di0001 - -IService RootM03D24di0002 + -IDependency RootM03D26di0001 + -IService RootM03D26di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -72,8 +72,8 @@ classDiagram <> } Service *-- Dependency : IDependency - Composition ..> Dependency : IDependency RootM03D24di0001 - Composition ..> Service : IService RootM03D24di0002 + Composition ..> Dependency : IDependency RootM03D26di0001 + Composition ..> Service : IService RootM03D26di0002 Composition ..> OtherService : IService OtherService ``` @@ -85,16 +85,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.ResolveScenario.IService OtherService @@ -105,7 +105,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency RootM03D24di0001 + public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency RootM03D26di0001 { get { @@ -113,7 +113,7 @@ partial class Composition } } - public Pure.DI.UsageTests.Basics.ResolveScenario.IService RootM03D24di0002 + public Pure.DI.UsageTests.Basics.ResolveScenario.IService RootM03D26di0002 { get { @@ -123,20 +123,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -148,10 +148,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -167,8 +167,8 @@ partial class Composition "classDiagram\n" + " class Composition {\n" + " +IService OtherService\n" + - " -IDependency RootM03D24di0001\n" + - " -IService RootM03D24di0002\n" + + " -IDependency RootM03D26di0001\n" + + " -IService RootM03D26di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -193,33 +193,33 @@ partial class Composition " <>\n" + " }\n" + " Service *-- Dependency : IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D24di0001\n" + - " Composition ..> Service : IService RootM03D24di0002\n" + + " Composition ..> Dependency : IDependency RootM03D26di0001\n" + + " Composition ..> Service : IService RootM03D26di0002\n" + " Composition ..> OtherService : IService OtherService"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IService), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IDependency), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IService), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IDependency), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -232,11 +232,11 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ResolveScenario.IService Resolve(Composition composition) { - return composition.RootM03D24di0002; + return composition.RootM03D26di0002; } public Pure.DI.UsageTests.Basics.ResolveScenario.IService ResolveByTag(Composition composition, object tag) @@ -246,17 +246,17 @@ partial class Composition case "Other": return composition.OtherService; case null: - return composition.RootM03D24di0002; + return composition.RootM03D26di0002; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.Basics.ResolveScenario.IService."); } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D24di0001; + return composition.RootM03D26di0001; } public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -264,7 +264,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D24di0001; + return composition.RootM03D26di0001; } 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 7e1e60b62..e9b733388 100644 --- a/readme/root-arguments.md +++ b/readme/root-arguments.md @@ -99,16 +99,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } 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 bb8718792..bdca79dc8 100644 --- a/readme/rootbind.md +++ b/readme/rootbind.md @@ -46,16 +46,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.RootBindScenario.IDependency Root @@ -68,20 +68,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -93,10 +93,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -127,25 +127,25 @@ partial class Composition " Composition ..> Dependency : IDependency Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RootBindScenario.IDependency), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RootBindScenario.IDependency), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -158,7 +158,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.RootBindScenario.IDependency Resolve(Composition composition) { diff --git a/readme/scope.md b/readme/scope.md index 872743681..9463e70e4 100644 --- a/readme/scope.md +++ b/readme/scope.md @@ -128,42 +128,42 @@ classDiagram ```c# partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private readonly global::System.IDisposable[] _disposablesM03D24di; - private int _disposeIndexM03D24di; - private Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency _scopedM03D24di36_Dependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private readonly global::System.IDisposable[] _disposablesM03D26di; + private int _disposeIndexM03D26di; + private Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency _scopedM03D26di36_Dependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); - _disposablesM03D24di = new global::System.IDisposable[1]; + _rootM03D26di = this; + _lockM03D26di = new object(); + _disposablesM03D26di = new global::System.IDisposable[1]; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; - _disposablesM03D24di = new global::System.IDisposable[1]; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; + _disposablesM03D26di = new global::System.IDisposable[1]; } public Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService SessionRoot { get { - if (ReferenceEquals(_scopedM03D24di36_Dependency, null)) + if (ReferenceEquals(_scopedM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_scopedM03D24di36_Dependency, null)) + if (ReferenceEquals(_scopedM03D26di36_Dependency, null)) { - _scopedM03D24di36_Dependency = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency(); - _disposablesM03D24di[_disposeIndexM03D24di++] = _scopedM03D24di36_Dependency; + _scopedM03D26di36_Dependency = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency(); + _disposablesM03D26di[_disposeIndexM03D26di++] = _scopedM03D26di36_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Service(_scopedM03D24di36_Dependency); + return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Service(_scopedM03D26di36_Dependency); } } @@ -171,35 +171,35 @@ partial class Composition: global::System.IDisposable { get { - var perResolveM03D24di42_Func = default(System.Func); - perResolveM03D24di42_Func = new global::System.Func( + var perResolveM03D26di42_Func = default(System.Func); + perResolveM03D26di42_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - Pure.DI.UsageTests.Lifetimes.ScopeScenario.Composition transientM03D24di2_Composition = this; - var factory_M03D24di1 = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Session(transientM03D24di2_Composition); - return factory_M03D24di1; + Pure.DI.UsageTests.Lifetimes.ScopeScenario.Composition transientM03D26di2_Composition = this; + var factory_M03D26di1 = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Session(transientM03D26di2_Composition); + return factory_M03D26di1; }); - return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program(perResolveM03D24di42_Func); + return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program(perResolveM03D26di42_Func); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -211,10 +211,10 @@ partial class Composition: global::System.IDisposable public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -227,11 +227,11 @@ partial class Composition: global::System.IDisposable public void Dispose() { - lock (_lockM03D24di) + lock (_lockM03D26di) { - while (_disposeIndexM03D24di > 0) + while (_disposeIndexM03D26di > 0) { - var disposableInstance = _disposablesM03D24di[--_disposeIndexM03D24di]; + var disposableInstance = _disposablesM03D26di[--_disposeIndexM03D26di]; try { disposableInstance.Dispose(); @@ -242,7 +242,7 @@ partial class Composition: global::System.IDisposable } } - _scopedM03D24di36_Dependency = null; + _scopedM03D26di36_Dependency = null; } } @@ -291,28 +291,28 @@ partial class Composition: global::System.IDisposable " FuncᐸSessionᐳ *-- Session : Session"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -325,7 +325,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService Resolve(Composition composition) { @@ -343,7 +343,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 193ef758f..b1049beef 100644 --- a/readme/service-collection.md +++ b/readme/service-collection.md @@ -47,8 +47,8 @@ service.Dependency.ShouldBe(dependency); ```mermaid classDiagram class Composition { - -IDependency RootM03D24di0001 - -IService RootM03D24di0002 + -IDependency RootM03D26di0001 + -IService RootM03D26di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -69,8 +69,8 @@ classDiagram <> } Service o-- "Singleton" Dependency : "Dependency Key" IDependency - Composition ..> Dependency : IDependency RootM03D24di0001 - Composition ..> Service : IService RootM03D24di0002 + Composition ..> Dependency : IDependency RootM03D26di0001 + Composition ..> Service : IService RootM03D26di0002 ``` @@ -81,76 +81,76 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency _singletonM03D24di36_Dependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency _singletonM03D26di36_Dependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } - public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency RootM03D24di0001 + public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency RootM03D26di0001 { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } } } - return _rootM03D24di._singletonM03D24di36_Dependency; + return _rootM03D26di._singletonM03D26di36_Dependency; } } - public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService RootM03D24di0002 + public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService RootM03D26di0002 { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } } } - return new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Service(_rootM03D24di._singletonM03D24di36_Dependency); + return new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Service(_rootM03D26di._singletonM03D26di36_Dependency); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -162,10 +162,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -180,8 +180,8 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D24di0001\n" + - " -IService RootM03D24di0002\n" + + " -IDependency RootM03D26di0001\n" + + " -IService RootM03D26di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -202,34 +202,34 @@ partial class Composition " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : \"Dependency Key\" IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D24di0001\n" + - " Composition ..> Service : IService RootM03D24di0002"; + " Composition ..> Dependency : IDependency RootM03D26di0001\n" + + " Composition ..> Service : IService RootM03D26di0002"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - OnNewRoot(valResolverM03D24di_0000, "RootM03D24di0001", "Dependency Key", Pure.DI.Lifetime.Singleton); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - OnNewRoot(valResolverM03D24di_0001, "RootM03D24di0002", null, Pure.DI.Lifetime.Transient); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + OnNewRoot(valResolverM03D26di_0000, "RootM03D26di0001", "Dependency Key", Pure.DI.Lifetime.Singleton); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + OnNewRoot(valResolverM03D26di_0001, "RootM03D26di0002", null, Pure.DI.Lifetime.Transient); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -242,7 +242,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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.RootM03D24di0001; + return composition.RootM03D26di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency."); } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService Resolve(Composition composition) { - return composition.RootM03D24di0002; + return composition.RootM03D26di0002; } 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.RootM03D24di0002; + return composition.RootM03D26di0002; } 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 fcf16e12a..45d93fa6b 100644 --- a/readme/service-provider-with-scope.md +++ b/readme/service-provider-with-scope.md @@ -73,8 +73,8 @@ dependency1.ShouldBe(dependency2); ```mermaid classDiagram class Composition { - -IDependency RootM03D24di0001 - -IService RootM03D24di0002 + -IDependency RootM03D26di0001 + -IService RootM03D26di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object GetService(Type type) @@ -96,8 +96,8 @@ classDiagram <> } Service o-- "Singleton" Dependency : IDependency - Composition ..> Dependency : IDependency RootM03D24di0001 - Composition ..> Service : IService RootM03D24di0002 + Composition ..> Dependency : IDependency RootM03D26di0001 + Composition ..> Service : IService RootM03D26di0002 ``` @@ -108,86 +108,86 @@ classDiagram ```c# partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private readonly global::System.IDisposable[] _disposablesM03D24di; - private int _disposeIndexM03D24di; - private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency _singletonM03D24di36_Dependency; - private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service _scopedM03D24di37_Service; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private readonly global::System.IDisposable[] _disposablesM03D26di; + private int _disposeIndexM03D26di; + private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency _singletonM03D26di36_Dependency; + private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service _scopedM03D26di37_Service; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); - _disposablesM03D24di = new global::System.IDisposable[1]; + _rootM03D26di = this; + _lockM03D26di = new object(); + _disposablesM03D26di = new global::System.IDisposable[1]; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; - _disposablesM03D24di = new global::System.IDisposable[1]; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; + _disposablesM03D26di = new global::System.IDisposable[1]; } - public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency RootM03D24di0001 + public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency RootM03D26di0001 { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } } } - return _rootM03D24di._singletonM03D24di36_Dependency; + return _rootM03D26di._singletonM03D26di36_Dependency; } } - public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService RootM03D24di0002 + public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService RootM03D26di0002 { get { - if (ReferenceEquals(_scopedM03D24di37_Service, null)) + if (ReferenceEquals(_scopedM03D26di37_Service, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_scopedM03D24di37_Service, null)) + if (ReferenceEquals(_scopedM03D26di37_Service, null)) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } - _scopedM03D24di37_Service = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service(_rootM03D24di._singletonM03D24di36_Dependency); - _disposablesM03D24di[_disposeIndexM03D24di++] = _scopedM03D24di37_Service; + _scopedM03D26di37_Service = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service(_rootM03D26di._singletonM03D26di36_Dependency); + _disposablesM03D26di[_disposeIndexM03D26di++] = _scopedM03D26di37_Service; } } } - return _scopedM03D24di37_Service; + return _scopedM03D26di37_Service; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -199,10 +199,10 @@ partial class Composition: global::System.IDisposable public object GetRequiredKeyedService(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -215,11 +215,11 @@ partial class Composition: global::System.IDisposable public void Dispose() { - lock (_lockM03D24di) + lock (_lockM03D26di) { - while (_disposeIndexM03D24di > 0) + while (_disposeIndexM03D26di > 0) { - var disposableInstance = _disposablesM03D24di[--_disposeIndexM03D24di]; + var disposableInstance = _disposablesM03D26di[--_disposeIndexM03D26di]; try { disposableInstance.Dispose(); @@ -230,8 +230,8 @@ partial class Composition: global::System.IDisposable } } - _singletonM03D24di36_Dependency = null; - _scopedM03D24di37_Service = null; + _singletonM03D26di36_Dependency = null; + _scopedM03D26di37_Service = null; } } @@ -242,8 +242,8 @@ partial class Composition: global::System.IDisposable return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D24di0001\n" + - " -IService RootM03D24di0002\n" + + " -IDependency RootM03D26di0001\n" + + " -IService RootM03D26di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object GetService(Type type)\n" + @@ -265,32 +265,32 @@ partial class Composition: global::System.IDisposable " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D24di0001\n" + - " Composition ..> Service : IService RootM03D24di0002"; + " Composition ..> Dependency : IDependency RootM03D26di0001\n" + + " Composition ..> Service : IService RootM03D26di0002"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -303,11 +303,11 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D24di0001; + return composition.RootM03D26di0001; } public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -315,17 +315,17 @@ partial class Composition: global::System.IDisposable switch (tag) { case null: - return composition.RootM03D24di0001; + return composition.RootM03D26di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency."); } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService Resolve(Composition composition) { - return composition.RootM03D24di0002; + return composition.RootM03D26di0002; } public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService ResolveByTag(Composition composition, object tag) @@ -333,7 +333,7 @@ partial class Composition: global::System.IDisposable switch (tag) { case null: - return composition.RootM03D24di0002; + return composition.RootM03D26di0002; } 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 21cec03e7..5a1d8a129 100644 --- a/readme/service-provider.md +++ b/readme/service-provider.md @@ -45,8 +45,8 @@ service.Dependency.ShouldBe(dependency); ```mermaid classDiagram class Composition { - -IDependency RootM03D24di0001 - -IService RootM03D24di0002 + -IDependency RootM03D26di0001 + -IService RootM03D26di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object GetService(Type type) @@ -67,8 +67,8 @@ classDiagram <> } Service o-- "Singleton" Dependency : IDependency - Composition ..> Dependency : IDependency RootM03D24di0001 - Composition ..> Service : IService RootM03D24di0002 + Composition ..> Dependency : IDependency RootM03D26di0001 + Composition ..> Service : IService RootM03D26di0002 ``` @@ -79,76 +79,76 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency _singletonM03D24di36_Dependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency _singletonM03D26di36_Dependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } - public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency RootM03D24di0001 + public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency RootM03D26di0001 { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } } } - return _rootM03D24di._singletonM03D24di36_Dependency; + return _rootM03D26di._singletonM03D26di36_Dependency; } } - public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService RootM03D24di0002 + public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService RootM03D26di0002 { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } } } - return new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Service(_rootM03D24di._singletonM03D24di36_Dependency); + return new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Service(_rootM03D26di._singletonM03D26di36_Dependency); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -160,10 +160,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -178,8 +178,8 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D24di0001\n" + - " -IService RootM03D24di0002\n" + + " -IDependency RootM03D26di0001\n" + + " -IService RootM03D26di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object GetService(Type type)\n" + @@ -200,32 +200,32 @@ partial class Composition " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D24di0001\n" + - " Composition ..> Service : IService RootM03D24di0002"; + " Composition ..> Dependency : IDependency RootM03D26di0001\n" + + " Composition ..> Service : IService RootM03D26di0002"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -238,11 +238,11 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D24di0001; + return composition.RootM03D26di0001; } 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.RootM03D24di0001; + return composition.RootM03D26di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency."); } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService Resolve(Composition composition) { - return composition.RootM03D24di0002; + return composition.RootM03D26di0002; } 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.RootM03D24di0002; + return composition.RootM03D26di0002; } 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 f13ef40d4..0b9722256 100644 --- a/readme/simplified-binding.md +++ b/readme/simplified-binding.md @@ -87,24 +87,24 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Service MyService { get { - Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency perBlockM03D24di1_Dependency = new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency(); - return new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Service(perBlockM03D24di1_Dependency, perBlockM03D24di1_Dependency, perBlockM03D24di1_Dependency); + Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency perBlockM03D26di1_Dependency = new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency(); + return new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Service(perBlockM03D26di1_Dependency, perBlockM03D26di1_Dependency, perBlockM03D26di1_Dependency); } } diff --git a/readme/singleton.md b/readme/singleton.md index d19c446a9..f1922d7ba 100644 --- a/readme/singleton.md +++ b/readme/singleton.md @@ -76,57 +76,57 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency _singletonM03D24di36_Dependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency _singletonM03D26di36_Dependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService Root { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di36_Dependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di36_Dependency, null)) { - _singletonM03D24di36_Dependency = new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency(); - _rootM03D24di._singletonM03D24di36_Dependency = _singletonM03D24di36_Dependency; + _singletonM03D26di36_Dependency = new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency(); + _rootM03D26di._singletonM03D26di36_Dependency = _singletonM03D26di36_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Service(_singletonM03D24di36_Dependency, _rootM03D24di._singletonM03D24di36_Dependency); + return new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Service(_singletonM03D26di36_Dependency, _rootM03D26di._singletonM03D26di36_Dependency); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -138,10 +138,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -181,25 +181,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -212,7 +212,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 6c69e6e5b..cadd296ce 100644 --- a/readme/span-and-readonlyspan.md +++ b/readme/span-and-readonlyspan.md @@ -78,48 +78,48 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.BCL.SpanScenario.IService Root { get { - System.ReadOnlySpan transientM03D24di1_ReadOnlySpan = stackalloc Pure.DI.UsageTests.BCL.SpanScenario.Dependency[3] + System.ReadOnlySpan transientM03D26di1_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(transientM03D24di1_ReadOnlySpan); + return new Pure.DI.UsageTests.BCL.SpanScenario.Service(transientM03D26di1_ReadOnlySpan); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -131,10 +131,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -173,25 +173,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.SpanScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.SpanScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -204,7 +204,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 c4b454ccb..725062d7b 100644 --- a/readme/tag-attribute.md +++ b/readme/tag-attribute.md @@ -86,16 +86,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Basics.TagAttributeScenario.IService Root @@ -108,20 +108,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -133,10 +133,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -180,25 +180,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagAttributeScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagAttributeScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -211,7 +211,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 07a04ae9c..c15c8af18 100644 --- a/readme/tag-type.md +++ b/readme/tag-type.md @@ -97,38 +97,38 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency _singletonM03D24di37_XyzDependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency _singletonM03D26di37_XyzDependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.Advanced.TagTypeScenario.IDependency XyzRoot { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di37_XyzDependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di37_XyzDependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di37_XyzDependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di37_XyzDependency, null)) { - _singletonM03D24di37_XyzDependency = new Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency(); - _rootM03D24di._singletonM03D24di37_XyzDependency = _singletonM03D24di37_XyzDependency; + _singletonM03D26di37_XyzDependency = new Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency(); + _rootM03D26di._singletonM03D26di37_XyzDependency = _singletonM03D26di37_XyzDependency; } } } - return _rootM03D24di._singletonM03D24di37_XyzDependency; + return _rootM03D26di._singletonM03D26di37_XyzDependency; } } @@ -136,37 +136,37 @@ partial class Composition { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di37_XyzDependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di37_XyzDependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di37_XyzDependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di37_XyzDependency, null)) { - _singletonM03D24di37_XyzDependency = new Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency(); - _rootM03D24di._singletonM03D24di37_XyzDependency = _singletonM03D24di37_XyzDependency; + _singletonM03D26di37_XyzDependency = new Pure.DI.UsageTests.Advanced.TagTypeScenario.XyzDependency(); + _rootM03D26di._singletonM03D26di37_XyzDependency = _singletonM03D26di37_XyzDependency; } } } - return new Pure.DI.UsageTests.Advanced.TagTypeScenario.Service(new Pure.DI.UsageTests.Advanced.TagTypeScenario.AbcDependency(), _rootM03D24di._singletonM03D24di37_XyzDependency, new Pure.DI.UsageTests.Advanced.TagTypeScenario.AbcDependency()); + return new Pure.DI.UsageTests.Advanced.TagTypeScenario.Service(new Pure.DI.UsageTests.Advanced.TagTypeScenario.AbcDependency(), _rootM03D26di._singletonM03D26di37_XyzDependency, new Pure.DI.UsageTests.Advanced.TagTypeScenario.AbcDependency()); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -178,10 +178,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -229,28 +229,28 @@ partial class Composition " Composition ..> XyzDependency : IDependency XyzRoot"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagTypeScenario.IDependency), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagTypeScenario.IService), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagTypeScenario.IDependency), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagTypeScenario.IService), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -263,7 +263,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Advanced.TagTypeScenario.IDependency Resolve(Composition composition) { @@ -280,7 +280,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 48c40cd9f..fee41671b 100644 --- a/readme/tag-unique.md +++ b/readme/tag-unique.md @@ -78,16 +78,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Advanced.TagUniqueScenario.IService Root @@ -95,32 +95,32 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D24di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D26di1_IEnumerable() { yield return new Pure.DI.UsageTests.Advanced.TagUniqueScenario.AbcDependency(); yield return new Pure.DI.UsageTests.Advanced.TagUniqueScenario.XyzDependency(); } - System.Collections.Generic.IEnumerable> perBlockM03D24di1_IEnumerable = LocalperBlockM03D24di1_IEnumerable(); - return new Pure.DI.UsageTests.Advanced.TagUniqueScenario.Service(perBlockM03D24di1_IEnumerable); + System.Collections.Generic.IEnumerable> perBlockM03D26di1_IEnumerable = LocalperBlockM03D26di1_IEnumerable(); + return new Pure.DI.UsageTests.Advanced.TagUniqueScenario.Service(perBlockM03D26di1_IEnumerable); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -132,10 +132,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -181,25 +181,25 @@ partial class Composition " ServiceᐸStringᐳ o-- \"PerBlock\" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di>.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di>.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagUniqueScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Advanced.TagUniqueScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -212,7 +212,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D26di_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 5e67079ef..2bb5b5ccf 100644 --- a/readme/tags.md +++ b/readme/tags.md @@ -101,38 +101,38 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; - private Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency _singletonM03D24di37_XyzDependency; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; + private Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency _singletonM03D26di37_XyzDependency; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.Basics.TagsScenario.IDependency XyzRoot { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di37_XyzDependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di37_XyzDependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di37_XyzDependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di37_XyzDependency, null)) { - _singletonM03D24di37_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); - _rootM03D24di._singletonM03D24di37_XyzDependency = _singletonM03D24di37_XyzDependency; + _singletonM03D26di37_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); + _rootM03D26di._singletonM03D26di37_XyzDependency = _singletonM03D26di37_XyzDependency; } } } - return _rootM03D24di._singletonM03D24di37_XyzDependency; + return _rootM03D26di._singletonM03D26di37_XyzDependency; } } @@ -140,37 +140,37 @@ partial class Composition { get { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di37_XyzDependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di37_XyzDependency, null)) { - lock (_lockM03D24di) + lock (_lockM03D26di) { - if (ReferenceEquals(_rootM03D24di._singletonM03D24di37_XyzDependency, null)) + if (ReferenceEquals(_rootM03D26di._singletonM03D26di37_XyzDependency, null)) { - _singletonM03D24di37_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); - _rootM03D24di._singletonM03D24di37_XyzDependency = _singletonM03D24di37_XyzDependency; + _singletonM03D26di37_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); + _rootM03D26di._singletonM03D26di37_XyzDependency = _singletonM03D26di37_XyzDependency; } } } - return new Pure.DI.UsageTests.Basics.TagsScenario.Service(new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency(), _rootM03D24di._singletonM03D24di37_XyzDependency, new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency()); + return new Pure.DI.UsageTests.Basics.TagsScenario.Service(new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency(), _rootM03D26di._singletonM03D26di37_XyzDependency, new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency()); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -182,10 +182,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -233,28 +233,28 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - var valResolverM03D24di_0001 = new ResolverM03D24di_0001(); - ResolverM03D24di.Value = valResolverM03D24di_0001; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + var valResolverM03D26di_0001 = new ResolverM03D26di_0001(); + ResolverM03D26di.Value = valResolverM03D26di_0001; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IDependency), valResolverM03D24di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IService), valResolverM03D24di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IDependency), valResolverM03D26di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IService), valResolverM03D26di_0001) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -267,7 +267,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TagsScenario.IDependency Resolve(Composition composition) { @@ -285,7 +285,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 0c34c862a..1c1aad242 100644 --- a/readme/task.md +++ b/readme/task.md @@ -107,49 +107,49 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.BCL.TaskScenario.IService GetRoot(System.Threading.CancellationToken cancellationToken) { - var perResolveM03D24di41_Func = default(System.Func); - System.Threading.Tasks.TaskScheduler transientM03D24di5_TaskScheduler = TaskScheduler.Current; - System.Threading.Tasks.TaskContinuationOptions transientM03D24di4_TaskContinuationOptions = global::System.Threading.Tasks.TaskContinuationOptions.None; - System.Threading.Tasks.TaskCreationOptions transientM03D24di3_TaskCreationOptions = global::System.Threading.Tasks.TaskCreationOptions.None; - System.Threading.Tasks.TaskFactory perBlockM03D24di2_TaskFactory; + var perResolveM03D26di41_Func = default(System.Func); + System.Threading.Tasks.TaskScheduler transientM03D26di5_TaskScheduler = TaskScheduler.Current; + System.Threading.Tasks.TaskContinuationOptions transientM03D26di4_TaskContinuationOptions = global::System.Threading.Tasks.TaskContinuationOptions.None; + System.Threading.Tasks.TaskCreationOptions transientM03D26di3_TaskCreationOptions = global::System.Threading.Tasks.TaskCreationOptions.None; + System.Threading.Tasks.TaskFactory perBlockM03D26di2_TaskFactory; { - var cancellationToken_M03D24di1 = cancellationToken; - var taskCreationOptions_M03D24di2 = transientM03D24di3_TaskCreationOptions; - var taskContinuationOptions_M03D24di3 = transientM03D24di4_TaskContinuationOptions; - var taskScheduler_M03D24di4 = transientM03D24di5_TaskScheduler; - perBlockM03D24di2_TaskFactory = new global::System.Threading.Tasks.TaskFactory(cancellationToken_M03D24di1, taskCreationOptions_M03D24di2, taskContinuationOptions_M03D24di3, taskScheduler_M03D24di4); + var cancellationToken_M03D26di1 = cancellationToken; + var taskCreationOptions_M03D26di2 = transientM03D26di3_TaskCreationOptions; + var taskContinuationOptions_M03D26di3 = transientM03D26di4_TaskContinuationOptions; + var taskScheduler_M03D26di4 = transientM03D26di5_TaskScheduler; + perBlockM03D26di2_TaskFactory = new global::System.Threading.Tasks.TaskFactory(cancellationToken_M03D26di1, taskCreationOptions_M03D26di2, taskContinuationOptions_M03D26di3, taskScheduler_M03D26di4); } - perResolveM03D24di41_Func = new global::System.Func( + perResolveM03D26di41_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D24di5 = new Pure.DI.UsageTests.BCL.TaskScenario.Dependency(); - return factory_M03D24di5; + var factory_M03D26di5 = new Pure.DI.UsageTests.BCL.TaskScenario.Dependency(); + return factory_M03D26di5; }); - System.Threading.Tasks.Task transientM03D24di1_Task; + System.Threading.Tasks.Task transientM03D26di1_Task; { - var factory_M03D24di6 = perResolveM03D24di41_Func; - var taskFactory_M03D24di7 = perBlockM03D24di2_TaskFactory; - transientM03D24di1_Task = taskFactory_M03D24di7.StartNew(factory_M03D24di6); + var factory_M03D26di6 = perResolveM03D26di41_Func; + var taskFactory_M03D26di7 = perBlockM03D26di2_TaskFactory; + transientM03D26di1_Task = taskFactory_M03D26di7.StartNew(factory_M03D26di6); } - return new Pure.DI.UsageTests.BCL.TaskScenario.Service(transientM03D24di1_Task); + return new Pure.DI.UsageTests.BCL.TaskScenario.Service(transientM03D26di1_Task); } public override string ToString() diff --git a/readme/threadsafe-hint.md b/readme/threadsafe-hint.md index 2bf1b516b..f1c59c610 100644 --- a/readme/threadsafe-hint.md +++ b/readme/threadsafe-hint.md @@ -65,16 +65,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService Root @@ -87,20 +87,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -112,10 +112,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -154,25 +154,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -185,7 +185,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 efe7abd25..23cf9c887 100644 --- a/readme/tostring-hint.md +++ b/readme/tostring-hint.md @@ -63,16 +63,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Hints.ToStringHintScenario.IService MyService @@ -85,20 +85,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -110,10 +110,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -152,25 +152,25 @@ partial class Composition " Composition ..> Service : IService MyService"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ToStringHintScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ToStringHintScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -183,7 +183,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 35f26a15e..0fdde2caf 100644 --- a/readme/tracking-disposable-instances-in-delegates.md +++ b/readme/tracking-disposable-instances-in-delegates.md @@ -101,63 +101,63 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; - private readonly object _lockM03D24di; + private readonly Composition _rootM03D26di; + private readonly object _lockM03D26di; public Composition() { - _rootM03D24di = this; - _lockM03D24di = new object(); + _rootM03D26di = this; + _lockM03D26di = new object(); } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; - _lockM03D24di = _rootM03D24di._lockM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; + _lockM03D26di = _rootM03D26di._lockM03D26di; } public Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service Root { get { - var perResolveM03D24di43_Func = default(System.Func>); - perResolveM03D24di43_Func = new global::System.Func>( + var perResolveM03D26di43_Func = default(System.Func>); + perResolveM03D26di43_Func = new global::System.Func>( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var accumulatorM03D24di42 = new Pure.DI.Owned(); - Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Dependency transientM03D24di3_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Dependency(); - accumulatorM03D24di42.Add(transientM03D24di3_Dependency); - Pure.DI.Owned perBlockM03D24di1_Owned; + var accumulatorM03D26di42 = new Pure.DI.Owned(); + Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Dependency transientM03D26di3_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Dependency(); + accumulatorM03D26di42.Add(transientM03D26di3_Dependency); + Pure.DI.Owned perBlockM03D26di1_Owned; { - var owned_M03D24di2 = accumulatorM03D24di42; - var value_M03D24di3 = transientM03D24di3_Dependency; - perBlockM03D24di1_Owned = new Owned(value_M03D24di3, owned_M03D24di2); + var owned_M03D26di2 = accumulatorM03D26di42; + var value_M03D26di3 = transientM03D26di3_Dependency; + perBlockM03D26di1_Owned = new Owned(value_M03D26di3, owned_M03D26di2); } - accumulatorM03D24di42.Add(perBlockM03D24di1_Owned); - var factory_M03D24di1 = perBlockM03D24di1_Owned; - return factory_M03D24di1; + accumulatorM03D26di42.Add(perBlockM03D26di1_Owned); + var factory_M03D26di1 = perBlockM03D26di1_Owned; + return factory_M03D26di1; }); - return new Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service(perResolveM03D24di43_Func); + return new Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service(perResolveM03D26di43_Func); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -169,10 +169,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -214,25 +214,25 @@ partial class Composition " OwnedᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TrackingDisposableInDelegatesScenario.Service), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -245,7 +245,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 64f1cea32..4518140e3 100644 --- a/readme/tracking-disposable-instances-per-a-composition-root.md +++ b/readme/tracking-disposable-instances-per-a-composition-root.md @@ -96,44 +96,44 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.Owned Root { get { - var accumulatorM03D24di39 = new Pure.DI.Owned(); - Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Dependency transientM03D24di3_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Dependency(); - accumulatorM03D24di39.Add(transientM03D24di3_Dependency); - Pure.DI.Owned perBlockM03D24di0_Owned; + var accumulatorM03D26di39 = new Pure.DI.Owned(); + Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Dependency transientM03D26di3_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Dependency(); + accumulatorM03D26di39.Add(transientM03D26di3_Dependency); + Pure.DI.Owned perBlockM03D26di0_Owned; { - var owned_M03D24di1 = accumulatorM03D24di39; - var value_M03D24di2 = new Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Service(transientM03D24di3_Dependency); - perBlockM03D24di0_Owned = new Owned(value_M03D24di2, owned_M03D24di1); + var owned_M03D26di1 = accumulatorM03D26di39; + var value_M03D26di2 = new Pure.DI.UsageTests.Basics.TrackingDisposableScenario.Service(transientM03D26di3_Dependency); + perBlockM03D26di0_Owned = new Owned(value_M03D26di2, owned_M03D26di1); } - accumulatorM03D24di39.Add(perBlockM03D24di0_Owned); - return perBlockM03D24di0_Owned; + accumulatorM03D26di39.Add(perBlockM03D26di0_Owned); + return perBlockM03D26di0_Owned; } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) @@ -179,9 +179,9 @@ partial class Composition } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { diff --git a/readme/transient.md b/readme/transient.md index 7221dcce0..e363f10ed 100644 --- a/readme/transient.md +++ b/readme/transient.md @@ -76,16 +76,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Lifetimes.TransientScenario.IService Root @@ -98,20 +98,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -123,10 +123,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -166,25 +166,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.TransientScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.TransientScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -197,7 +197,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 101ab260a..3f93175b5 100644 --- a/readme/tuple.md +++ b/readme/tuple.md @@ -74,43 +74,43 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.BCL.TupleScenario.IService Root { get { - Pure.DI.UsageTests.BCL.TupleScenario.Point transientM03D24di2_Point = new Point(7, 9); - return new Pure.DI.UsageTests.BCL.TupleScenario.Service((transientM03D24di2_Point, new Pure.DI.UsageTests.BCL.TupleScenario.Dependency())); + Pure.DI.UsageTests.BCL.TupleScenario.Point transientM03D26di2_Point = new Point(7, 9); + return new Pure.DI.UsageTests.BCL.TupleScenario.Service((transientM03D26di2_Point, new Pure.DI.UsageTests.BCL.TupleScenario.Dependency())); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -122,10 +122,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -170,25 +170,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.TupleScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.TupleScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -201,7 +201,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 556e99af3..1d2911971 100644 --- a/readme/type-attribute.md +++ b/readme/type-attribute.md @@ -77,16 +77,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService Root @@ -99,20 +99,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -124,10 +124,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -166,25 +166,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -197,7 +197,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 7c78ac1eb..3dbc4cb36 100644 --- a/readme/valuetask.md +++ b/readme/valuetask.md @@ -76,47 +76,47 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.BCL.ValueTaskScenario.IService Root { get { - System.Threading.Tasks.ValueTask transientM03D24di1_ValueTask; + System.Threading.Tasks.ValueTask transientM03D26di1_ValueTask; { - var value_M03D24di1 = new Pure.DI.UsageTests.BCL.ValueTaskScenario.Dependency(); - transientM03D24di1_ValueTask = new global::System.Threading.Tasks.ValueTask(value_M03D24di1); + var value_M03D26di1 = new Pure.DI.UsageTests.BCL.ValueTaskScenario.Dependency(); + transientM03D26di1_ValueTask = new global::System.Threading.Tasks.ValueTask(value_M03D26di1); } - return new Pure.DI.UsageTests.BCL.ValueTaskScenario.Service(transientM03D24di1_ValueTask); + return new Pure.DI.UsageTests.BCL.ValueTaskScenario.Service(transientM03D26di1_ValueTask); } } public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -128,10 +128,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -172,25 +172,25 @@ partial class Composition " ValueTaskᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ValueTaskScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ValueTaskScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -203,7 +203,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_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 5297ceb81..552867bb6 100644 --- a/readme/weak-reference.md +++ b/readme/weak-reference.md @@ -67,16 +67,16 @@ classDiagram ```c# partial class Composition { - private readonly Composition _rootM03D24di; + private readonly Composition _rootM03D26di; public Composition() { - _rootM03D24di = this; + _rootM03D26di = this; } internal Composition(Composition baseComposition) { - _rootM03D24di = baseComposition._rootM03D24di; + _rootM03D26di = baseComposition._rootM03D26di; } public Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService Root @@ -89,20 +89,20 @@ partial class Composition public T Resolve() { - return ResolverM03D24di.Value.Resolve(this); + return ResolverM03D26di.Value.Resolve(this); } public T Resolve(object? tag) { - return ResolverM03D24di.Value.ResolveByTag(this, tag); + return ResolverM03D26di.Value.ResolveByTag(this, tag); } public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -114,10 +114,10 @@ partial class Composition public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D24di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D24di; + var index = (int)(_bucketSizeM03D26di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D26di; do { - ref var pair = ref _bucketsM03D24di[index]; + ref var pair = ref _bucketsM03D26di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -160,25 +160,25 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D24di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D24di; + private readonly static int _bucketSizeM03D26di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D26di; static Composition() { - var valResolverM03D24di_0000 = new ResolverM03D24di_0000(); - ResolverM03D24di.Value = valResolverM03D24di_0000; - _bucketsM03D24di = global::Pure.DI.Buckets>.Create( + var valResolverM03D26di_0000 = new ResolverM03D26di_0000(); + ResolverM03D26di.Value = valResolverM03D26di_0000; + _bucketsM03D26di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D24di, + out _bucketSizeM03D26di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService), valResolverM03D24di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService), valResolverM03D26di_0000) }); } - private sealed class ResolverM03D24di: global::Pure.DI.IResolver + private sealed class ResolverM03D26di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D24di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D26di(); public T Resolve(Composition composite) { @@ -191,7 +191,7 @@ partial class Composition } } - private sealed class ResolverM03D24di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D26di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService Resolve(Composition composition) {