PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 1ms RepoModel.GetById 40ms app.codeStats 0ms

/src/LinFu.IoC/Interfaces/IFactoryOfT.cs

http://github.com/philiplaureano/LinFu
C# | 17 lines | 7 code | 0 blank | 10 comment | 0 complexity | cdf29eddcde2422650ed56531e5448fe MD5 | raw file
 1namespace LinFu.IoC.Interfaces
 2{
 3    /// <summary>
 4    ///     A strongly-typed version of <see cref="IFactory" />. Allows users
 5    ///     to create their own service instances
 6    /// </summary>
 7    /// <typeparam name="T">The instance type that can be created by this factory.</typeparam>
 8    public interface IFactory<T>
 9    {
10        /// <summary>
11        ///     Creates a service instance using the given <see cref="IFactoryRequest" /> instance.
12        /// </summary>
13        /// <param name="request">The <see cref="IFactoryRequest" /> instance that describes the requested service.</param>
14        /// <returns>An object instance that represents the service to be created. This cannot be <c>null</c>.</returns>
15        T CreateInstance(IFactoryRequest request);
16    }
17}