mirror of https://github.com/AMT-Cheif/Stylet.git
Fix autobinding problem
This commit is contained in:
parent
f41645ab89
commit
5f655188c5
|
@ -376,7 +376,10 @@ namespace StyletIoC
|
||||||
/// <param name="assemblies">Assembly(s) to search, or leave empty / null to search the current assembly</param>
|
/// <param name="assemblies">Assembly(s) to search, or leave empty / null to search the current assembly</param>
|
||||||
public void Autobind(params Assembly[] assemblies)
|
public void Autobind(params Assembly[] assemblies)
|
||||||
{
|
{
|
||||||
this.Autobind(assemblies);
|
// Have to do null-or-empty check here as well, otherwise GetCallingAssembly returns this one....
|
||||||
|
if (assemblies == null || assemblies.Length == 0)
|
||||||
|
assemblies = new[] { Assembly.GetCallingAssembly() };
|
||||||
|
this.Autobind(assemblies.AsEnumerable());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue