Esempio n. 1
0
 /// <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;
 }
Esempio n. 3
0
 public override bool Test(ExtensionInfo extension)
 {
     return _predicate(extension);
 }
 internal ExtensionPointViewExtensionNode(ExtensionInfo ext)
 {
     _ext = ext;
 }
Esempio n. 5
0
 internal PluginViewExtensionNode(ExtensionInfo ext)
 {
     _ext = ext;
 }
Esempio n. 6
0
 public override bool Test(ExtensionInfo extension)
 {
     return(_predicate(extension));
 }