fixed broken test, cleaned up some code around config contracts.

This commit is contained in:
kayone
2013-09-24 17:01:03 -07:00
parent eaed756655
commit e8b2d1fda0
7 changed files with 26 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ namespace NzbDrone.Common.Reflection
public static Type FindTypeByName(this Assembly assembly, string name)
{
return assembly.GetTypes().Single(c => c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
return assembly.GetTypes().SingleOrDefault(c => c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
}
public static bool HasAttribute<TAttribute>(this Type type)