internal static bool IsDefined(this Type type, Type attributeType, bool inherit)
 {
     Should.NotBeNull(type, nameof(type));
     return(type.GetTypeInfo().IsDefined(attributeType, inherit));
 }
 internal static AssemblyName GetAssemblyName(this Assembly assembly)
 {
     Should.NotBeNull(assembly, nameof(assembly));
     return(new AssemblyName(assembly.FullName));
 }
 public static MethodInfo GetMethodInfo([NotNull] this Delegate del)
 {
     Should.NotBeNull(del, nameof(del));
     return(del.Method);
 }
 internal static IEnumerable <Type> GetInterfaces([NotNull] this Type type)
 {
     Should.NotBeNull(type, nameof(type));
     return(type.GetTypeInfo().ImplementedInterfaces);
 }
 internal static bool IsAssignableFrom([NotNull] this Type typeFrom, [NotNull] Type typeTo)
 {
     Should.NotBeNull(typeFrom, nameof(typeFrom));
     Should.NotBeNull(typeTo, nameof(typeTo));
     return(typeFrom.GetTypeInfo().IsAssignableFrom(typeTo.GetTypeInfo()));
 }
 public void Unbind(Type service)
 {
     Should.MethodBeSupported(!ThrowOnUnbind, "Unbind(Type service)");
     Tracer.Error("Unbind call on Autofac container type " + service);
 }