PageRenderTime 79ms CodeModel.GetById 75ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/src/LinFu.Reflection/Interfaces/IActionLoader.cs

http://github.com/philiplaureano/LinFu
C# | 30 lines | 10 code | 2 blank | 18 comment | 0 complexity | 25a912f69e146258c48808ee48e4eb18 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3
 4namespace LinFu.Reflection
 5{
 6    /// <summary>
 7    ///     Represents a class that can configure
 8    ///     a target of type <typeparamref name="TTarget" />
 9    ///     using an input type of <typeparamref name="TInput" />.
10    /// </summary>
11    /// <typeparam name="TTarget">The target type to configure.</typeparam>
12    /// <typeparam name="TInput">The input that will be used to configure the target.</typeparam>
13    public interface IActionLoader<TTarget, TInput>
14    {
15        /// <summary>
16        ///     Generates a set of <see cref="Action{T}" /> instances
17        ///     using the given <paramref name="input" />.
18        /// </summary>
19        /// <param name="input">The input that will be used to configure the target.</param>
20        /// <returns>A set of <see cref="Action{TTarget}" /> instances. This cannot be <c>null</c>.</returns>
21        IEnumerable<Action<TTarget>> Load(TInput input);
22
23        /// <summary>
24        ///     Determines if the PluginLoader can load the <paramref name="inputType" />.
25        /// </summary>
26        /// <param name="inputType">The target type that might contain the target instance.</param>
27        /// <returns><c>true</c> if the type can be loaded; otherwise, it returns <c>false</c>.</returns>
28        bool CanLoad(TInput inputType);
29    }
30}