Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed May 21, 2024
1 parent a125a4b commit f77b2dd
Show file tree
Hide file tree
Showing 91 changed files with 320 additions and 338 deletions.
2 changes: 1 addition & 1 deletion readme/ArrayDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ classDiagram
CompositionRoot *-- "3 " Service2Array : IService2
CompositionRoot *-- Service3 : IService3
CompositionRoot *-- "2 " Service4 : IService4
Array ..> CompositionRoot : CompositionRoot TestPureDIByCR()
Service1 *-- Service2Array : IService2
Service2Array *-- ArrayᐸIService3ᐳ : ArrayᐸIService3ᐳ
Service3 *-- "2 " Service4 : IService4
Service3v2 *-- "2 " Service4 : IService4
Service3v3 *-- "2 " Service4 : IService4
Service3v4 *-- "2 " Service4 : IService4
Array ..> CompositionRoot : CompositionRoot TestPureDIByCR()
ArrayᐸIService3ᐳ *-- Service3 : IService3
ArrayᐸIService3ᐳ *-- Service3v2 : 2 IService3
ArrayᐸIService3ᐳ *-- Service3v3 : 3 IService3
Expand Down
2 changes: 1 addition & 1 deletion readme/Avalonia.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ The [project file](/samples/AvaloniaApp/AvaloniaApp.csproj) looks like this:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/BlazorServerApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The [project file](/samples/BlazorServerApp/BlazorServerApp.csproj) looks like t
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/BlazorWebAssemblyApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The [project file](/samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj) lo
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/Console.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The [project file](/samples/ShroedingersCat/ShroedingersCat.csproj) looks like t
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/ConsoleNativeAOT.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The [project file](/samples/ShroedingersCatNativeAOT/ShroedingersCatNativeAOT.cs
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/ConsoleTopLevelStatements.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The [project file](/samples/ShroedingersCatTopLevelStatements/ShroedingersCatTop
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/EnumDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ classDiagram
CompositionRoot *-- "3 " Service2Enum : IService2
CompositionRoot *-- Service3 : IService3
CompositionRoot *-- "2 " Service4 : IService4
Enum ..> CompositionRoot : CompositionRoot TestPureDIByCR()
Service1 *-- Service2Enum : IService2
Service2Enum o-- "PerBlock" IEnumerableᐸIService3ᐳ : IEnumerableᐸIService3ᐳ
Service3 *-- "2 " Service4 : IService4
Service3v2 *-- "2 " Service4 : IService4
Service3v3 *-- "2 " Service4 : IService4
Service3v4 *-- "2 " Service4 : IService4
Enum ..> CompositionRoot : CompositionRoot TestPureDIByCR()
IEnumerableᐸIService3ᐳ *-- Service3 : IService3
IEnumerableᐸIService3ᐳ *-- Service3v2 : 2 IService3
IEnumerableᐸIService3ᐳ *-- Service3v3 : 3 IService3
Expand Down
2 changes: 1 addition & 1 deletion readme/FuncDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ classDiagram
CompositionRoot *-- "3 " Service2Func : IService2
CompositionRoot *-- Service3 : IService3
CompositionRoot *-- "2 " Service4 : IService4
Func ..> CompositionRoot : CompositionRoot TestPureDIByCR()
Service1 *-- Service2Func : IService2
Service2Func o-- "PerBlock" FuncᐸIService3ᐳ : FuncᐸIService3ᐳ
Service3 *-- "2 " Service4 : IService4
Func ..> CompositionRoot : CompositionRoot TestPureDIByCR()
FuncᐸIService3ᐳ *-- Service3 : IService3
```

Expand Down
2 changes: 1 addition & 1 deletion readme/GrpcService.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The [project file](/samples/GrpcService/GrpcService.csproj) looks like this:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/Maui.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ The [project file](/samples/MAUIApp/MAUIApp.csproj) looks like this:
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)"/>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0"/>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/MinimalWebAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The [project file](/samples/WebAPI/WebAPI.csproj) looks like this:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/SingletonDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ classDiagram
CompositionRoot *-- "3 " Service2 : IService2
CompositionRoot *-- Service3 : IService3
CompositionRoot o-- "2 Scoped" Service4 : IService4
Singleton ..> CompositionRoot : CompositionRoot TestPureDIByCR()
Service1 *-- Service2 : IService2
Service2 *-- "5 " Service3 : IService3
Service3 o-- "2 Scoped" Service4 : IService4
Singleton ..> CompositionRoot : CompositionRoot TestPureDIByCR()
```

### Generated code
Expand Down
2 changes: 1 addition & 1 deletion readme/TransientDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ classDiagram
CompositionRoot *-- "3 " Service2 : IService2
CompositionRoot *-- Service3 : IService3
CompositionRoot *-- "2 " Service4 : IService4
Transient ..> CompositionRoot : CompositionRoot TestPureDIByCR()
Service1 *-- Service2 : IService2
Service2 *-- "5 " Service3 : IService3
Service3 *-- "2 " Service4 : IService4
Transient ..> CompositionRoot : CompositionRoot TestPureDIByCR()
```

### Generated code
Expand Down
2 changes: 1 addition & 1 deletion readme/WebAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The [project file](/samples/WebAPI/WebAPI.csproj) looks like this:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/WebApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The [project file](/samples/WebApp/WebApp.csproj) looks like this:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/WinFormsApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The [project file](/samples/WinFormsApp/WinFormsApp.csproj) looks like this:
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/WinFormsAppNetCore.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The [project file](/samples/WinFormsAppNetCore/WinFormsAppNetCore.csproj) looks
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/Wpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The [project file](/samples/WpfAppNetCore/WpfAppNetCore.csproj) looks like this:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pure.DI" Version="2.1.19">
<PackageReference Include="Pure.DI" Version="2.1.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion readme/a-few-partial-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ classDiagram
class IService {
<<interface>>
}
Service *-- Dependency : IDependency
Composition ..> Service : IService Root
Service *-- Dependency : IDependency
```

12 changes: 6 additions & 6 deletions readme/accumulators.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ partial class Composition
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
var accumulator45 = new MyAccumulator();
var accumulator44 = new MyAccumulator();
AbcDependency perBlockAbcDependency4 = new AbcDependency();
if (_root._singletonXyzDependency41 == null)
{
Expand All @@ -78,7 +78,7 @@ partial class Composition
{
XyzDependency _singletonXyzDependency41Temp;
_singletonXyzDependency41Temp = new XyzDependency();
accumulator45.Add(_singletonXyzDependency41Temp);
accumulator44.Add(_singletonXyzDependency41Temp);
Thread.MemoryBarrier();
_root._singletonXyzDependency41 = _singletonXyzDependency41Temp;
}
Expand All @@ -88,16 +88,16 @@ partial class Composition
AbcDependency transientAbcDependency3 = new AbcDependency();
lock (_lock)
{
accumulator45.Add(transientAbcDependency3);
accumulator44.Add(transientAbcDependency3);
}

Service transientService1 = new Service(transientAbcDependency3, _root._singletonXyzDependency41!, perBlockAbcDependency4);
lock (_lock)
{
accumulator45.Add(transientService1);
accumulator44.Add(transientService1);
}

return (transientService1, accumulator45);
return (transientService1, accumulator44);
}
}

Expand Down Expand Up @@ -262,9 +262,9 @@ classDiagram
}
ValueTupleᐸIServiceˏMyAccumulatorᐳ *-- Service : IService
ValueTupleᐸIServiceˏMyAccumulatorᐳ *-- MyAccumulator : MyAccumulator
Composition ..> ValueTupleᐸIServiceˏMyAccumulatorᐳ : ValueTupleᐸIServiceˏMyAccumulatorᐳ Root
Service *-- AbcDependency : typeof(Pure.DI.UsageTests.Advanced.AccumulatorScenario.AbcDependency) IDependency
Service o-- "Singleton" XyzDependency : typeof(Pure.DI.UsageTests.Advanced.AccumulatorScenario.XyzDependency) IDependency
Service o-- "PerBlock" AbcDependency : IDependency
Composition ..> ValueTupleᐸIServiceˏMyAccumulatorᐳ : ValueTupleᐸIServiceˏMyAccumulatorᐳ Root
```

2 changes: 1 addition & 1 deletion readme/advanced-interception.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ classDiagram
class IService {
<<interface>>
}
Service *-- Dependency : IDependency
Composition ..> Service : IService Root
Service *-- Dependency : IDependency
```

2 changes: 1 addition & 1 deletion readme/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ classDiagram
class IService {
<<interface>>
}
Service *-- ArrayᐸIDependencyᐳ : ArrayᐸIDependencyᐳ
Composition ..> Service : IService Root
Service *-- ArrayᐸIDependencyᐳ : ArrayᐸIDependencyᐳ
ArrayᐸIDependencyᐳ *-- AbcDependency : IDependency
ArrayᐸIDependencyᐳ *-- XyzDependency : 2 IDependency
```
Expand Down
14 changes: 7 additions & 7 deletions readme/async-disposable-scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ partial class Composition: IDisposable, IAsyncDisposable
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
var perResolveFunc46 = default(Func<Session>);
if (perResolveFunc46 == null)
var perResolveFunc47 = default(Func<Session>);
if (perResolveFunc47 == null)
{
lock (_lock)
{
if (perResolveFunc46 == null)
if (perResolveFunc47 == null)
{
perResolveFunc46 = new Func<Session>(
perResolveFunc47 = new Func<Session>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
{
Expand All @@ -153,7 +153,7 @@ partial class Composition: IDisposable, IAsyncDisposable
}
}

return new Program(perResolveFunc46!);
return new Program(perResolveFunc47!);
}
}

Expand Down Expand Up @@ -268,9 +268,9 @@ classDiagram
}
Session *-- Composition : Composition
Program o-- "PerResolve" FuncᐸSessionᐳ : FuncᐸSessionᐳ
Service o-- "Scoped" Dependency : IDependency
Composition ..> Service : IService SessionRoot
Composition ..> Program : Program ProgramRoot
Composition ..> Service : IService SessionRoot
Service o-- "Scoped" Dependency : IDependency
FuncᐸSessionᐳ *-- Session : Session
```

2 changes: 1 addition & 1 deletion readme/async-disposable-singleton.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ classDiagram
class IService {
<<interface>>
}
Service o-- "Singleton" Dependency : IDependency
Composition ..> Service : IService Root
Service o-- "Singleton" Dependency : IDependency
```

2 changes: 1 addition & 1 deletion readme/async-enumerable.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ classDiagram
class IService {
<<interface>>
}
Service *-- IAsyncEnumerableᐸIDependencyᐳ : IAsyncEnumerableᐸIDependencyᐳ
Composition ..> Service : IService Root
Service *-- IAsyncEnumerableᐸIDependencyᐳ : IAsyncEnumerableᐸIDependencyᐳ
IAsyncEnumerableᐸIDependencyᐳ *-- AbcDependency : IDependency
IAsyncEnumerableᐸIDependencyᐳ *-- XyzDependency : 2 IDependency
```
Expand Down
14 changes: 7 additions & 7 deletions readme/async-root.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ partial class Composition
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public Task<IService> GetMyServiceAsync(CancellationToken cancellationToken)
{
var perResolveFunc44 = default(Func<IService>);
var perResolveFunc45 = default(Func<IService>);
TaskScheduler transientTaskScheduler4 = TaskScheduler.Default;
TaskContinuationOptions transientTaskContinuationOptions3 = TaskContinuationOptions.None;
TaskCreationOptions transientTaskCreationOptions2 = TaskCreationOptions.None;
Expand All @@ -65,13 +65,13 @@ partial class Composition
perBlockTaskFactory1 = new TaskFactory<IService>(localCancellationToken10, localTaskCreationOptions11, localTaskContinuationOptions12, localTaskScheduler13);
}

if (perResolveFunc44 == null)
if (perResolveFunc45 == null)
{
lock (_lock)
{
if (perResolveFunc44 == null)
if (perResolveFunc45 == null)
{
perResolveFunc44 = new Func<IService>(
perResolveFunc45 = new Func<IService>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
{
Expand All @@ -84,7 +84,7 @@ partial class Composition

Task<IService> transientTask0;
{
Func<IService> localFactory15 = perResolveFunc44!;
Func<IService> localFactory15 = perResolveFunc45!;
TaskFactory<IService> localTaskFactory16 = perBlockTaskFactory1;
transientTask0 = localTaskFactory16.StartNew(localFactory15);
}
Expand All @@ -106,7 +106,6 @@ classDiagram
class TaskCreationOptions
class TaskContinuationOptions
class TaskFactory
class CancellationToken
Dependency --|> IDependency
class Dependency {
+Dependency()
Expand All @@ -115,6 +114,7 @@ classDiagram
class Service {
+Service(IDependency dependency)
}
class CancellationToken
class FuncᐸIServiceᐳ
class TaskFactoryᐸIServiceᐳ
class IDependency {
Expand All @@ -123,12 +123,12 @@ classDiagram
class IService {
<<interface>>
}
Composition ..> TaskᐸIServiceᐳ : TaskᐸIServiceᐳ GetMyServiceAsync(System.Threading.CancellationToken cancellationToken)
TaskFactory o-- CancellationToken : Argument "cancellationToken"
TaskFactory *-- TaskCreationOptions : TaskCreationOptions
TaskFactory *-- TaskContinuationOptions : TaskContinuationOptions
TaskFactory *-- TaskScheduler : TaskScheduler
Service *-- Dependency : IDependency
Composition ..> TaskᐸIServiceᐳ : TaskᐸIServiceᐳ GetMyServiceAsync(System.Threading.CancellationToken cancellationToken)
TaskᐸIServiceᐳ o-- "PerResolve" FuncᐸIServiceᐳ : FuncᐸIServiceᐳ
TaskᐸIServiceᐳ o-- "PerBlock" TaskFactoryᐸIServiceᐳ : TaskFactoryᐸIServiceᐳ
FuncᐸIServiceᐳ *-- Service : IService
Expand Down
Loading

0 comments on commit f77b2dd

Please sign in to comment.