Version 3.1.11.0

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.

GetAssemblyDirectory(Assembly)
Gets the full file path to a given assembly.
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, 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.

GetAssemblyTypeFlag(Assembly)
Gets the AssemblyTypeFlags for a given assembly.
public static AssemblyTypeFlags GetAssemblyTypeFlag(this Assembly assembly)
Parameters
System.Reflection.Assembly assembly

The assembly.

Returns
AssemblyTypeFlags

The AssemblyTypeFlags for a given assembly.

Exceptions
System.NullReferenceException

assembly is null.

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

The full name of the type without any assembly information.

Returns
System.Type

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

The AssemblyTypeFlags filters.

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

Types from the current AppDomain with the specified AssemblyTypeFlags 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