diff --git a/README.md b/README.md index 07e5bda35..5f7b78eb6 100644 --- a/README.md +++ b/README.md @@ -205,6 +205,7 @@ dotnet run - [Factory](readme/factory.md) - [Injection](readme/injection.md) - [Generic composition roots](readme/generic-composition-roots.md) +- [Generic with constraints composition roots](readme/generic-with-constraints-composition-roots.md) - [Generics](readme/generics.md) - [Arguments](readme/arguments.md) - [Root arguments](readme/root-arguments.md) diff --git a/readme/ArrayDetails.md b/readme/ArrayDetails.md index 8487e5497..7c1953203 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 _rootM03D13di; + private readonly Array _rootM03D14di; /// /// This constructor creates a new instance of . /// public Array() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -135,7 +135,7 @@ partial class Array /// Base composition. internal Array(Array baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -169,7 +169,7 @@ partial class Array #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -183,7 +183,7 @@ partial class Array #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -196,10 +196,10 @@ partial class Array #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -316,26 +316,26 @@ partial class Array " Array ..> CompositionRoot : CompositionRoot PureDIByCR()
provides CompositionRoot"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Array() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Array composite) { @@ -348,7 +348,7 @@ partial class Array } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 96b046e31..f359d3195 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 _rootM03D13di; + private readonly Enum _rootM03D14di; /// /// This constructor creates a new instance of . /// public Enum() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -135,7 +135,7 @@ partial class Enum /// Base composition. internal Enum(Enum baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #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 LocalperBlockM03D13di10_IEnumerable() + System.Collections.Generic.IEnumerable LocalperBlockM03D14di10_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 perBlockM03D13di10_IEnumerable = LocalperBlockM03D13di10_IEnumerable(); - return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D13di10_IEnumerable)), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D13di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D13di10_IEnumerable), new Pure.DI.Benchmarks.Model.Service2Enum(perBlockM03D13di10_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 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()); } #endregion @@ -178,7 +178,7 @@ partial class Enum #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -192,7 +192,7 @@ partial class Enum #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -205,10 +205,10 @@ partial class Enum #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -325,26 +325,26 @@ partial class Enum " Enum ..> CompositionRoot : CompositionRoot PureDIByCR()
provides CompositionRoot"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Enum() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Enum composite) { @@ -357,7 +357,7 @@ partial class Enum } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 df93b3c2b..7cb58cf4b 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 _rootM03D13di; + private readonly Func _rootM03D14di; /// /// This constructor creates a new instance of . /// public Func() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -114,7 +114,7 @@ partial class Func /// Base composition. internal Func(Func baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -133,14 +133,14 @@ partial class Func #endif public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { - System.Func perBlockM03D13di10_Func = new Func( + System.Func perBlockM03D14di10_Func = new Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var value_M03D13di1 = new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); - return value_M03D13di1; + var value_M03D14di1 = new Pure.DI.Benchmarks.Model.Service3(new Pure.DI.Benchmarks.Model.Service4(), new Pure.DI.Benchmarks.Model.Service4()); + return value_M03D14di1; }); - return new Pure.DI.Benchmarks.Model.CompositionRoot(new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D13di10_Func)), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D13di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D13di10_Func), new Pure.DI.Benchmarks.Model.Service2Func(perBlockM03D13di10_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(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()); } #endregion @@ -155,7 +155,7 @@ partial class Func #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -169,7 +169,7 @@ partial class Func #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -182,10 +182,10 @@ partial class Func #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Func() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Func composite) { @@ -313,7 +313,7 @@ partial class Func } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 c81eadbb3..a8048e866 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 _rootM03D13di; - private Pure.DI.Benchmarks.Model.Service1 _scopedM03D13di35_Service1; - private Pure.DI.Benchmarks.Model.Service4 _scopedM03D13di38_Service4; + private readonly Singleton _rootM03D14di; + private Pure.DI.Benchmarks.Model.Service1 _scopedM03D14di35_Service1; + private Pure.DI.Benchmarks.Model.Service4 _scopedM03D14di38_Service4; /// /// This constructor creates a new instance of . /// public Singleton() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -118,7 +118,7 @@ partial class Singleton /// Base composition. internal Singleton(Singleton baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -137,15 +137,15 @@ partial class Singleton #endif public partial Pure.DI.Benchmarks.Model.CompositionRoot PureDIByCR() { - if (ReferenceEquals(_scopedM03D13di38_Service4, null)) + if (ReferenceEquals(_scopedM03D14di38_Service4, null)) { - _scopedM03D13di38_Service4 = new Pure.DI.Benchmarks.Model.Service4(); + _scopedM03D14di38_Service4 = new Pure.DI.Benchmarks.Model.Service4(); } - if (ReferenceEquals(_scopedM03D13di35_Service1, null)) + if (ReferenceEquals(_scopedM03D14di35_Service1, null)) { - _scopedM03D13di35_Service1 = new Pure.DI.Benchmarks.Model.Service1(new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4))); + _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))); } - return new Pure.DI.Benchmarks.Model.CompositionRoot(_scopedM03D13di35_Service1, new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4)), new Pure.DI.Benchmarks.Model.Service2(new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4)), new Pure.DI.Benchmarks.Model.Service3(_scopedM03D13di38_Service4, _scopedM03D13di38_Service4), _scopedM03D13di38_Service4, _scopedM03D13di38_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); } #endregion @@ -160,7 +160,7 @@ partial class Singleton #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -174,7 +174,7 @@ partial class Singleton #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -187,10 +187,10 @@ partial class Singleton #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -288,26 +288,26 @@ partial class Singleton " Singleton ..> CompositionRoot : CompositionRoot PureDIByCR()
provides CompositionRoot"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Singleton() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Singleton composite) { @@ -320,7 +320,7 @@ partial class Singleton } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 b2ff6daa3..61b002db8 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 _rootM03D13di; + private readonly Transient _rootM03D14di; /// /// This constructor creates a new instance of . /// public Transient() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -116,7 +116,7 @@ partial class Transient /// Base composition. internal Transient(Transient baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -150,7 +150,7 @@ partial class Transient #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -164,7 +164,7 @@ partial class Transient #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -177,10 +177,10 @@ partial class Transient #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -278,26 +278,26 @@ partial class Transient " Transient ..> CompositionRoot : CompositionRoot PureDIByCR()
provides CompositionRoot"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Transient() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.Benchmarks.Model.CompositionRoot), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Transient composite) { @@ -310,7 +310,7 @@ partial class Transient } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 76a589704..f98c9f20a 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -126,7 +126,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -163,7 +163,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -177,7 +177,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -190,10 +190,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -260,26 +260,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.SeveralPartialClassesScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.SeveralPartialClassesScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -292,7 +292,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 7ae5e6498..ec7df7f88 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -194,7 +194,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -231,7 +231,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -245,7 +245,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -258,10 +258,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -330,26 +330,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.AdvancedInterceptionScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -362,7 +362,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 71c690a65..1c47a8598 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(_argM03D13di_id, _argM03D13di_serviceName); +/// var composition = new Composition(_argM03D14di_id, _argM03D14di_serviceName); /// var instance = composition.Root; /// /// @@ -123,9 +123,9 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D13di; - private readonly int _argM03D13di_id; - private readonly string _argM03D13di_serviceName; + private readonly Composition _rootM03D14di; + private readonly int _argM03D14di_id; + private readonly string _argM03D14di_serviceName; /// /// This parameterized constructor creates a new instance of with arguments. @@ -139,14 +139,14 @@ partial class Composition /// public Composition(int id, string serviceName) { - _rootM03D13di = this; + _rootM03D14di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D13di_id = id; - _argM03D13di_serviceName = serviceName; + _argM03D14di_id = id; + _argM03D14di_serviceName = serviceName; } /// @@ -155,9 +155,9 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _argM03D13di_id = baseComposition._argM03D13di_id; - _argM03D13di_serviceName = baseComposition._argM03D13di_serviceName; + _rootM03D14di = baseComposition._rootM03D14di; + _argM03D14di_id = baseComposition._argM03D14di_id; + _argM03D14di_serviceName = baseComposition._argM03D14di_serviceName; } #region Composition Roots @@ -167,7 +167,7 @@ partial class Composition /// /// This shows how to get an instance of type : /// - /// var composition = new Composition(_argM03D13di_id, _argM03D13di_serviceName); + /// var composition = new Composition(_argM03D14di_id, _argM03D14di_serviceName); /// var instance = composition.Root; /// /// @@ -178,7 +178,7 @@ partial class Composition #endif get { - return new Pure.DI.UsageTests.Basics.ArgumentsScenario.Service(_argM03D13di_serviceName, new Pure.DI.UsageTests.Basics.ArgumentsScenario.Dependency(_argM03D13di_id)); + return new Pure.DI.UsageTests.Basics.ArgumentsScenario.Service(_argM03D14di_serviceName, new Pure.DI.UsageTests.Basics.ArgumentsScenario.Dependency(_argM03D14di_id)); } } #endregion @@ -194,7 +194,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -208,7 +208,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -221,10 +221,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -295,26 +295,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ArgumentsScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ArgumentsScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -327,7 +327,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 eef20c8ac..2c22e2d37 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -151,7 +151,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -188,7 +188,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -202,7 +202,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -215,10 +215,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -292,26 +292,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ArrayScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ArrayScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -324,7 +324,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 be30f4479..878ce848d 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -134,7 +134,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #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 LocaltransientM03D13di1_IAsyncEnumerable() + async System.Collections.Generic.IAsyncEnumerable LocaltransientM03D14di1_IAsyncEnumerable() { yield return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.XyzDependency(); } - var transientM03D13di1_IAsyncEnumerable = LocaltransientM03D13di1_IAsyncEnumerable(); - return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.Service(transientM03D13di1_IAsyncEnumerable); + var transientM03D14di1_IAsyncEnumerable = LocaltransientM03D14di1_IAsyncEnumerable(); + return new Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.Service(transientM03D14di1_IAsyncEnumerable); } } #endregion @@ -178,7 +178,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -192,7 +192,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -205,10 +205,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -282,26 +282,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.AsyncEnumerableScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -314,7 +314,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 991641094..aef6696df 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -100,7 +100,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots diff --git a/readme/auto-scoped.md b/readme/auto-scoped.md index e46210dc2..7e0ddb373 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 _rootM03D13di; - private readonly object _lockM03D13di; - private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency _scopedM03D13di34_Dependency; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; + private Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency _scopedM03D14di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -163,8 +163,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -185,17 +185,17 @@ partial class Composition #endif get { - if (ReferenceEquals(_scopedM03D13di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_scopedM03D13di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D14di34_Dependency, null)) { - _scopedM03D13di34_Dependency = new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency(); + _scopedM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Dependency(); } } } - return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service(_scopedM03D13di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service(_scopedM03D14di34_Dependency); } } @@ -216,23 +216,23 @@ partial class Composition #endif get { - var perResolveM03D13di39_Func = default(System.Func); - perResolveM03D13di39_Func = new global::System.Func( + var perResolveM03D14di39_Func = default(System.Func); + perResolveM03D14di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var transientM03D13di2_Composition = this; - Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.IService transientM03D13di1_IService; + var transientM03D14di2_Composition = this; + Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.IService transientM03D14di1_IService; { - var baseComposition_M03D13di2 = transientM03D13di2_Composition; + var baseComposition_M03D14di2 = transientM03D14di2_Composition; // Creates a session - var session_M03D13di3 = new Composition(baseComposition_M03D13di2); - transientM03D13di1_IService = session_M03D13di3.SessionRoot; + var session_M03D14di3 = new Composition(baseComposition_M03D14di2); + transientM03D14di1_IService = session_M03D14di3.SessionRoot; } - var factory_M03D13di1 = transientM03D13di1_IService; - return factory_M03D13di1; + var factory_M03D14di1 = transientM03D14di1_IService; + return factory_M03D14di1; }); - return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program(perResolveM03D13di39_Func); + return new Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program(perResolveM03D14di39_Func); } } #endregion @@ -248,7 +248,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -262,7 +262,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -275,10 +275,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Service), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.AutoScopedScenario.Program), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -387,7 +387,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 6bd1a1fd9..46deae9d0 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 RootM03D13di0001 + -IDependency RootM03D14di0001 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -86,7 +86,7 @@ classDiagram <> } Service *-- Dependency : "MyDep" IDependency - Composition ..> Dependency : IDependency RootM03D13di0001
provides "MyDep" IDependency + Composition ..> Dependency : IDependency RootM03D14di0001
provides "MyDep" IDependency Composition ..> Service : IService Root
provides IService ``` @@ -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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -153,7 +153,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -184,7 +184,7 @@ partial class Composition /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency RootM03D13di0001 + public Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency RootM03D14di0001 { #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 ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -221,7 +221,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -234,10 +234,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 RootM03D13di0001\n" + + " -IDependency RootM03D14di0001\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 RootM03D13di0001
provides \"MyDep\" IDependency\n" + + " Composition ..> Dependency : IDependency RootM03D14di0001
provides \"MyDep\" IDependency\n" + " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; private static partial void OnNewRoot(global::Pure.DI.IResolver resolver, string name, object? tag, global::Pure.DI.Lifetime lifetime); static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - OnNewRoot(valResolverM03D13di_0000, "Root", null, Pure.DI.Lifetime.Transient); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - OnNewRoot(valResolverM03D13di_0001, "RootM03D13di0001", "MyDep", Pure.DI.Lifetime.Transient); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CheckForRootScenario.IService), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CheckForRootScenario.IDependency), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -346,7 +346,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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.RootM03D13di0001; + return composition.RootM03D14di0001; } 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 b61bab4b0..ad5f58f86 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -155,7 +155,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -192,7 +192,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -206,7 +206,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -219,10 +219,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di>.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di>.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ComplexGenericsScenario.Program), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ComplexGenericsScenario.Program), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -333,7 +333,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D14di_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 aa1b3cc75..8da999983 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -150,7 +150,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -223,7 +223,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -237,7 +237,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -250,10 +250,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -328,29 +328,29 @@ partial class Composition " Composition ..> Dependency : IDependency Dependency
provides IDependency"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IService), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootKindsScenario.IDependency), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -363,7 +363,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 8413ad2d6..51668af6d 100644 --- a/readme/composition-roots.md +++ b/readme/composition-roots.md @@ -71,7 +71,7 @@ classDiagram class Composition { +IService MyRoot +IService SomeOtherService - -IDependency RootM03D13di0003 + -IDependency RootM03D14di0003 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -98,7 +98,7 @@ classDiagram Service *-- Dependency : IDependency Composition ..> OtherService : IService SomeOtherService
provides "Other" IService Composition ..> Service : IService MyRoot
provides IService - Composition ..> Dependency : IDependency RootM03D13di0003
provides IDependency + Composition ..> Dependency : IDependency RootM03D14di0003
provides IDependency ``` @@ -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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -176,7 +176,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #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 RootM03D13di0003 + public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency RootM03D14di0003 { #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 ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -266,7 +266,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -279,10 +279,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 RootM03D13di0003\n" + + " -IDependency RootM03D14di0003\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
provides \"Other\" IService\n" + " Composition ..> Service : IService MyRoot
provides IService\n" + - " Composition ..> Dependency : IDependency RootM03D13di0003
provides IDependency"; + " Composition ..> Dependency : IDependency RootM03D14di0003
provides IDependency"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IService), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -392,7 +392,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.CompositionRootsScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D13di0003; + return composition.RootM03D14di0003; } 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.RootM03D13di0003; + return composition.RootM03D14di0003; } 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 074874bf9..1da69f594 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(_argM03D13di_serviceName); +/// var composition = new Composition(_argM03D14di_serviceName); /// var instance = composition.Root; /// /// @@ -102,8 +102,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D13di; - private readonly string _argM03D13di_serviceName; + private readonly Composition _rootM03D14di; + private readonly string _argM03D14di_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) { - _rootM03D13di = this; + _rootM03D14di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D13di_serviceName = serviceName; + _argM03D14di_serviceName = serviceName; } /// @@ -126,8 +126,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _argM03D13di_serviceName = baseComposition._argM03D13di_serviceName; + _rootM03D14di = baseComposition._rootM03D14di; + _argM03D14di_serviceName = baseComposition._argM03D14di_serviceName; } #region Composition Roots @@ -137,7 +137,7 @@ partial class Composition /// /// This shows how to get an instance of type : /// - /// var composition = new Composition(_argM03D13di_serviceName); + /// var composition = new Composition(_argM03D14di_serviceName); /// var instance = composition.Root; /// /// @@ -148,7 +148,7 @@ partial class Composition #endif get { - return new Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.Service(_argM03D13di_serviceName); + return new Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.Service(_argM03D14di_serviceName); } } #endregion @@ -164,7 +164,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -178,7 +178,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -191,10 +191,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -255,26 +255,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.ConstructorOrdinalAttributeScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -287,7 +287,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 a3df2d943..4f5096acd 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(_argM03D13di_personId); +/// var composition = new PersonComposition(_argM03D14di_personId); /// var instance = composition.Person; /// /// @@ -118,8 +118,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class PersonComposition { - private readonly PersonComposition _rootM03D13di; - private readonly int _argM03D13di_personId; + private readonly PersonComposition _rootM03D14di; + private readonly int _argM03D14di_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) { - _rootM03D13di = this; - _argM03D13di_personId = personId; + _rootM03D14di = this; + _argM03D14di_personId = personId; } /// @@ -137,8 +137,8 @@ partial class PersonComposition /// Base composition. internal PersonComposition(PersonComposition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _argM03D13di_personId = baseComposition._argM03D13di_personId; + _rootM03D14di = baseComposition._rootM03D14di; + _argM03D14di_personId = baseComposition._argM03D14di_personId; } #region Composition Roots @@ -148,7 +148,7 @@ partial class PersonComposition /// /// This shows how to get an instance of type : /// - /// var composition = new PersonComposition(_argM03D13di_personId); + /// var composition = new PersonComposition(_argM03D14di_personId); /// var instance = composition.Person; /// /// @@ -159,10 +159,10 @@ partial class PersonComposition #endif get { - string transientM03D13di1_String = "Nik"; - var transientM03D13di0_Person = new Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person(transientM03D13di1_String); - transientM03D13di0_Person.Id = _argM03D13di_personId; - return transientM03D13di0_Person; + string transientM03D14di1_String = "Nik"; + var transientM03D14di0_Person = new Pure.DI.UsageTests.Attributes.CustomAttributesScenario.Person(transientM03D14di1_String); + transientM03D14di0_Person.Id = _argM03D14di_personId; + return transientM03D14di0_Person; } } #endregion @@ -178,7 +178,7 @@ partial class PersonComposition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -192,7 +192,7 @@ partial class PersonComposition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -205,10 +205,10 @@ partial class PersonComposition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -272,26 +272,26 @@ partial class PersonComposition " PersonComposition ..> Person : IPerson Person
provides IPerson"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static PersonComposition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.CustomAttributesScenario.IPerson), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(PersonComposition composite) { @@ -304,7 +304,7 @@ partial class PersonComposition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 24efe1f5e..bec41d620 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -111,7 +111,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -148,7 +148,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -162,7 +162,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -175,10 +175,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -242,26 +242,26 @@ partial class Composition " Composition ..> GreetingService : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.DecoratorScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.DecoratorScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -274,7 +274,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 e5f3dc9be..b907c3b0d 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 _rootM03D13di; - private readonly object _lockM03D13di; - private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service _singletonM03D13di35_Service; - private Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency _singletonM03D13di34_Dependency; + 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; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -128,8 +128,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -150,23 +150,23 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di35_Service, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_Service, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di35_Service, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_Service, null)) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } - _singletonM03D13di35_Service = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service(_singletonM03D13di34_Dependency, _rootM03D13di._singletonM03D13di34_Dependency); - _rootM03D13di._singletonM03D13di35_Service = _singletonM03D13di35_Service; + _singletonM03D14di35_Service = new Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.Service(_singletonM03D14di34_Dependency, _rootM03D14di._singletonM03D14di34_Dependency); + _rootM03D14di._singletonM03D14di35_Service = _singletonM03D14di35_Service; } } } - return _rootM03D13di._singletonM03D13di35_Service; + return _rootM03D14di._singletonM03D14di35_Service; } } #endregion @@ -182,7 +182,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -196,7 +196,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -209,10 +209,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -280,26 +280,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DefaultLifetimeScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -312,7 +312,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 6e1f88fa2..8f35087a9 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -117,7 +117,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -157,7 +157,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -171,7 +171,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -184,10 +184,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -255,26 +255,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DefaultValuesScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -287,7 +287,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 6e1502157..6c3d4fcd0 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -139,7 +139,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -176,7 +176,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -190,7 +190,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -203,10 +203,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -273,26 +273,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -305,7 +305,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 _rootM03D13di; + private readonly OtherComposition _rootM03D14di; /// /// This constructor creates a new instance of . /// public OtherComposition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -393,7 +393,7 @@ partial class OtherComposition /// Base composition. internal OtherComposition(OtherComposition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -451,7 +451,7 @@ partial class OtherComposition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -465,7 +465,7 @@ partial class OtherComposition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -478,10 +478,10 @@ partial class OtherComposition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -554,29 +554,29 @@ partial class OtherComposition " OtherComposition ..> Program : Program Program
provides Program"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static OtherComposition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.IService), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.DependentCompositionsScenario.Program), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(OtherComposition composite) { @@ -589,7 +589,7 @@ partial class OtherComposition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 1b83003ba..0c1c28809 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 _rootM03D13di; - private readonly object _lockM03D13di; - private readonly global::System.IDisposable[] _disposablesM03D13di; - private int _disposeIndexM03D13di; - private Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency _singletonM03D13di34_Dependency; + 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; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); - _disposablesM03D13di = new global::System.IDisposable[1]; + _rootM03D14di = this; + _lockM03D14di = new object(); + _disposablesM03D14di = new global::System.IDisposable[1]; } /// @@ -136,8 +136,8 @@ partial class Composition: global::System.IDisposable /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -158,19 +158,19 @@ partial class Composition: global::System.IDisposable #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; - _rootM03D13di._disposablesM03D13di[_rootM03D13di._disposeIndexM03D13di++] = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; + _rootM03D14di._disposablesM03D14di[_rootM03D14di._disposeIndexM03D14di++] = _singletonM03D14di34_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Service(_rootM03D13di._singletonM03D13di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); } } #endregion @@ -186,7 +186,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -200,7 +200,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 (_lockM03D13di) + lock (_lockM03D14di) { - while (_disposeIndexM03D13di > 0) + while (_disposeIndexM03D14di > 0) { - var disposableInstance = _disposablesM03D13di[--_disposeIndexM03D13di]; + var disposableInstance = _disposablesM03D14di[--_disposeIndexM03D14di]; try { disposableInstance.Dispose(); @@ -272,7 +272,7 @@ partial class Composition: global::System.IDisposable } } - _singletonM03D13di34_Dependency = null; + _singletonM03D14di34_Dependency = null; } } @@ -311,26 +311,26 @@ partial class Composition: global::System.IDisposable " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.DisposableSingletonScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -343,7 +343,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 3ed0d4ad5..dd5b08e3e 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -164,7 +164,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #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> LocalperBlockM03D13di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D14di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.XyzDependency(); } - var perBlockM03D13di1_IEnumerable = LocalperBlockM03D13di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D13di1_IEnumerable); + var perBlockM03D14di1_IEnumerable = LocalperBlockM03D14di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D14di1_IEnumerable); } } @@ -214,13 +214,13 @@ partial class Composition get { [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)0x200)] - System.Collections.Generic.IEnumerable> LocalperBlockM03D13di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D14di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.XyzDependency(); } - var perBlockM03D13di1_IEnumerable = LocalperBlockM03D13di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D13di1_IEnumerable); + var perBlockM03D14di1_IEnumerable = LocalperBlockM03D14di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.Service(perBlockM03D14di1_IEnumerable); } } #endregion @@ -236,7 +236,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -250,7 +250,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -263,10 +263,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di>.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di>.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableGenericsScenario.IService), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -399,7 +399,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D14di_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 ResolverM03D13di_0001: global::Pure.DI.IResolver> + private sealed class ResolverM03D14di_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 43dff8620..e31b8bcdc 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -126,7 +126,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #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 LocalperBlockM03D13di1_IEnumerable() + System.Collections.Generic.IEnumerable LocalperBlockM03D14di1_IEnumerable() { yield return new Pure.DI.UsageTests.BCL.EnumerableScenario.AbcDependency(); yield return new Pure.DI.UsageTests.BCL.EnumerableScenario.XyzDependency(); } - var perBlockM03D13di1_IEnumerable = LocalperBlockM03D13di1_IEnumerable(); - return new Pure.DI.UsageTests.BCL.EnumerableScenario.Service(perBlockM03D13di1_IEnumerable); + var perBlockM03D14di1_IEnumerable = LocalperBlockM03D14di1_IEnumerable(); + return new Pure.DI.UsageTests.BCL.EnumerableScenario.Service(perBlockM03D14di1_IEnumerable); } } #endregion @@ -170,7 +170,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -184,7 +184,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -197,10 +197,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -274,26 +274,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.EnumerableScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -306,7 +306,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 a7bd94230..7e07ba701 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -128,7 +128,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -149,13 +149,13 @@ partial class Composition #endif get { - Pure.DI.UsageTests.Basics.FactoryScenario.Dependency transientM03D13di1_Dependency; + Pure.DI.UsageTests.Basics.FactoryScenario.Dependency transientM03D14di1_Dependency; { - var dependency_M03D13di1 = new Dependency(DateTimeOffset.Now); - dependency_M03D13di1.Initialize(); - transientM03D13di1_Dependency = dependency_M03D13di1; + var dependency_M03D14di1 = new Dependency(DateTimeOffset.Now); + dependency_M03D14di1.Initialize(); + transientM03D14di1_Dependency = dependency_M03D14di1; } - return new Pure.DI.UsageTests.Basics.FactoryScenario.Service(transientM03D13di1_Dependency); + return new Pure.DI.UsageTests.Basics.FactoryScenario.Service(transientM03D14di1_Dependency); } } #endregion @@ -171,7 +171,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -185,7 +185,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -198,10 +198,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -266,26 +266,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FactoryScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FactoryScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -298,7 +298,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 7b5188e95..cea2036bf 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -117,7 +117,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -138,9 +138,9 @@ partial class Composition #endif get { - var transientM03D13di0_Service = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service(); - transientM03D13di0_Service.DependencyVal = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Dependency(); - return transientM03D13di0_Service; + var transientM03D14di0_Service = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Service(); + transientM03D14di0_Service.DependencyVal = new Pure.DI.UsageTests.Basics.FieldInjectionScenario.Dependency(); + return transientM03D14di0_Service; } } #endregion @@ -156,7 +156,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -170,7 +170,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -183,10 +183,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -254,26 +254,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.FieldInjectionScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -286,7 +286,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 aeca0888b..7e4d99a63 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 _rootM03D13di; - private readonly object _lockM03D13di; - private Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock _singletonM03D13di34_Clock; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; + private Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock _singletonM03D14di34_Clock; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -157,8 +157,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -179,24 +179,24 @@ partial class Composition #endif get { - System.Func transientM03D13di1_Func = dependencyId => + System.Func transientM03D14di1_Func = dependencyId => { - int transientM03D13di3_Int32 = dependencyId; - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Clock, null)) + int transientM03D14di3_Int32 = dependencyId; + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Clock, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Clock, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Clock, null)) { - _singletonM03D13di34_Clock = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock(); - _rootM03D13di._singletonM03D13di34_Clock = _singletonM03D13di34_Clock; + _singletonM03D14di34_Clock = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Clock(); + _rootM03D14di._singletonM03D14di34_Clock = _singletonM03D14di34_Clock; } } } - var dependency_M03D13di1 = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Dependency(_rootM03D13di._singletonM03D13di34_Clock, transientM03D13di3_Int32); - return dependency_M03D13di1; + var dependency_M03D14di1 = new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Dependency(_rootM03D14di._singletonM03D14di34_Clock, transientM03D14di3_Int32); + return dependency_M03D14di1; }; - return new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Service(transientM03D13di1_Func); + return new Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.Service(transientM03D14di1_Func); } } #endregion @@ -212,7 +212,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -226,7 +226,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -239,10 +239,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -317,26 +317,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncWithArgumentsScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -349,7 +349,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 2d0ecf977..c40ff4b4b 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 _rootM03D13di; - private readonly object _lockM03D13di; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -123,8 +123,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -145,15 +145,15 @@ partial class Composition #endif get { - var perResolveM03D13di36_Func = default(System.Func); - perResolveM03D13di36_Func = new global::System.Func( + var perResolveM03D14di36_Func = default(System.Func); + perResolveM03D14di36_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D13di1 = new Pure.DI.UsageTests.BCL.FuncScenario.Dependency(); - return factory_M03D13di1; + var factory_M03D14di1 = new Pure.DI.UsageTests.BCL.FuncScenario.Dependency(); + return factory_M03D14di1; }); - return new Pure.DI.UsageTests.BCL.FuncScenario.Service(perResolveM03D13di36_Func); + return new Pure.DI.UsageTests.BCL.FuncScenario.Service(perResolveM03D14di36_Func); } } #endregion @@ -169,7 +169,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -183,7 +183,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -196,10 +196,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.FuncScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -300,7 +300,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.FuncScenario.IService Resolve(Composition composition) { diff --git a/readme/generic-composition-roots.md b/readme/generic-composition-roots.md index 1b0dd50fb..b7ab0c455 100644 --- a/readme/generic-composition-roots.md +++ b/readme/generic-composition-roots.md @@ -135,14 +135,14 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -151,7 +151,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -193,12 +193,12 @@ partial class Composition #endif public Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.IService GetOtherService() { - Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.OtherService transientM03D13di0_OtherService; + Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.OtherService transientM03D14di0_OtherService; { - var dependency_M03D13di1 = new Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.Dependency(); - transientM03D13di0_OtherService = new OtherService(dependency_M03D13di1); + var dependency_M03D14di1 = new Pure.DI.UsageTests.Basics.GenericsCompositionRootsScenario.Dependency(); + transientM03D14di0_OtherService = new OtherService(dependency_M03D14di1); } - return transientM03D13di0_OtherService; + return transientM03D14di0_OtherService; } #endregion @@ -213,7 +213,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -227,7 +227,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -297,9 +297,9 @@ partial class Composition #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { diff --git a/readme/generic-with-constraints-composition-roots.md b/readme/generic-with-constraints-composition-roots.md new file mode 100644 index 000000000..2b00bc3bb --- /dev/null +++ b/readme/generic-with-constraints-composition-roots.md @@ -0,0 +1,327 @@ +#### Generic with constraints composition roots + +[![CSharp](https://img.shields.io/badge/C%23-code-blue.svg)](../tests/Pure.DI.UsageTests/Basics/GenericsWithConstraintsCompositionRootsScenario.cs) + +```c# +interface IDependency + where T: IDisposable; + +class Dependency : IDependency + where T: IDisposable; + +interface IService + where T: IDisposable + where TStruct: struct; + +class Service(IDependency dependency) : IService + where T: IDisposable + where TStruct: struct; + +class OtherService(IDependency dependency) : IService + where T: IDisposable + where TStruct: struct; + +DI.Setup(nameof(Composition)) + .Bind().To>() + .Bind().To>() + // Creates OtherService manually, + // just for the sake of example + .Bind("Other").To(ctx => + { + ctx.Inject(out IDependency dependency); + return new OtherService(dependency); + }) + + // Specifies to create a regular public method + // to get a composition root of type Service + // with the name "GetMyRoot" + .Root>("GetMyRoot") + + // Specifies to create a regular public method + // to get a composition root of type OtherService + // with the name "GetOtherService" + // using the "Other" tag + .Root>("GetOtherService", "Other"); + +var composition = new Composition(); + +// service = new Service(new Dependency()); +var service = composition.GetMyRoot(); + +// someOtherService = new OtherService(new Dependency()); +var someOtherService = composition.GetOtherService(); +``` + +
+Class Diagram + +```mermaid +classDiagram + class Composition { + +IServiceᐸT49ˏT51ᐳ GetMyRootᐸT49ˏT51ᐳ() + +IServiceᐸT49ˏT51ᐳ GetOtherServiceᐸT49ˏT51ᐳ() + + T ResolveᐸTᐳ() + + T ResolveᐸTᐳ(object? tag) + + object Resolve(Type type) + + object Resolve(Type type, object? tag) + } + ServiceᐸT49ˏT51ᐳ --|> IServiceᐸT49ˏT51ᐳ : + class ServiceᐸT49ˏT51ᐳ { + +Service(IDependencyᐸT49ᐳ dependency) + } + OtherServiceᐸT49ˏT51ᐳ --|> IServiceᐸT49ˏT51ᐳ : "Other" + class OtherServiceᐸT49ˏT51ᐳ + DependencyᐸT49ᐳ --|> IDependencyᐸT49ᐳ : + class DependencyᐸT49ᐳ { + +Dependency() + } + class IServiceᐸT49ˏT51ᐳ { + <> + } + class IDependencyᐸT49ᐳ { + <> + } + Composition ..> ServiceᐸT49ˏT51ᐳ : IServiceᐸT49ˏT51ᐳ GetMyRootᐸT49ˏT51ᐳ()
provides IServiceᐸT49ˏT51ᐳ + Composition ..> OtherServiceᐸT49ˏT51ᐳ : IServiceᐸT49ˏT51ᐳ GetOtherServiceᐸT49ˏT51ᐳ()
provides "Other" IServiceᐸT49ˏT51ᐳ + ServiceᐸT49ˏT51ᐳ *-- DependencyᐸT49ᐳ : IDependencyᐸT49ᐳ + OtherServiceᐸT49ˏT51ᐳ *-- DependencyᐸT49ᐳ : IDependencyᐸT49ᐳ +``` + +
+ +
+Pure.DI-generated partial class Composition
+ +```c# +/// +/// Composition roots
+/// +/// +/// Root +/// Description +/// +/// +/// +/// +/// +/// +/// Specifies to create a regular public method
+/// to get a composition root of type Service<T>
+/// with the name "GetMyRoot" +///
+///
+/// +/// +/// +/// +/// +/// Specifies to create a regular public method
+/// to get a composition root of type OtherService<T>
+/// with the name "GetOtherService"
+/// using the "Other" tag +///
+///
+///
+///
+///
+/// +/// This shows how to get an instance of type using the composition root : +/// +/// var composition = new Composition(); +/// var instance = composition.GetMyRoot<T49, T51>(); +/// +/// +/// Class diagram
+/// This class was created by Pure.DI source code generator. +/// +/// +/// +[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] +partial class Composition +{ + private readonly Composition _rootM03D14di; + + /// + /// This constructor creates a new instance of . + /// + public Composition() + { + _rootM03D14di = this; + } + + /// + /// This constructor creates a new instance of scope based on . This allows the life time to be applied. + /// + /// Base composition. + internal Composition(Composition baseComposition) + { + _rootM03D14di = baseComposition._rootM03D14di; + } + + #region Composition Roots + /// + /// Specifies to create a regular public method
+ /// to get a composition root of type Service<T>
+ /// with the name "GetMyRoot" + ///
+ /// + /// This shows how to get an instance of type : + /// + /// var composition = new Composition(); + /// var instance = composition.GetMyRoot<T49, T51>(); + /// + /// + #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET + [global::System.Diagnostics.Contracts.Pure] + #endif + public Pure.DI.UsageTests.Basics.GenericsWithConstraintsCompositionRootsScenario.IService GetMyRoot() + where T49: System.IDisposable + where T51: struct + { + return new Pure.DI.UsageTests.Basics.GenericsWithConstraintsCompositionRootsScenario.Service(new Pure.DI.UsageTests.Basics.GenericsWithConstraintsCompositionRootsScenario.Dependency()); + } + + /// + /// Specifies to create a regular public method
+ /// to get a composition root of type OtherService<T>
+ /// with the name "GetOtherService"
+ /// using the "Other" tag + ///
+ /// + /// This shows how to get an instance of type : + /// + /// var composition = new Composition(); + /// var instance = composition.GetOtherService<T49, T51>(); + /// + /// + #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET + [global::System.Diagnostics.Contracts.Pure] + #endif + public Pure.DI.UsageTests.Basics.GenericsWithConstraintsCompositionRootsScenario.IService GetOtherService() + where T49: System.IDisposable + where T51: struct + { + Pure.DI.UsageTests.Basics.GenericsWithConstraintsCompositionRootsScenario.OtherService transientM03D14di0_OtherService; + { + var dependency_M03D14di1 = new Pure.DI.UsageTests.Basics.GenericsWithConstraintsCompositionRootsScenario.Dependency(); + transientM03D14di0_OtherService = new OtherService(dependency_M03D14di1); + } + return transientM03D14di0_OtherService; + } + #endregion + + #region API + /// + /// Resolves the composition root. + /// + /// The type of the composition root. + /// A composition root. + #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET + [global::System.Diagnostics.Contracts.Pure] + #endif + public T Resolve() + { + return ResolverM03D14di.Value.Resolve(this); + } + + /// + /// Resolves the composition root by tag. + /// + /// The type of the composition root. + /// The tag of a composition root. + /// A composition root. + #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET + [global::System.Diagnostics.Contracts.Pure] + #endif + public T Resolve(object? tag) + { + return ResolverM03D14di.Value.ResolveByTag(this, tag); + } + + /// + /// Resolves the composition root. + /// + /// The type of the composition root. + /// A composition root. + #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET + [global::System.Diagnostics.Contracts.Pure] + #endif + public object Resolve(global::System.Type type) + { + throw new global::System.InvalidOperationException($"Cannot resolve composition root of type {type}."); + } + + /// + /// Resolves the composition root by tag. + /// + /// The type of the composition root. + /// The tag of a composition root. + /// A composition root. + #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET + [global::System.Diagnostics.Contracts.Pure] + #endif + public object Resolve(global::System.Type type, object? tag) + { + throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type {type}."); + } + #endregion + + /// + /// This method provides a class diagram in mermaid format. To see this diagram, simply call the method and copy the text to this site https://mermaid.live/. + /// + public override string ToString() + { + return + "classDiagram\n" + + " class Composition {\n" + + " +IServiceᐸT49ˏT51ᐳ GetMyRootᐸT49ˏT51ᐳ()\n" + + " +IServiceᐸT49ˏT51ᐳ GetOtherServiceᐸT49ˏT51ᐳ()\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ᐸT49ˏT51ᐳ --|> IServiceᐸT49ˏT51ᐳ : \n" + + " class ServiceᐸT49ˏT51ᐳ {\n" + + " +Service(IDependencyᐸT49ᐳ dependency)\n" + + " }\n" + + " OtherServiceᐸT49ˏT51ᐳ --|> IServiceᐸT49ˏT51ᐳ : \"Other\" \n" + + " class OtherServiceᐸT49ˏT51ᐳ\n" + + " DependencyᐸT49ᐳ --|> IDependencyᐸT49ᐳ : \n" + + " class DependencyᐸT49ᐳ {\n" + + " +Dependency()\n" + + " }\n" + + " class IServiceᐸT49ˏT51ᐳ {\n" + + " <>\n" + + " }\n" + + " class IDependencyᐸT49ᐳ {\n" + + " <>\n" + + " }\n" + + " Composition ..> ServiceᐸT49ˏT51ᐳ : IServiceᐸT49ˏT51ᐳ GetMyRootᐸT49ˏT51ᐳ()
provides IServiceᐸT49ˏT51ᐳ\n" + + " Composition ..> OtherServiceᐸT49ˏT51ᐳ : IServiceᐸT49ˏT51ᐳ GetOtherServiceᐸT49ˏT51ᐳ()
provides \"Other\" IServiceᐸT49ˏT51ᐳ\n" + + " ServiceᐸT49ˏT51ᐳ *-- DependencyᐸT49ᐳ : IDependencyᐸT49ᐳ\n" + + " OtherServiceᐸT49ˏT51ᐳ *-- DependencyᐸT49ᐳ : IDependencyᐸT49ᐳ"; + } + + + #region Resolvers + private sealed class ResolverM03D14di: global::Pure.DI.IResolver + { + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); + + public T Resolve(Composition composite) + { + throw new global::System.InvalidOperationException($"Cannot resolve composition root of type {typeof(T)}."); + } + + public T ResolveByTag(Composition composite, object tag) + { + throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type {typeof(T)}."); + } + } + #endregion +} +``` + + + diff --git a/readme/generics.md b/readme/generics.md index 5dd2c68ea..f5f24409d 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -140,7 +140,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -177,7 +177,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -191,7 +191,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -204,10 +204,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -282,26 +282,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.GenericsScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.GenericsScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -314,7 +314,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 145305785..9fe67a79d 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -118,7 +118,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -139,12 +139,12 @@ partial class Composition #endif get { - Pure.DI.UsageTests.Basics.InjectionScenario.Service transientM03D13di0_Service; + Pure.DI.UsageTests.Basics.InjectionScenario.Service transientM03D14di0_Service; { - var dependency_M03D13di1 = new Pure.DI.UsageTests.Basics.InjectionScenario.Dependency(); - transientM03D13di0_Service = new Service(dependency_M03D13di1); + var dependency_M03D14di1 = new Pure.DI.UsageTests.Basics.InjectionScenario.Dependency(); + transientM03D14di0_Service = new Service(dependency_M03D14di1); } - return transientM03D13di0_Service; + return transientM03D14di0_Service; } } #endregion @@ -160,7 +160,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -174,7 +174,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -187,10 +187,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -255,26 +255,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InjectionScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InjectionScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -287,7 +287,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 c7a1a7669..cfab38103 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -126,7 +126,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots diff --git a/readme/instance-initialization.md b/readme/instance-initialization.md index 8d101d5c7..43c30c4b1 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(_argM03D13di_serviceName); +/// var composition = new Composition(_argM03D14di_serviceName); /// var instance = composition.Root; /// /// @@ -118,8 +118,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D13di; - private readonly string _argM03D13di_serviceName; + private readonly Composition _rootM03D14di; + private readonly string _argM03D14di_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) { - _rootM03D13di = this; + _rootM03D14di = this; if (ReferenceEquals(serviceName, null)) { throw new global::System.ArgumentNullException("serviceName"); } - _argM03D13di_serviceName = serviceName; + _argM03D14di_serviceName = serviceName; } /// @@ -142,8 +142,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _argM03D13di_serviceName = baseComposition._argM03D13di_serviceName; + _rootM03D14di = baseComposition._rootM03D14di; + _argM03D14di_serviceName = baseComposition._argM03D14di_serviceName; } #region Composition Roots @@ -153,7 +153,7 @@ partial class Composition /// /// This shows how to get an instance of type : /// - /// var composition = new Composition(_argM03D13di_serviceName); + /// var composition = new Composition(_argM03D14di_serviceName); /// var instance = composition.Root; /// /// @@ -164,13 +164,13 @@ partial class Composition #endif get { - Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service transientM03D13di0_Service; + Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service transientM03D14di0_Service; { - var service_M03D13di1 = new Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Service(_argM03D13di_serviceName, new Pure.DI.UsageTests.Basics.InstanceInitializationScenario.Dependency()); - service_M03D13di1.Initialize(); - transientM03D13di0_Service = service_M03D13di1; + 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; } - return transientM03D13di0_Service; + return transientM03D14di0_Service; } } #endregion @@ -186,7 +186,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -200,7 +200,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -213,10 +213,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -281,26 +281,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InstanceInitializationScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.InstanceInitializationScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -313,7 +313,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 59cf20927..101aff38d 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -130,7 +130,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -167,7 +167,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -181,7 +181,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -194,10 +194,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -258,26 +258,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.InterceptionScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Interception.InterceptionScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -290,7 +290,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 c2d68c7df..dc3e1dbf1 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 RootM03D13di0001 - -IService RootM03D13di0002 + -IDependency RootM03D14di0001 + -IService RootM03D14di0002 + 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 RootM03D13di0001
provides "Dependency Key" IDependency - Composition ..> Service : IService RootM03D13di0002
provides "Service Key" IService + Composition ..> Dependency : IDependency RootM03D14di0001
provides "Dependency Key" IDependency + Composition ..> Service : IService RootM03D14di0002
provides "Service Key" IService ``` @@ -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 _rootM03D13di; - private readonly object _lockM03D13di; - private Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency _singletonM03D13di34_Dependency; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; + private Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency _singletonM03D14di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -135,58 +135,58 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency RootM03D13di0001 + public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency RootM03D14di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } } } - return _rootM03D13di._singletonM03D13di34_Dependency; + return _rootM03D14di._singletonM03D14di34_Dependency; } } /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService RootM03D13di0002 + public Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService RootM03D14di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } } } - return new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Service(_rootM03D13di._singletonM03D13di34_Dependency); + return new Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); } } #endregion @@ -202,7 +202,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -216,7 +216,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -229,10 +229,10 @@ partial class Composition #endif public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 RootM03D13di0001\n" + - " -IService RootM03D13di0002\n" + + " -IDependency RootM03D14di0001\n" + + " -IService RootM03D14di0002\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 RootM03D13di0001
provides \"Dependency Key\" IDependency\n" + - " Composition ..> Service : IService RootM03D13di0002
provides \"Service Key\" IService"; + " Composition ..> Dependency : IDependency RootM03D14di0001
provides \"Dependency Key\" IDependency\n" + + " Composition ..> Service : IService RootM03D14di0002
provides \"Service Key\" IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IService), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -336,7 +336,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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.RootM03D13di0001; + return composition.RootM03D14di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.KeyedServiceProviderScenario.IDependency."); } } - private sealed class ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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.RootM03D13di0002; + return composition.RootM03D14di0002; } 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 1b8dc0850..8489d1908 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 _rootM03D13di; - private readonly object _lockM03D13di; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -117,8 +117,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -139,20 +139,20 @@ partial class Composition #endif get { - var perResolveM03D13di37_Func = default(System.Func); - perResolveM03D13di37_Func = new global::System.Func( + var perResolveM03D14di37_Func = default(System.Func); + perResolveM03D14di37_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D13di1 = new Pure.DI.UsageTests.BCL.LazyScenario.Dependency(); - return factory_M03D13di1; + var factory_M03D14di1 = new Pure.DI.UsageTests.BCL.LazyScenario.Dependency(); + return factory_M03D14di1; }); - System.Lazy transientM03D13di1_Lazy; + System.Lazy transientM03D14di1_Lazy; { - var factory_M03D13di2 = perResolveM03D13di37_Func; - transientM03D13di1_Lazy = new global::System.Lazy(factory_M03D13di2, true); + var factory_M03D14di2 = perResolveM03D14di37_Func; + transientM03D14di1_Lazy = new global::System.Lazy(factory_M03D14di2, true); } - return new Pure.DI.UsageTests.BCL.LazyScenario.Service(transientM03D13di1_Lazy); + return new Pure.DI.UsageTests.BCL.LazyScenario.Service(transientM03D14di1_Lazy); } } #endregion @@ -168,7 +168,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -182,7 +182,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -195,10 +195,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.LazyScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.LazyScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -301,7 +301,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 6b26e219c..02e5d1c8d 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 _rootM03D13di; - private readonly object _lockM03D13di; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; /// /// This parameterized constructor creates a new instance of with arguments. /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -158,8 +158,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -178,21 +178,21 @@ partial class Composition #endif public Pure.DI.UsageTests.BCL.ManualTaskScenario.IService GetRoot(System.Threading.CancellationToken cancellationToken) { - var perResolveM03D13di39_Func = default(System.Func); - perResolveM03D13di39_Func = new global::System.Func( + var perResolveM03D14di39_Func = default(System.Func); + perResolveM03D14di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D13di1 = new Pure.DI.UsageTests.BCL.ManualTaskScenario.Dependency(); - return factory_M03D13di1; + var factory_M03D14di1 = new Pure.DI.UsageTests.BCL.ManualTaskScenario.Dependency(); + return factory_M03D14di1; }); - System.Threading.Tasks.Task transientM03D13di1_Task; + System.Threading.Tasks.Task transientM03D14di1_Task; { - var factory_M03D13di2 = perResolveM03D13di39_Func; - var cancellationToken_M03D13di3 = cancellationToken; - transientM03D13di1_Task = new Task(factory_M03D13di2, cancellationToken_M03D13di3); + var factory_M03D14di2 = perResolveM03D14di39_Func; + var cancellationToken_M03D14di3 = cancellationToken; + transientM03D14di1_Task = new Task(factory_M03D14di2, cancellationToken_M03D14di3); } - return new Pure.DI.UsageTests.BCL.ManualTaskScenario.Service(transientM03D13di1_Task); + return new Pure.DI.UsageTests.BCL.ManualTaskScenario.Service(transientM03D14di1_Task); } #endregion diff --git a/readme/member-ordinal-attribute.md b/readme/member-ordinal-attribute.md index 1a274cb4c..d5859df07 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(_argM03D13di_personId, _argM03D13di_personName, _argM03D13di_personBirthday); +/// var composition = new PersonComposition(_argM03D14di_personId, _argM03D14di_personName, _argM03D14di_personBirthday); /// var instance = composition.Person; /// /// @@ -128,10 +128,10 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class PersonComposition { - private readonly PersonComposition _rootM03D13di; - private readonly int _argM03D13di_personId; - private readonly string _argM03D13di_personName; - private readonly System.DateTime _argM03D13di_personBirthday; + private readonly PersonComposition _rootM03D14di; + private readonly int _argM03D14di_personId; + private readonly string _argM03D14di_personName; + private readonly System.DateTime _argM03D14di_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) { - _rootM03D13di = this; + _rootM03D14di = this; if (ReferenceEquals(personName, null)) { throw new global::System.ArgumentNullException("personName"); } - _argM03D13di_personId = personId; - _argM03D13di_personName = personName; - _argM03D13di_personBirthday = personBirthday; + _argM03D14di_personId = personId; + _argM03D14di_personName = personName; + _argM03D14di_personBirthday = personBirthday; } /// @@ -158,10 +158,10 @@ partial class PersonComposition /// Base composition. internal PersonComposition(PersonComposition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _argM03D13di_personId = baseComposition._argM03D13di_personId; - _argM03D13di_personName = baseComposition._argM03D13di_personName; - _argM03D13di_personBirthday = baseComposition._argM03D13di_personBirthday; + _rootM03D14di = baseComposition._rootM03D14di; + _argM03D14di_personId = baseComposition._argM03D14di_personId; + _argM03D14di_personName = baseComposition._argM03D14di_personName; + _argM03D14di_personBirthday = baseComposition._argM03D14di_personBirthday; } #region Composition Roots @@ -171,7 +171,7 @@ partial class PersonComposition /// /// This shows how to get an instance of type : /// - /// var composition = new PersonComposition(_argM03D13di_personId, _argM03D13di_personName, _argM03D13di_personBirthday); + /// var composition = new PersonComposition(_argM03D14di_personId, _argM03D14di_personName, _argM03D14di_personBirthday); /// var instance = composition.Person; /// /// @@ -182,11 +182,11 @@ partial class PersonComposition #endif get { - var transientM03D13di0_Person = new Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.Person(); - transientM03D13di0_Person.Id = _argM03D13di_personId; - transientM03D13di0_Person.FirstName = _argM03D13di_personName; - transientM03D13di0_Person.Birthday = _argM03D13di_personBirthday; - return transientM03D13di0_Person; + 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; } } #endregion @@ -202,7 +202,7 @@ partial class PersonComposition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -216,7 +216,7 @@ partial class PersonComposition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -229,10 +229,10 @@ partial class PersonComposition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -300,26 +300,26 @@ partial class PersonComposition " PersonComposition ..> Person : IPerson Person
provides IPerson"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static PersonComposition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.MemberOrdinalAttributeScenario.IPerson), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(PersonComposition composite) { @@ -332,7 +332,7 @@ partial class PersonComposition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 3e779fb55..d0a33cd80 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -118,7 +118,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -139,9 +139,9 @@ partial class Composition #endif get { - var transientM03D13di0_Service = new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service(); - transientM03D13di0_Service.SetDependency(new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Dependency()); - return transientM03D13di0_Service; + var transientM03D14di0_Service = new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Service(); + transientM03D14di0_Service.SetDependency(new Pure.DI.UsageTests.Basics.MethodInjectionScenario.Dependency()); + return transientM03D14di0_Service; } } #endregion @@ -157,7 +157,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -171,7 +171,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -184,10 +184,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -255,26 +255,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MethodInjectionScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -287,7 +287,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 72ba06913..6d4eaac2a 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -118,7 +118,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -155,7 +155,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -169,7 +169,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -182,10 +182,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -257,26 +257,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.MultiContractBindingsScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -289,7 +289,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 a82f77b8b..f24c8b1d1 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -143,7 +143,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -164,8 +164,8 @@ partial class Composition #endif get { - var transientM03D13di2_String = OnCannotResolve(null, Pure.DI.Lifetime.Transient); - return new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Service(new Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.Dependency(transientM03D13di2_String)); + 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)); } } #endregion @@ -181,7 +181,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -195,7 +195,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -208,10 +208,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -282,26 +282,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnCannotResolveHintScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -314,7 +314,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 31f66d069..ce98f8094 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -140,7 +140,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -177,7 +177,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -191,7 +191,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -204,10 +204,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -276,26 +276,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnDependencyInjectionHintScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -308,7 +308,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 7f3c72f3c..7912507d0 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 _rootM03D13di; - private readonly object _lockM03D13di; - private Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D13di34_Dependency; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; + private Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D14di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -145,8 +145,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -167,24 +167,24 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency _singletonM03D13di34_DependencyTemp; - _singletonM03D13di34_DependencyTemp = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Dependency(); - OnNewInstance(ref _singletonM03D13di34_DependencyTemp, null, Pure.DI.Lifetime.Singleton); + 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); global::System.Threading.Thread.MemoryBarrier(); - _singletonM03D13di34_Dependency = _singletonM03D13di34_DependencyTemp; - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = _singletonM03D14di34_DependencyTemp; + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } } } - var transientM03D13di0_Service = new Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.Service(_rootM03D13di._singletonM03D13di34_Dependency); - OnNewInstance(ref transientM03D13di0_Service, null, Pure.DI.Lifetime.Transient); - return transientM03D13di0_Service; + 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; } } #endregion @@ -200,7 +200,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -214,7 +214,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -227,10 +227,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -299,26 +299,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.OnNewInstanceHintScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -331,7 +331,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 a60e0a778..6d3ca6f5a 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -117,7 +117,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -138,13 +138,13 @@ partial class Composition #endif get { - Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IDependency[] transientM03D13di1_ = new IDependency[] + Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IDependency[] transientM03D14di1_ = new IDependency[] { new AbcDependency(), new XyzDependency(), new AbcDependency() }; - return new Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.Service(transientM03D13di1_); + return new Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.Service(transientM03D14di1_); } } #endregion @@ -160,7 +160,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -174,7 +174,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -187,10 +187,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -251,26 +251,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.OverridingBclBindingScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -283,7 +283,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 7df9eebce..ad1bb9414 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -151,7 +151,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -172,10 +172,10 @@ partial class Composition #endif get { - long transientM03D13di5_Int64 = GenerateId(); - long transientM03D13di4_Int64 = GenerateId(); - string transientM03D13di1_String = $"{_serviceName}_{GenerateId()}"; - return new Pure.DI.UsageTests.Basics.PartialClassScenario.Service(transientM03D13di1_String, new Pure.DI.UsageTests.Basics.PartialClassScenario.Dependency(transientM03D13di5_Int64), new Pure.DI.UsageTests.Basics.PartialClassScenario.Dependency(transientM03D13di4_Int64)); + 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)); } } #endregion @@ -191,7 +191,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -205,7 +205,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -218,10 +218,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -289,26 +289,26 @@ partial class Composition " Composition ..> Service : Service Root
provides Service"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PartialClassScenario.Service), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PartialClassScenario.Service), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -321,7 +321,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 53e4f6ee3..31449bd1d 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 _rootM03D13di; - private readonly object _lockM03D13di; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -132,8 +132,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -154,22 +154,22 @@ partial class Composition #endif get { - var perResolveM03D13di40_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>); - perResolveM03D13di40_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>( + 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)>( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var perBlockM03D13di4_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); - var factory_M03D13di1 = (perBlockM03D13di4_Dependency, perBlockM03D13di4_Dependency); - return factory_M03D13di1; + var perBlockM03D14di4_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); + var factory_M03D14di1 = (perBlockM03D14di4_Dependency, perBlockM03D14di4_Dependency); + return factory_M03D14di1; }); - System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)> transientM03D13di2_Lazy; + System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)> transientM03D14di2_Lazy; { - var factory_M03D13di2 = perResolveM03D13di40_Func; - transientM03D13di2_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerBlockScenario.IDependency dep4)>(factory_M03D13di2, true); + 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 perBlockM03D13di1_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); - return new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service(perBlockM03D13di1_Dependency, perBlockM03D13di1_Dependency, transientM03D13di2_Lazy); + var perBlockM03D14di1_Dependency = new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Dependency(); + return new Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service(perBlockM03D14di1_Dependency, perBlockM03D14di1_Dependency, transientM03D14di2_Lazy); } } #endregion @@ -185,7 +185,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -199,7 +199,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -212,10 +212,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerBlockScenario.Service), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -321,7 +321,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 94b422f3b..ada3d0f9e 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 _rootM03D13di; - private readonly object _lockM03D13di; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -132,8 +132,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -154,41 +154,41 @@ partial class Composition #endif get { - var perResolveM03D13di34_Dependency = default(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency); - var perResolveM03D13di40_Func = default(System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>); - perResolveM03D13di40_Func = new global::System.Func<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>( + 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)>( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - if (ReferenceEquals(perResolveM03D13di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(perResolveM03D13di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D14di34_Dependency, null)) { - perResolveM03D13di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); + perResolveM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); } } } - var factory_M03D13di1 = (perResolveM03D13di34_Dependency, perResolveM03D13di34_Dependency); - return factory_M03D13di1; + var factory_M03D14di1 = (perResolveM03D14di34_Dependency, perResolveM03D14di34_Dependency); + return factory_M03D14di1; }); - System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)> transientM03D13di1_Lazy; + System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)> transientM03D14di1_Lazy; { - var factory_M03D13di2 = perResolveM03D13di40_Func; - transientM03D13di1_Lazy = new global::System.Lazy<(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep3, Pure.DI.UsageTests.Lifetimes.PerResolveScenario.IDependency dep4)>(factory_M03D13di2, true); + 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); } - if (ReferenceEquals(perResolveM03D13di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(perResolveM03D13di34_Dependency, null)) + if (ReferenceEquals(perResolveM03D14di34_Dependency, null)) { - perResolveM03D13di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); + perResolveM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Dependency(); } } } - return new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service(perResolveM03D13di34_Dependency, perResolveM03D13di34_Dependency, transientM03D13di1_Lazy); + return new Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service(perResolveM03D14di34_Dependency, perResolveM03D14di34_Dependency, transientM03D14di1_Lazy); } } #endregion @@ -204,7 +204,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -218,7 +218,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -231,10 +231,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.PerResolveScenario.Service), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -340,7 +340,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 17f1b0e53..cd210e7ec 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -115,7 +115,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -136,9 +136,9 @@ partial class Composition #endif get { - var transientM03D13di0_Service = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service(); - transientM03D13di0_Service.Dependency = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Dependency(); - return transientM03D13di0_Service; + var transientM03D14di0_Service = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Service(); + transientM03D14di0_Service.Dependency = new Pure.DI.UsageTests.Basics.PropertyInjectionScenario.Dependency(); + return transientM03D14di0_Service; } } #endregion @@ -154,7 +154,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -168,7 +168,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -181,10 +181,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -252,26 +252,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.PropertyInjectionScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -284,7 +284,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 e1db17f08..c70de70a1 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(_argM03D13di_name); +/// var composition = new Composition(_argM03D14di_name); /// var instance = composition.Root; /// /// @@ -109,8 +109,8 @@ classDiagram [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] partial class Composition { - private readonly Composition _rootM03D13di; - private readonly string _argM03D13di_name; + private readonly Composition _rootM03D14di; + private readonly string _argM03D14di_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) { - _rootM03D13di = this; + _rootM03D14di = this; if (ReferenceEquals(name, null)) { throw new global::System.ArgumentNullException("name"); } - _argM03D13di_name = name; + _argM03D14di_name = name; } /// @@ -133,8 +133,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _argM03D13di_name = baseComposition._argM03D13di_name; + _rootM03D14di = baseComposition._rootM03D14di; + _argM03D14di_name = baseComposition._argM03D14di_name; } #region Composition Roots @@ -144,7 +144,7 @@ partial class Composition /// /// This shows how to get an instance of type : /// - /// var composition = new Composition(_argM03D13di_name); + /// var composition = new Composition(_argM03D14di_name); /// var instance = composition.Root; /// /// @@ -157,7 +157,7 @@ partial class Composition { return new Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.Service() { - ServiceNameField = _argM03D13di_name, + ServiceNameField = _argM03D14di_name, Dependency = new Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.Dependency() }; } @@ -175,7 +175,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -189,7 +189,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -202,10 +202,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -276,26 +276,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.RequiredPropertiesOrFieldsScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -308,7 +308,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 7f55b0413..5e32cd5ea 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -119,7 +119,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots diff --git a/readme/resolve-methods.md b/readme/resolve-methods.md index c4a788838..61032f0f8 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 RootM03D13di0001 - -IService RootM03D13di0002 + -IDependency RootM03D14di0001 + -IService RootM03D14di0002 + T ResolveᐸTᐳ() + T ResolveᐸTᐳ(object? tag) + object Resolve(Type type) @@ -72,8 +72,8 @@ classDiagram <> } Service *-- Dependency : IDependency - Composition ..> Dependency : IDependency RootM03D13di0001
provides IDependency - Composition ..> Service : IService RootM03D13di0002
provides IService + Composition ..> Dependency : IDependency RootM03D14di0001
provides IDependency + Composition ..> Service : IService RootM03D14di0002
provides IService Composition ..> OtherService : IService OtherService
provides "Other" IService ``` @@ -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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -151,7 +151,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #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 RootM03D13di0001 + public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency RootM03D14di0001 { #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 RootM03D13di0002 + public Pure.DI.UsageTests.Basics.ResolveScenario.IService RootM03D14di0002 { #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 ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -233,7 +233,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -246,10 +246,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 RootM03D13di0001\n" + - " -IService RootM03D13di0002\n" + + " -IDependency RootM03D14di0001\n" + + " -IService RootM03D14di0002\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 RootM03D13di0001
provides IDependency\n" + - " Composition ..> Service : IService RootM03D13di0002
provides IService\n" + + " Composition ..> Dependency : IDependency RootM03D14di0001
provides IDependency\n" + + " Composition ..> Service : IService RootM03D14di0002
provides IService\n" + " Composition ..> OtherService : IService OtherService
provides \"Other\" IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IService), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.ResolveScenario.IDependency), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -359,11 +359,11 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ResolveScenario.IService Resolve(Composition composition) { - return composition.RootM03D13di0002; + return composition.RootM03D14di0002; } 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.RootM03D13di0002; + return composition.RootM03D14di0002; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.Basics.ResolveScenario.IService."); } } - private sealed class ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.Basics.ResolveScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D13di0001; + return composition.RootM03D14di0001; } 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.RootM03D13di0001; + return composition.RootM03D14di0001; } 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 ae3126714..84bf19a65 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This parameterized constructor creates a new instance of with arguments. /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -145,7 +145,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots diff --git a/readme/scope.md b/readme/scope.md index 1bbb163bb..e776cf7f0 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 _rootM03D13di; - private readonly object _lockM03D13di; - private readonly global::System.IDisposable[] _disposablesM03D13di; - private int _disposeIndexM03D13di; - private Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency _scopedM03D13di34_Dependency; + 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; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); - _disposablesM03D13di = new global::System.IDisposable[1]; + _rootM03D14di = this; + _lockM03D14di = new object(); + _disposablesM03D14di = new global::System.IDisposable[1]; } /// @@ -189,9 +189,9 @@ partial class Composition: global::System.IDisposable /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; - _disposablesM03D13di = new global::System.IDisposable[1]; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; + _disposablesM03D14di = new global::System.IDisposable[1]; } #region Composition Roots @@ -212,18 +212,18 @@ partial class Composition: global::System.IDisposable #endif get { - if (ReferenceEquals(_scopedM03D13di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_scopedM03D13di34_Dependency, null)) + if (ReferenceEquals(_scopedM03D14di34_Dependency, null)) { - _scopedM03D13di34_Dependency = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency(); - _disposablesM03D13di[_disposeIndexM03D13di++] = _scopedM03D13di34_Dependency; + _scopedM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Dependency(); + _disposablesM03D14di[_disposeIndexM03D14di++] = _scopedM03D14di34_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Service(_scopedM03D13di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Service(_scopedM03D14di34_Dependency); } } @@ -244,16 +244,16 @@ partial class Composition: global::System.IDisposable #endif get { - var perResolveM03D13di40_Func = default(System.Func); - perResolveM03D13di40_Func = new global::System.Func( + var perResolveM03D14di40_Func = default(System.Func); + perResolveM03D14di40_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var transientM03D13di2_Composition = this; - var factory_M03D13di1 = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Session(transientM03D13di2_Composition); - return factory_M03D13di1; + var transientM03D14di2_Composition = this; + var factory_M03D14di1 = new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Session(transientM03D14di2_Composition); + return factory_M03D14di1; }); - return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program(perResolveM03D13di40_Func); + return new Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program(perResolveM03D14di40_Func); } } #endregion @@ -269,7 +269,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -283,7 +283,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 (_lockM03D13di) + lock (_lockM03D14di) { - while (_disposeIndexM03D13di > 0) + while (_disposeIndexM03D14di > 0) { - var disposableInstance = _disposablesM03D13di[--_disposeIndexM03D13di]; + var disposableInstance = _disposablesM03D14di[--_disposeIndexM03D14di]; try { disposableInstance.Dispose(); @@ -355,7 +355,7 @@ partial class Composition: global::System.IDisposable } } - _scopedM03D13di34_Dependency = null; + _scopedM03D14di34_Dependency = null; } } @@ -407,29 +407,29 @@ partial class Composition: global::System.IDisposable " FuncᐸSessionᐳ *-- Session : Session"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.IService), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.ScopeScenario.Program), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -442,7 +442,7 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 447fba28a..1f2172bda 100644 --- a/readme/service-collection.md +++ b/readme/service-collection.md @@ -47,8 +47,8 @@ service.Dependency.ShouldBe(dependency); ```mermaid classDiagram class Composition { - -IDependency RootM03D13di0001 - -IService RootM03D13di0002 + -IDependency RootM03D14di0001 + -IService RootM03D14di0002 + 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 RootM03D13di0001
provides "Dependency Key" IDependency - Composition ..> Service : IService RootM03D13di0002
provides IService + Composition ..> Dependency : IDependency RootM03D14di0001
provides "Dependency Key" IDependency + Composition ..> Service : IService RootM03D14di0002
provides IService ``` @@ -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 _rootM03D13di; - private readonly object _lockM03D13di; - private Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency _singletonM03D13di34_Dependency; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; + private Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency _singletonM03D14di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -132,58 +132,58 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency RootM03D13di0001 + public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency RootM03D14di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } } } - return _rootM03D13di._singletonM03D13di34_Dependency; + return _rootM03D14di._singletonM03D14di34_Dependency; } } /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService RootM03D13di0002 + public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService RootM03D14di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } } } - return new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Service(_rootM03D13di._singletonM03D13di34_Dependency); + return new Pure.DI.UsageTests.BCL.ServiceCollectionScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); } } #endregion @@ -199,7 +199,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -213,7 +213,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -226,10 +226,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 RootM03D13di0001\n" + - " -IService RootM03D13di0002\n" + + " -IDependency RootM03D14di0001\n" + + " -IService RootM03D14di0002\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 RootM03D13di0001
provides \"Dependency Key\" IDependency\n" + - " Composition ..> Service : IService RootM03D13di0002
provides IService"; + " Composition ..> Dependency : IDependency RootM03D14di0001
provides \"Dependency Key\" IDependency\n" + + " Composition ..> Service : IService RootM03D14di0002
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - OnNewRoot(valResolverM03D13di_0000, "RootM03D13di0001", "Dependency Key", Pure.DI.Lifetime.Singleton); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - OnNewRoot(valResolverM03D13di_0001, "RootM03D13di0002", null, Pure.DI.Lifetime.Transient); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -335,7 +335,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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.RootM03D13di0001; + return composition.RootM03D14di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IDependency."); } } - private sealed class ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceCollectionScenario.IService Resolve(Composition composition) { - return composition.RootM03D13di0002; + return composition.RootM03D14di0002; } 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.RootM03D13di0002; + return composition.RootM03D14di0002; } 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 ae079f29a..9bd015c7e 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 RootM03D13di0001 - -IService RootM03D13di0002 + -IDependency RootM03D14di0001 + -IService RootM03D14di0002 + 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 RootM03D13di0001
provides IDependency - Composition ..> Service : IService RootM03D13di0002
provides IService + Composition ..> Dependency : IDependency RootM03D14di0001
provides IDependency + Composition ..> Service : IService RootM03D14di0002
provides IService ``` @@ -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 _rootM03D13di; - private readonly object _lockM03D13di; - private readonly global::System.IDisposable[] _disposablesM03D13di; - private int _disposeIndexM03D13di; - private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency _singletonM03D13di34_Dependency; - private Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service _scopedM03D13di35_Service; + 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; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); - _disposablesM03D13di = new global::System.IDisposable[1]; + _rootM03D14di = this; + _lockM03D14di = new object(); + _disposablesM03D14di = new global::System.IDisposable[1]; } /// @@ -168,64 +168,64 @@ partial class Composition: global::System.IDisposable /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; - _disposablesM03D13di = new global::System.IDisposable[1]; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; + _disposablesM03D14di = new global::System.IDisposable[1]; } #region Composition Roots /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency RootM03D13di0001 + public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency RootM03D14di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } } } - return _rootM03D13di._singletonM03D13di34_Dependency; + return _rootM03D14di._singletonM03D14di34_Dependency; } } /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService RootM03D13di0002 + public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService RootM03D14di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_scopedM03D13di35_Service, null)) + if (ReferenceEquals(_scopedM03D14di35_Service, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_scopedM03D13di35_Service, null)) + if (ReferenceEquals(_scopedM03D14di35_Service, null)) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } - _scopedM03D13di35_Service = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service(_rootM03D13di._singletonM03D13di34_Dependency); - _disposablesM03D13di[_disposeIndexM03D13di++] = _scopedM03D13di35_Service; + _scopedM03D14di35_Service = new Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); + _disposablesM03D14di[_disposeIndexM03D14di++] = _scopedM03D14di35_Service; } } } - return _scopedM03D13di35_Service; + return _scopedM03D14di35_Service; } } #endregion @@ -241,7 +241,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -255,7 +255,7 @@ partial class Composition: global::System.IDisposable #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 (_lockM03D13di) + lock (_lockM03D14di) { - while (_disposeIndexM03D13di > 0) + while (_disposeIndexM03D14di > 0) { - var disposableInstance = _disposablesM03D13di[--_disposeIndexM03D13di]; + var disposableInstance = _disposablesM03D14di[--_disposeIndexM03D14di]; try { disposableInstance.Dispose(); @@ -327,8 +327,8 @@ partial class Composition: global::System.IDisposable } } - _singletonM03D13di34_Dependency = null; - _scopedM03D13di35_Service = null; + _singletonM03D14di34_Dependency = null; + _scopedM03D14di35_Service = null; } } @@ -342,8 +342,8 @@ partial class Composition: global::System.IDisposable return "classDiagram\n" + " class Composition {\n" + - " -IDependency RootM03D13di0001\n" + - " -IService RootM03D13di0002\n" + + " -IDependency RootM03D14di0001\n" + + " -IService RootM03D14di0002\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 RootM03D13di0001
provides IDependency\n" + - " Composition ..> Service : IService RootM03D13di0002
provides IService"; + " Composition ..> Dependency : IDependency RootM03D14di0001
provides IDependency\n" + + " Composition ..> Service : IService RootM03D14di0002
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -404,11 +404,11 @@ partial class Composition: global::System.IDisposable } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D13di0001; + return composition.RootM03D14di0001; } 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.RootM03D13di0001; + return composition.RootM03D14di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IDependency."); } } - private sealed class ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderWithScopeScenario.IService Resolve(Composition composition) { - return composition.RootM03D13di0002; + return composition.RootM03D14di0002; } 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.RootM03D13di0002; + return composition.RootM03D14di0002; } 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 9f7ec204a..bb54628da 100644 --- a/readme/service-provider.md +++ b/readme/service-provider.md @@ -45,8 +45,8 @@ service.Dependency.ShouldBe(dependency); ```mermaid classDiagram class Composition { - -IDependency RootM03D13di0001 - -IService RootM03D13di0002 + -IDependency RootM03D14di0001 + -IService RootM03D14di0002 + 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 RootM03D13di0001
provides IDependency - Composition ..> Service : IService RootM03D13di0002
provides IService + Composition ..> Dependency : IDependency RootM03D14di0001
provides IDependency + Composition ..> Service : IService RootM03D14di0002
provides IService ``` @@ -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 _rootM03D13di; - private readonly object _lockM03D13di; - private Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency _singletonM03D13di34_Dependency; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; + private Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency _singletonM03D14di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -130,58 +130,58 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency RootM03D13di0001 + public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency RootM03D14di0001 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } } } - return _rootM03D13di._singletonM03D13di34_Dependency; + return _rootM03D14di._singletonM03D14di34_Dependency; } } /// /// Provides a composition root of type . /// - public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService RootM03D13di0002 + public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService RootM03D14di0002 { #if NETSTANDARD2_0_OR_GREATER || NETCOREAPP || NET40_OR_GREATER || NET [global::System.Diagnostics.Contracts.Pure] #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } } } - return new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Service(_rootM03D13di._singletonM03D13di34_Dependency); + return new Pure.DI.UsageTests.BCL.ServiceProviderScenario.Service(_rootM03D14di._singletonM03D14di34_Dependency); } } #endregion @@ -197,7 +197,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -211,7 +211,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -224,10 +224,10 @@ partial class Composition #endif public object GetService(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 RootM03D13di0001\n" + - " -IService RootM03D13di0002\n" + + " -IDependency RootM03D14di0001\n" + + " -IService RootM03D14di0002\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 RootM03D13di0001
provides IDependency\n" + - " Composition ..> Service : IService RootM03D13di0002
provides IService"; + " Composition ..> Dependency : IDependency RootM03D14di0001
provides IDependency\n" + + " Composition ..> Service : IService RootM03D14di0002
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -331,11 +331,11 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency Resolve(Composition composition) { - return composition.RootM03D13di0001; + return composition.RootM03D14di0001; } 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.RootM03D13di0001; + return composition.RootM03D14di0001; } throw new global::System.InvalidOperationException($"Cannot resolve composition root \"{tag}\" of type Pure.DI.UsageTests.BCL.ServiceProviderScenario.IDependency."); } } - private sealed class ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_0001: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.ServiceProviderScenario.IService Resolve(Composition composition) { - return composition.RootM03D13di0002; + return composition.RootM03D14di0002; } 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.RootM03D13di0002; + return composition.RootM03D14di0002; } 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 f7d83d4a3..0b3f6a828 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -137,7 +137,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -158,8 +158,8 @@ partial class Composition #endif get { - var perBlockM03D13di1_Dependency = new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency(); - return new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Service(perBlockM03D13di1_Dependency, perBlockM03D13di1_Dependency, perBlockM03D13di1_Dependency); + var perBlockM03D14di1_Dependency = new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Dependency(); + return new Pure.DI.UsageTests.Basics.SimplifiedBindingScenario.Service(perBlockM03D14di1_Dependency, perBlockM03D14di1_Dependency, perBlockM03D14di1_Dependency); } } #endregion diff --git a/readme/singleton.md b/readme/singleton.md index 7e1201d7e..21b913cfd 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 _rootM03D13di; - private readonly object _lockM03D13di; - private Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency _singletonM03D13di34_Dependency; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; + private Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency _singletonM03D14di34_Dependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -126,8 +126,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -148,18 +148,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di34_Dependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di34_Dependency, null)) { - _singletonM03D13di34_Dependency = new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency(); - _rootM03D13di._singletonM03D13di34_Dependency = _singletonM03D13di34_Dependency; + _singletonM03D14di34_Dependency = new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Dependency(); + _rootM03D14di._singletonM03D14di34_Dependency = _singletonM03D14di34_Dependency; } } } - return new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Service(_singletonM03D13di34_Dependency, _rootM03D13di._singletonM03D13di34_Dependency); + return new Pure.DI.UsageTests.Lifetimes.SingletonScenario.Service(_singletonM03D14di34_Dependency, _rootM03D14di._singletonM03D14di34_Dependency); } } #endregion @@ -175,7 +175,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -189,7 +189,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -202,10 +202,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -273,26 +273,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.SingletonScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -305,7 +305,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 af59bd3bc..aff8ba0e6 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -125,7 +125,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -146,13 +146,13 @@ partial class Composition #endif get { - System.ReadOnlySpan transientM03D13di1_ReadOnlySpan = stackalloc Pure.DI.UsageTests.BCL.SpanScenario.Dependency[3] + System.ReadOnlySpan transientM03D14di1_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(transientM03D13di1_ReadOnlySpan); + return new Pure.DI.UsageTests.BCL.SpanScenario.Service(transientM03D14di1_ReadOnlySpan); } } #endregion @@ -168,7 +168,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -182,7 +182,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -195,10 +195,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -265,26 +265,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.SpanScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.SpanScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -297,7 +297,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 befe35e4a..03bd99d21 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -133,7 +133,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -170,7 +170,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -184,7 +184,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -197,10 +197,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -272,26 +272,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagAttributeScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagAttributeScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -304,7 +304,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 7663061ec..b87a6bc27 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 _rootM03D13di; - private readonly object _lockM03D13di; - private Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency _singletonM03D13di35_XyzDependency; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; + private Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency _singletonM03D14di35_XyzDependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -157,8 +157,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -179,18 +179,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) { - _singletonM03D13di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); - _rootM03D13di._singletonM03D13di35_XyzDependency = _singletonM03D13di35_XyzDependency; + _singletonM03D14di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); + _rootM03D14di._singletonM03D14di35_XyzDependency = _singletonM03D14di35_XyzDependency; } } } - return _rootM03D13di._singletonM03D13di35_XyzDependency; + return _rootM03D14di._singletonM03D14di35_XyzDependency; } } @@ -211,18 +211,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) { - _singletonM03D13di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); - _rootM03D13di._singletonM03D13di35_XyzDependency = _singletonM03D13di35_XyzDependency; + _singletonM03D14di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency(); + _rootM03D14di._singletonM03D14di35_XyzDependency = _singletonM03D14di35_XyzDependency; } } } - return new Pure.DI.UsageTests.Basics.TagTypeScenario.Service(new Pure.DI.UsageTests.Basics.TagTypeScenario.AbcDependency(), _rootM03D13di._singletonM03D13di35_XyzDependency, new Pure.DI.UsageTests.Basics.TagTypeScenario.AbcDependency()); + 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()); } } #endregion @@ -238,7 +238,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -252,7 +252,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -265,10 +265,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -344,29 +344,29 @@ partial class Composition " Composition ..> XyzDependency : IDependency XyzRoot
provides typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.XyzDependency) IDependency"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.IDependency), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagTypeScenario.IService), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -379,7 +379,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 cc6e8dd13..daea92d83 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ᐳ : 8e66f70a-0a79-4ece-b707-d2f61a8c7f5f + AbcDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : ea2cb910-81dd-467c-88de-f4fdace5b58c class AbcDependencyᐸStringᐳ { +AbcDependency() } - XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 68c841d4-f363-47e0-b64f-c71f6f092ed3 + XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 74590d2c-8898-4bbd-a633-e8f27153d6e9 class XyzDependencyᐸStringᐳ { +XyzDependency() } @@ -64,8 +64,8 @@ classDiagram class IServiceᐸStringᐳ { <> } - IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : 8e66f70a-0a79-4ece-b707-d2f61a8c7f5f IDependencyᐸStringᐳ - IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : 68c841d4-f363-47e0-b64f-c71f6f092ed3 IDependencyᐸStringᐳ + IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : ea2cb910-81dd-467c-88de-f4fdace5b58c IDependencyᐸStringᐳ + IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : 74590d2c-8898-4bbd-a633-e8f27153d6e9 IDependencyᐸStringᐳ Composition ..> ServiceᐸStringᐳ : IServiceᐸStringᐳ Root
provides IServiceᐸStringᐳ 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -125,7 +125,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #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> LocalperBlockM03D13di1_IEnumerable() + System.Collections.Generic.IEnumerable> LocalperBlockM03D14di1_IEnumerable() { yield return new Pure.DI.UsageTests.Basics.TagUniqueScenario.AbcDependency(); yield return new Pure.DI.UsageTests.Basics.TagUniqueScenario.XyzDependency(); } - var perBlockM03D13di1_IEnumerable = LocalperBlockM03D13di1_IEnumerable(); - return new Pure.DI.UsageTests.Basics.TagUniqueScenario.Service(perBlockM03D13di1_IEnumerable); + var perBlockM03D14di1_IEnumerable = LocalperBlockM03D14di1_IEnumerable(); + return new Pure.DI.UsageTests.Basics.TagUniqueScenario.Service(perBlockM03D14di1_IEnumerable); } } #endregion @@ -169,7 +169,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -183,7 +183,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -196,10 +196,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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ᐳ : 8e66f70a-0a79-4ece-b707-d2f61a8c7f5f \n" + + " AbcDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : ea2cb910-81dd-467c-88de-f4fdace5b58c \n" + " class AbcDependencyᐸStringᐳ {\n" + " +AbcDependency()\n" + " }\n" + - " XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 68c841d4-f363-47e0-b64f-c71f6f092ed3 \n" + + " XyzDependencyᐸStringᐳ --|> IDependencyᐸStringᐳ : 74590d2c-8898-4bbd-a633-e8f27153d6e9 \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ᐳ : 8e66f70a-0a79-4ece-b707-d2f61a8c7f5f IDependencyᐸStringᐳ\n" + - " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : 68c841d4-f363-47e0-b64f-c71f6f092ed3 IDependencyᐸStringᐳ\n" + + " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- AbcDependencyᐸStringᐳ : ea2cb910-81dd-467c-88de-f4fdace5b58c IDependencyᐸStringᐳ\n" + + " IEnumerableᐸIDependencyᐸStringᐳᐳ *-- XyzDependencyᐸStringᐳ : 74590d2c-8898-4bbd-a633-e8f27153d6e9 IDependencyᐸStringᐳ\n" + " Composition ..> ServiceᐸStringᐳ : IServiceᐸStringᐳ Root
provides IServiceᐸStringᐳ\n" + " ServiceᐸStringᐳ o-- \"PerBlock\" IEnumerableᐸIDependencyᐸStringᐳᐳ : IEnumerableᐸIDependencyᐸStringᐳᐳ"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di>.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di>.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagUniqueScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagUniqueScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -305,7 +305,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver> + private sealed class ResolverM03D14di_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 08d816f8e..a99049037 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 _rootM03D13di; - private readonly object _lockM03D13di; - private Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency _singletonM03D13di35_XyzDependency; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; + private Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency _singletonM03D14di35_XyzDependency; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -159,8 +159,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -181,18 +181,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) { - _singletonM03D13di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); - _rootM03D13di._singletonM03D13di35_XyzDependency = _singletonM03D13di35_XyzDependency; + _singletonM03D14di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); + _rootM03D14di._singletonM03D14di35_XyzDependency = _singletonM03D14di35_XyzDependency; } } } - return _rootM03D13di._singletonM03D13di35_XyzDependency; + return _rootM03D14di._singletonM03D14di35_XyzDependency; } } @@ -213,18 +213,18 @@ partial class Composition #endif get { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) { - lock (_lockM03D13di) + lock (_lockM03D14di) { - if (ReferenceEquals(_rootM03D13di._singletonM03D13di35_XyzDependency, null)) + if (ReferenceEquals(_rootM03D14di._singletonM03D14di35_XyzDependency, null)) { - _singletonM03D13di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); - _rootM03D13di._singletonM03D13di35_XyzDependency = _singletonM03D13di35_XyzDependency; + _singletonM03D14di35_XyzDependency = new Pure.DI.UsageTests.Basics.TagsScenario.XyzDependency(); + _rootM03D14di._singletonM03D14di35_XyzDependency = _singletonM03D14di35_XyzDependency; } } } - return new Pure.DI.UsageTests.Basics.TagsScenario.Service(new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency(), _rootM03D13di._singletonM03D13di35_XyzDependency, new Pure.DI.UsageTests.Basics.TagsScenario.AbcDependency()); + 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()); } } #endregion @@ -240,7 +240,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -254,7 +254,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -267,10 +267,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 4)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -346,29 +346,29 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - var valResolverM03D13di_0001 = new ResolverM03D13di_0001(); - ResolverM03D13di.Value = valResolverM03D13di_0001; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + 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( 4, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[2] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IDependency), valResolverM03D13di_0000) - ,new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TagsScenario.IService), valResolverM03D13di_0001) + 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) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -381,7 +381,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 ResolverM03D13di_0001: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 5205ee563..9e9ffcab6 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 _rootM03D13di; - private readonly object _lockM03D13di; + private readonly Composition _rootM03D14di; + private readonly object _lockM03D14di; /// /// This parameterized constructor creates a new instance of with arguments. /// public Composition() { - _rootM03D13di = this; - _lockM03D13di = new object(); + _rootM03D14di = this; + _lockM03D14di = new object(); } /// @@ -156,8 +156,8 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; - _lockM03D13di = _rootM03D13di._lockM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; + _lockM03D14di = _rootM03D14di._lockM03D14di; } #region Composition Roots @@ -176,32 +176,32 @@ partial class Composition #endif public Pure.DI.UsageTests.BCL.TaskScenario.IService GetRoot(System.Threading.CancellationToken cancellationToken) { - var perResolveM03D13di39_Func = default(System.Func); - System.Threading.Tasks.TaskScheduler transientM03D13di5_TaskScheduler = TaskScheduler.Current; - System.Threading.Tasks.TaskContinuationOptions transientM03D13di4_TaskContinuationOptions = global::System.Threading.Tasks.TaskContinuationOptions.None; - System.Threading.Tasks.TaskCreationOptions transientM03D13di3_TaskCreationOptions = global::System.Threading.Tasks.TaskCreationOptions.None; - System.Threading.Tasks.TaskFactory perBlockM03D13di2_TaskFactory; + 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 cancellationToken_M03D13di1 = cancellationToken; - var taskCreationOptions_M03D13di2 = transientM03D13di3_TaskCreationOptions; - var taskContinuationOptions_M03D13di3 = transientM03D13di4_TaskContinuationOptions; - var taskScheduler_M03D13di4 = transientM03D13di5_TaskScheduler; - perBlockM03D13di2_TaskFactory = new global::System.Threading.Tasks.TaskFactory(cancellationToken_M03D13di1, taskCreationOptions_M03D13di2, taskContinuationOptions_M03D13di3, taskScheduler_M03D13di4); + 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); } - perResolveM03D13di39_Func = new global::System.Func( + perResolveM03D14di39_Func = new global::System.Func( [global::System.Runtime.CompilerServices.MethodImpl((global::System.Runtime.CompilerServices.MethodImplOptions)768)] () => { - var factory_M03D13di5 = new Pure.DI.UsageTests.BCL.TaskScenario.Dependency(); - return factory_M03D13di5; + var factory_M03D14di5 = new Pure.DI.UsageTests.BCL.TaskScenario.Dependency(); + return factory_M03D14di5; }); - System.Threading.Tasks.Task transientM03D13di1_Task; + System.Threading.Tasks.Task transientM03D14di1_Task; { - var factory_M03D13di6 = perResolveM03D13di39_Func; - var taskFactory_M03D13di7 = perBlockM03D13di2_TaskFactory; - transientM03D13di1_Task = taskFactory_M03D13di7.StartNew(factory_M03D13di6); + var factory_M03D14di6 = perResolveM03D14di39_Func; + var taskFactory_M03D14di7 = perBlockM03D14di2_TaskFactory; + transientM03D14di1_Task = taskFactory_M03D14di7.StartNew(factory_M03D14di6); } - return new Pure.DI.UsageTests.BCL.TaskScenario.Service(transientM03D13di1_Task); + return new Pure.DI.UsageTests.BCL.TaskScenario.Service(transientM03D14di1_Task); } #endregion diff --git a/readme/threadsafe-hint.md b/readme/threadsafe-hint.md index 8f840cb34..112e70e0b 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -112,7 +112,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -149,7 +149,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -163,7 +163,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -176,10 +176,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -246,26 +246,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ThreadSafeHintScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -278,7 +278,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 c69860b34..c794fc9d2 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -110,7 +110,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -147,7 +147,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -161,7 +161,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -174,10 +174,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -244,26 +244,26 @@ partial class Composition " Composition ..> Service : IService MyService
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ToStringHintScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Hints.ToStringHintScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -276,7 +276,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 930f0a4dc..5578d6b43 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -165,7 +165,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -186,11 +186,11 @@ partial class Composition #endif get { - var transientM03D13di1_Dependency = new Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.Dependency(); - OnNewInstance(ref transientM03D13di1_Dependency, null, Pure.DI.Lifetime.Transient); - var transientM03D13di0_Service = new Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.Service(transientM03D13di1_Dependency); - OnNewInstance(ref transientM03D13di0_Service, null, Pure.DI.Lifetime.Transient); - return transientM03D13di0_Service; + 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; } } #endregion @@ -206,7 +206,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -220,7 +220,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -233,10 +233,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -305,26 +305,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Basics.TrackingDisposableInstancesScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -337,7 +337,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 3a6a81fc2..37f7a0732 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -123,7 +123,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -160,7 +160,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -174,7 +174,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -187,10 +187,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -258,26 +258,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.TransientScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Lifetimes.TransientScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -290,7 +290,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 c706c8aae..063a04ecf 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -121,7 +121,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -142,8 +142,8 @@ partial class Composition #endif get { - Pure.DI.UsageTests.BCL.TupleScenario.Point transientM03D13di2_Point = new Point(7, 9); - return new Pure.DI.UsageTests.BCL.TupleScenario.Service((transientM03D13di2_Point, new Pure.DI.UsageTests.BCL.TupleScenario.Dependency())); + 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())); } } #endregion @@ -159,7 +159,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -173,7 +173,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -186,10 +186,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -262,26 +262,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.TupleScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.TupleScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -294,7 +294,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 9a2abfda4..d9e56ef7d 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -124,7 +124,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -161,7 +161,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -175,7 +175,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -188,10 +188,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -258,26 +258,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.Attributes.TypeAttributeScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -290,7 +290,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 6e2800ac9..030fbf3d4 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -123,7 +123,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -144,12 +144,12 @@ partial class Composition #endif get { - System.Threading.Tasks.ValueTask transientM03D13di1_ValueTask; + System.Threading.Tasks.ValueTask transientM03D14di1_ValueTask; { - var value_M03D13di1 = new Pure.DI.UsageTests.BCL.ValueTaskScenario.Dependency(); - transientM03D13di1_ValueTask = new global::System.Threading.Tasks.ValueTask(value_M03D13di1); + var value_M03D14di1 = new Pure.DI.UsageTests.BCL.ValueTaskScenario.Dependency(); + transientM03D14di1_ValueTask = new global::System.Threading.Tasks.ValueTask(value_M03D14di1); } - return new Pure.DI.UsageTests.BCL.ValueTaskScenario.Service(transientM03D13di1_ValueTask); + return new Pure.DI.UsageTests.BCL.ValueTaskScenario.Service(transientM03D14di1_ValueTask); } } #endregion @@ -165,7 +165,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -179,7 +179,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -192,10 +192,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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 _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ValueTaskScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.ValueTaskScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -296,7 +296,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_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 c404fb9aa..d5d70f196 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 _rootM03D13di; + private readonly Composition _rootM03D14di; /// /// This constructor creates a new instance of . /// public Composition() { - _rootM03D13di = this; + _rootM03D14di = this; } /// @@ -114,7 +114,7 @@ partial class Composition /// Base composition. internal Composition(Composition baseComposition) { - _rootM03D13di = baseComposition._rootM03D13di; + _rootM03D14di = baseComposition._rootM03D14di; } #region Composition Roots @@ -151,7 +151,7 @@ partial class Composition #endif public T Resolve() { - return ResolverM03D13di.Value.Resolve(this); + return ResolverM03D14di.Value.Resolve(this); } /// @@ -165,7 +165,7 @@ partial class Composition #endif public T Resolve(object? tag) { - return ResolverM03D13di.Value.ResolveByTag(this, tag); + return ResolverM03D14di.Value.ResolveByTag(this, tag); } /// @@ -178,10 +178,10 @@ partial class Composition #endif public object Resolve(global::System.Type type) { - var index = (int)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[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)(_bucketSizeM03D13di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); - var finish = index + _bucketSizeM03D13di; + var index = (int)(_bucketSizeM03D14di * ((uint)global::System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(type) % 1)); + var finish = index + _bucketSizeM03D14di; do { - ref var pair = ref _bucketsM03D13di[index]; + ref var pair = ref _bucketsM03D14di[index]; if (ReferenceEquals(pair.Key, type)) { return pair.Value.ResolveByTag(this, tag); @@ -252,26 +252,26 @@ partial class Composition " Composition ..> Service : IService Root
provides IService"; } - private readonly static int _bucketSizeM03D13di; - private readonly static global::Pure.DI.Pair>[] _bucketsM03D13di; + private readonly static int _bucketSizeM03D14di; + private readonly static global::Pure.DI.Pair>[] _bucketsM03D14di; static Composition() { - var valResolverM03D13di_0000 = new ResolverM03D13di_0000(); - ResolverM03D13di.Value = valResolverM03D13di_0000; - _bucketsM03D13di = global::Pure.DI.Buckets>.Create( + var valResolverM03D14di_0000 = new ResolverM03D14di_0000(); + ResolverM03D14di.Value = valResolverM03D14di_0000; + _bucketsM03D14di = global::Pure.DI.Buckets>.Create( 1, - out _bucketSizeM03D13di, + out _bucketSizeM03D14di, new global::Pure.DI.Pair>[1] { - new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService), valResolverM03D13di_0000) + new global::Pure.DI.Pair>(typeof(Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService), valResolverM03D14di_0000) }); } #region Resolvers - private sealed class ResolverM03D13di: global::Pure.DI.IResolver + private sealed class ResolverM03D14di: global::Pure.DI.IResolver { - public static global::Pure.DI.IResolver Value = new ResolverM03D13di(); + public static global::Pure.DI.IResolver Value = new ResolverM03D14di(); public T Resolve(Composition composite) { @@ -284,7 +284,7 @@ partial class Composition } } - private sealed class ResolverM03D13di_0000: global::Pure.DI.IResolver + private sealed class ResolverM03D14di_0000: global::Pure.DI.IResolver { public Pure.DI.UsageTests.BCL.WeakReferenceScenario.IService Resolve(Composition composition) {