PageRenderTime 11ms CodeModel.GetById 8ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/LinFu.IoC/Configuration/Injectors/NullMemberInjectionFilter.cs

http://github.com/philiplaureano/LinFu
C# | 25 lines | 15 code | 1 blank | 9 comment | 0 complexity | d9ebe739148f552c6d0a5203b2836b98 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Reflection;
 4using LinFu.IoC.Configuration.Interfaces;
 5
 6namespace LinFu.IoC.Configuration.Injectors
 7{
 8    /// <summary>
 9    ///     Represents a type of <see cref="IMemberInjectionFilter{TMember}" />
10    ///     that always returns an empty match.
11    /// </summary>
12    public class NullMemberInjectionFilter<TMember> : IMemberInjectionFilter<TMember>
13        where TMember : MemberInfo
14    {
15        /// <summary>
16        ///     Always returns an empty list of injectable members.
17        /// </summary>
18        /// <param name="targetType">The type to be injected.</param>
19        /// <returns>An empty list.</returns>
20        public IEnumerable<TMember> GetInjectableMembers(Type targetType)
21        {
22            return new TMember[0];
23        }
24    }
25}