Version 3.3.0.1

AssemblyUtilities class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities.Editor
public static class AssemblyUtilities
A utility class for finding types in various asssembly.
Inheritance
  • System.Object
  • AssemblyUtilities

Methods

GetAllAssemblies()
Gets an ImmutableList of all assemblies in the current System.AppDomain.
public static ImmutableList<Assembly> GetAllAssemblies()
Returns
ImmutableList<System.Reflection.Assembly>

An ImmutableList of all assemblies in the current System.AppDomain.

GetAssemblyCategory(Assembly)
public static AssemblyCategory GetAssemblyCategory(Assembly assembly)
Parameters
System.Reflection.Assembly assembly

GetAssemblyDirectory(Assembly)
Gets the full file path to a given assembly's containing directory.
public static string GetAssemblyDirectory(this Assembly assembly)
Parameters
System.Reflection.Assembly assembly

The assembly.

Returns
System.String

The full file path to a given assembly's containing directory, or Null if no file path was found.

Exceptions
System.NullReferenceException

assembly is Null.

GetAssemblyFilePath(Assembly)
Gets the full directory path to a given assembly.
public static string GetAssemblyFilePath(this Assembly assembly)
Parameters
System.Reflection.Assembly assembly

The assembly.

Returns
System.String

The full directory path in which a given assembly is located, or Null if no file path was found.

GetTypeByCachedFullName(String)
Gets the type.
public static Type GetTypeByCachedFullName(string name)
Parameters
System.String name

Returns
System.Type

GetTypes(AssemblyCategory)
Get types from the current AppDomain with a specified AssemblyCategory filter.
public static IEnumerable<Type> GetTypes(AssemblyCategory assemblyFlags)
Parameters
AssemblyCategory assemblyFlags

The AssemblyCategory filters.

Returns
System.Collections.Generic.IEnumerable<System.Type>

Types from the current AppDomain with the specified AssemblyCategory filters.

IsDependentOn(Assembly, Assembly)
Determines whether an assembly is depended on another assembly.
public static bool IsDependentOn(this Assembly assembly, Assembly otherAssembly)
Parameters
System.Reflection.Assembly assembly

The assembly.

System.Reflection.Assembly otherAssembly

The other assembly.

Returns
System.Boolean

true if assembly has a reference in otherAssembly or assembly is the same as otherAssembly.

Exceptions
System.NullReferenceException

assembly is null.

System.NullReferenceException

otherAssembly is null.

IsDynamic(Assembly)
Determines whether the assembly module is a of type System.Reflection.Emit.ModuleBuilder.
public static bool IsDynamic(this Assembly assembly)
Parameters
System.Reflection.Assembly assembly

The assembly.

Returns
System.Boolean

true if the specified assembly of type System.Reflection.Emit.ModuleBuilder; otherwise, false.

Exceptions
System.ArgumentNullException

assembly