/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
- using System;
- using System.Reflection;
- using LinFu.IoC.Interfaces;
- namespace LinFu.IoC.Configuration.Interfaces
- {
- /// <summary>
- /// Represents a class that can choose a member that best matches
- /// the services currently available in a given <see cref="IServiceContainer" /> instance.
- /// </summary>
- /// <typeparam name="TMember">The member type that will be searched.</typeparam>
- public interface IMemberResolver<TMember>
- where TMember : MemberInfo
- {
- /// <summary>
- /// Uses the <paramref name="container" /> to determine which member can be used to instantiate
- /// a <paramref name="concreteType">concrete type</paramref>.
- /// </summary>
- /// <param name="concreteType">The target type.</param>
- /// <param name="container">
- /// The container that contains the service instances that will be used to invoke the target
- /// member.
- /// </param>
- /// <param name="finderContext">The <see cref="IMethodFinderContext" /> that describes the target method.</param>
- /// <returns>A <typeparamref name="TMember" /> instance if a match is found; otherwise, it will return <c>null</c>.</returns>
- TMember ResolveFrom(Type concreteType, IServiceContainer container,
- IMethodFinderContext finderContext);
- }
- }