/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
- using System.Reflection;
- using LinFu.Reflection;
- namespace LinFu.IoC.Configuration
- {
- /// <summary>
- /// An assembly loader that returns an existing
- /// <see cref="Assembly" /> from memory.
- /// </summary>
- internal class InMemoryAssemblyLoader : IAssemblyLoader
- {
- private readonly Assembly _targetAssembly;
- /// <summary>
- /// Initializes the class with an existing
- /// <see cref="Assembly" />.
- /// </summary>
- /// <param name="targetAssembly">The target assembly.</param>
- internal InMemoryAssemblyLoader(Assembly targetAssembly)
- {
- _targetAssembly = targetAssembly;
- }
- public Assembly Load(string assemblyFile)
- {
- return _targetAssembly;
- }
- }
- }