Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed Aug 12, 2024
1 parent 78ae09a commit ada23cc
Show file tree
Hide file tree
Showing 60 changed files with 532 additions and 532 deletions.
8 changes: 4 additions & 4 deletions readme/EnumDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ partial class Enum
[MethodImpl(MethodImplOptions.AggressiveInlining)]
IEnumerable<IService3> EnumerationOf_perBlockIEnumerable10()
{
yield return new Service3(new Service4(), new Service4());
yield return new Service3v2(new Service4(), new Service4());
yield return new Service3v3(new Service4(), new Service4());
yield return new Service3v4(new Service4(), new Service4());
yield return new Service3(new Service4(), new Service4());
yield return new Service3v2(new Service4(), new Service4());
yield return new Service3v3(new Service4(), new Service4());
yield return new Service3v4(new Service4(), new Service4());
}

IEnumerable<IService3> perBlockIEnumerable10 = EnumerationOf_perBlockIEnumerable10();
Expand Down
4 changes: 2 additions & 2 deletions readme/FuncDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ partial class Func
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
{
IService3 localValue0 = new Service3(new Service4(), new Service4());
return localValue0;
IService3 localValue0 = new Service3(new Service4(), new Service4());
return localValue0;
});
return new CompositionRoot(new Service1(new Service2Func(perBlockFunc10)), new Service2Func(perBlockFunc10), new Service2Func(perBlockFunc10), new Service2Func(perBlockFunc10), new Service3(new Service4(), new Service4()), new Service4(), new Service4());
}
Expand Down
12 changes: 6 additions & 6 deletions readme/SingletonDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ partial class Singleton
{
if (_scopedService443 == null)
{
_scopedService443 = new Service4();
_scopedService443 = new Service4();
}

if (_scopedService140 == null)
{
if (_scopedService443 == null)
{
_scopedService443 = new Service4();
}
if (_scopedService443 == null)
{
_scopedService443 = new Service4();
}

_scopedService140 = new Service1(new Service2(new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!)));
_scopedService140 = new Service1(new Service2(new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!)));
}

return new CompositionRoot(_scopedService140!, new Service2(new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!)), new Service2(new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!)), new Service2(new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!), new Service3(_scopedService443!, _scopedService443!)), new Service3(_scopedService443!, _scopedService443!), _scopedService443!, _scopedService443!);
Expand Down
22 changes: 11 additions & 11 deletions readme/accumulators.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,29 +73,29 @@ partial class Composition
AbcDependency perBlockAbcDependency4 = new AbcDependency();
if (_root._singletonXyzDependency41 == null)
{
lock (_lock)
lock (_lock)
{
if (_root._singletonXyzDependency41 == null)
{
if (_root._singletonXyzDependency41 == null)
{
XyzDependency _singletonXyzDependency41Temp;
_singletonXyzDependency41Temp = new XyzDependency();
accumulator44.Add(_singletonXyzDependency41Temp);
Thread.MemoryBarrier();
_root._singletonXyzDependency41 = _singletonXyzDependency41Temp;
}
XyzDependency _singletonXyzDependency41Temp;
_singletonXyzDependency41Temp = new XyzDependency();
accumulator44.Add(_singletonXyzDependency41Temp);
Thread.MemoryBarrier();
_root._singletonXyzDependency41 = _singletonXyzDependency41Temp;
}
}
}

AbcDependency transientAbcDependency3 = new AbcDependency();
lock (_lock)
{
accumulator44.Add(transientAbcDependency3);
accumulator44.Add(transientAbcDependency3);
}

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

return (transientService1, accumulator44);
Expand Down
36 changes: 18 additions & 18 deletions readme/async-disposable-scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ partial class Composition: IDisposable, IAsyncDisposable
{
if (_scopedDependency39 == null)
{
lock (_lock)
lock (_lock)
{
if (_scopedDependency39 == null)
{
if (_scopedDependency39 == null)
{
_scopedDependency39 = new Dependency();
_disposables[_disposeIndex++] = _scopedDependency39;
}
_scopedDependency39 = new Dependency();
_disposables[_disposeIndex++] = _scopedDependency39;
}
}
}

return new Service(_scopedDependency39!);
Expand All @@ -139,20 +139,20 @@ partial class Composition: IDisposable, IAsyncDisposable
var perResolveFunc47 = default(Func<Session>);
if (perResolveFunc47 == null)
{
lock (_lock)
lock (_lock)
{
if (perResolveFunc47 == null)
{
if (perResolveFunc47 == null)
{
perResolveFunc47 = new Func<Session>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
{
Composition transientComposition2 = this;
Session localValue63 = new Session(transientComposition2);
return localValue63;
});
}
perResolveFunc47 = new Func<Session>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
{
Composition transientComposition2 = this;
Session localValue63 = new Session(transientComposition2);
return localValue63;
});
}
}
}

return new Program(perResolveFunc47!);
Expand Down
12 changes: 6 additions & 6 deletions readme/async-disposable-singleton.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ partial class Composition: IDisposable, IAsyncDisposable
{
if (_root._singletonDependency39 == null)
{
lock (_lock)
lock (_lock)
{
if (_root._singletonDependency39 == null)
{
if (_root._singletonDependency39 == null)
{
_root._singletonDependency39 = new Dependency();
_root._disposables[_root._disposeIndex++] = _root._singletonDependency39;
}
_root._singletonDependency39 = new Dependency();
_root._disposables[_root._disposeIndex++] = _root._singletonDependency39;
}
}
}

return new Service(_root._singletonDependency39!);
Expand Down
6 changes: 3 additions & 3 deletions readme/async-enumerable.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ partial class Composition
[MethodImpl(MethodImplOptions.AggressiveInlining)]
async IAsyncEnumerable<IDependency> EnumerationOf_transientIAsyncEnumerable1()
{
yield return new AbcDependency();
yield return new XyzDependency();
await Task.CompletedTask;
yield return new AbcDependency();
yield return new XyzDependency();
await Task.CompletedTask;
}

IAsyncEnumerable<IDependency> transientIAsyncEnumerable1 = EnumerationOf_transientIAsyncEnumerable1();
Expand Down
38 changes: 19 additions & 19 deletions readme/async-root.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,35 +59,35 @@ partial class Composition
TaskCreationOptions transientTaskCreationOptions2 = TaskCreationOptions.None;
TaskFactory<IService> perBlockTaskFactory1;
{
CancellationToken localCancellationToken17 = cancellationToken;
TaskCreationOptions localTaskCreationOptions18 = transientTaskCreationOptions2;
TaskContinuationOptions localTaskContinuationOptions19 = transientTaskContinuationOptions3;
TaskScheduler localTaskScheduler20 = transientTaskScheduler4;
perBlockTaskFactory1 = new TaskFactory<IService>(localCancellationToken17, localTaskCreationOptions18, localTaskContinuationOptions19, localTaskScheduler20);
CancellationToken localCancellationToken17 = cancellationToken;
TaskCreationOptions localTaskCreationOptions18 = transientTaskCreationOptions2;
TaskContinuationOptions localTaskContinuationOptions19 = transientTaskContinuationOptions3;
TaskScheduler localTaskScheduler20 = transientTaskScheduler4;
perBlockTaskFactory1 = new TaskFactory<IService>(localCancellationToken17, localTaskCreationOptions18, localTaskContinuationOptions19, localTaskScheduler20);
}

if (perResolveFunc45 == null)
{
lock (_lock)
lock (_lock)
{
if (perResolveFunc45 == null)
{
if (perResolveFunc45 == null)
{
perResolveFunc45 = new Func<IService>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
{
IService localValue21 = new Service(new Dependency());
return localValue21;
});
}
perResolveFunc45 = new Func<IService>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
{
IService localValue21 = new Service(new Dependency());
return localValue21;
});
}
}
}

Task<IService> transientTask0;
{
Func<IService> localFactory22 = perResolveFunc45!;
TaskFactory<IService> localTaskFactory23 = perBlockTaskFactory1;
transientTask0 = localTaskFactory23.StartNew(localFactory22);
Func<IService> localFactory22 = perResolveFunc45!;
TaskFactory<IService> localTaskFactory23 = perBlockTaskFactory1;
transientTask0 = localTaskFactory23.StartNew(localFactory22);
}

return transientTask0;
Expand Down
46 changes: 23 additions & 23 deletions readme/auto-scoped.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,28 +98,28 @@ partial class Composition
var perResolveFunc46 = default(Func<IService>);
if (perResolveFunc46 == null)
{
lock (_lock)
lock (_lock)
{
if (perResolveFunc46 == null)
{
if (perResolveFunc46 == null)
perResolveFunc46 = new Func<IService>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
{
Composition transientComposition2 = this;
IService transientIService1;
{
perResolveFunc46 = new Func<IService>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
{
Composition transientComposition2 = this;
IService transientIService1;
{
Composition localBaseComposition65 = transientComposition2;
// Creates a session
var localSession66 = new Composition(localBaseComposition65);
transientIService1 = localSession66.SessionRoot;
}

IService localValue64 = transientIService1;
return localValue64;
});
Composition localBaseComposition65 = transientComposition2;
// Creates a session
var localSession66 = new Composition(localBaseComposition65);
transientIService1 = localSession66.SessionRoot;
}

IService localValue64 = transientIService1;
return localValue64;
});
}
}
}

return new Program(perResolveFunc46!);
Expand All @@ -133,13 +133,13 @@ partial class Composition
{
if (_scopedDependency39 == null)
{
lock (_lock)
lock (_lock)
{
if (_scopedDependency39 == null)
{
if (_scopedDependency39 == null)
{
_scopedDependency39 = new Dependency();
}
_scopedDependency39 = new Dependency();
}
}
}

return new Service(_scopedDependency39!);
Expand Down
14 changes: 7 additions & 7 deletions readme/bind-attribute-for-a-generic-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ partial class Composition
{
if (_root._singletonFacade39 == null)
{
lock (_lock)
lock (_lock)
{
if (_root._singletonFacade39 == null)
{
if (_root._singletonFacade39 == null)
{
_root._singletonFacade39 = new Facade();
}
_root._singletonFacade39 = new Facade();
}
}
}

IDependency<int> transientIDependency1;
{
Facade localInstance_1182D12724 = _root._singletonFacade39!;
transientIDependency1 = localInstance_1182D12724.GetDependency<int>();
Facade localInstance_1182D12724 = _root._singletonFacade39!;
transientIDependency1 = localInstance_1182D12724.GetDependency<int>();
}

return new Service(transientIDependency1);
Expand Down
26 changes: 13 additions & 13 deletions readme/bind-attribute-with-lifetime-and-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,21 @@ partial class Composition
{
if (_root._singletonIDependency0 == null)
{
lock (_lock)
lock (_lock)
{
if (_root._singletonIDependency0 == null)
{
if (_root._singletonIDependency0 == null)
{
if (_root._singletonFacade39 == null)
{
_root._singletonFacade39 = new Facade();
}

{
Facade localInstance_1182D12726 = _root._singletonFacade39!;
_root._singletonIDependency0 = localInstance_1182D12726.Dependency;
}
}
if (_root._singletonFacade39 == null)
{
_root._singletonFacade39 = new Facade();
}

{
Facade localInstance_1182D12726 = _root._singletonFacade39!;
_root._singletonIDependency0 = localInstance_1182D12726.Dependency;
}
}
}
}

return new Service(_root._singletonIDependency0!);
Expand Down
14 changes: 7 additions & 7 deletions readme/bind-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ partial class Composition
{
if (_root._singletonFacade39 == null)
{
lock (_lock)
lock (_lock)
{
if (_root._singletonFacade39 == null)
{
if (_root._singletonFacade39 == null)
{
_root._singletonFacade39 = new Facade();
}
_root._singletonFacade39 = new Facade();
}
}
}

IDependency transientIDependency1;
{
Facade localInstance_1182D12725 = _root._singletonFacade39!;
transientIDependency1 = localInstance_1182D12725.Dependency;
Facade localInstance_1182D12725 = _root._singletonFacade39!;
transientIDependency1 = localInstance_1182D12725.Dependency;
}

return new Service(transientIDependency1);
Expand Down
2 changes: 1 addition & 1 deletion readme/check-for-a-root.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ partial class Composition
{
return new Service()
{
Dependency = new Dependency()
Dependency = new Dependency()
};
}
}
Expand Down
Loading

0 comments on commit ada23cc

Please sign in to comment.