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 83613b2 commit b950d99
Show file tree
Hide file tree
Showing 38 changed files with 111 additions and 256 deletions.
2 changes: 0 additions & 2 deletions readme/accumulators.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,11 @@ partial class Composition
{
accumulator44.Add(transientAbcDependency3);
}

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

return (transientService1, accumulator44);
}
}
Expand Down
4 changes: 1 addition & 3 deletions readme/async-disposable-scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ partial class Composition: IDisposable, IAsyncDisposable
{
if (perResolveFunc47 == null)
{
perResolveFunc47 = new Func<Session>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
perResolveFunc47 = new Func<Session>([MethodImpl(MethodImplOptions.AggressiveInlining)] () =>
{
Composition transientComposition2 = this;
Session localValue63 = new Session(transientComposition2);
Expand Down
26 changes: 9 additions & 17 deletions readme/async-root.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,18 @@ partial class Composition
TaskContinuationOptions transientTaskContinuationOptions3 = TaskContinuationOptions.None;
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)
{
if (perResolveFunc45 == null)
{
perResolveFunc45 = new Func<IService>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
perResolveFunc45 = new Func<IService>([MethodImpl(MethodImplOptions.AggressiveInlining)] () =>
{
IService localValue21 = new Service(new Dependency());
return localValue21;
Expand All @@ -84,12 +79,9 @@ partial class Composition
}

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
15 changes: 5 additions & 10 deletions readme/auto-scoped.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,14 @@ partial class Composition
{
if (perResolveFunc46 == null)
{
perResolveFunc46 = new Func<IService>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
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;
}

Composition localBaseComposition65 = transientComposition2;
// Creates a session
var localSession66= new Composition(localBaseComposition65);
transientIService1 = localSession66.SessionRoot;
IService localValue64 = transientIService1;
return localValue64;
});
Expand Down
7 changes: 2 additions & 5 deletions readme/bind-attribute-for-a-generic-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,8 @@ partial class Composition
}

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
6 changes: 2 additions & 4 deletions readme/bind-attribute-with-lifetime-and-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ partial class Composition
_root._singletonFacade39 = new Facade();
}

{
Facade localInstance_1182D12726 = _root._singletonFacade39!;
_root._singletonIDependency0 = localInstance_1182D12726.Dependency;
}
Facade localInstance_1182D12726 = _root._singletonFacade39!;
_root._singletonIDependency0 = localInstance_1182D12726.Dependency;
}
}
}
Expand Down
7 changes: 2 additions & 5 deletions readme/bind-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,8 @@ partial class Composition
}

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
5 changes: 1 addition & 4 deletions readme/check-for-a-root.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ partial class Composition
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return new Service()
{
Dependency = new Dependency()
};
return new Service() { Dependency = new Dependency() };
}
}

Expand Down
5 changes: 1 addition & 4 deletions readme/default-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ partial class Composition
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
return new Service()
{
Dependency = new Dependency()
};
return new Service() { Dependency = new Dependency() };
}
}
}
Expand Down
9 changes: 3 additions & 6 deletions readme/exposed-generic-roots-with-args.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,9 @@ partial class Composition
}

Integration.IMyGenericService<int> transientIMyGenericService1;
{
int localId1 = id;
Integration.CompositionWithGenericRootsAndArgsInOtherProject localInstance_1182D1272 = _root._singletonCompositionWithGenericRootsAndArgsInOtherProject40!;
transientIMyGenericService1 = localInstance_1182D1272.GetMyService<int>(localId1);
}

int localId1 = id;
Integration.CompositionWithGenericRootsAndArgsInOtherProject localInstance_1182D1272 = _root._singletonCompositionWithGenericRootsAndArgsInOtherProject40!;
transientIMyGenericService1 = localInstance_1182D1272.GetMyService<int>(localId1);
return new Program(transientIMyGenericService1);
}
}
Expand Down
7 changes: 2 additions & 5 deletions readme/exposed-generic-roots.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,8 @@ partial class Composition
}

Integration.IMyGenericService<int> transientIMyGenericService1;
{
Integration.CompositionWithGenericRootsInOtherProject localInstance_1182D1270 = _root._singletonCompositionWithGenericRootsInOtherProject39!;
transientIMyGenericService1 = localInstance_1182D1270.GetMyService<int>();
}

Integration.CompositionWithGenericRootsInOtherProject localInstance_1182D1270 = _root._singletonCompositionWithGenericRootsInOtherProject39!;
transientIMyGenericService1 = localInstance_1182D1270.GetMyService<int>();
return new Program(transientIMyGenericService1);
}
}
Expand Down
7 changes: 2 additions & 5 deletions readme/exposed-roots-via-arg.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,8 @@ partial class Composition
get
{
Integration.IMyService transientIMyService1;
{
Integration.CompositionInOtherProject localInstance_1182D1274 = _argBaseComposition;
transientIMyService1 = localInstance_1182D1274.MyService;
}

Integration.CompositionInOtherProject localInstance_1182D1274 = _argBaseComposition;
transientIMyService1 = localInstance_1182D1274.MyService;
return new Program(transientIMyService1);
}
}
Expand Down
7 changes: 2 additions & 5 deletions readme/exposed-roots-via-root-arg.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,8 @@ partial class Composition
public Program GetProgram(Integration.CompositionInOtherProject baseComposition)
{
Integration.IMyService transientIMyService1;
{
Integration.CompositionInOtherProject localInstance_1182D1275 = baseComposition;
transientIMyService1 = localInstance_1182D1275.MyService;
}

Integration.CompositionInOtherProject localInstance_1182D1275 = baseComposition;
transientIMyService1 = localInstance_1182D1275.MyService;
return new Program(transientIMyService1);
}
}
Expand Down
7 changes: 2 additions & 5 deletions readme/exposed-roots-with-tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,8 @@ partial class Composition
}

Integration.IMyService transientIMyService1;
{
Integration.CompositionWithTagsInOtherProject localInstance_1182D1276 = _root._singletonCompositionWithTagsInOtherProject39!;
transientIMyService1 = localInstance_1182D1276.MyService;
}

Integration.CompositionWithTagsInOtherProject localInstance_1182D1276 = _root._singletonCompositionWithTagsInOtherProject39!;
transientIMyService1 = localInstance_1182D1276.MyService;
return new Program(transientIMyService1);
}
}
Expand Down
7 changes: 2 additions & 5 deletions readme/exposed-roots.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,8 @@ partial class Composition
}

Integration.IMyService transientIMyService1;
{
Integration.CompositionInOtherProject localInstance_1182D1273 = _root._singletonCompositionInOtherProject39!;
transientIMyService1 = localInstance_1182D1273.MyService;
}

Integration.CompositionInOtherProject localInstance_1182D1273 = _root._singletonCompositionInOtherProject39!;
transientIMyService1 = localInstance_1182D1273.MyService;
return new Program(transientIMyService1);
}
}
Expand Down
9 changes: 3 additions & 6 deletions readme/factory.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,9 @@ partial class Composition
{
DateTimeOffset transientDateTimeOffset3 = DateTimeOffset.Now;
Dependency transientDependency1;
{
Dependency localDependency27 = new Dependency(transientDateTimeOffset3);
localDependency27.Initialize();
transientDependency1 = localDependency27;
}

Dependency localDependency27 = new Dependency(transientDateTimeOffset3);
localDependency27.Initialize();
transientDependency1 = localDependency27;
return new Service(transientDependency1);
}
}
Expand Down
4 changes: 1 addition & 3 deletions readme/func-with-tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ partial class Composition
{
if (perResolveFunc42 == null)
{
perResolveFunc42 = new Func<IDependency>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
perResolveFunc42 = new Func<IDependency>([MethodImpl(MethodImplOptions.AggressiveInlining)] () =>
{
IDependency localValue32 = new Dependency();
return localValue32;
Expand Down
4 changes: 1 addition & 3 deletions readme/func.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ partial class Composition
{
if (perResolveFunc42 == null)
{
perResolveFunc42 = new Func<IDependency>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
perResolveFunc42 = new Func<IDependency>([MethodImpl(MethodImplOptions.AggressiveInlining)] () =>
{
IDependency localValue30 = new Dependency();
return localValue30;
Expand Down
59 changes: 20 additions & 39 deletions readme/generic-async-composition-roots-with-constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,30 +92,22 @@ partial class Composition
TaskContinuationOptions transientTaskContinuationOptions3 = TaskContinuationOptions.None;
TaskCreationOptions transientTaskCreationOptions2 = TaskCreationOptions.None;
TaskFactory<IService<T, bool>> perBlockTaskFactory1;
{
CancellationToken localCancellationToken46 = cancellationToken;
TaskCreationOptions localTaskCreationOptions47 = transientTaskCreationOptions2;
TaskContinuationOptions localTaskContinuationOptions48 = transientTaskContinuationOptions3;
TaskScheduler localTaskScheduler49 = transientTaskScheduler4;
perBlockTaskFactory1 = new TaskFactory<IService<T, bool>>(localCancellationToken46, localTaskCreationOptions47, localTaskContinuationOptions48, localTaskScheduler49);
}

CancellationToken localCancellationToken46 = cancellationToken;
TaskCreationOptions localTaskCreationOptions47 = transientTaskCreationOptions2;
TaskContinuationOptions localTaskContinuationOptions48 = transientTaskContinuationOptions3;
TaskScheduler localTaskScheduler49 = transientTaskScheduler4;
perBlockTaskFactory1 = new TaskFactory<IService<T, bool>>(localCancellationToken46, localTaskCreationOptions47, localTaskContinuationOptions48, localTaskScheduler49);
if (perResolveFunc48 == null)
{
lock (_lock)
{
if (perResolveFunc48 == null)
{
perResolveFunc48 = new Func<IService<T, bool>>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
perResolveFunc48 = new Func<IService<T, bool>>([MethodImpl(MethodImplOptions.AggressiveInlining)] () =>
{
OtherService<T> transientOtherService5;
{
IDependency<T> localDependency51 = new Dependency<T>();
transientOtherService5 = new OtherService<T>(localDependency51);
}

IDependency<T> localDependency51 = new Dependency<T>();
transientOtherService5 = new OtherService<T>(localDependency51);
IService<T, bool> localValue50 = transientOtherService5;
return localValue50;
});
Expand All @@ -124,12 +116,9 @@ partial class Composition
}

Task<IService<T, bool>> transientTask0;
{
Func<IService<T, bool>> localFactory52 = perResolveFunc48!;
TaskFactory<IService<T, bool>> localTaskFactory53 = perBlockTaskFactory1;
transientTask0 = localTaskFactory53.StartNew(localFactory52);
}

Func<IService<T, bool>> localFactory52 = perResolveFunc48!;
TaskFactory<IService<T, bool>> localTaskFactory53 = perBlockTaskFactory1;
transientTask0 = localTaskFactory53.StartNew(localFactory52);
return transientTask0;
}

Expand All @@ -143,23 +132,18 @@ partial class Composition
TaskContinuationOptions transientTaskContinuationOptions3 = TaskContinuationOptions.None;
TaskCreationOptions transientTaskCreationOptions2 = TaskCreationOptions.None;
TaskFactory<IService<T, T1>> perBlockTaskFactory1;
{
CancellationToken localCancellationToken54 = cancellationToken;
TaskCreationOptions localTaskCreationOptions55 = transientTaskCreationOptions2;
TaskContinuationOptions localTaskContinuationOptions56 = transientTaskContinuationOptions3;
TaskScheduler localTaskScheduler57 = transientTaskScheduler4;
perBlockTaskFactory1 = new TaskFactory<IService<T, T1>>(localCancellationToken54, localTaskCreationOptions55, localTaskContinuationOptions56, localTaskScheduler57);
}

CancellationToken localCancellationToken54 = cancellationToken;
TaskCreationOptions localTaskCreationOptions55 = transientTaskCreationOptions2;
TaskContinuationOptions localTaskContinuationOptions56 = transientTaskContinuationOptions3;
TaskScheduler localTaskScheduler57 = transientTaskScheduler4;
perBlockTaskFactory1 = new TaskFactory<IService<T, T1>>(localCancellationToken54, localTaskCreationOptions55, localTaskContinuationOptions56, localTaskScheduler57);
if (perResolveFunc50 == null)
{
lock (_lock)
{
if (perResolveFunc50 == null)
{
perResolveFunc50 = new Func<IService<T, T1>>(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
() =>
perResolveFunc50 = new Func<IService<T, T1>>([MethodImpl(MethodImplOptions.AggressiveInlining)] () =>
{
IService<T, T1> localValue58 = new Service<T, T1>(new Dependency<T>());
return localValue58;
Expand All @@ -169,12 +153,9 @@ partial class Composition
}

Task<IService<T, T1>> transientTask0;
{
Func<IService<T, T1>> localFactory59 = perResolveFunc50!;
TaskFactory<IService<T, T1>> localTaskFactory60 = perBlockTaskFactory1;
transientTask0 = localTaskFactory60.StartNew(localFactory59);
}

Func<IService<T, T1>> localFactory59 = perResolveFunc50!;
TaskFactory<IService<T, T1>> localTaskFactory60 = perBlockTaskFactory1;
transientTask0 = localTaskFactory60.StartNew(localFactory59);
return transientTask0;
}
}
Expand Down
7 changes: 2 additions & 5 deletions readme/generic-composition-roots-with-constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,8 @@ partial class Composition
where T: IDisposable
{
OtherService<T> transientOtherService0;
{
IDependency<T> localDependency61 = new Dependency<T>();
transientOtherService0 = new OtherService<T>(localDependency61);
}

IDependency<T> localDependency61 = new Dependency<T>();
transientOtherService0 = new OtherService<T>(localDependency61);
return transientOtherService0;
}

Expand Down
Loading

0 comments on commit b950d99

Please sign in to comment.