Skip to main content

AssemblyUtils

Utils to load types

Assembly: ServiceStack.Text.dll
View Source
Declaration
public static class AssemblyUtils

Methods

FindType(String)

Find the type from the name supplied

View Source
Declaration
public static Type FindType(string typeName)
Returns

System.Type

Parameters
TypeNameDescription
System.StringtypeName[typeName] or [typeName, assemblyName]

|

MainInterface<T>()

The top-most interface of the given type, if any.

View Source
Declaration
public static Type MainInterface<T>()
Returns

System.Type

Type Parameters
  • T

FindType(String, String)

Find type if it exists

View Source
Declaration
public static Type FindType(string typeName, string assemblyName)
Returns

System.Type: The type if it exists

Parameters
TypeName
System.StringtypeName
System.StringassemblyName

FindTypeFromLoadedAssemblies(String)

View Source
Declaration
public static Type FindTypeFromLoadedAssemblies(string typeName)
Returns

System.Type

Parameters
TypeName
System.StringtypeName

LoadAssembly(String)

View Source
Declaration
public static Assembly LoadAssembly(string assemblyPath)
Returns

System.Reflection.Assembly

Parameters
TypeName
System.StringassemblyPath

GetAssemblyBinPath(Assembly)

View Source
Declaration
public static string GetAssemblyBinPath(Assembly assembly)
Returns

System.String

Parameters
TypeName
System.Reflection.Assemblyassembly

ToTypeString(Type)

View Source
Declaration
public static string ToTypeString(this Type type)
Returns

System.String

Parameters
TypeName
System.Typetype

WriteType(Type)

View Source
Declaration
public static string WriteType(Type type)
Returns

System.String

Parameters
TypeName
System.Typetype