-
-
Notifications
You must be signed in to change notification settings - Fork 832
/
ResolveRequest.cs
54 lines (48 loc) · 2.12 KB
/
ResolveRequest.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
using System.Collections.Generic;
using Autofac.Core;
namespace Autofac
{
/// <summary>
/// The details of an individual request to resolve a service.
/// </summary>
public class ResolveRequest
{
/// <summary>
/// Initializes a new instance of the <see cref="ResolveRequest"/> class.
/// </summary>
/// <param name="service">The service being resolved.</param>
/// <param name="registration">The component registration for the service.</param>
/// <param name="parameters">The parameters used when resolving the service.</param>
public ResolveRequest(Service service, IComponentRegistration registration, IEnumerable<Parameter> parameters)
: this(service, registration, parameters, null)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="ResolveRequest"/> class.
/// </summary>
/// <param name="service">The service being resolved.</param>
/// <param name="registration">The component registration for the service.</param>
/// <param name="parameters">The parameters used when resolving the service.</param>
/// <param name="decoratorTarget">The target component to be decorated.</param>
public ResolveRequest(Service service, IComponentRegistration registration, IEnumerable<Parameter> parameters, IComponentRegistration? decoratorTarget = null)
{
Service = service;
Registration = registration;
Parameters = parameters;
DecoratorTarget = decoratorTarget;
}
/// <summary>
/// Gets the service being resolved.
/// </summary>
public Service Service { get; }
/// <summary>
/// Gets the component registration for the service being resolved.
/// </summary>
public IComponentRegistration Registration { get; }
/// <summary>
/// Gets the parameters used when resolving the service.
/// </summary>
public IEnumerable<Parameter> Parameters { get; }
public IComponentRegistration? DecoratorTarget { get; }
}
}