/// <summary>
 /// Create a new criterion that filters assemblies by predicate. 
 /// </summary>
 /// <param name="assemblyPredicate">A predicate which accepts an assembly an an argument. If this predicate returns true, the assembly will loaded and further inspection of the assembly with halt. If this predicate returns false, the predicate must provide a complaint explaining why the assembly does not meet the criterion described by the predicate.</param>
 /// <returns></returns>
 /// <exception cref="System.ArgumentNullException">assemblyPredicate is null.</exception>
 internal static AssemblyLoaderReflectionCriterion NewCriterion(AssemblyPredicate assemblyPredicate)
 {
     if (assemblyPredicate == null)
         throw new ArgumentNullException("assemblyPredicate");
     return 
         new AssemblyLoaderReflectionCriterion(assemblyPredicate);
 }
Beispiel #2
0
 /// <summary>
 /// Create a new criterion that filters assemblies by predicate.
 /// </summary>
 /// <param name="assemblyPredicate">A predicate which accepts an assembly an an argument. If this predicate returns true, the assembly will loaded and further inspection of the assembly with halt. If this predicate returns false, the predicate must provide a complaint explaining why the assembly does not meet the criterion described by the predicate.</param>
 /// <returns></returns>
 /// <exception cref="System.ArgumentNullException">assemblyPredicate is null.</exception>
 internal static AssemblyLoaderReflectionCriterion NewCriterion(AssemblyPredicate assemblyPredicate)
 {
     if (assemblyPredicate == null)
     {
         throw new ArgumentNullException("assemblyPredicate");
     }
     return
         (new AssemblyLoaderReflectionCriterion(assemblyPredicate));
 }
Beispiel #3
0
 private AssemblyLoaderReflectionCriterion(AssemblyPredicate predicate) :
     base((object input, out IEnumerable <string> complaints) =>
          predicate((Assembly)input, out complaints))
 {
 }
 private AssemblyLoaderReflectionCriterion(AssemblyPredicate predicate) :
     base((object input, out IEnumerable<string> complaints) =>
             predicate((Assembly)input, out complaints))
 {}