PageRenderTime 122ms CodeModel.GetById 60ms app.highlight 2ms RepoModel.GetById 58ms app.codeStats 0ms

/src/LinFu.IoC/Configuration/MethodFinderContext.cs

http://github.com/philiplaureano/LinFu
C# | 51 lines | 23 code | 6 blank | 22 comment | 0 complexity | b8841b15215e99c1caf897897c60c8de MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using LinFu.IoC.Configuration.Interfaces;
 4
 5namespace LinFu.IoC.Configuration
 6{
 7    /// <summary>
 8    ///     Represents the data associated with a <see cref="IMethodFinder{T}" /> search.
 9    /// </summary>
10    public class MethodFinderContext : IMethodFinderContext
11    {
12        /// <summary>
13        ///     Initializes the context with the default values.
14        /// </summary>
15        /// <param name="arguments">The list of arguments that will be passed to the target method.</param>
16        public MethodFinderContext(params object[] arguments)
17        {
18            TypeArguments = new Type[0];
19            Arguments = arguments;
20        }
21
22        /// <summary>
23        ///     Initializes the context with the default values.
24        /// </summary>
25        /// <param name="typeArguments">The type arguments that will be used to construct the target method.</param>
26        /// <param name="arguments">The list of arguments that will be passed to the target method.</param>
27        /// <param name="returnType">The type that must be returned by the target method.</param>
28        public MethodFinderContext(IEnumerable<Type> typeArguments, IEnumerable<object> arguments, Type returnType)
29        {
30            TypeArguments = typeArguments;
31            Arguments = arguments;
32            ReturnType = returnType;
33        }
34
35
36        /// <summary>
37        ///     Gets or sets the value indicating the type arguments that will be passed to the target method.
38        /// </summary>
39        public IEnumerable<Type> TypeArguments { get; set; }
40
41        /// <summary>
42        ///     Gets or sets the value indicating the list of arguments that will be passed to the target method.
43        /// </summary>
44        public IEnumerable<object> Arguments { get; set; }
45
46        /// <summary>
47        ///     Gets or sets the value indicating the <see cref="System.Type">return type</see> of the target method.
48        /// </summary>
49        public Type ReturnType { get; set; }
50    }
51}