public static void ImplementsTypeMatcherProtocol(Type type) { Debug.Assert(type != null); Guard.ImplementsInterface(typeof(ITypeMatcher), type); Guard.CanCreateInstance(type); }
public static void ImplementsTypeMatcherProtocol(Type type) { Debug.Assert(type != null); if (typeof(ITypeMatcher).IsAssignableFrom(type) == false) { throw new ArgumentException( string.Format( CultureInfo.CurrentCulture, Resources.TypeNotImplementInterface, type.GetFormattedName(), typeof(ITypeMatcher).GetFormattedName())); } Guard.CanCreateInstance(type); }