|
|
|
@ -7,14 +7,26 @@ using LightweightIocContainer.Interfaces.Installers; |
|
|
|
|
|
|
|
|
|
|
|
namespace LightweightIocContainer.Installers |
|
|
|
namespace LightweightIocContainer.Installers |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Helper class that supplies methods to find the wanted <see cref="Assembly"/> |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
public static class FromAssembly |
|
|
|
public static class FromAssembly |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Get an <see cref="IAssemblyInstaller"/> that installs from the <see cref="Assembly"/> calling the method |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <returns>A new <see cref="IAssemblyInstaller"/> with the calling <see cref="Assembly"/></returns> |
|
|
|
public static IAssemblyInstaller This() |
|
|
|
public static IAssemblyInstaller This() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Assembly assembly = Assembly.GetCallingAssembly(); |
|
|
|
Assembly assembly = Assembly.GetCallingAssembly(); |
|
|
|
return new AssemblyInstaller(assembly); |
|
|
|
return new AssemblyInstaller(assembly); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// Get an <see cref="IAssemblyInstaller"/> that installs from the given <see cref="Assembly"/> |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="assembly">The given <see cref="Assembly"/></param> |
|
|
|
|
|
|
|
/// <returns>A new <see cref="IAssemblyInstaller"/> with the given <see cref="Assembly"/></returns> |
|
|
|
public static IAssemblyInstaller Instance(Assembly assembly) |
|
|
|
public static IAssemblyInstaller Instance(Assembly assembly) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return new AssemblyInstaller(assembly); |
|
|
|
return new AssemblyInstaller(assembly); |
|
|
|
|