PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/philiplaureano/LinFu
C# | 35 lines | 10 code | 2 blank | 23 comment | 0 complexity | 1530113731ce4716ca8956942afe7968 MD5 | raw file
 1using System;
 2using LinFu.IoC.Interfaces;
 3
 4namespace LinFu.IoC.Configuration.Interfaces
 5{
 6    /// <summary>
 7    ///     Represents a fluent class that creates
 8    ///     a method that initializes a <typeparamref name="TService" />
 9    ///     instance.
10    /// </summary>
11    /// <typeparam name="TService">The service type being instantiated.</typeparam>
12    public interface IPropertyInjectionLambda<TService>
13    {
14        /// <summary>
15        ///     Initializes service instances with the given
16        ///     <paramref name="action" />.
17        /// </summary>
18        /// <param name="action">
19        ///     An <see cref="Action{TService}" /> delegate that will be used to initialize newly created
20        ///     services.
21        /// </param>
22        void With(Action<TService> action);
23
24        /// <summary>
25        ///     Uses an action delegate to initialize a given service using
26        ///     the given <see cref="IServiceContainer" /> and <typeparamref name="TService" />
27        ///     instances.
28        /// </summary>
29        /// <param name="action">
30        ///     An <see cref="Func{IServiceContainer, TService}" /> delegate that will be used to initialize newly
31        ///     created services.
32        /// </param>
33        void With(Action<IServiceContainer, TService> action);
34    }
35}