From 857ba2c7ef52c69bd812f630e7990a6c04124b11 Mon Sep 17 00:00:00 2001 From: Nikolay Pianikov Date: Fri, 15 Mar 2024 09:56:11 +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/advanced-interception.md | 42 +++--- readme/arguments.md | 60 ++++---- 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 | 68 ++++----- readme/complex-generics.md | 42 +++--- readme/composition-root-kinds.md | 50 +++---- readme/composition-roots.md | 66 ++++----- readme/constructor-ordinal-attribute.md | 54 +++---- readme/custom-attributes.md | 60 ++++---- 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.md | 58 ++++---- ...eric-composition-roots-with-constraints.md | 120 +++++++-------- readme/generic-composition-roots.md | 106 +++++++------- readme/generics.md | 42 +++--- readme/injection.md | 50 +++---- readme/injections-of-abstractions.md | 6 +- readme/instance-initialization.md | 62 ++++---- readme/interception.md | 42 +++--- readme/keyed-service-provider.md | 108 +++++++------- readme/lazy.md | 64 ++++---- readme/manually-started-tasks.md | 30 ++-- readme/member-ordinal-attribute.md | 74 +++++----- readme/method-injection.md | 48 +++--- readme/multi-contract-bindings.md | 42 +++--- readme/oncannotresolve-hint.md | 46 +++--- readme/ondependencyinjection-hint.md | 42 +++--- 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 | 54 +++---- readme/resolve-hint.md | 6 +- readme/resolve-methods.md | 80 +++++----- readme/root-arguments.md | 6 +- readme/scope.md | 98 ++++++------- readme/service-collection.md | 114 +++++++-------- readme/service-provider-with-scope.md | 138 +++++++++--------- readme/service-provider.md | 112 +++++++------- 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 | 66 ++++----- readme/tags.md | 82 +++++------ readme/task.md | 48 +++--- readme/threadsafe-hint.md | 42 +++--- readme/tostring-hint.md | 42 +++--- readme/tracking-disposable-instances.md | 52 +++---- readme/transient.md | 42 +++--- readme/tuple.md | 46 +++--- readme/type-attribute.md | 42 +++--- readme/valuetask.md | 50 +++---- readme/weak-reference.md | 42 +++--- ...CompositionRootsWithConstraintsScenario.cs | 19 ++- 75 files changed, 2121 insertions(+), 2118 deletions(-) diff --git a/readme/ArrayDetails.md b/readme/ArrayDetails.md index c8b827fef..8f2ed0864 100644 --- a/readme/ArrayDetails.md +++ b/readme/ArrayDetails.md @@ -119,14 +119,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Array { - private readonly Array _rootM03D14di; + private readonly Array _rootM03D15di; /// /// This constructor creates a new instance of . /// public Array() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -135,7 +135,7 @@ partial class Array /// Base composition. internal Array(Array baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -169,7 +169,7 @@ partial class Array #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -183,7 +183,7 @@ partial class Array #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -196,10 +196,10 @@ partial class Array #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -220,10 +220,10 @@ partial class Array #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -316,26 +316,26 @@ partial class Array " Array ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Array() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Array composite) { @@ -348,7 +348,7 @@ partial class Array } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 7650f48c2..84bbcb492 100644 --- a/readme/EnumDetails.md +++ b/readme/EnumDetails.md @@ -119,14 +119,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Enum { - private readonly Enum _rootM03D14di; + private readonly Enum _rootM03D15di; /// /// This constructor creates a new instance of . /// public Enum() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -135,7 +135,7 @@ partial class Enum /// Base composition. internal Enum(Enum baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -155,15 +155,15 @@ partial class Enum public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable LocalperBlockM03D14di10_IEnumerable() + System.Collections.Generic.IEnumerable LocalperBlockM03D15di10_IEnumerable() { yield return new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); yield return new Pure.DI.Benchmarks.Model.Service3v2(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); yield return new Pure.DI.Benchmarks.Model.Service3v3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); yield return new Pure.DI.Benchmarks.Model.Service3v4(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); } - var perBlockM03D14di10_IEnumerable = LocalperBlockM03D14di10_IEnumerable(); - return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D14di10_IEnumerable)), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D14di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D14di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D14di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()), new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); + var perBlockM03D15di10_IEnumerable = LocalperBlockM03D15di10_IEnumerable(); + return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D15di10_IEnumerable)), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D15di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D15di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D15di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()), new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); } #endregion @@ -178,7 +178,7 @@ partial class Enum #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -192,7 +192,7 @@ partial class Enum #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -205,10 +205,10 @@ partial class Enum #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -229,10 +229,10 @@ partial class Enum #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -325,26 +325,26 @@ partial class Enum " Enum ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Enum() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Enum composite) { @@ -357,7 +357,7 @@ partial class Enum } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 d823cc904..f1b74922e 100644 --- a/readme/FuncDetails.md +++ b/readme/FuncDetails.md @@ -98,14 +98,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Func { - private readonly Func _rootM03D14di; + private readonly Func _rootM03D15di; /// /// This constructor creates a new instance of . /// public Func() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -114,7 +114,7 @@ partial class Func /// Base composition. internal Func(Func baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -133,14 +133,14 @@ partial class Func #endif public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { - System.Func perBlockM03D14di10_Func = new Func( + System.Func perBlockM03D15di10_Func = new Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var value_M03D14di1 = new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); - return value_M03D14di1; + var value_M03D15di1 = new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); + return value_M03D15di1; }); - return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D14di10_Func)), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D14di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D14di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D14di10_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(perBlockM03D15di10_Func)), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D15di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D15di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D15di10_Func), new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()), new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); } #endregion @@ -155,7 +155,7 @@ partial class Func #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -169,7 +169,7 @@ partial class Func #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -182,10 +182,10 @@ partial class Func #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -206,10 +206,10 @@ partial class Func #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -281,26 +281,26 @@ partial class Func " FuncᐸIService3ᐳ *-- Service3 : IService3"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Func() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Func composite) { @@ -313,7 +313,7 @@ partial class Func } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 2de4ff167..414af406f 100644 --- a/readme/SingletonDetails.md +++ b/readme/SingletonDetails.md @@ -100,16 +100,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Singleton { - private readonly Singleton _rootM03D14di; - private Pure.DI.Benchmarks.Model.Service1 _scopedM03D14di35_Service1; - private Pure.DI.Benchmarks.Model.Service4 _scopedM03D14di38_Service4; + private readonly Singleton _rootM03D15di; + private Pure.DI.Benchmarks.Model.Service1 _scopedM03D15di35_Service1; + private Pure.DI.Benchmarks.Model.Service4 _scopedM03D15di38_Service4; /// /// This constructor creates a new instance of . /// public Singleton() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -118,7 +118,7 @@ partial class Singleton /// Base composition. internal Singleton(Singleton baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -137,15 +137,15 @@ partial class Singleton #endif public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { - if (ReferenceEquals(_scopedM03D14di38_Service4, null)) + if (ReferenceEquals(_scopedM03D15di38_Service4, null)) { - _scopedM03D14di38_Service4 = new Pure.DI.Benchmarks.Model.Service4(); + _scopedM03D15di38_Service4 = new Pure.DI.Benchmarks.Model.Service4(); } - if (ReferenceEquals(_scopedM03D14di35_Service1, null)) + if (ReferenceEquals(_scopedM03D15di35_Service1, null)) { - _scopedM03D14di35_Service1 = new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4))); + _scopedM03D15di35_Service1 = new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4))); } - return new Pure.DI.Benchmarks.Model.CompositionRoot(_scopedM03D14di35_Service1, new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4)), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D14di38_Service4, _scopedM03D14di38_Service4), _scopedM03D14di38_Service4, _scopedM03D14di38_Service4); + return new Pure.DI.Benchmarks.Model.CompositionRoot(_scopedM03D15di35_Service1, new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4)), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D15di38_Service4, _scopedM03D15di38_Service4), _scopedM03D15di38_Service4, _scopedM03D15di38_Service4); } #endregion @@ -160,7 +160,7 @@ partial class Singleton #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -174,7 +174,7 @@ partial class Singleton #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -187,10 +187,10 @@ partial class Singleton #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -211,10 +211,10 @@ partial class Singleton #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -288,26 +288,26 @@ partial class Singleton " Singleton ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Singleton() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Singleton composite) { @@ -320,7 +320,7 @@ partial class Singleton } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 3a7dff997..8856dbe7c 100644 --- a/readme/TransientDetails.md +++ b/readme/TransientDetails.md @@ -100,14 +100,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Transient { - private readonly Transient _rootM03D14di; + private readonly Transient _rootM03D15di; /// /// This constructor creates a new instance of . /// public Transient() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -116,7 +116,7 @@ partial class Transient /// Base composition. internal Transient(Transient baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -150,7 +150,7 @@ partial class Transient #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -164,7 +164,7 @@ partial class Transient #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -177,10 +177,10 @@ partial class Transient #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -201,10 +201,10 @@ partial class Transient #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -278,26 +278,26 @@ partial class Transient " Transient ..> CompositionRoot : CompositionRoot PureDIByCR()"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Transient() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Transient composite) { @@ -310,7 +310,7 @@ partial class Transient } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 3c184f73e..4e12d9a1e 100644 --- a/readme/a-few-partial-classes.md +++ b/readme/a-few-partial-classes.md @@ -110,14 +110,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -126,7 +126,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -163,7 +163,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -177,7 +177,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -190,10 +190,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -214,10 +214,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -260,26 +260,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.SeveralPartialClassesScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.SeveralPartialClassesScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -292,7 +292,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.SeveralPartialClassesScenario.IService Resolve(Composition composition) { diff --git a/readme/advanced-interception.md b/readme/advanced-interception.md index ddde52d59..7236e8be8 100644 --- a/readme/advanced-interception.md +++ b/readme/advanced-interception.md @@ -178,14 +178,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -194,7 +194,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -231,7 +231,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -245,7 +245,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -258,10 +258,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -282,10 +282,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -330,26 +330,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -362,7 +362,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 713874656..595ee3105 100644 --- a/readme/arguments.md +++ b/readme/arguments.md @@ -111,7 +111,7 @@ classDiagram /// /// This shows how to get an instance of type using the composition root : /// -/// var composition = new Composition(_argM03D14di_id, _argM03D14di_serviceName); +/// var composition = new Composition(_argM03D15di_id, _argM03D15di_serviceName); /// var instance = composition.Root; /// /// @@ -123,9 +123,9 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly int _argM03D14di_id; - private readonly string _argM03D14di_serviceName; + private readonly Composition _rootM03D15di; + private readonly int _argM03D15di_id; + private readonly string _argM03D15di_serviceName; /// /// This parameterized constructor creates a new instance of with arguments. @@ -139,14 +139,14 @@ partial class Composition /// public Composition(int id, string serviceName) { - _rootM03D14di = this; + _rootM03D15di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D14di_id = id; - _argM03D14di_serviceName = serviceName; + _argM03D15di_id = id; + _argM03D15di_serviceName = serviceName; } /// @@ -155,9 +155,9 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _argM03D14di_id = baseComposition._argM03D14di_id; - _argM03D14di_serviceName = baseComposition._argM03D14di_serviceName; + _rootM03D15di = baseComposition._rootM03D15di; + _argM03D15di_id = baseComposition._argM03D15di_id; + _argM03D15di_serviceName = baseComposition._argM03D15di_serviceName; } #region Composition Roots @@ -167,7 +167,7 @@ partial class Composition /// /// This shows how to get an instance of type : /// - /// var composition = new Composition(_argM03D14di_id, _argM03D14di_serviceName); + /// var composition = new Composition(_argM03D15di_id, _argM03D15di_serviceName); /// var instance = composition.Root; /// /// @@ -178,7 +178,7 @@ partial class Composition #endif get { - return new Pure.DI.UsageTests.Basics.ArgumentsScenario.Service(_argM03D14di_serviceName, new Pure.DI.UsageTests.Basics.ArgumentsScenario.Dependency(_argM03D14di_id)); + return new Pure.DI.UsageTests.Basics.ArgumentsScenario.Service(_argM03D15di_serviceName, new Pure.DI.UsageTests.Basics.ArgumentsScenario.Dependency(_argM03D15di_id)); } } #endregion @@ -194,7 +194,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -208,7 +208,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -221,10 +221,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -245,10 +245,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -295,26 +295,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ArgumentsScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ArgumentsScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -327,7 +327,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 cf102f080..995631843 100644 --- a/readme/array.md +++ b/readme/array.md @@ -135,14 +135,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -151,7 +151,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -188,7 +188,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -202,7 +202,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -215,10 +215,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -239,10 +239,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -292,26 +292,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ArrayScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ArrayScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -324,7 +324,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 72b49488d..967931d17 100644 --- a/readme/async-enumerable.md +++ b/readme/async-enumerable.md @@ -118,14 +118,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -134,7 +134,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -156,13 +156,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - async System.Collections.Generic.IAsyncEnumerable LocaltransientM03D14di1_IAsyncEnumerable() + async System.Collections.Generic.IAsyncEnumerable LocaltransientM03D15di1_IAsyncEnumerable() { yield return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.XyzDependency(); } - var transientM03D14di1_IAsyncEnumerable = LocaltransientM03D14di1_IAsyncEnumerable(); - return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.Service(transientM03D14di1_IAsyncEnumerable); + var transientM03D15di1_IAsyncEnumerable = LocaltransientM03D15di1_IAsyncEnumerable(); + return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.Service(transientM03D15di1_IAsyncEnumerable); } } #endregion @@ -178,7 +178,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -192,7 +192,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -205,10 +205,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -229,10 +229,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -282,26 +282,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -314,7 +314,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 d383b4bfc..f904f67b6 100644 --- a/readme/auto-bindings.md +++ b/readme/auto-bindings.md @@ -84,14 +84,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -100,7 +100,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots diff --git a/readme/auto-scoped.md b/readme/auto-scoped.md index 8238473bc..df65c8e08 100644 --- a/readme/auto-scoped.md +++ b/readme/auto-scoped.md @@ -144,17 +144,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency _scopedM03D14di34_Dependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency _scopedM03D15di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -163,8 +163,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -185,17 +185,17 @@ partial class Composition #endif get { - if (ReferenceEquals(_scopedM03D14di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_scopedM03D14di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D15di34_Dependency, null)) { - _scopedM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency(); + _scopedM03D15di34_Dependency = new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency(); } } } - return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service(_scopedM03D14di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service(_scopedM03D15di34_Dependency); } } @@ -216,23 +216,23 @@ partial class Composition #endif get { - var perResolveM03D14di39_Func = default(System.Func); - perResolveM03D14di39_Func = new global::System.Func( + var perResolveM03D15di39_Func = default(System.Func); + perResolveM03D15di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var transientM03D14di2_Composition = this; - Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.IService transientM03D14di1_IService; + var transientM03D15di2_Composition = this; + Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.IService transientM03D15di1_IService; { - var baseComposition_M03D14di2 = transientM03D14di2_Composition; + var baseComposition_M03D15di2 = transientM03D15di2_Composition; // Creates a session - var session_M03D14di3 = new Composition(baseComposition_M03D14di2); - transientM03D14di1_IService = session_M03D14di3.SessionRoot; + var session_M03D15di3 = new Composition(baseComposition_M03D15di2); + transientM03D15di1_IService = session_M03D15di3.SessionRoot; } - var factory_M03D14di1 = transientM03D14di1_IService; - return factory_M03D14di1; + var factory_M03D15di1 = transientM03D15di1_IService; + return factory_M03D15di1; }); - return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program(perResolveM03D14di39_Func); + return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program(perResolveM03D15di39_Func); } } #endregion @@ -248,7 +248,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -262,7 +262,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -275,10 +275,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -299,10 +299,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -352,29 +352,29 @@ partial class Composition " FuncᐸIServiceᐳ *-- IService : IService"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -387,7 +387,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service Resolve(Composition composition) { @@ -405,7 +405,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 de364484c..5df1b4f33 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 RootM03D14di0001 + -IDependency RootM03D15di0001 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -86,7 +86,7 @@ classDiagram <> } Service *-- Dependency : "MyDep" IDependency - Composition ..> Dependency : IDependency RootM03D14di0001 + Composition ..> Dependency : IDependency RootM03D15di0001 Composition ..> Service : IService Root ``` @@ -129,7 +129,7 @@ classDiagram /// var instance = composition.Root; /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. /// /// @@ -137,14 +137,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -153,7 +153,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -184,7 +184,7 @@ partial class Composition /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency RootM03D14di0001 + public Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency RootM03D15di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] @@ -207,7 +207,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -221,7 +221,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -234,10 +234,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -258,10 +258,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -281,7 +281,7 @@ partial class Composition "classDiagram\n" + " class Composition {\n" + " +IService Root\n" + - " -IDependency RootM03D14di0001\n" + + " -IDependency RootM03D15di0001\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -303,37 +303,37 @@ partial class Composition " <>\n" + " }\n" + " Service *-- Dependency : \"MyDep\" IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D14di0001\n" + + " Composition ..> Dependency : IDependency RootM03D15di0001\n" + " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; private static partial void OnNewRoot(global::Pure.DI.IResolver resolver, string name, object? tag, global::Pure.DI.Lifetime lifetime); static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - OnNewRoot(valResolverM03D14di_0000, "Root", null, Pure.DI.Lifetime.Transient); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - OnNewRoot(valResolverM03D14di_0001, "RootM03D14di0001", "MyDep", Pure.DI.Lifetime.Transient); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + OnNewRoot(valResolverM03D15di_0000, "Root", null, Pure.DI.Lifetime.Transient); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + OnNewRoot(valResolverM03D15di_0001, "RootM03D15di0001", "MyDep", Pure.DI.Lifetime.Transient); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CheckForRootScenario.IService), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CheckForRootScenario.IService), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -346,7 +346,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CheckForRootScenario.IService Resolve(Composition composition) { @@ -364,7 +364,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency Resolve(Composition composition) { @@ -376,7 +376,7 @@ partial class Composition switch (tag) { case "MyDep": - return composition.RootM03D14di0001; + return composition.RootM03D15di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency."); } diff --git a/readme/complex-generics.md b/readme/complex-generics.md index 1170f62f6..7ef8544bc 100644 --- a/readme/complex-generics.md +++ b/readme/complex-generics.md @@ -139,14 +139,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -155,7 +155,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -192,7 +192,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -206,7 +206,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -219,10 +219,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -243,10 +243,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -301,26 +301,26 @@ partial class Composition " ServiceᐸStringˏInt32ˏListᐸStringᐳˏDictionaryᐸStringˏInt32ᐳᐳ *-- DependencyStructᐸInt32ᐳ : \"value type\" IDependencyᐸInt32ᐳ"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di>.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di>.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ComplexGenericsScenario.Program), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ComplexGenericsScenario.Program), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -333,7 +333,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.Basics.ComplexGenericsScenario.Program Resolve(Composition composition) { diff --git a/readme/composition-root-kinds.md b/readme/composition-root-kinds.md index 5e41bfdd1..bdd4b2bda 100644 --- a/readme/composition-root-kinds.md +++ b/readme/composition-root-kinds.md @@ -134,14 +134,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -150,7 +150,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -223,7 +223,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -237,7 +237,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -250,10 +250,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -274,10 +274,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -328,29 +328,29 @@ partial class Composition " Composition ..> Dependency : IDependency Dependency"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IService), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IDependency), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IService), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IDependency), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -363,7 +363,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IService Resolve(Composition composition) { @@ -383,7 +383,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IDependency Resolve(Composition composition) { diff --git a/readme/composition-roots.md b/readme/composition-roots.md index 3119eede2..8421ff4d6 100644 --- a/readme/composition-roots.md +++ b/readme/composition-roots.md @@ -71,7 +71,7 @@ classDiagram class Composition { +IService MyRoot +IService SomeOtherService - -IDependency RootM03D14di0003 + -IDependency RootM03D15di0003 + 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 RootM03D14di0003 + Composition ..> Dependency : IDependency RootM03D15di0003 ``` @@ -152,7 +152,7 @@ classDiagram /// var instance = composition.MyRoot; /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. /// /// @@ -160,14 +160,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -176,7 +176,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -229,7 +229,7 @@ partial class Composition /// Specifies to create a private composition root
/// that is only accessible from "Resolve()" methods ///
- public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency RootM03D14di0003 + public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency RootM03D15di0003 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] @@ -252,7 +252,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -266,7 +266,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -279,10 +279,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -303,10 +303,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -327,7 +327,7 @@ partial class Composition " class Composition {\n" + " +IService MyRoot\n" + " +IService SomeOtherService\n" + - " -IDependency RootM03D14di0003\n" + + " -IDependency RootM03D15di0003\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -354,32 +354,32 @@ partial class Composition " Service *-- Dependency : IDependency\n" + " Composition ..> OtherService : IService SomeOtherService\n" + " Composition ..> Service : IService MyRoot\n" + - " Composition ..> Dependency : IDependency RootM03D14di0003"; + " Composition ..> Dependency : IDependency RootM03D15di0003"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -392,7 +392,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService Resolve(Composition composition) { @@ -412,11 +412,11 @@ partial class Composition } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D14di0003; + return composition.RootM03D15di0003; } public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -424,7 +424,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D14di0003; + return composition.RootM03D15di0003; } 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 9d1847f7c..662a3cf34 100644 --- a/readme/constructor-ordinal-attribute.md +++ b/readme/constructor-ordinal-attribute.md @@ -90,7 +90,7 @@ classDiagram /// /// This shows how to get an instance of type using the composition root : /// -/// var composition = new Composition(_argM03D14di_serviceName); +/// var composition = new Composition(_argM03D15di_serviceName); /// var instance = composition.Root; /// /// @@ -102,8 +102,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly string _argM03D14di_serviceName; + private readonly Composition _rootM03D15di; + private readonly string _argM03D15di_serviceName; /// /// This parameterized constructor creates a new instance of with arguments. @@ -111,13 +111,13 @@ partial class Composition /// The composition argument of type . public Composition(string serviceName) { - _rootM03D14di = this; + _rootM03D15di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D14di_serviceName = serviceName; + _argM03D15di_serviceName = serviceName; } /// @@ -126,8 +126,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _argM03D14di_serviceName = baseComposition._argM03D14di_serviceName; + _rootM03D15di = baseComposition._rootM03D15di; + _argM03D15di_serviceName = baseComposition._argM03D15di_serviceName; } #region Composition Roots @@ -137,7 +137,7 @@ partial class Composition /// /// This shows how to get an instance of type : /// - /// var composition = new Composition(_argM03D14di_serviceName); + /// var composition = new Composition(_argM03D15di_serviceName); /// var instance = composition.Root; /// /// @@ -148,7 +148,7 @@ partial class Composition #endif get { - return new Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.Service(_argM03D14di_serviceName); + return new Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.Service(_argM03D15di_serviceName); } } #endregion @@ -164,7 +164,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -178,7 +178,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -191,10 +191,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -215,10 +215,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -255,26 +255,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -287,7 +287,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 5756eca32..56581a09d 100644 --- a/readme/custom-attributes.md +++ b/readme/custom-attributes.md @@ -106,7 +106,7 @@ classDiagram /// /// This shows how to get an instance of type using the composition root : /// -/// var composition = new PersonComposition(_argM03D14di_personId); +/// var composition = new PersonComposition(_argM03D15di_personId); /// var instance = composition.Person; /// /// @@ -118,8 +118,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class PersonComposition { - private readonly PersonComposition _rootM03D14di; - private readonly int _argM03D14di_personId; + private readonly PersonComposition _rootM03D15di; + private readonly int _argM03D15di_personId; /// /// This parameterized constructor creates a new instance of with arguments. @@ -127,8 +127,8 @@ partial class PersonComposition /// The composition argument of type . public PersonComposition(int personId) { - _rootM03D14di = this; - _argM03D14di_personId = personId; + _rootM03D15di = this; + _argM03D15di_personId = personId; } /// @@ -137,8 +137,8 @@ partial class PersonComposition /// Base composition. internal PersonComposition(PersonComposition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _argM03D14di_personId = baseComposition._argM03D14di_personId; + _rootM03D15di = baseComposition._rootM03D15di; + _argM03D15di_personId = baseComposition._argM03D15di_personId; } #region Composition Roots @@ -148,7 +148,7 @@ partial class PersonComposition /// /// This shows how to get an instance of type : /// - /// var composition = new PersonComposition(_argM03D14di_personId); + /// var composition = new PersonComposition(_argM03D15di_personId); /// var instance = composition.Person; /// /// @@ -159,10 +159,10 @@ partial class PersonComposition #endif get { - string transientM03D14di1_String = "Nik"; - var transientM03D14di0_Person = new Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person(transientM03D14di1_String); - transientM03D14di0_Person.Id = _argM03D14di_personId; - return transientM03D14di0_Person; + string transientM03D15di1_String = "Nik"; + var transientM03D15di0_Person = new Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person(transientM03D15di1_String); + transientM03D15di0_Person.Id = _argM03D15di_personId; + return transientM03D15di0_Person; } } #endregion @@ -178,7 +178,7 @@ partial class PersonComposition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -192,7 +192,7 @@ partial class PersonComposition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -205,10 +205,10 @@ partial class PersonComposition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -229,10 +229,10 @@ partial class PersonComposition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -272,26 +272,26 @@ partial class PersonComposition " PersonComposition ..> Person : IPerson Person"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static PersonComposition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(PersonComposition composite) { @@ -304,7 +304,7 @@ partial class PersonComposition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 840708899..e17881d18 100644 --- a/readme/decorator.md +++ b/readme/decorator.md @@ -95,14 +95,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -111,7 +111,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -148,7 +148,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -162,7 +162,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -175,10 +175,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -199,10 +199,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -242,26 +242,26 @@ partial class Composition " Composition ..> GreetingService : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.DecoratorScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.DecoratorScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -274,7 +274,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 a055141cb..ce4377fcf 100644 --- a/readme/default-lifetime.md +++ b/readme/default-lifetime.md @@ -108,18 +108,18 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service _singletonM03D14di35_Service; - private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency _singletonM03D14di34_Dependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service _singletonM03D15di35_Service; + private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency _singletonM03D15di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -128,8 +128,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -150,23 +150,23 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_Service, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di35_Service, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_Service, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di35_Service, null)) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } - _singletonM03D14di35_Service = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service(_singletonM03D14di34_Dependency, _rootM03D14di._singletonM03D14di34_Dependency); - _rootM03D14di._singletonM03D14di35_Service = _singletonM03D14di35_Service; + _singletonM03D15di35_Service = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service(_singletonM03D15di34_Dependency, _rootM03D15di._singletonM03D15di34_Dependency); + _rootM03D15di._singletonM03D15di35_Service = _singletonM03D15di35_Service; } } } - return _rootM03D14di._singletonM03D14di35_Service; + return _rootM03D15di._singletonM03D15di35_Service; } } #endregion @@ -182,7 +182,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -196,7 +196,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -209,10 +209,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -233,10 +233,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -280,26 +280,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -312,7 +312,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 1806c3ebb..27e5c1230 100644 --- a/readme/default-values.md +++ b/readme/default-values.md @@ -101,14 +101,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -117,7 +117,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -157,7 +157,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -171,7 +171,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -184,10 +184,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -208,10 +208,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -255,26 +255,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -287,7 +287,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 6f6c32774..74ba76676 100644 --- a/readme/dependent-compositions.md +++ b/readme/dependent-compositions.md @@ -123,14 +123,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -139,7 +139,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -176,7 +176,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -190,7 +190,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -203,10 +203,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -227,10 +227,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -273,26 +273,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -305,7 +305,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService Resolve(Composition composition) { @@ -377,14 +377,14 @@ partial class Composition [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class OtherComposition { - private readonly OtherComposition _rootM03D14di; + private readonly OtherComposition _rootM03D15di; /// /// This constructor creates a new instance of . /// public OtherComposition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -393,7 +393,7 @@ partial class OtherComposition /// Base composition. internal OtherComposition(OtherComposition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -451,7 +451,7 @@ partial class OtherComposition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -465,7 +465,7 @@ partial class OtherComposition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -478,10 +478,10 @@ partial class OtherComposition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -502,10 +502,10 @@ partial class OtherComposition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -554,29 +554,29 @@ partial class OtherComposition " OtherComposition ..> Program : Program Program"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static OtherComposition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.Program), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.Program), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(OtherComposition composite) { @@ -589,7 +589,7 @@ partial class OtherComposition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService Resolve(OtherComposition composition) { @@ -607,7 +607,7 @@ partial class OtherComposition } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.DependentCompositionsScenario.Program Resolve(OtherComposition composition) { diff --git a/readme/disposable-singleton.md b/readme/disposable-singleton.md index d72c8d995..b2ce32c8a 100644 --- a/readme/disposable-singleton.md +++ b/readme/disposable-singleton.md @@ -114,20 +114,20 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private readonly global::System.IDisposable[] _disposablesM03D14di; - private int _disposeIndexM03D14di; - private Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency _singletonM03D14di34_Dependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private readonly global::System.IDisposable[] _disposablesM03D15di; + private int _disposeIndexM03D15di; + private Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency _singletonM03D15di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); - _disposablesM03D14di = new global::System.IDisposable[1]; + _rootM03D15di = this; + _lockM03D15di = new object(); + _disposablesM03D15di = new global::System.IDisposable[1]; } /// @@ -136,8 +136,8 @@ partial class Composition: global::System.IDisposable /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -158,19 +158,19 @@ partial class Composition: global::System.IDisposable #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; - _rootM03D14di._disposablesM03D14di[_rootM03D14di._disposeIndexM03D14di++] = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; + _rootM03D15di._disposablesM03D15di[_rootM03D15di._disposeIndexM03D15di++] = _singletonM03D15di34_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Service(_rootM03D15di._singletonM03D15di34_Dependency); } } #endregion @@ -186,7 +186,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -200,7 +200,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -213,10 +213,10 @@ partial class Composition: global::System.IDisposable #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -237,10 +237,10 @@ partial class Composition: global::System.IDisposable #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -257,11 +257,11 @@ partial class Composition: global::System.IDisposable /// public void Dispose() { - lock (_lockM03D14di) + lock (_lockM03D15di) { - while (_disposeIndexM03D14di > 0) + while (_disposeIndexM03D15di > 0) { - var disposableInstance = _disposablesM03D14di[--_disposeIndexM03D14di]; + var disposableInstance = _disposablesM03D15di[--_disposeIndexM03D15di]; try { disposableInstance.Dispose(); @@ -272,7 +272,7 @@ partial class Composition: global::System.IDisposable } } - _singletonM03D14di34_Dependency = null; + _singletonM03D15di34_Dependency = null; } } @@ -311,26 +311,26 @@ partial class Composition: global::System.IDisposable " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -343,7 +343,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 2507f193a..ab05ff3c4 100644 --- a/readme/enumerable-generics.md +++ b/readme/enumerable-generics.md @@ -148,14 +148,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -164,7 +164,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -186,13 +186,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D14di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D15di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.XyzDependency(); } - var perBlockM03D14di1_IEnumerable = LocalperBlockM03D14di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D14di1_IEnumerable); + var perBlockM03D15di1_IEnumerable = LocalperBlockM03D15di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D15di1_IEnumerable); } } @@ -214,13 +214,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D14di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D15di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.XyzDependency(); } - var perBlockM03D14di1_IEnumerable = LocalperBlockM03D14di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D14di1_IEnumerable); + var perBlockM03D15di1_IEnumerable = LocalperBlockM03D15di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D15di1_IEnumerable); } } #endregion @@ -236,7 +236,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -250,7 +250,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -263,10 +263,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -287,10 +287,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -364,29 +364,29 @@ partial class Composition " ServiceᐸStringᐳ o-- \"PerBlock\" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di>.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di>.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di>.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di>.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -399,7 +399,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService Resolve(Composition composition) { @@ -417,7 +417,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver> + private sealed class ResolverM03D15di_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 f8dbc5a67..d6f9dc78d 100644 --- a/readme/enumerable.md +++ b/readme/enumerable.md @@ -110,14 +110,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -126,7 +126,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -148,13 +148,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable LocalperBlockM03D14di1_IEnumerable() + System.Collections.Generic.IEnumerable LocalperBlockM03D15di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableScenario.XyzDependency(); } - var perBlockM03D14di1_IEnumerable = LocalperBlockM03D14di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableScenario.Service(perBlockM03D14di1_IEnumerable); + var perBlockM03D15di1_IEnumerable = LocalperBlockM03D15di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableScenario.Service(perBlockM03D15di1_IEnumerable); } } #endregion @@ -170,7 +170,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -184,7 +184,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -197,10 +197,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -221,10 +221,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -274,26 +274,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -306,7 +306,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 774e6aca6..d131956f5 100644 --- a/readme/factory.md +++ b/readme/factory.md @@ -112,14 +112,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -128,7 +128,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -149,13 +149,13 @@ partial class Composition #endif get { - Pure.DI.UsageTests.Basics.FactoryScenario.Dependency transientM03D14di1_Dependency; + Pure.DI.UsageTests.Basics.FactoryScenario.Dependency transientM03D15di1_Dependency; { - var dependency_M03D14di1 = new Dependency(DateTimeOffset.Now); - dependency_M03D14di1.Initialize(); - transientM03D14di1_Dependency = dependency_M03D14di1; + var dependency_M03D15di1 = new Dependency(DateTimeOffset.Now); + dependency_M03D15di1.Initialize(); + transientM03D15di1_Dependency = dependency_M03D15di1; } - return new Pure.DI.UsageTests.Basics.FactoryScenario.Service(transientM03D14di1_Dependency); + return new Pure.DI.UsageTests.Basics.FactoryScenario.Service(transientM03D15di1_Dependency); } } #endregion @@ -171,7 +171,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -185,7 +185,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -198,10 +198,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -222,10 +222,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -266,26 +266,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FactoryScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FactoryScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -298,7 +298,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 a8d5a8285..989612ea6 100644 --- a/readme/field-injection.md +++ b/readme/field-injection.md @@ -101,14 +101,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -117,7 +117,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -138,9 +138,9 @@ partial class Composition #endif get { - var transientM03D14di0_Service = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service(); - transientM03D14di0_Service.DependencyVal = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Dependency(); - return transientM03D14di0_Service; + var transientM03D15di0_Service = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service(); + transientM03D15di0_Service.DependencyVal = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Dependency(); + return transientM03D15di0_Service; } } #endregion @@ -156,7 +156,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -170,7 +170,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -183,10 +183,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -207,10 +207,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -254,26 +254,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -286,7 +286,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 988c73dbe..2eb94ce06 100644 --- a/readme/func-with-arguments.md +++ b/readme/func-with-arguments.md @@ -138,17 +138,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock _singletonM03D14di34_Clock; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock _singletonM03D15di34_Clock; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -157,8 +157,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -179,24 +179,24 @@ partial class Composition #endif get { - System.Func transientM03D14di1_Func = dependencyId => + System.Func transientM03D15di1_Func = dependencyId => { - int transientM03D14di3_Int32 = dependencyId; - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Clock, null)) + int transientM03D15di3_Int32 = dependencyId; + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Clock, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Clock, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Clock, null)) { - _singletonM03D14di34_Clock = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock(); - _rootM03D14di._singletonM03D14di34_Clock = _singletonM03D14di34_Clock; + _singletonM03D15di34_Clock = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock(); + _rootM03D15di._singletonM03D15di34_Clock = _singletonM03D15di34_Clock; } } } - var dependency_M03D14di1 = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Dependency(_rootM03D14di._singletonM03D14di34_Clock, transientM03D14di3_Int32); - return dependency_M03D14di1; + var dependency_M03D15di1 = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Dependency(_rootM03D15di._singletonM03D15di34_Clock, transientM03D15di3_Int32); + return dependency_M03D15di1; }; - return new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Service(transientM03D14di1_Func); + return new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Service(transientM03D15di1_Func); } } #endregion @@ -212,7 +212,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -226,7 +226,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -239,10 +239,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -263,10 +263,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -317,26 +317,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -349,7 +349,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService Resolve(Composition composition) { diff --git a/readme/func.md b/readme/func.md index 15ec6d456..0b7110054 100644 --- a/readme/func.md +++ b/readme/func.md @@ -105,16 +105,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -123,8 +123,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -145,15 +145,15 @@ partial class Composition #endif get { - var perResolveM03D14di36_Func = default(System.Func); - perResolveM03D14di36_Func = new global::System.Func( + var perResolveM03D15di36_Func = default(System.Func); + perResolveM03D15di36_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D14di1 = new Pure.DI.UsageTests.BCL.FuncScenario.Dependency(); - return factory_M03D14di1; + var factory_M03D15di1 = new Pure.DI.UsageTests.BCL.FuncScenario.Dependency(); + return factory_M03D15di1; }); - return new Pure.DI.UsageTests.BCL.FuncScenario.Service(perResolveM03D14di36_Func); + return new Pure.DI.UsageTests.BCL.FuncScenario.Service(perResolveM03D15di36_Func); } } #endregion @@ -169,7 +169,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -183,7 +183,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -196,10 +196,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -220,10 +220,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -268,26 +268,26 @@ partial class Composition " FuncᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -300,7 +300,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 fcace8a04..3688a42f6 100644 --- a/readme/generic-composition-roots-with-constraints.md +++ b/readme/generic-composition-roots-with-constraints.md @@ -17,9 +17,8 @@ class Service(IDependency dependency) : IService where T: IDisposable where TStruct: struct; -class OtherService(IDependency dependency) : IService - where T: IDisposable - where TStruct: struct; +class OtherService(IDependency dependency) : IService + where T: IDisposable; DI.Setup(nameof(Composition)) .Bind().To>() @@ -29,11 +28,11 @@ DI.Setup(nameof(Composition)) .Bind("Other").To(ctx => { ctx.Inject(out IDependency dependency); - return new OtherService(dependency); + return new OtherService(dependency); }) // Specifies to create a regular public method - // to get a composition root of type Service + // to get a composition root of type Service // with the name "GetMyRoot" .Root>("GetMyRoot") @@ -41,15 +40,15 @@ DI.Setup(nameof(Composition)) // to get a composition root of type OtherService // with the name "GetOtherService" // using the "Other" tag - .Root>("GetOtherService", "Other"); + .Root>("GetOtherService", "Other"); var composition = new Composition(); -// service = new Service(new Dependency()); +// service = new Service(new Dependency()); var service = composition.GetMyRoot(); -// someOtherService = new OtherService(new Dependency()); -var someOtherService = composition.GetOtherService(); +// someOtherService = new OtherService(new Dependency()); +var someOtherService = composition.GetOtherService(); ```
@@ -58,33 +57,36 @@ var someOtherService = composition.GetOtherService(); ```mermaid classDiagram class Composition { - +IServiceᐸTˏT2ᐳ GetMyRootᐸTˏT2ᐳ() - +IServiceᐸTˏT2ᐳ GetOtherServiceᐸTˏT2ᐳ() + +IServiceᐸTˏT4ᐳ GetMyRootᐸTˏT4ᐳ() + +IServiceᐸTˏBooleanᐳ GetOtherServiceᐸTᐳ() + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) + object Resolve(Type type, object? tag) } - ServiceᐸTˏT2ᐳ --|> IServiceᐸTˏT2ᐳ : - class ServiceᐸTˏT2ᐳ { + ServiceᐸTˏT4ᐳ --|> IServiceᐸTˏT4ᐳ : + class ServiceᐸTˏT4ᐳ { +Service(IDependencyᐸTᐳ dependency) } - OtherServiceᐸTˏT2ᐳ --|> IServiceᐸTˏT2ᐳ : "Other" - class OtherServiceᐸTˏT2ᐳ + OtherServiceᐸTᐳ --|> IServiceᐸTˏBooleanᐳ : "Other" + class OtherServiceᐸTᐳ DependencyᐸTᐳ --|> IDependencyᐸTᐳ : class DependencyᐸTᐳ { +Dependency() } - class IServiceᐸTˏT2ᐳ { + class IServiceᐸTˏT4ᐳ { + <> + } + class IServiceᐸTˏBooleanᐳ { <> } class IDependencyᐸTᐳ { <> } - Composition ..> ServiceᐸTˏT2ᐳ : IServiceᐸTˏT2ᐳ GetMyRootᐸTˏT2ᐳ() - Composition ..> OtherServiceᐸTˏT2ᐳ : IServiceᐸTˏT2ᐳ GetOtherServiceᐸTˏT2ᐳ() - ServiceᐸTˏT2ᐳ *-- DependencyᐸTᐳ : IDependencyᐸTᐳ - OtherServiceᐸTˏT2ᐳ *-- DependencyᐸTᐳ : IDependencyᐸTᐳ + Composition ..> ServiceᐸTˏT4ᐳ : IServiceᐸTˏT4ᐳ GetMyRootᐸTˏT4ᐳ() + Composition ..> OtherServiceᐸTᐳ : IServiceᐸTˏBooleanᐳ GetOtherServiceᐸTᐳ() + ServiceᐸTˏT4ᐳ *-- DependencyᐸTᐳ : IDependencyᐸTᐳ + OtherServiceᐸTᐳ *-- DependencyᐸTᐳ : IDependencyᐸTᐳ ```
@@ -102,17 +104,17 @@ classDiagram /// /// /// -/// +/// /// /// /// Specifies to create a regular public method
-/// to get a composition root of type Service<T>
+/// to get a composition root of type Service<T, TStruct>
/// with the name "GetMyRoot" ///
///
/// /// -/// +/// /// /// /// Specifies to create a regular public method
@@ -125,13 +127,13 @@ classDiagram /// ///
/// -/// This shows how to get an instance of type using the composition root : +/// This shows how to get an instance of type using the composition root : /// /// var composition = new Composition(); -/// var instance = composition.GetMyRoot<T, T2>(); +/// var instance = composition.GetMyRoot<T, T4>(); /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. /// /// @@ -139,14 +141,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -155,30 +157,30 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots /// /// Specifies to create a regular public method
- /// to get a composition root of type Service<T>
+ /// to get a composition root of type Service<T, TStruct>
/// with the name "GetMyRoot" ///
/// - /// This shows how to get an instance of type : + /// This shows how to get an instance of type : /// /// var composition = new Composition(); - /// var instance = composition.GetMyRoot<T, T2>(); + /// var instance = composition.GetMyRoot<T, T4>(); /// /// #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif - public Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.IService GetMyRoot() + public Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.IService GetMyRoot() where T: System.IDisposable - where T2: struct + where T4: struct { - return new Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.Service(new Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.Dependency()); + return new Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.Service(new Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.Dependency()); } /// @@ -188,25 +190,24 @@ partial class Composition /// using the "Other" tag /// /// - /// This shows how to get an instance of type : + /// This shows how to get an instance of type : /// /// var composition = new Composition(); - /// var instance = composition.GetOtherService<T, T2>(); + /// var instance = composition.GetOtherService<T>(); /// /// #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif - public Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.IService GetOtherService() + public Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.IService GetOtherService() where T: System.IDisposable - where T2: struct { - Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.OtherService transientM03D14di0_OtherService; + Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.OtherService transientM03D15di0_OtherService; { - var dependency_M03D14di1 = new Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.Dependency(); - transientM03D14di0_OtherService = new OtherService(dependency_M03D14di1); + var dependency_M03D15di1 = new Pure.DI.UsageTests.Basics.GenericCompositionRootsWithConstraintsScenario.Dependency(); + transientM03D15di0_OtherService = new OtherService(dependency_M03D15di1); } - return transientM03D14di0_OtherService; + return transientM03D15di0_OtherService; } #endregion @@ -221,7 +222,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -235,7 +236,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -274,40 +275,43 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " +IServiceᐸTˏT2ᐳ GetMyRootᐸTˏT2ᐳ()\n" + - " +IServiceᐸTˏT2ᐳ GetOtherServiceᐸTˏT2ᐳ()\n" + + " +IServiceᐸTˏT4ᐳ GetMyRootᐸTˏT4ᐳ()\n" + + " +IServiceᐸTˏBooleanᐳ GetOtherServiceᐸTᐳ()\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + " + object Resolve(Type type, object? tag)\n" + " }\n" + - " ServiceᐸTˏT2ᐳ --|> IServiceᐸTˏT2ᐳ : \n" + - " class ServiceᐸTˏT2ᐳ {\n" + + " ServiceᐸTˏT4ᐳ --|> IServiceᐸTˏT4ᐳ : \n" + + " class ServiceᐸTˏT4ᐳ {\n" + " +Service(IDependencyᐸTᐳ dependency)\n" + " }\n" + - " OtherServiceᐸTˏT2ᐳ --|> IServiceᐸTˏT2ᐳ : \"Other\" \n" + - " class OtherServiceᐸTˏT2ᐳ\n" + + " OtherServiceᐸTᐳ --|> IServiceᐸTˏBooleanᐳ : \"Other\" \n" + + " class OtherServiceᐸTᐳ\n" + " DependencyᐸTᐳ --|> IDependencyᐸTᐳ : \n" + " class DependencyᐸTᐳ {\n" + " +Dependency()\n" + " }\n" + - " class IServiceᐸTˏT2ᐳ {\n" + + " class IServiceᐸTˏT4ᐳ {\n" + + " <>\n" + + " }\n" + + " class IServiceᐸTˏBooleanᐳ {\n" + " <>\n" + " }\n" + " class IDependencyᐸTᐳ {\n" + " <>\n" + " }\n" + - " Composition ..> ServiceᐸTˏT2ᐳ : IServiceᐸTˏT2ᐳ GetMyRootᐸTˏT2ᐳ()\n" + - " Composition ..> OtherServiceᐸTˏT2ᐳ : IServiceᐸTˏT2ᐳ GetOtherServiceᐸTˏT2ᐳ()\n" + - " ServiceᐸTˏT2ᐳ *-- DependencyᐸTᐳ : IDependencyᐸTᐳ\n" + - " OtherServiceᐸTˏT2ᐳ *-- DependencyᐸTᐳ : IDependencyᐸTᐳ"; + " Composition ..> ServiceᐸTˏT4ᐳ : IServiceᐸTˏT4ᐳ GetMyRootᐸTˏT4ᐳ()\n" + + " Composition ..> OtherServiceᐸTᐳ : IServiceᐸTˏBooleanᐳ GetOtherServiceᐸTᐳ()\n" + + " ServiceᐸTˏT4ᐳ *-- DependencyᐸTᐳ : IDependencyᐸTᐳ\n" + + " OtherServiceᐸTᐳ *-- DependencyᐸTᐳ : IDependencyᐸTᐳ"; } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { diff --git a/readme/generic-composition-roots.md b/readme/generic-composition-roots.md index 267ea2c25..81f04ab3f 100644 --- a/readme/generic-composition-roots.md +++ b/readme/generic-composition-roots.md @@ -54,33 +54,33 @@ When a generic composition root is used, `Resolve` methods cannot be used to res ```mermaid classDiagram class Composition { - +IServiceᐸT82ᐳ GetMyRootᐸT82ᐳ() - +IServiceᐸT82ᐳ GetOtherServiceᐸT82ᐳ() + +IServiceᐸT66ᐳ GetMyRootᐸT66ᐳ() + +IServiceᐸT66ᐳ GetOtherServiceᐸT66ᐳ() + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) + object Resolve(Type type, object? tag) } - ServiceᐸT82ᐳ --|> IServiceᐸT82ᐳ : - class ServiceᐸT82ᐳ { - +Service(IDependencyᐸT82ᐳ dependency) + ServiceᐸT66ᐳ --|> IServiceᐸT66ᐳ : + class ServiceᐸT66ᐳ { + +Service(IDependencyᐸT66ᐳ dependency) } - OtherServiceᐸT82ᐳ --|> IServiceᐸT82ᐳ : "Other" - class OtherServiceᐸT82ᐳ - DependencyᐸT82ᐳ --|> IDependencyᐸT82ᐳ : - class DependencyᐸT82ᐳ { + OtherServiceᐸT66ᐳ --|> IServiceᐸT66ᐳ : "Other" + class OtherServiceᐸT66ᐳ + DependencyᐸT66ᐳ --|> IDependencyᐸT66ᐳ : + class DependencyᐸT66ᐳ { +Dependency() } - class IServiceᐸT82ᐳ { + class IServiceᐸT66ᐳ { <> } - class IDependencyᐸT82ᐳ { + class IDependencyᐸT66ᐳ { <> } - Composition ..> ServiceᐸT82ᐳ : IServiceᐸT82ᐳ GetMyRootᐸT82ᐳ() - Composition ..> OtherServiceᐸT82ᐳ : IServiceᐸT82ᐳ GetOtherServiceᐸT82ᐳ() - ServiceᐸT82ᐳ *-- DependencyᐸT82ᐳ : IDependencyᐸT82ᐳ - OtherServiceᐸT82ᐳ *-- DependencyᐸT82ᐳ : IDependencyᐸT82ᐳ + Composition ..> ServiceᐸT66ᐳ : IServiceᐸT66ᐳ GetMyRootᐸT66ᐳ() + Composition ..> OtherServiceᐸT66ᐳ : IServiceᐸT66ᐳ GetOtherServiceᐸT66ᐳ() + ServiceᐸT66ᐳ *-- DependencyᐸT66ᐳ : IDependencyᐸT66ᐳ + OtherServiceᐸT66ᐳ *-- DependencyᐸT66ᐳ : IDependencyᐸT66ᐳ ``` @@ -98,7 +98,7 @@ classDiagram /// /// /// -/// +/// /// /// /// Specifies to create a regular public method
@@ -108,7 +108,7 @@ classDiagram ///
/// /// -/// +/// /// /// /// Specifies to create a regular public method
@@ -121,13 +121,13 @@ classDiagram /// ///
/// -/// This shows how to get an instance of type using the composition root : +/// This shows how to get an instance of type using the composition root : /// /// var composition = new Composition(); -/// var instance = composition.GetMyRoot<T82>(); +/// var instance = composition.GetMyRoot<T66>(); /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. /// /// @@ -135,14 +135,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -151,7 +151,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -161,18 +161,18 @@ partial class Composition /// with the name "GetMyRoot" /// /// - /// This shows how to get an instance of type : + /// This shows how to get an instance of type : /// /// var composition = new Composition(); - /// var instance = composition.GetMyRoot<T82>(); + /// var instance = composition.GetMyRoot<T66>(); /// /// #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif - public Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.IService GetMyRoot() + public Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.IService GetMyRoot() { - return new Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.Service(new Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.Dependency()); + return new Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.Service(new Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.Dependency()); } /// @@ -182,23 +182,23 @@ partial class Composition /// using the "Other" tag /// /// - /// This shows how to get an instance of type : + /// This shows how to get an instance of type : /// /// var composition = new Composition(); - /// var instance = composition.GetOtherService<T82>(); + /// var instance = composition.GetOtherService<T66>(); /// /// #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif - public Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.IService GetOtherService() + public Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.IService GetOtherService() { - Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.OtherService transientM03D14di0_OtherService; + Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.OtherService transientM03D15di0_OtherService; { - var dependency_M03D14di1 = new Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.Dependency(); - transientM03D14di0_OtherService = new OtherService(dependency_M03D14di1); + var dependency_M03D15di1 = new Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.Dependency(); + transientM03D15di0_OtherService = new OtherService(dependency_M03D15di1); } - return transientM03D14di0_OtherService; + return transientM03D15di0_OtherService; } #endregion @@ -213,7 +213,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -227,7 +227,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -266,40 +266,40 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " +IServiceᐸT82ᐳ GetMyRootᐸT82ᐳ()\n" + - " +IServiceᐸT82ᐳ GetOtherServiceᐸT82ᐳ()\n" + + " +IServiceᐸT66ᐳ GetMyRootᐸT66ᐳ()\n" + + " +IServiceᐸT66ᐳ GetOtherServiceᐸT66ᐳ()\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + " + object Resolve(Type type, object? tag)\n" + " }\n" + - " ServiceᐸT82ᐳ --|> IServiceᐸT82ᐳ : \n" + - " class ServiceᐸT82ᐳ {\n" + - " +Service(IDependencyᐸT82ᐳ dependency)\n" + + " ServiceᐸT66ᐳ --|> IServiceᐸT66ᐳ : \n" + + " class ServiceᐸT66ᐳ {\n" + + " +Service(IDependencyᐸT66ᐳ dependency)\n" + " }\n" + - " OtherServiceᐸT82ᐳ --|> IServiceᐸT82ᐳ : \"Other\" \n" + - " class OtherServiceᐸT82ᐳ\n" + - " DependencyᐸT82ᐳ --|> IDependencyᐸT82ᐳ : \n" + - " class DependencyᐸT82ᐳ {\n" + + " OtherServiceᐸT66ᐳ --|> IServiceᐸT66ᐳ : \"Other\" \n" + + " class OtherServiceᐸT66ᐳ\n" + + " DependencyᐸT66ᐳ --|> IDependencyᐸT66ᐳ : \n" + + " class DependencyᐸT66ᐳ {\n" + " +Dependency()\n" + " }\n" + - " class IServiceᐸT82ᐳ {\n" + + " class IServiceᐸT66ᐳ {\n" + " <>\n" + " }\n" + - " class IDependencyᐸT82ᐳ {\n" + + " class IDependencyᐸT66ᐳ {\n" + " <>\n" + " }\n" + - " Composition ..> ServiceᐸT82ᐳ : IServiceᐸT82ᐳ GetMyRootᐸT82ᐳ()\n" + - " Composition ..> OtherServiceᐸT82ᐳ : IServiceᐸT82ᐳ GetOtherServiceᐸT82ᐳ()\n" + - " ServiceᐸT82ᐳ *-- DependencyᐸT82ᐳ : IDependencyᐸT82ᐳ\n" + - " OtherServiceᐸT82ᐳ *-- DependencyᐸT82ᐳ : IDependencyᐸT82ᐳ"; + " Composition ..> ServiceᐸT66ᐳ : IServiceᐸT66ᐳ GetMyRootᐸT66ᐳ()\n" + + " Composition ..> OtherServiceᐸT66ᐳ : IServiceᐸT66ᐳ GetOtherServiceᐸT66ᐳ()\n" + + " ServiceᐸT66ᐳ *-- DependencyᐸT66ᐳ : IDependencyᐸT66ᐳ\n" + + " OtherServiceᐸT66ᐳ *-- DependencyᐸT66ᐳ : IDependencyᐸT66ᐳ"; } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { diff --git a/readme/generics.md b/readme/generics.md index c0845a37e..ec61611da 100644 --- a/readme/generics.md +++ b/readme/generics.md @@ -124,14 +124,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -140,7 +140,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -177,7 +177,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -191,7 +191,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -204,10 +204,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -228,10 +228,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -282,26 +282,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.GenericsScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.GenericsScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -314,7 +314,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.GenericsScenario.IService Resolve(Composition composition) { diff --git a/readme/injection.md b/readme/injection.md index 55abb1ca6..69cd37dd2 100644 --- a/readme/injection.md +++ b/readme/injection.md @@ -102,14 +102,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -118,7 +118,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -139,12 +139,12 @@ partial class Composition #endif get { - Pure.DI.UsageTests.Basics.InjectionScenario.Service transientM03D14di0_Service; + Pure.DI.UsageTests.Basics.InjectionScenario.Service transientM03D15di0_Service; { - var dependency_M03D14di1 = new Pure.DI.UsageTests.Basics.InjectionScenario.Dependency(); - transientM03D14di0_Service = new Service(dependency_M03D14di1); + var dependency_M03D15di1 = new Pure.DI.UsageTests.Basics.InjectionScenario.Dependency(); + transientM03D15di0_Service = new Service(dependency_M03D15di1); } - return transientM03D14di0_Service; + return transientM03D15di0_Service; } } #endregion @@ -160,7 +160,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -174,7 +174,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -187,10 +187,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -211,10 +211,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -255,26 +255,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InjectionScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InjectionScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -287,7 +287,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 ddc2c7086..263ee63e5 100644 --- a/readme/injections-of-abstractions.md +++ b/readme/injections-of-abstractions.md @@ -110,14 +110,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -126,7 +126,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots diff --git a/readme/instance-initialization.md b/readme/instance-initialization.md index 596c3eda1..db14a5028 100644 --- a/readme/instance-initialization.md +++ b/readme/instance-initialization.md @@ -106,7 +106,7 @@ classDiagram /// /// This shows how to get an instance of type using the composition root : /// -/// var composition = new Composition(_argM03D14di_serviceName); +/// var composition = new Composition(_argM03D15di_serviceName); /// var instance = composition.Root; /// /// @@ -118,8 +118,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly string _argM03D14di_serviceName; + private readonly Composition _rootM03D15di; + private readonly string _argM03D15di_serviceName; /// /// This parameterized constructor creates a new instance of with arguments. @@ -127,13 +127,13 @@ partial class Composition /// The composition argument of type . public Composition(string serviceName) { - _rootM03D14di = this; + _rootM03D15di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D14di_serviceName = serviceName; + _argM03D15di_serviceName = serviceName; } /// @@ -142,8 +142,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _argM03D14di_serviceName = baseComposition._argM03D14di_serviceName; + _rootM03D15di = baseComposition._rootM03D15di; + _argM03D15di_serviceName = baseComposition._argM03D15di_serviceName; } #region Composition Roots @@ -153,7 +153,7 @@ partial class Composition /// /// This shows how to get an instance of type : /// - /// var composition = new Composition(_argM03D14di_serviceName); + /// var composition = new Composition(_argM03D15di_serviceName); /// var instance = composition.Root; /// /// @@ -164,13 +164,13 @@ partial class Composition #endif get { - Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service transientM03D14di0_Service; + Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service transientM03D15di0_Service; { - var service_M03D14di1 = new Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service(_argM03D14di_serviceName, new Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Dependency()); - service_M03D14di1.Initialize(); - transientM03D14di0_Service = service_M03D14di1; + var service_M03D15di1 = new Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service(_argM03D15di_serviceName, new Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Dependency()); + service_M03D15di1.Initialize(); + transientM03D15di0_Service = service_M03D15di1; } - return transientM03D14di0_Service; + return transientM03D15di0_Service; } } #endregion @@ -186,7 +186,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -200,7 +200,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -213,10 +213,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -237,10 +237,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -281,26 +281,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InstanceInitializationScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InstanceInitializationScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -313,7 +313,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.InstanceInitializationScenario.IService Resolve(Composition composition) { diff --git a/readme/interception.md b/readme/interception.md index 42c402835..ca3f19500 100644 --- a/readme/interception.md +++ b/readme/interception.md @@ -114,14 +114,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -130,7 +130,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -167,7 +167,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -181,7 +181,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -194,10 +194,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -218,10 +218,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -258,26 +258,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.InterceptionScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.InterceptionScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -290,7 +290,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 def95bb38..de89d3825 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 RootM03D14di0001 - -IService RootM03D14di0002 + -IDependency RootM03D15di0001 + -IService RootM03D15di0002 + 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 RootM03D14di0001 - Composition ..> Service : IService RootM03D14di0002 + Composition ..> Dependency : IDependency RootM03D15di0001 + Composition ..> Service : IService RootM03D15di0002 ``` @@ -108,7 +108,7 @@ classDiagram /// /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. /// /// @@ -116,17 +116,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency _singletonM03D14di34_Dependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency _singletonM03D15di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -135,58 +135,58 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency RootM03D14di0001 + public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency RootM03D15di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } } } - return _rootM03D14di._singletonM03D14di34_Dependency; + return _rootM03D15di._singletonM03D15di34_Dependency; } } /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService RootM03D14di0002 + public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService RootM03D15di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } } } - return new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); + return new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Service(_rootM03D15di._singletonM03D15di34_Dependency); } } #endregion @@ -202,7 +202,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -216,7 +216,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -229,10 +229,10 @@ partial class Composition #endif public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -253,10 +253,10 @@ partial class Composition #endif public object GetRequiredKeyedService(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -275,8 +275,8 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D14di0001\n" + - " -IService RootM03D14di0002\n" + + " -IDependency RootM03D15di0001\n" + + " -IService RootM03D15di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object GetService(Type type)\n" + @@ -297,33 +297,33 @@ partial class Composition " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : \"Dependency Key\" IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D14di0001\n" + - " Composition ..> Service : IService RootM03D14di0002"; + " Composition ..> Dependency : IDependency RootM03D15di0001\n" + + " Composition ..> Service : IService RootM03D15di0002"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -336,7 +336,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency Resolve(Composition composition) { @@ -348,13 +348,13 @@ partial class Composition switch (tag) { case "Dependency Key": - return composition.RootM03D14di0001; + return composition.RootM03D15di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency."); } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService Resolve(Composition composition) { @@ -366,7 +366,7 @@ partial class Composition switch (tag) { case "Service Key": - return composition.RootM03D14di0002; + return composition.RootM03D15di0002; } 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 53808664f..fc72c196b 100644 --- a/readme/lazy.md +++ b/readme/lazy.md @@ -99,16 +99,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -117,8 +117,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -139,20 +139,20 @@ partial class Composition #endif get { - var perResolveM03D14di37_Func = default(System.Func); - perResolveM03D14di37_Func = new global::System.Func( + var perResolveM03D15di37_Func = default(System.Func); + perResolveM03D15di37_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D14di1 = new Pure.DI.UsageTests.BCL.LazyScenario.Dependency(); - return factory_M03D14di1; + var factory_M03D15di1 = new Pure.DI.UsageTests.BCL.LazyScenario.Dependency(); + return factory_M03D15di1; }); - System.Lazy transientM03D14di1_Lazy; + System.Lazy transientM03D15di1_Lazy; { - var factory_M03D14di2 = perResolveM03D14di37_Func; - transientM03D14di1_Lazy = new global::System.Lazy(factory_M03D14di2, true); + var factory_M03D15di2 = perResolveM03D15di37_Func; + transientM03D15di1_Lazy = new global::System.Lazy(factory_M03D15di2, true); } - return new Pure.DI.UsageTests.BCL.LazyScenario.Service(transientM03D14di1_Lazy); + return new Pure.DI.UsageTests.BCL.LazyScenario.Service(transientM03D15di1_Lazy); } } #endregion @@ -168,7 +168,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -182,7 +182,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -195,10 +195,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -219,10 +219,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -269,26 +269,26 @@ partial class Composition " FuncᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.LazyScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.LazyScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -301,7 +301,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 3714893fa..57a3af338 100644 --- a/readme/manually-started-tasks.md +++ b/readme/manually-started-tasks.md @@ -140,16 +140,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; /// /// This parameterized constructor creates a new instance of with arguments. /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -158,8 +158,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -178,21 +178,21 @@ partial class Composition #endif public Pure.DI.UsageTests.BCL.ManualTaskScenario.IService GetRoot(System.Threading.CancellationToken cancellationToken) { - var perResolveM03D14di39_Func = default(System.Func); - perResolveM03D14di39_Func = new global::System.Func( + var perResolveM03D15di39_Func = default(System.Func); + perResolveM03D15di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D14di1 = new Pure.DI.UsageTests.BCL.ManualTaskScenario.Dependency(); - return factory_M03D14di1; + var factory_M03D15di1 = new Pure.DI.UsageTests.BCL.ManualTaskScenario.Dependency(); + return factory_M03D15di1; }); - System.Threading.Tasks.Task transientM03D14di1_Task; + System.Threading.Tasks.Task transientM03D15di1_Task; { - var factory_M03D14di2 = perResolveM03D14di39_Func; - var cancellationToken_M03D14di3 = cancellationToken; - transientM03D14di1_Task = new Task(factory_M03D14di2, cancellationToken_M03D14di3); + var factory_M03D15di2 = perResolveM03D15di39_Func; + var cancellationToken_M03D15di3 = cancellationToken; + transientM03D15di1_Task = new Task(factory_M03D15di2, cancellationToken_M03D15di3); } - return new Pure.DI.UsageTests.BCL.ManualTaskScenario.Service(transientM03D14di1_Task); + return new Pure.DI.UsageTests.BCL.ManualTaskScenario.Service(transientM03D15di1_Task); } #endregion diff --git a/readme/member-ordinal-attribute.md b/readme/member-ordinal-attribute.md index 9b2201630..31acc851e 100644 --- a/readme/member-ordinal-attribute.md +++ b/readme/member-ordinal-attribute.md @@ -116,7 +116,7 @@ classDiagram /// /// This shows how to get an instance of type using the composition root : /// -/// var composition = new PersonComposition(_argM03D14di_personId, _argM03D14di_personName, _argM03D14di_personBirthday); +/// var composition = new PersonComposition(_argM03D15di_personId, _argM03D15di_personName, _argM03D15di_personBirthday); /// var instance = composition.Person; /// /// @@ -128,10 +128,10 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class PersonComposition { - private readonly PersonComposition _rootM03D14di; - private readonly int _argM03D14di_personId; - private readonly string _argM03D14di_personName; - private readonly System.DateTime _argM03D14di_personBirthday; + private readonly PersonComposition _rootM03D15di; + private readonly int _argM03D15di_personId; + private readonly string _argM03D15di_personName; + private readonly System.DateTime _argM03D15di_personBirthday; /// /// This parameterized constructor creates a new instance of with arguments. @@ -141,15 +141,15 @@ partial class PersonComposition /// The composition argument of type . public PersonComposition(int personId, string personName, System.DateTime personBirthday) { - _rootM03D14di = this; + _rootM03D15di = this; if (ReferenceEquals(personName, null)) { throw new global::System.ArgumentNullException("personName"); } - _argM03D14di_personId = personId; - _argM03D14di_personName = personName; - _argM03D14di_personBirthday = personBirthday; + _argM03D15di_personId = personId; + _argM03D15di_personName = personName; + _argM03D15di_personBirthday = personBirthday; } /// @@ -158,10 +158,10 @@ partial class PersonComposition /// Base composition. internal PersonComposition(PersonComposition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _argM03D14di_personId = baseComposition._argM03D14di_personId; - _argM03D14di_personName = baseComposition._argM03D14di_personName; - _argM03D14di_personBirthday = baseComposition._argM03D14di_personBirthday; + _rootM03D15di = baseComposition._rootM03D15di; + _argM03D15di_personId = baseComposition._argM03D15di_personId; + _argM03D15di_personName = baseComposition._argM03D15di_personName; + _argM03D15di_personBirthday = baseComposition._argM03D15di_personBirthday; } #region Composition Roots @@ -171,7 +171,7 @@ partial class PersonComposition /// /// This shows how to get an instance of type : /// - /// var composition = new PersonComposition(_argM03D14di_personId, _argM03D14di_personName, _argM03D14di_personBirthday); + /// var composition = new PersonComposition(_argM03D15di_personId, _argM03D15di_personName, _argM03D15di_personBirthday); /// var instance = composition.Person; /// /// @@ -182,11 +182,11 @@ partial class PersonComposition #endif get { - var transientM03D14di0_Person = new Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person(); - transientM03D14di0_Person.Id = _argM03D14di_personId; - transientM03D14di0_Person.FirstName = _argM03D14di_personName; - transientM03D14di0_Person.Birthday = _argM03D14di_personBirthday; - return transientM03D14di0_Person; + var transientM03D15di0_Person = new Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person(); + transientM03D15di0_Person.Id = _argM03D15di_personId; + transientM03D15di0_Person.FirstName = _argM03D15di_personName; + transientM03D15di0_Person.Birthday = _argM03D15di_personBirthday; + return transientM03D15di0_Person; } } #endregion @@ -202,7 +202,7 @@ partial class PersonComposition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -216,7 +216,7 @@ partial class PersonComposition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -229,10 +229,10 @@ partial class PersonComposition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -253,10 +253,10 @@ partial class PersonComposition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -300,26 +300,26 @@ partial class PersonComposition " PersonComposition ..> Person : IPerson Person"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static PersonComposition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(PersonComposition composite) { @@ -332,7 +332,7 @@ partial class PersonComposition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 4d8afca43..853b6fc62 100644 --- a/readme/method-injection.md +++ b/readme/method-injection.md @@ -102,14 +102,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -118,7 +118,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -139,9 +139,9 @@ partial class Composition #endif get { - var transientM03D14di0_Service = new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service(); - transientM03D14di0_Service.SetDependency(new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Dependency()); - return transientM03D14di0_Service; + var transientM03D15di0_Service = new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service(); + transientM03D15di0_Service.SetDependency(new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Dependency()); + return transientM03D15di0_Service; } } #endregion @@ -157,7 +157,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -171,7 +171,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -184,10 +184,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -208,10 +208,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -255,26 +255,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -287,7 +287,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 d4720ba78..c7333a1b1 100644 --- a/readme/multi-contract-bindings.md +++ b/readme/multi-contract-bindings.md @@ -102,14 +102,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -118,7 +118,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -155,7 +155,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -169,7 +169,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -182,10 +182,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -206,10 +206,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -257,26 +257,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -289,7 +289,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 62d8c854f..31042a213 100644 --- a/readme/oncannotresolve-hint.md +++ b/readme/oncannotresolve-hint.md @@ -127,14 +127,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -143,7 +143,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -164,8 +164,8 @@ partial class Composition #endif get { - var transientM03D14di2_String = OnCannotResolve(null, Pure.DI.Lifetime.Transient); - return new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Service(new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Dependency(transientM03D14di2_String)); + var transientM03D15di2_String = OnCannotResolve(null, Pure.DI.Lifetime.Transient); + return new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Service(new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Dependency(transientM03D15di2_String)); } } #endregion @@ -181,7 +181,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -195,7 +195,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -208,10 +208,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -232,10 +232,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -282,26 +282,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -314,7 +314,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 d0ea0e2d5..bd2220895 100644 --- a/readme/ondependencyinjection-hint.md +++ b/readme/ondependencyinjection-hint.md @@ -124,14 +124,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -140,7 +140,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -177,7 +177,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -191,7 +191,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -204,10 +204,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -228,10 +228,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -276,26 +276,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -308,7 +308,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 a8af7a4dc..ab82ffe1e 100644 --- a/readme/onnewinstance-hint.md +++ b/readme/onnewinstance-hint.md @@ -126,17 +126,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D14di34_Dependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D15di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -145,8 +145,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -167,24 +167,24 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D14di34_DependencyTemp; - _singletonM03D14di34_DependencyTemp = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency(); - OnNewInstance(ref _singletonM03D14di34_DependencyTemp, null, Pure.DI.Lifetime.Singleton); + Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D15di34_DependencyTemp; + _singletonM03D15di34_DependencyTemp = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency(); + OnNewInstance(ref _singletonM03D15di34_DependencyTemp, null, Pure.DI.Lifetime.Singleton); global::System.Threading.Thread.MemoryBarrier(); - _singletonM03D14di34_Dependency = _singletonM03D14di34_DependencyTemp; - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = _singletonM03D15di34_DependencyTemp; + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } } } - var transientM03D14di0_Service = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); - OnNewInstance(ref transientM03D14di0_Service, null, Pure.DI.Lifetime.Transient); - return transientM03D14di0_Service; + var transientM03D15di0_Service = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service(_rootM03D15di._singletonM03D15di34_Dependency); + OnNewInstance(ref transientM03D15di0_Service, null, Pure.DI.Lifetime.Transient); + return transientM03D15di0_Service; } } #endregion @@ -200,7 +200,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -214,7 +214,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -227,10 +227,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -251,10 +251,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -299,26 +299,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -331,7 +331,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 665eae91a..1cce11d60 100644 --- a/readme/overriding-the-bcl-binding.md +++ b/readme/overriding-the-bcl-binding.md @@ -101,14 +101,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -117,7 +117,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -138,13 +138,13 @@ partial class Composition #endif get { - Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IDependency[] transientM03D14di1_ = new IDependency[] + Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IDependency[] transientM03D15di1_ = new IDependency[] { new AbcDependency(), new XyzDependency(), new AbcDependency() }; - return new Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.Service(transientM03D14di1_); + return new Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.Service(transientM03D15di1_); } } #endregion @@ -160,7 +160,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -174,7 +174,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -187,10 +187,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -211,10 +211,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -251,26 +251,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -283,7 +283,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 5ba4f2023..baa61f6a1 100644 --- a/readme/partial-class.md +++ b/readme/partial-class.md @@ -135,14 +135,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -151,7 +151,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -172,10 +172,10 @@ partial class Composition #endif get { - long transientM03D14di5_Int64 = GenerateId(); - long transientM03D14di4_Int64 = GenerateId(); - string transientM03D14di1_String = $"{_serviceName}_{GenerateId()}"; - return new Pure.DI.UsageTests.Basics.PartialClassScenario.Service(transientM03D14di1_String, new Pure.DI.UsageTests.Basics.PartialClassScenario.Dependency(transientM03D14di5_Int64), new Pure.DI.UsageTests.Basics.PartialClassScenario.Dependency(transientM03D14di4_Int64)); + long transientM03D15di5_Int64 = GenerateId(); + long transientM03D15di4_Int64 = GenerateId(); + string transientM03D15di1_String = $"{_serviceName}_{GenerateId()}"; + return new Pure.DI.UsageTests.Basics.PartialClassScenario.Service(transientM03D15di1_String, new Pure.DI.UsageTests.Basics.PartialClassScenario.Dependency(transientM03D15di5_Int64), new Pure.DI.UsageTests.Basics.PartialClassScenario.Dependency(transientM03D15di4_Int64)); } } #endregion @@ -191,7 +191,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -205,7 +205,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -218,10 +218,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -242,10 +242,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -289,26 +289,26 @@ partial class Composition " Composition ..> Service : Service Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PartialClassScenario.Service), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PartialClassScenario.Service), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -321,7 +321,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.PartialClassScenario.Service Resolve(Composition composition) { diff --git a/readme/perblock.md b/readme/perblock.md index 63efd4313..7228a476c 100644 --- a/readme/perblock.md +++ b/readme/perblock.md @@ -114,16 +114,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -132,8 +132,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -154,22 +154,22 @@ partial class Composition #endif get { - var perResolveM03D14di40_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>); - perResolveM03D14di40_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>( + var perResolveM03D15di40_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>); + perResolveM03D15di40_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var perBlockM03D14di4_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); - var factory_M03D14di1 = (perBlockM03D14di4_Dependency, perBlockM03D14di4_Dependency); - return factory_M03D14di1; + var perBlockM03D15di4_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); + var factory_M03D15di1 = (perBlockM03D15di4_Dependency, perBlockM03D15di4_Dependency); + return factory_M03D15di1; }); - System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)> transientM03D14di2_Lazy; + System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)> transientM03D15di2_Lazy; { - var factory_M03D14di2 = perResolveM03D14di40_Func; - transientM03D14di2_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>(factory_M03D14di2, true); + var factory_M03D15di2 = perResolveM03D15di40_Func; + transientM03D15di2_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>(factory_M03D15di2, true); } - var perBlockM03D14di1_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); - return new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service(perBlockM03D14di1_Dependency, perBlockM03D14di1_Dependency, transientM03D14di2_Lazy); + var perBlockM03D15di1_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); + return new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service(perBlockM03D15di1_Dependency, perBlockM03D15di1_Dependency, transientM03D15di2_Lazy); } } #endregion @@ -185,7 +185,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -199,7 +199,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -212,10 +212,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -236,10 +236,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -289,26 +289,26 @@ partial class Composition " FuncᐸValueTupleᐸIDependencyˏIDependencyᐳᐳ *-- ValueTupleᐸIDependencyˏIDependencyᐳ : ValueTupleᐸIDependencyˏIDependencyᐳ"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -321,7 +321,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 dd0d4c573..04da8b488 100644 --- a/readme/perresolve.md +++ b/readme/perresolve.md @@ -114,16 +114,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -132,8 +132,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -154,41 +154,41 @@ partial class Composition #endif get { - var perResolveM03D14di34_Dependency = default(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency); - var perResolveM03D14di40_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>); - perResolveM03D14di40_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>( + var perResolveM03D15di34_Dependency = default(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency); + var perResolveM03D15di40_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>); + perResolveM03D15di40_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(perResolveM03D14di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(perResolveM03D14di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D15di34_Dependency, null)) { - perResolveM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); + perResolveM03D15di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); } } } - var factory_M03D14di1 = (perResolveM03D14di34_Dependency, perResolveM03D14di34_Dependency); - return factory_M03D14di1; + var factory_M03D15di1 = (perResolveM03D15di34_Dependency, perResolveM03D15di34_Dependency); + return factory_M03D15di1; }); - System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)> transientM03D14di1_Lazy; + System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)> transientM03D15di1_Lazy; { - var factory_M03D14di2 = perResolveM03D14di40_Func; - transientM03D14di1_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>(factory_M03D14di2, true); + var factory_M03D15di2 = perResolveM03D15di40_Func; + transientM03D15di1_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>(factory_M03D15di2, true); } - if (ReferenceEquals(perResolveM03D14di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(perResolveM03D14di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D15di34_Dependency, null)) { - perResolveM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); + perResolveM03D15di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); } } } - return new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service(perResolveM03D14di34_Dependency, perResolveM03D14di34_Dependency, transientM03D14di1_Lazy); + return new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service(perResolveM03D15di34_Dependency, perResolveM03D15di34_Dependency, transientM03D15di1_Lazy); } } #endregion @@ -204,7 +204,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -218,7 +218,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -231,10 +231,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -255,10 +255,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -308,26 +308,26 @@ partial class Composition " FuncᐸValueTupleᐸIDependencyˏIDependencyᐳᐳ *-- ValueTupleᐸIDependencyˏIDependencyᐳ : ValueTupleᐸIDependencyˏIDependencyᐳ"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -340,7 +340,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 566551d9d..29f5ee870 100644 --- a/readme/property-injection.md +++ b/readme/property-injection.md @@ -99,14 +99,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -115,7 +115,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -136,9 +136,9 @@ partial class Composition #endif get { - var transientM03D14di0_Service = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service(); - transientM03D14di0_Service.Dependency = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Dependency(); - return transientM03D14di0_Service; + var transientM03D15di0_Service = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service(); + transientM03D15di0_Service.Dependency = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Dependency(); + return transientM03D15di0_Service; } } #endregion @@ -154,7 +154,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -168,7 +168,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -181,10 +181,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -205,10 +205,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -252,26 +252,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -284,7 +284,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 432efd3c6..9cd224706 100644 --- a/readme/required-properties-or-fields.md +++ b/readme/required-properties-or-fields.md @@ -97,7 +97,7 @@ classDiagram /// /// This shows how to get an instance of type using the composition root : /// -/// var composition = new Composition(_argM03D14di_name); +/// var composition = new Composition(_argM03D15di_name); /// var instance = composition.Root; /// /// @@ -109,8 +109,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly string _argM03D14di_name; + private readonly Composition _rootM03D15di; + private readonly string _argM03D15di_name; /// /// This parameterized constructor creates a new instance of with arguments. @@ -118,13 +118,13 @@ partial class Composition /// The composition argument of type . public Composition(string name) { - _rootM03D14di = this; + _rootM03D15di = this; if (ReferenceEquals(name, null)) { throw new global::System.ArgumentNullException("name"); } - _argM03D14di_name = name; + _argM03D15di_name = name; } /// @@ -133,8 +133,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _argM03D14di_name = baseComposition._argM03D14di_name; + _rootM03D15di = baseComposition._rootM03D15di; + _argM03D15di_name = baseComposition._argM03D15di_name; } #region Composition Roots @@ -144,7 +144,7 @@ partial class Composition /// /// This shows how to get an instance of type : /// - /// var composition = new Composition(_argM03D14di_name); + /// var composition = new Composition(_argM03D15di_name); /// var instance = composition.Root; /// /// @@ -157,7 +157,7 @@ partial class Composition { return new Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.Service() { - ServiceNameField = _argM03D14di_name, + ServiceNameField = _argM03D15di_name, Dependency = new Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.Dependency() }; } @@ -175,7 +175,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -189,7 +189,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -202,10 +202,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -226,10 +226,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -276,26 +276,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -308,7 +308,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 f37cab93a..79d46349d 100644 --- a/readme/resolve-hint.md +++ b/readme/resolve-hint.md @@ -103,14 +103,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -119,7 +119,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots diff --git a/readme/resolve-methods.md b/readme/resolve-methods.md index 1fdbd61d1..b35d613b9 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 RootM03D14di0001 - -IService RootM03D14di0002 + -IDependency RootM03D15di0001 + -IService RootM03D15di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -72,8 +72,8 @@ classDiagram <> } Service *-- Dependency : IDependency - Composition ..> Dependency : IDependency RootM03D14di0001 - Composition ..> Service : IService RootM03D14di0002 + Composition ..> Dependency : IDependency RootM03D15di0001 + Composition ..> Service : IService RootM03D15di0002 Composition ..> OtherService : IService OtherService ``` @@ -127,7 +127,7 @@ classDiagram /// var instance = composition.OtherService; /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. /// /// @@ -135,14 +135,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -151,7 +151,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -181,7 +181,7 @@ partial class Composition /// Specifies to create a private composition root
/// of type "IDependency" with the name "Dependency" ///
- public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency RootM03D14di0001 + public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency RootM03D15di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] @@ -196,7 +196,7 @@ partial class Composition /// Specifies to create a private root
/// that is only accessible from _Resolve_ methods ///
- public Pure.DI.UsageTests.Basics.ResolveScenario.IService RootM03D14di0002 + public Pure.DI.UsageTests.Basics.ResolveScenario.IService RootM03D15di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] @@ -219,7 +219,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -233,7 +233,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -246,10 +246,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -270,10 +270,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -293,8 +293,8 @@ partial class Composition "classDiagram\n" + " class Composition {\n" + " +IService OtherService\n" + - " -IDependency RootM03D14di0001\n" + - " -IService RootM03D14di0002\n" + + " -IDependency RootM03D15di0001\n" + + " -IService RootM03D15di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -319,34 +319,34 @@ partial class Composition " <>\n" + " }\n" + " Service *-- Dependency : IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D14di0001\n" + - " Composition ..> Service : IService RootM03D14di0002\n" + + " Composition ..> Dependency : IDependency RootM03D15di0001\n" + + " Composition ..> Service : IService RootM03D15di0002\n" + " Composition ..> OtherService : IService OtherService"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IService), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IDependency), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IService), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IDependency), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -359,11 +359,11 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ResolveScenario.IService Resolve(Composition composition) { - return composition.RootM03D14di0002; + return composition.RootM03D15di0002; } public Pure.DI.UsageTests.Basics.ResolveScenario.IService ResolveByTag(Composition composition, object tag) @@ -373,17 +373,17 @@ partial class Composition case "Other": return composition.OtherService; case null: - return composition.RootM03D14di0002; + return composition.RootM03D15di0002; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.Basics.ResolveScenario.IService."); } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D14di0001; + return composition.RootM03D15di0001; } public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -391,7 +391,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D14di0001; + return composition.RootM03D15di0001; } 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 dec29a636..0a03c8a75 100644 --- a/readme/root-arguments.md +++ b/readme/root-arguments.md @@ -129,14 +129,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This parameterized constructor creates a new instance of with arguments. /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -145,7 +145,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots diff --git a/readme/scope.md b/readme/scope.md index b4053c12c..7e50c1522 100644 --- a/readme/scope.md +++ b/readme/scope.md @@ -167,20 +167,20 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private readonly global::System.IDisposable[] _disposablesM03D14di; - private int _disposeIndexM03D14di; - private Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency _scopedM03D14di34_Dependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private readonly global::System.IDisposable[] _disposablesM03D15di; + private int _disposeIndexM03D15di; + private Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency _scopedM03D15di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); - _disposablesM03D14di = new global::System.IDisposable[1]; + _rootM03D15di = this; + _lockM03D15di = new object(); + _disposablesM03D15di = new global::System.IDisposable[1]; } /// @@ -189,9 +189,9 @@ partial class Composition: global::System.IDisposable /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; - _disposablesM03D14di = new global::System.IDisposable[1]; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; + _disposablesM03D15di = new global::System.IDisposable[1]; } #region Composition Roots @@ -212,18 +212,18 @@ partial class Composition: global::System.IDisposable #endif get { - if (ReferenceEquals(_scopedM03D14di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_scopedM03D14di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D15di34_Dependency, null)) { - _scopedM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency(); - _disposablesM03D14di[_disposeIndexM03D14di++] = _scopedM03D14di34_Dependency; + _scopedM03D15di34_Dependency = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency(); + _disposablesM03D15di[_disposeIndexM03D15di++] = _scopedM03D15di34_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Service(_scopedM03D14di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Service(_scopedM03D15di34_Dependency); } } @@ -244,16 +244,16 @@ partial class Composition: global::System.IDisposable #endif get { - var perResolveM03D14di40_Func = default(System.Func); - perResolveM03D14di40_Func = new global::System.Func( + var perResolveM03D15di40_Func = default(System.Func); + perResolveM03D15di40_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var transientM03D14di2_Composition = this; - var factory_M03D14di1 = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Session(transientM03D14di2_Composition); - return factory_M03D14di1; + var transientM03D15di2_Composition = this; + var factory_M03D15di1 = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Session(transientM03D15di2_Composition); + return factory_M03D15di1; }); - return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program(perResolveM03D14di40_Func); + return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program(perResolveM03D15di40_Func); } } #endregion @@ -269,7 +269,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -283,7 +283,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -296,10 +296,10 @@ partial class Composition: global::System.IDisposable #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -320,10 +320,10 @@ partial class Composition: global::System.IDisposable #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -340,11 +340,11 @@ partial class Composition: global::System.IDisposable /// public void Dispose() { - lock (_lockM03D14di) + lock (_lockM03D15di) { - while (_disposeIndexM03D14di > 0) + while (_disposeIndexM03D15di > 0) { - var disposableInstance = _disposablesM03D14di[--_disposeIndexM03D14di]; + var disposableInstance = _disposablesM03D15di[--_disposeIndexM03D15di]; try { disposableInstance.Dispose(); @@ -355,7 +355,7 @@ partial class Composition: global::System.IDisposable } } - _scopedM03D14di34_Dependency = null; + _scopedM03D15di34_Dependency = null; } } @@ -407,29 +407,29 @@ partial class Composition: global::System.IDisposable " FuncᐸSessionᐳ *-- Session : Session"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -442,7 +442,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService Resolve(Composition composition) { @@ -460,7 +460,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 6c81c415f..102072a96 100644 --- a/readme/service-collection.md +++ b/readme/service-collection.md @@ -47,8 +47,8 @@ service.Dependency.ShouldBe(dependency); ```mermaid classDiagram class Composition { - -IDependency RootM03D14di0001 - -IService RootM03D14di0002 + -IDependency RootM03D15di0001 + -IService RootM03D15di0002 + 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 RootM03D14di0001 - Composition ..> Service : IService RootM03D14di0002 + Composition ..> Dependency : IDependency RootM03D15di0001 + Composition ..> Service : IService RootM03D15di0002 ``` @@ -105,7 +105,7 @@ classDiagram /// /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. /// /// @@ -113,17 +113,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency _singletonM03D14di34_Dependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency _singletonM03D15di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -132,58 +132,58 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency RootM03D14di0001 + public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency RootM03D15di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } } } - return _rootM03D14di._singletonM03D14di34_Dependency; + return _rootM03D15di._singletonM03D15di34_Dependency; } } /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService RootM03D14di0002 + public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService RootM03D15di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } } } - return new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); + return new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Service(_rootM03D15di._singletonM03D15di34_Dependency); } } #endregion @@ -199,7 +199,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -213,7 +213,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -226,10 +226,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -250,10 +250,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -272,8 +272,8 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D14di0001\n" + - " -IService RootM03D14di0002\n" + + " -IDependency RootM03D15di0001\n" + + " -IService RootM03D15di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object Resolve(Type type)\n" + @@ -294,35 +294,35 @@ partial class Composition " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : \"Dependency Key\" IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D14di0001\n" + - " Composition ..> Service : IService RootM03D14di0002"; + " Composition ..> Dependency : IDependency RootM03D15di0001\n" + + " Composition ..> Service : IService RootM03D15di0002"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - OnNewRoot(valResolverM03D14di_0000, "RootM03D14di0001", "Dependency Key", Pure.DI.Lifetime.Singleton); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - OnNewRoot(valResolverM03D14di_0001, "RootM03D14di0002", null, Pure.DI.Lifetime.Transient); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + OnNewRoot(valResolverM03D15di_0000, "RootM03D15di0001", "Dependency Key", Pure.DI.Lifetime.Singleton); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + OnNewRoot(valResolverM03D15di_0001, "RootM03D15di0002", null, Pure.DI.Lifetime.Transient); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -335,7 +335,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency Resolve(Composition composition) { @@ -347,17 +347,17 @@ partial class Composition switch (tag) { case "Dependency Key": - return composition.RootM03D14di0001; + return composition.RootM03D15di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency."); } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService Resolve(Composition composition) { - return composition.RootM03D14di0002; + return composition.RootM03D15di0002; } public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService ResolveByTag(Composition composition, object tag) @@ -365,7 +365,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D14di0002; + return composition.RootM03D15di0002; } 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 3092452aa..0f5c14fd1 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 RootM03D14di0001 - -IService RootM03D14di0002 + -IDependency RootM03D15di0001 + -IService RootM03D15di0002 + 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 RootM03D14di0001 - Composition ..> Service : IService RootM03D14di0002 + Composition ..> Dependency : IDependency RootM03D15di0001 + Composition ..> Service : IService RootM03D15di0002 ``` @@ -137,7 +137,7 @@ classDiagram /// /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. /// /// @@ -145,21 +145,21 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition: global::System.IDisposable { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private readonly global::System.IDisposable[] _disposablesM03D14di; - private int _disposeIndexM03D14di; - private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency _singletonM03D14di34_Dependency; - private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service _scopedM03D14di35_Service; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private readonly global::System.IDisposable[] _disposablesM03D15di; + private int _disposeIndexM03D15di; + private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency _singletonM03D15di34_Dependency; + private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service _scopedM03D15di35_Service; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); - _disposablesM03D14di = new global::System.IDisposable[1]; + _rootM03D15di = this; + _lockM03D15di = new object(); + _disposablesM03D15di = new global::System.IDisposable[1]; } /// @@ -168,64 +168,64 @@ partial class Composition: global::System.IDisposable /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; - _disposablesM03D14di = new global::System.IDisposable[1]; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; + _disposablesM03D15di = new global::System.IDisposable[1]; } #region Composition Roots /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency RootM03D14di0001 + public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency RootM03D15di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } } } - return _rootM03D14di._singletonM03D14di34_Dependency; + return _rootM03D15di._singletonM03D15di34_Dependency; } } /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService RootM03D14di0002 + public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService RootM03D15di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_scopedM03D14di35_Service, null)) + if (ReferenceEquals(_scopedM03D15di35_Service, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_scopedM03D14di35_Service, null)) + if (ReferenceEquals(_scopedM03D15di35_Service, null)) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } - _scopedM03D14di35_Service = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); - _disposablesM03D14di[_disposeIndexM03D14di++] = _scopedM03D14di35_Service; + _scopedM03D15di35_Service = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service(_rootM03D15di._singletonM03D15di34_Dependency); + _disposablesM03D15di[_disposeIndexM03D15di++] = _scopedM03D15di35_Service; } } } - return _scopedM03D14di35_Service; + return _scopedM03D15di35_Service; } } #endregion @@ -241,7 +241,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -255,7 +255,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -268,10 +268,10 @@ partial class Composition: global::System.IDisposable #endif public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -292,10 +292,10 @@ partial class Composition: global::System.IDisposable #endif public object GetRequiredKeyedService(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -312,11 +312,11 @@ partial class Composition: global::System.IDisposable /// public void Dispose() { - lock (_lockM03D14di) + lock (_lockM03D15di) { - while (_disposeIndexM03D14di > 0) + while (_disposeIndexM03D15di > 0) { - var disposableInstance = _disposablesM03D14di[--_disposeIndexM03D14di]; + var disposableInstance = _disposablesM03D15di[--_disposeIndexM03D15di]; try { disposableInstance.Dispose(); @@ -327,8 +327,8 @@ partial class Composition: global::System.IDisposable } } - _singletonM03D14di34_Dependency = null; - _scopedM03D14di35_Service = null; + _singletonM03D15di34_Dependency = null; + _scopedM03D15di35_Service = null; } } @@ -342,8 +342,8 @@ partial class Composition: global::System.IDisposable return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D14di0001\n" + - " -IService RootM03D14di0002\n" + + " -IDependency RootM03D15di0001\n" + + " -IService RootM03D15di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object GetService(Type type)\n" + @@ -365,33 +365,33 @@ partial class Composition: global::System.IDisposable " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D14di0001\n" + - " Composition ..> Service : IService RootM03D14di0002"; + " Composition ..> Dependency : IDependency RootM03D15di0001\n" + + " Composition ..> Service : IService RootM03D15di0002"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -404,11 +404,11 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D14di0001; + return composition.RootM03D15di0001; } public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -416,17 +416,17 @@ partial class Composition: global::System.IDisposable switch (tag) { case null: - return composition.RootM03D14di0001; + return composition.RootM03D15di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency."); } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService Resolve(Composition composition) { - return composition.RootM03D14di0002; + return composition.RootM03D15di0002; } public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService ResolveByTag(Composition composition, object tag) @@ -434,7 +434,7 @@ partial class Composition: global::System.IDisposable switch (tag) { case null: - return composition.RootM03D14di0002; + return composition.RootM03D15di0002; } 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 a4eac198c..dec3ddaf8 100644 --- a/readme/service-provider.md +++ b/readme/service-provider.md @@ -45,8 +45,8 @@ service.Dependency.ShouldBe(dependency); ```mermaid classDiagram class Composition { - -IDependency RootM03D14di0001 - -IService RootM03D14di0002 + -IDependency RootM03D15di0001 + -IService RootM03D15di0002 + 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 RootM03D14di0001 - Composition ..> Service : IService RootM03D14di0002 + Composition ..> Dependency : IDependency RootM03D15di0001 + Composition ..> Service : IService RootM03D15di0002 ``` @@ -103,7 +103,7 @@ classDiagram /// /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. /// /// @@ -111,17 +111,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency _singletonM03D14di34_Dependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency _singletonM03D15di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -130,58 +130,58 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency RootM03D14di0001 + public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency RootM03D15di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } } } - return _rootM03D14di._singletonM03D14di34_Dependency; + return _rootM03D15di._singletonM03D15di34_Dependency; } } /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService RootM03D14di0002 + public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService RootM03D15di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } } } - return new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); + return new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Service(_rootM03D15di._singletonM03D15di34_Dependency); } } #endregion @@ -197,7 +197,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -211,7 +211,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -224,10 +224,10 @@ partial class Composition #endif public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -248,10 +248,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -270,8 +270,8 @@ partial class Composition return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D14di0001\n" + - " -IService RootM03D14di0002\n" + + " -IDependency RootM03D15di0001\n" + + " -IService RootM03D15di0002\n" + " + T ResolveᐸTᐳ()\n" + " + T ResolveᐸTᐳ(object? tag)\n" + " + object GetService(Type type)\n" + @@ -292,33 +292,33 @@ partial class Composition " <>\n" + " }\n" + " Service o-- \"Singleton\" Dependency : IDependency\n" + - " Composition ..> Dependency : IDependency RootM03D14di0001\n" + - " Composition ..> Service : IService RootM03D14di0002"; + " Composition ..> Dependency : IDependency RootM03D15di0001\n" + + " Composition ..> Service : IService RootM03D15di0002"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -331,11 +331,11 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D14di0001; + return composition.RootM03D15di0001; } public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency ResolveByTag(Composition composition, object tag) @@ -343,17 +343,17 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D14di0001; + return composition.RootM03D15di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency."); } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService Resolve(Composition composition) { - return composition.RootM03D14di0002; + return composition.RootM03D15di0002; } public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService ResolveByTag(Composition composition, object tag) @@ -361,7 +361,7 @@ partial class Composition switch (tag) { case null: - return composition.RootM03D14di0002; + return composition.RootM03D15di0002; } 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 4f41c5a0c..df37d2c26 100644 --- a/readme/simplified-binding.md +++ b/readme/simplified-binding.md @@ -121,14 +121,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -137,7 +137,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -158,8 +158,8 @@ partial class Composition #endif get { - var perBlockM03D14di1_Dependency = new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency(); - return new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Service(perBlockM03D14di1_Dependency, perBlockM03D14di1_Dependency, perBlockM03D14di1_Dependency); + var perBlockM03D15di1_Dependency = new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency(); + return new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Service(perBlockM03D15di1_Dependency, perBlockM03D15di1_Dependency, perBlockM03D15di1_Dependency); } } #endregion diff --git a/readme/singleton.md b/readme/singleton.md index ad80794d4..bcbadb9ae 100644 --- a/readme/singleton.md +++ b/readme/singleton.md @@ -107,17 +107,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency _singletonM03D14di34_Dependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency _singletonM03D15di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -126,8 +126,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -148,18 +148,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di34_Dependency, null)) { - _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency(); - _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _singletonM03D15di34_Dependency = new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency(); + _rootM03D15di._singletonM03D15di34_Dependency = _singletonM03D15di34_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Service(_singletonM03D14di34_Dependency, _rootM03D14di._singletonM03D14di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Service(_singletonM03D15di34_Dependency, _rootM03D15di._singletonM03D15di34_Dependency); } } #endregion @@ -175,7 +175,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -189,7 +189,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -202,10 +202,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -226,10 +226,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -273,26 +273,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -305,7 +305,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 8a361b84e..a614c49ad 100644 --- a/readme/span-and-readonlyspan.md +++ b/readme/span-and-readonlyspan.md @@ -109,14 +109,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -125,7 +125,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -146,13 +146,13 @@ partial class Composition #endif get { - System.ReadOnlySpan transientM03D14di1_ReadOnlySpan = stackalloc Pure.DI.UsageTests.BCL.SpanScenario.Dependency[3] + System.ReadOnlySpan transientM03D15di1_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(transientM03D14di1_ReadOnlySpan); + return new Pure.DI.UsageTests.BCL.SpanScenario.Service(transientM03D15di1_ReadOnlySpan); } } #endregion @@ -168,7 +168,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -182,7 +182,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -195,10 +195,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -219,10 +219,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -265,26 +265,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.SpanScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.SpanScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -297,7 +297,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 8cd9fd5ee..b188ff3e7 100644 --- a/readme/tag-attribute.md +++ b/readme/tag-attribute.md @@ -117,14 +117,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -133,7 +133,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -170,7 +170,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -184,7 +184,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -197,10 +197,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -221,10 +221,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -272,26 +272,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagAttributeScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagAttributeScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -304,7 +304,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 59ac8d894..cf888924e 100644 --- a/readme/tag-type.md +++ b/readme/tag-type.md @@ -138,17 +138,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency _singletonM03D14di35_XyzDependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency _singletonM03D15di35_XyzDependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -157,8 +157,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -179,18 +179,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di35_XyzDependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di35_XyzDependency, null)) { - _singletonM03D14di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); - _rootM03D14di._singletonM03D14di35_XyzDependency = _singletonM03D14di35_XyzDependency; + _singletonM03D15di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); + _rootM03D15di._singletonM03D15di35_XyzDependency = _singletonM03D15di35_XyzDependency; } } } - return _rootM03D14di._singletonM03D14di35_XyzDependency; + return _rootM03D15di._singletonM03D15di35_XyzDependency; } } @@ -211,18 +211,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di35_XyzDependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di35_XyzDependency, null)) { - _singletonM03D14di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); - _rootM03D14di._singletonM03D14di35_XyzDependency = _singletonM03D14di35_XyzDependency; + _singletonM03D15di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); + _rootM03D15di._singletonM03D15di35_XyzDependency = _singletonM03D15di35_XyzDependency; } } } - return new Pure.DI.UsageTests.Basics.TagTypeScenario.Service(new Pure.DI.UsageTests.Basics.TagTypeScenario.AbcDependency(), _rootM03D14di._singletonM03D14di35_XyzDependency, new Pure.DI.UsageTests.Basics.TagTypeScenario.AbcDependency()); + return new Pure.DI.UsageTests.Basics.TagTypeScenario.Service(new Pure.DI.UsageTests.Basics.TagTypeScenario.AbcDependency(), _rootM03D15di._singletonM03D15di35_XyzDependency, new Pure.DI.UsageTests.Basics.TagTypeScenario.AbcDependency()); } } #endregion @@ -238,7 +238,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -252,7 +252,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -265,10 +265,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -289,10 +289,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -344,29 +344,29 @@ partial class Composition " Composition ..> XyzDependency : IDependency XyzRoot"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.IDependency), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.IService), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.IDependency), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.IService), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -379,7 +379,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TagTypeScenario.IDependency Resolve(Composition composition) { @@ -396,7 +396,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TagTypeScenario.IService Resolve(Composition composition) { diff --git a/readme/tag-unique.md b/readme/tag-unique.md index f1d6e8fd2..32be73711 100644 --- a/readme/tag-unique.md +++ b/readme/tag-unique.md @@ -46,11 +46,11 @@ classDiagram + object Resolve(Type type, object? tag) } class IEnumerableᐸIDependencyᐸStringᐳᐳ - AbcDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 5017f7e8-f235-4d7a-bf7c-9f28b74372dd + AbcDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 6bb5f9b1-3a6d-4a09-82b7-4d0634ab1d4a class AbcDependencyᐸStringᐳ { +AbcDependency() } - XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 19e5686d-32c0-4be6-a56e-96103a4e834c + XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 919b84f0-b2e3-4678-a50d-41a729ce75cb class XyzDependencyᐸStringᐳ { +XyzDependency() } @@ -64,8 +64,8 @@ classDiagram class IServiceᐸStringᐳ { <> } - IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : 5017f7e8-f235-4d7a-bf7c-9f28b74372dd IDependencyᐸStringᐳ - IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : 19e5686d-32c0-4be6-a56e-96103a4e834c IDependencyᐸStringᐳ + IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : 6bb5f9b1-3a6d-4a09-82b7-4d0634ab1d4a IDependencyᐸStringᐳ + IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : 919b84f0-b2e3-4678-a50d-41a729ce75cb IDependencyᐸStringᐳ Composition ..> ServiceᐸStringᐳ : IServiceᐸStringᐳ Root ServiceᐸStringᐳ o-- "PerBlock" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ ``` @@ -101,7 +101,7 @@ classDiagram /// var instance = composition.Root; /// /// -/// Class diagram
+/// Class diagram
/// This class was created by Pure.DI source code generator. /// /// @@ -109,14 +109,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -125,7 +125,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -147,13 +147,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D14di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D15di1_IEnumerable() { yield return new Pure.DI.UsageTests.Basics.TagUniqueScenario.AbcDependency(); yield return new Pure.DI.UsageTests.Basics.TagUniqueScenario.XyzDependency(); } - var perBlockM03D14di1_IEnumerable = LocalperBlockM03D14di1_IEnumerable(); - return new Pure.DI.UsageTests.Basics.TagUniqueScenario.Service(perBlockM03D14di1_IEnumerable); + var perBlockM03D15di1_IEnumerable = LocalperBlockM03D15di1_IEnumerable(); + return new Pure.DI.UsageTests.Basics.TagUniqueScenario.Service(perBlockM03D15di1_IEnumerable); } } #endregion @@ -169,7 +169,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -183,7 +183,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -196,10 +196,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -220,10 +220,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -249,11 +249,11 @@ partial class Composition " + object Resolve(Type type, object? tag)\n" + " }\n" + " class IEnumerableᐸIDependencyᐸStringᐳᐳ\n" + - " AbcDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 5017f7e8-f235-4d7a-bf7c-9f28b74372dd \n" + + " AbcDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 6bb5f9b1-3a6d-4a09-82b7-4d0634ab1d4a \n" + " class AbcDependencyᐸStringᐳ {\n" + " +AbcDependency()\n" + " }\n" + - " XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 19e5686d-32c0-4be6-a56e-96103a4e834c \n" + + " XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 919b84f0-b2e3-4678-a50d-41a729ce75cb \n" + " class XyzDependencyᐸStringᐳ {\n" + " +XyzDependency()\n" + " }\n" + @@ -267,32 +267,32 @@ partial class Composition " class IServiceᐸStringᐳ {\n" + " <>\n" + " }\n" + - " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : 5017f7e8-f235-4d7a-bf7c-9f28b74372dd IDependencyᐸStringᐳ\n" + - " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : 19e5686d-32c0-4be6-a56e-96103a4e834c IDependencyᐸStringᐳ\n" + + " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : 6bb5f9b1-3a6d-4a09-82b7-4d0634ab1d4a IDependencyᐸStringᐳ\n" + + " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : 919b84f0-b2e3-4678-a50d-41a729ce75cb IDependencyᐸStringᐳ\n" + " Composition ..> ServiceᐸStringᐳ : IServiceᐸStringᐳ Root\n" + " ServiceᐸStringᐳ o-- \"PerBlock\" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di>.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di>.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagUniqueScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagUniqueScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -305,7 +305,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver> { public Pure.DI.UsageTests.Basics.TagUniqueScenario.IService Resolve(Composition composition) { diff --git a/readme/tags.md b/readme/tags.md index 3d2ba8237..72b3d380a 100644 --- a/readme/tags.md +++ b/readme/tags.md @@ -140,17 +140,17 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; - private Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency _singletonM03D14di35_XyzDependency; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; + private Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency _singletonM03D15di35_XyzDependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -159,8 +159,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -181,18 +181,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di35_XyzDependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di35_XyzDependency, null)) { - _singletonM03D14di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); - _rootM03D14di._singletonM03D14di35_XyzDependency = _singletonM03D14di35_XyzDependency; + _singletonM03D15di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); + _rootM03D15di._singletonM03D15di35_XyzDependency = _singletonM03D15di35_XyzDependency; } } } - return _rootM03D14di._singletonM03D14di35_XyzDependency; + return _rootM03D15di._singletonM03D15di35_XyzDependency; } } @@ -213,18 +213,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di35_XyzDependency, null)) { - lock (_lockM03D14di) + lock (_lockM03D15di) { - if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D15di._singletonM03D15di35_XyzDependency, null)) { - _singletonM03D14di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); - _rootM03D14di._singletonM03D14di35_XyzDependency = _singletonM03D14di35_XyzDependency; + _singletonM03D15di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); + _rootM03D15di._singletonM03D15di35_XyzDependency = _singletonM03D15di35_XyzDependency; } } } - return new Pure.DI.UsageTests.Basics.TagsScenario.Service(new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency(), _rootM03D14di._singletonM03D14di35_XyzDependency, new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency()); + return new Pure.DI.UsageTests.Basics.TagsScenario.Service(new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency(), _rootM03D15di._singletonM03D15di35_XyzDependency, new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency()); } } #endregion @@ -240,7 +240,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -254,7 +254,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -267,10 +267,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -291,10 +291,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -346,29 +346,29 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - var valResolverM03D14di_0001 = new ResolverM03D14di_0001(); - ResolverM03D14di.Value = valResolverM03D14di_0001; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + var valResolverM03D15di_0001 = new ResolverM03D15di_0001(); + ResolverM03D15di.Value = valResolverM03D15di_0001; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 4, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IDependency), valResolverM03D14di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IService), valResolverM03D14di_0001) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IDependency), valResolverM03D15di_0000) + ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IService), valResolverM03D15di_0001) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -381,7 +381,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TagsScenario.IDependency Resolve(Composition composition) { @@ -399,7 +399,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 dc21bd760..bd4f8a6bf 100644 --- a/readme/task.md +++ b/readme/task.md @@ -138,16 +138,16 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; - private readonly object _lockM03D14di; + private readonly Composition _rootM03D15di; + private readonly object _lockM03D15di; /// /// This parameterized constructor creates a new instance of with arguments. /// public Composition() { - _rootM03D14di = this; - _lockM03D14di = new object(); + _rootM03D15di = this; + _lockM03D15di = new object(); } /// @@ -156,8 +156,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; - _lockM03D14di = _rootM03D14di._lockM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; + _lockM03D15di = _rootM03D15di._lockM03D15di; } #region Composition Roots @@ -176,32 +176,32 @@ partial class Composition #endif public Pure.DI.UsageTests.BCL.TaskScenario.IService GetRoot(System.Threading.CancellationToken cancellationToken) { - var perResolveM03D14di39_Func = default(System.Func); - System.Threading.Tasks.TaskScheduler transientM03D14di5_TaskScheduler = TaskScheduler.Current; - System.Threading.Tasks.TaskContinuationOptions transientM03D14di4_TaskContinuationOptions = global::System.Threading.Tasks.TaskContinuationOptions.None; - System.Threading.Tasks.TaskCreationOptions transientM03D14di3_TaskCreationOptions = global::System.Threading.Tasks.TaskCreationOptions.None; - System.Threading.Tasks.TaskFactory perBlockM03D14di2_TaskFactory; + var perResolveM03D15di39_Func = default(System.Func); + System.Threading.Tasks.TaskScheduler transientM03D15di5_TaskScheduler = TaskScheduler.Current; + System.Threading.Tasks.TaskContinuationOptions transientM03D15di4_TaskContinuationOptions = global::System.Threading.Tasks.TaskContinuationOptions.None; + System.Threading.Tasks.TaskCreationOptions transientM03D15di3_TaskCreationOptions = global::System.Threading.Tasks.TaskCreationOptions.None; + System.Threading.Tasks.TaskFactory perBlockM03D15di2_TaskFactory; { - var cancellationToken_M03D14di1 = cancellationToken; - var taskCreationOptions_M03D14di2 = transientM03D14di3_TaskCreationOptions; - var taskContinuationOptions_M03D14di3 = transientM03D14di4_TaskContinuationOptions; - var taskScheduler_M03D14di4 = transientM03D14di5_TaskScheduler; - perBlockM03D14di2_TaskFactory = new global::System.Threading.Tasks.TaskFactory(cancellationToken_M03D14di1, taskCreationOptions_M03D14di2, taskContinuationOptions_M03D14di3, taskScheduler_M03D14di4); + var cancellationToken_M03D15di1 = cancellationToken; + var taskCreationOptions_M03D15di2 = transientM03D15di3_TaskCreationOptions; + var taskContinuationOptions_M03D15di3 = transientM03D15di4_TaskContinuationOptions; + var taskScheduler_M03D15di4 = transientM03D15di5_TaskScheduler; + perBlockM03D15di2_TaskFactory = new global::System.Threading.Tasks.TaskFactory(cancellationToken_M03D15di1, taskCreationOptions_M03D15di2, taskContinuationOptions_M03D15di3, taskScheduler_M03D15di4); } - perResolveM03D14di39_Func = new global::System.Func( + perResolveM03D15di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D14di5 = new Pure.DI.UsageTests.BCL.TaskScenario.Dependency(); - return factory_M03D14di5; + var factory_M03D15di5 = new Pure.DI.UsageTests.BCL.TaskScenario.Dependency(); + return factory_M03D15di5; }); - System.Threading.Tasks.Task transientM03D14di1_Task; + System.Threading.Tasks.Task transientM03D15di1_Task; { - var factory_M03D14di6 = perResolveM03D14di39_Func; - var taskFactory_M03D14di7 = perBlockM03D14di2_TaskFactory; - transientM03D14di1_Task = taskFactory_M03D14di7.StartNew(factory_M03D14di6); + var factory_M03D15di6 = perResolveM03D15di39_Func; + var taskFactory_M03D15di7 = perBlockM03D15di2_TaskFactory; + transientM03D15di1_Task = taskFactory_M03D15di7.StartNew(factory_M03D15di6); } - return new Pure.DI.UsageTests.BCL.TaskScenario.Service(transientM03D14di1_Task); + return new Pure.DI.UsageTests.BCL.TaskScenario.Service(transientM03D15di1_Task); } #endregion diff --git a/readme/threadsafe-hint.md b/readme/threadsafe-hint.md index e11971bda..e74ded720 100644 --- a/readme/threadsafe-hint.md +++ b/readme/threadsafe-hint.md @@ -96,14 +96,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -112,7 +112,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -149,7 +149,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -163,7 +163,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -176,10 +176,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -200,10 +200,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -246,26 +246,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -278,7 +278,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 57073fb2f..4a8565349 100644 --- a/readme/tostring-hint.md +++ b/readme/tostring-hint.md @@ -94,14 +94,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -110,7 +110,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -147,7 +147,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -161,7 +161,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -174,10 +174,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -198,10 +198,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -244,26 +244,26 @@ partial class Composition " Composition ..> Service : IService MyService"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ToStringHintScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ToStringHintScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -276,7 +276,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Hints.ToStringHintScenario.IService Resolve(Composition composition) { diff --git a/readme/tracking-disposable-instances.md b/readme/tracking-disposable-instances.md index 9f0cc4016..dc86407ec 100644 --- a/readme/tracking-disposable-instances.md +++ b/readme/tracking-disposable-instances.md @@ -149,14 +149,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -165,7 +165,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -186,11 +186,11 @@ partial class Composition #endif get { - var transientM03D14di1_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.Dependency(); - OnNewInstance(ref transientM03D14di1_Dependency, null, Pure.DI.Lifetime.Transient); - var transientM03D14di0_Service = new Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.Service(transientM03D14di1_Dependency); - OnNewInstance(ref transientM03D14di0_Service, null, Pure.DI.Lifetime.Transient); - return transientM03D14di0_Service; + var transientM03D15di1_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.Dependency(); + OnNewInstance(ref transientM03D15di1_Dependency, null, Pure.DI.Lifetime.Transient); + var transientM03D15di0_Service = new Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.Service(transientM03D15di1_Dependency); + OnNewInstance(ref transientM03D15di0_Service, null, Pure.DI.Lifetime.Transient); + return transientM03D15di0_Service; } } #endregion @@ -206,7 +206,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -220,7 +220,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -233,10 +233,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -257,10 +257,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -305,26 +305,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -337,7 +337,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.IService Resolve(Composition composition) { diff --git a/readme/transient.md b/readme/transient.md index a3cb8e21e..9f81f4fd9 100644 --- a/readme/transient.md +++ b/readme/transient.md @@ -107,14 +107,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -123,7 +123,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -160,7 +160,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -174,7 +174,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -187,10 +187,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -211,10 +211,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -258,26 +258,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.TransientScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.TransientScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -290,7 +290,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 d64731578..79425c179 100644 --- a/readme/tuple.md +++ b/readme/tuple.md @@ -105,14 +105,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -121,7 +121,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -142,8 +142,8 @@ partial class Composition #endif get { - Pure.DI.UsageTests.BCL.TupleScenario.Point transientM03D14di2_Point = new Point(7, 9); - return new Pure.DI.UsageTests.BCL.TupleScenario.Service((transientM03D14di2_Point, new Pure.DI.UsageTests.BCL.TupleScenario.Dependency())); + Pure.DI.UsageTests.BCL.TupleScenario.Point transientM03D15di2_Point = new Point(7, 9); + return new Pure.DI.UsageTests.BCL.TupleScenario.Service((transientM03D15di2_Point, new Pure.DI.UsageTests.BCL.TupleScenario.Dependency())); } } #endregion @@ -159,7 +159,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -173,7 +173,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -186,10 +186,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -210,10 +210,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -262,26 +262,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.TupleScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.TupleScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -294,7 +294,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 85d08f911..5b1924b8b 100644 --- a/readme/type-attribute.md +++ b/readme/type-attribute.md @@ -108,14 +108,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -124,7 +124,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -161,7 +161,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -175,7 +175,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -188,10 +188,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -212,10 +212,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -258,26 +258,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -290,7 +290,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 9a51754fd..3b5afc658 100644 --- a/readme/valuetask.md +++ b/readme/valuetask.md @@ -107,14 +107,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -123,7 +123,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -144,12 +144,12 @@ partial class Composition #endif get { - System.Threading.Tasks.ValueTask transientM03D14di1_ValueTask; + System.Threading.Tasks.ValueTask transientM03D15di1_ValueTask; { - var value_M03D14di1 = new Pure.DI.UsageTests.BCL.ValueTaskScenario.Dependency(); - transientM03D14di1_ValueTask = new global::System.Threading.Tasks.ValueTask(value_M03D14di1); + var value_M03D15di1 = new Pure.DI.UsageTests.BCL.ValueTaskScenario.Dependency(); + transientM03D15di1_ValueTask = new global::System.Threading.Tasks.ValueTask(value_M03D15di1); } - return new Pure.DI.UsageTests.BCL.ValueTaskScenario.Service(transientM03D14di1_ValueTask); + return new Pure.DI.UsageTests.BCL.ValueTaskScenario.Service(transientM03D15di1_ValueTask); } } #endregion @@ -165,7 +165,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -179,7 +179,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -192,10 +192,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -216,10 +216,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -264,26 +264,26 @@ partial class Composition " ValueTaskᐸIDependencyᐳ *-- Dependency : IDependency"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ValueTaskScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ValueTaskScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -296,7 +296,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_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 631bf1eee..2b89eecdf 100644 --- a/readme/weak-reference.md +++ b/readme/weak-reference.md @@ -98,14 +98,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D14di; + private readonly Composition _rootM03D15di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D14di = this; + _rootM03D15di = this; } /// @@ -114,7 +114,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D14di = baseComposition._rootM03D14di; + _rootM03D15di = baseComposition._rootM03D15di; } #region Composition Roots @@ -151,7 +151,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D14di.Value.Resolve(this); + return ResolverM03D15di.Value.Resolve(this); } /// @@ -165,7 +165,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D14di.Value.ResolveByTag(this, tag); + return ResolverM03D15di.Value.ResolveByTag(this, tag); } /// @@ -178,10 +178,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.Resolve(this); @@ -202,10 +202,10 @@ partial class Composition #endif public object Resolve(global::System.Type type, object? tag) { - var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D14di; + var index = (int)(_bucketSizeM03D15di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D15di; do { - ref var pair = ref _bucketsM03D14di[index]; + ref var pair = ref _bucketsM03D15di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -252,26 +252,26 @@ partial class Composition " Composition ..> Service : IService Root"; } - private readonly static int _bucketSizeM03D14di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; + private readonly static int _bucketSizeM03D15di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D15di; static Composition() { - var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); - ResolverM03D14di.Value = valResolverM03D14di_0000; - _bucketsM03D14di = global::Pure.DI.Buckets>.Create( + var valResolverM03D15di_0000 = new ResolverM03D15di_0000(); + ResolverM03D15di.Value = valResolverM03D15di_0000; + _bucketsM03D15di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D14di, + out _bucketSizeM03D15di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService), valResolverM03D14di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService), valResolverM03D15di_0000) }); } #region Resolvers - private sealed class ResolverM03D14di: global::Pure.DI.IResolver + private sealed class ResolverM03D15di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D15di(); public T Resolve(Composition composite) { @@ -284,7 +284,7 @@ partial class Composition } } - private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D15di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService Resolve(Composition composition) { diff --git a/tests/Pure.DI.UsageTests/Basics/GenericCompositionRootsWithConstraintsScenario.cs b/tests/Pure.DI.UsageTests/Basics/GenericCompositionRootsWithConstraintsScenario.cs index 10be0a86c..45cf5eb2f 100644 --- a/tests/Pure.DI.UsageTests/Basics/GenericCompositionRootsWithConstraintsScenario.cs +++ b/tests/Pure.DI.UsageTests/Basics/GenericCompositionRootsWithConstraintsScenario.cs @@ -32,9 +32,8 @@ class Service(IDependency dependency) : IService where T: IDisposable where TStruct: struct; -class OtherService(IDependency dependency) : IService - where T: IDisposable - where TStruct: struct; +class OtherService(IDependency dependency) : IService + where T: IDisposable; // } public class Scenario @@ -51,11 +50,11 @@ public void Run() .Bind("Other").To(ctx => { ctx.Inject(out IDependency dependency); - return new OtherService(dependency); + return new OtherService(dependency); }) // Specifies to create a regular public method - // to get a composition root of type Service + // to get a composition root of type Service // with the name "GetMyRoot" .Root>("GetMyRoot") @@ -63,18 +62,18 @@ public void Run() // to get a composition root of type OtherService // with the name "GetOtherService" // using the "Other" tag - .Root>("GetOtherService", "Other"); + .Root>("GetOtherService", "Other"); var composition = new Composition(); - // service = new Service(new Dependency()); + // service = new Service(new Dependency()); var service = composition.GetMyRoot(); - // someOtherService = new OtherService(new Dependency()); - var someOtherService = composition.GetOtherService(); + // someOtherService = new OtherService(new Dependency()); + var someOtherService = composition.GetOtherService(); // } service.ShouldBeOfType>(); - someOtherService.ShouldBeOfType>(); + someOtherService.ShouldBeOfType>(); composition.SaveClassDiagram(); } } \ No newline at end of file