Esempio n. 1
0
 /// <summary>
 /// Searches local assemblies for types that extend the given <see cref="Type" />.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns></returns>
 /// <seealso cref="GetDerivedTypes{T}()" />
 /// <seealso cref="AssemblyScanner.GetLocalAssemblies" />
 public static IEnumerable <Type> GetDerivedTypes(Type type)
 {
     return(GetDerivedTypes(type, AssemblyScanner.GetLocalAssemblies()));
 }
Esempio n. 2
0
 /// <summary>
 /// Finds every <see cref="Type" /> that has the given <see cref="Attribute" /> defined at
 /// the <see cref="Type" /> level.
 /// </summary>
 /// <typeparam name="TAttribute"></typeparam>
 /// <returns></returns>
 public static IEnumerable <Type> GetDecoratedWith <TAttribute>()
     where TAttribute : Attribute
 {
     return(GetDecoratedWith <TAttribute>(AssemblyScanner.GetLocalAssemblies()));
 }
Esempio n. 3
0
 public static Type FindTypeByName(string typeFullName)
 {
     return(FindTypeByName(typeFullName, AssemblyScanner.GetLocalAssemblies()));
 }
Esempio n. 4
0
 /// <summary>
 /// Searches local assemblies for all types that implement the given interface
 /// <see cref="Type" /> and creates an instance of that <see cref="Type" />.
 /// </summary>
 /// <typeparam name="TInterface"></typeparam>
 /// <returns></returns>
 /// <seealso cref="GetInstancesOf{TInterface}(IEnumerable{Assembly})" />
 public static IEnumerable <TInterface> GetInstancesOf <TInterface>()
 {
     return(GetInstancesOf <TInterface>(AssemblyScanner.GetLocalAssemblies()));
 }
Esempio n. 5
0
 /// <summary>
 /// Searches local assemblies for all types that implement the given interface
 /// <see cref="Type" />.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns></returns>
 /// <seealso cref="GetImplementingTypes{T}()" />
 public static IEnumerable <Type> GetImplementingTypes(Type type)
 {
     return(GetImplementingTypes(type, AssemblyScanner.GetLocalAssemblies()));
 }