Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="Chinchilla Software Limited">
4 : // // Copyright Chinchilla Software Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using System;
10 :
11 : namespace Cqrs.Configuration
12 : {
13 : /// <summary>
14 : /// Provides an ability to resolve instances of objects.
15 : /// </summary>
16 : public interface IDependencyResolver
17 : {
18 : /// <summary>
19 : /// Resolves a single instance for the specified <typeparamref name="T"/>.
20 : /// Different implementations may return the first or last instance found or may return an exception.
21 : /// </summary>
22 : /// <typeparam name="T">The <see cref="Type"/> of object you want to resolve.</typeparam>
23 : /// <returns>An instance of type <typeparamref name="T"/>.</returns>
24 1 : T Resolve<T>();
25 :
26 : /// <summary>
27 : /// Resolves a single instance for the specified <paramref name="type"/>.
28 : /// Different implementations may return the first or last instance found or may return an exception.
29 : /// </summary>
30 : /// <param name="type">The <see cref="Type"/> of object you want to resolve.</param>
31 : /// <returns>An instance of type <paramref name="type"/>.</returns>
32 1 : object Resolve(Type type);
33 : }
34 : }
|