-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLifetime.cs
More file actions
32 lines (29 loc) · 1.02 KB
/
Copy pathLifetime.cs
File metadata and controls
32 lines (29 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace ServiceLifetimes
{
public sealed class Lifetime : ILifetime
{
private readonly IOperationTransient _transientOperation;
private readonly IOperationScoped _scopedOperation;
private readonly IOperationSingleton _singletondOperation;
public Lifetime(
IOperationTransient transientOperation,
IOperationScoped scopedOperation,
IOperationSingleton singletondOperation)
{
this._transientOperation = transientOperation;
this._scopedOperation = scopedOperation;
this._singletondOperation = singletondOperation;
}
public string Information()
{
var log = @"
{0}TRANSIENT{0}SCOPED{0}SINGLETON{0}
{0} {1}{0} {2}{0} {3}{0}";
return string.Format(log,
Common.Hyphen(25),
this._transientOperation.OperationId,
this._scopedOperation.OperationId,
this._singletondOperation.OperationId);
}
}
}