PageRenderTime 102ms CodeModel.GetById 61ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/src/LinFu.IoC/Configuration/Interfaces/IMemberResolver.cs

http://github.com/philiplaureano/LinFu
C# | 29 lines | 12 code | 1 blank | 16 comment | 0 complexity | 12f2ea310114d4f1e87462612a86a50e MD5 | raw file
 1using System;
 2using System.Reflection;
 3using LinFu.IoC.Interfaces;
 4
 5namespace LinFu.IoC.Configuration.Interfaces
 6{
 7    /// <summary>
 8    ///     Represents a class that can choose a member that best matches
 9    ///     the services currently available in a given <see cref="IServiceContainer" /> instance.
10    /// </summary>
11    /// <typeparam name="TMember">The member type that will be searched.</typeparam>
12    public interface IMemberResolver<TMember>
13        where TMember : MemberInfo
14    {
15        /// <summary>
16        ///     Uses the <paramref name="container" /> to determine which member can be used to instantiate
17        ///     a <paramref name="concreteType">concrete type</paramref>.
18        /// </summary>
19        /// <param name="concreteType">The target type.</param>
20        /// <param name="container">
21        ///     The container that contains the service instances that will be used to invoke the target
22        ///     member.
23        /// </param>
24        /// <param name="finderContext">The <see cref="IMethodFinderContext" /> that describes the target method.</param>
25        /// <returns>A <typeparamref name="TMember" /> instance if a match is found; otherwise, it will return <c>null</c>.</returns>
26        TMember ResolveFrom(Type concreteType, IServiceContainer container,
27            IMethodFinderContext finderContext);
28    }
29}