/src/LinFu.IoC/Interfaces/ICreateInstance.cs
http://github.com/philiplaureano/LinFu · C# · 20 lines · 7 code · 0 blank · 13 comment · 0 complexity · 5dae379b98464da3920b4938a3bc0de5 MD5 · raw file
- namespace LinFu.IoC.Interfaces
- {
- /// <summary>
- /// Represents a type that can create service instances from a given <see cref="IFactory" /> instance and
- /// <see cref="IFactoryRequest" />.
- /// </summary>
- public interface ICreateInstance
- {
- /// <summary>
- /// Creates a service instance using the given <paramref name="factoryRequest" /> and <see cref="IFactory" /> instance.
- /// </summary>
- /// <param name="factoryRequest">
- /// The <see cref="IFactoryRequest" /> instance that describes the context of the service
- /// request.
- /// </param>
- /// <param name="factory">The <see cref="IFactory" /> instance that will be used to instantiate the service type.</param>
- /// <returns>A valid service instance.</returns>
- object CreateFrom(IFactoryRequest factoryRequest, IFactory factory);
- }
- }