Skip to content

Commit 4d0b99d

Browse files
committed
wording
1 parent c384295 commit 4d0b99d

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

src/Abstracts/IContainerRegistration.cs

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,59 @@ namespace Unity
55
{
66
/// <summary>
77
/// Information about the types registered in a container.
8+
/// <para>
9+
/// Types registered with container are stored in registry and exposed to outside world
10+
/// through <see cref="IUnityContainer.Registrations"/> enumeration. Each record is
11+
/// represented by an instance of this interface.
12+
/// </para>
813
/// </summary>
914
public interface IContainerRegistration
1015
{
1116
/// <summary>
1217
/// Type of the registration.
1318
/// </summary>
19+
/// <remarks>
20+
/// This <see cref="Type"/> is what container stores in its internal registry. When resolving, it will look
21+
/// for this <see cref="Type"/> to satisfy dependencies.
22+
/// </remarks>
23+
/// <value>The type registered with the container</value>
1424
Type RegisteredType { get; }
1525

1626
/// <summary>
1727
/// Name the registered type. Null for default registration.
1828
/// </summary>
29+
/// <remarks>
30+
/// Each registration is uniquely identified by <see cref="RegisteredType"/> and <see cref="Name"/>.
31+
/// Registering the same <see cref="Type"/> with different names will create distinct registrations
32+
/// for each <see cref="RegisteredType"/> and <see cref="Name"/> combinations. Registration with no <see cref="Name"/>
33+
/// (<c>name == null</c>) is called <c>default registration</c>. The container uses these as implicit defaults when required.
34+
/// </remarks>
35+
/// <value>Name of the registration</value>
1936
string Name { get; }
2037

2138
/// <summary>
2239
/// The type that this registration is mapped to.
2340
/// </summary>
41+
/// <remarks>
42+
/// Type <see cref="MappedToType"/> informs container how to build the requested instance. Based on how it was registered, the
43+
/// <see cref="Type"/> could be built from this registration or redirected to mapped registration to satisfy the request.
44+
/// </remarks>
45+
/// <value>The type of object created when registered type is requested</value>
2446
Type MappedToType { get; }
2547

2648
/// <summary>
2749
/// The lifetime manager for this registration.
2850
/// </summary>
2951
/// <remarks>
30-
/// This property will be null if this registration is for an open generic.</remarks>
52+
/// <para>
53+
/// Each Unity registration is assigned a lifetime manager that controls how
54+
/// the container creates, manages, and disposes of created objects. Even if
55+
/// manager is not assigned explicitly, Unity will pick default type
56+
/// and add it to the registration.
57+
/// </para>
58+
/// </remarks>
59+
/// <value>Instance of lifetime manager associated with the registration</value>
60+
/// <seealso cref="Lifetime"/>
3161
LifetimeManager LifetimeManager { get; }
3262
}
3363
}

0 commit comments

Comments
 (0)