This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Wellknown.cs
106 lines (86 loc) · 2.63 KB
/
Wellknown.cs
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
namespace DevTeam.IoC.Contracts
{
[PublicAPI]
public static class Wellknown
{
[PublicAPI]
public enum Feature
{
// Support default set of features.
Default,
// Support child resolving child containers.
ChildContainers,
// Support lifetimes.
Lifetimes,
// Support scopes.
Scopes,
// Support key comparers.
// ReSharper disable once IdentifierTypo
KeyComparers,
// Support resolving via IEnumerable<>. Resolve all elements of specified contract.
// ReSharper disable once IdentifierTypo
Enumerables,
// Support resolving via IObservable<>. Resolve all elements of specified contract.
// ReSharper disable once IdentifierTypo
Observables,
#if !NET35
// Support injection via Task.
Tasks,
#endif
// Support resolving via IResolver<>, IProvider<>, Func<>
Resolvers,
// Support configuration using Dto.
Dto
}
[PublicAPI]
public enum Lifetime
{
/// <summary>
/// Singleton instance.
/// </summary>
Singleton,
/// <summary>
/// IDisposable instance is disposed when a registration is removed or a container is disposed.
/// </summary>
AutoDisposing,
/// <summary>
/// Singleton instance per container.
/// </summary>
PerContainer,
/// <summary>
/// Singleton instance per resolving.
/// </summary>
PerResolve,
/// <summary>
/// Singleton instance per thread.
/// </summary>
PerThread,
/// <summary>
/// Singleton instance per state.
/// </summary>
PerState
}
[PublicAPI]
public enum KeyComparer
{
// Tag key does not impact on resolving.
AnyTag,
// State key does not impact on resolving.
AnyState,
// Tag and State keys do not impact on resolving.
AnyTagAnyState,
}
[PublicAPI]
public enum Scope
{
/// <summary>
/// Registration is visible in the current container only.
/// </summary>
Internal,
/// <summary>
/// Registration is be visible for whole hierarchy of containers.
/// </summary>
Global
}
}
}