/// <summary> /// Checks whether the specified extension implements/subclasses all of the criteria types. /// </summary> /// <param name="extension">The extension to test.</param> /// <returns>True if the test succeeds.</returns> public override bool Test(ExtensionInfo extension) { foreach (Type filterType in _types) { if (!filterType.IsAssignableFrom(extension.ExtensionClass)) { return false; } } return true; }
/// <summary> /// Checks whether the specified extension is marked with attributes that /// match every test attribute supplied as criteria to this filter. /// </summary> /// <param name="extension">The information about the extension to test.</param> /// <returns>true if the test succeeds.</returns> public override bool Test(ExtensionInfo extension) { foreach (Attribute a in _attributes) { object[] candidates = extension.ExtensionClass.GetCustomAttributes(a.GetType(), true); if (!AnyMatch(a, candidates)) { return false; } } return true; }
public override bool Test(ExtensionInfo extension) { return _predicate(extension); }
internal ExtensionPointViewExtensionNode(ExtensionInfo ext) { _ext = ext; }
internal PluginViewExtensionNode(ExtensionInfo ext) { _ext = ext; }
public override bool Test(ExtensionInfo extension) { return(_predicate(extension)); }