PageRenderTime 122ms CodeModel.GetById 80ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/src/LinFu.IoC/Configuration/InMemoryAssemblyLoader.cs

http://github.com/philiplaureano/LinFu
C# | 30 lines | 17 code | 4 blank | 9 comment | 0 complexity | cdac675127e58494d06e96a3861a60a9 MD5 | raw file
 1using System.Reflection;
 2using LinFu.Reflection;
 3
 4namespace LinFu.IoC.Configuration
 5{
 6    /// <summary>
 7    ///     An assembly loader that returns an existing
 8    ///     <see cref="Assembly" /> from memory.
 9    /// </summary>
10    internal class InMemoryAssemblyLoader : IAssemblyLoader
11    {
12        private readonly Assembly _targetAssembly;
13
14        /// <summary>
15        ///     Initializes the class with an existing
16        ///     <see cref="Assembly" />.
17        /// </summary>
18        /// <param name="targetAssembly">The target assembly.</param>
19        internal InMemoryAssemblyLoader(Assembly targetAssembly)
20        {
21            _targetAssembly = targetAssembly;
22        }
23
24
25        public Assembly Load(string assemblyFile)
26        {
27            return _targetAssembly;
28        }
29    }
30}