PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.TypeFinder Class Reference

Find loaded types by name. More...

Static Public Member Functions

static Type TryFind (string name)
 Attempt to find a type by short or namespaced-name, in all loaded assemblies.
static Type TryFind (string name, Assembly assembly, params Assembly[] moreAssemblies)
 Attempt to find a type by name or namespaced name across provided assemblies.
static Type TryFind (string name, StringComparison stringComparison, params Assembly[] assemblies)
 Attempt to find a type by name in the specified assemblies.
static Type[] FindTypesIn (Assembly assembly)
 Returns all the exported types from an assembly, if possible (some assemblies will throw when queried - in this case you'll get back an empty array)

Detailed Description

Find loaded types by name.

Member Function Documentation

◆ FindTypesIn()

Type[] PeanutButter.Utils.TypeFinder.FindTypesIn ( Assembly assembly)
static

Returns all the exported types from an assembly, if possible (some assemblies will throw when queried - in this case you'll get back an empty array)

Parameters
assembly
Returns

◆ TryFind() [1/3]

Type PeanutButter.Utils.TypeFinder.TryFind ( string name)
static

Attempt to find a type by short or namespaced-name, in all loaded assemblies.

Parameters
name
Returns

◆ TryFind() [2/3]

Type PeanutButter.Utils.TypeFinder.TryFind ( string name,
Assembly assembly,
params Assembly[] moreAssemblies )
static

Attempt to find a type by name or namespaced name across provided assemblies.

Parameters
name
assemblyassembly to search
moreAssemblies(Optional) more assemblies to scan for the type
Returns

◆ TryFind() [3/3]

Type PeanutButter.Utils.TypeFinder.TryFind ( string name,
StringComparison stringComparison,
params Assembly[] assemblies )
static

Attempt to find a type by name in the specified assemblies.

Parameters
name
assemblies
stringComparison
Returns
Exceptions
NotImplementedException

The documentation for this class was generated from the following file:
  • source/Utils/PeanutButter.Utils/TypeFinder.cs