• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class TypeExtensions

specific extensions to be used in Dependency Injection invocations.

Inheritance
System.Object
TypeExtensions
Namespace: DotNetNuke.DependencyInjection.Extensions
Assembly: DotNetNuke.DependencyInjection.dll
Syntax
public static class TypeExtensions : object

Methods

| Improve this Doc View Source

BuildLoaderExceptionsMessage(IReadOnlyDictionary<Assembly, ReflectionTypeLoadException>)

Builds a message to load for a collection of instances.

Declaration
public static StringBuilder BuildLoaderExceptionsMessage(this IReadOnlyDictionary<Assembly, ReflectionTypeLoadException> loadExceptions)
Parameters
Type Name Description
IReadOnlyDictionary<Assembly, ReflectionTypeLoadException> loadExceptions

A dictionary mapping to .

Returns
Type Description
StringBuilder

A containing the message.

| Improve this Doc View Source

LogOtherExceptions(TypesResult, ILog)

Logs the exceptions in OtherExceptions of result using logger.

Declaration
public static void LogOtherExceptions(this TypesResult result, ILog logger)
Parameters
Type Name Description
TypesResult result

The types result to log.

ILog logger

The logger.

| Improve this Doc View Source

SafeGetTypes()

Safely get all types from all assemblies.

Declaration
public static TypesResult SafeGetTypes()
Returns
Type Description
TypesResult

A sequence of all available instances, along with errors and warnings.

| Improve this Doc View Source

SafeGetTypes(Assembly, ILog)

Safely Get all Types from the assembly. If there is an error while retrieving the types it will return an empty array of .

Declaration
public static Type[] SafeGetTypes(this Assembly assembly, ILog logger)
Parameters
Type Name Description
Assembly assembly

The assembly to retrieve all types from.

ILog logger

A optional ILog object. This will log issues loading the types.

Returns
Type Description
Type[]

An array of all in the given .

| Improve this Doc View Source

SafeGetTypes(Assembly)

Safely Get all Types from the assembly. If there is an error while retrieving the types it will return an empty array of .

Declaration
public static Type[] SafeGetTypes(this Assembly assembly)
Parameters
Type Name Description
Assembly assembly

The assembly to retrieve all types from.

Returns
Type Description
Type[]

An array of all in the given .

Remarks

This is obsolete because logging is not added. Please use the SafeGetTypes with the ILog parameter.

| Improve this Doc View Source

SafeGetTypes(IEnumerable<Assembly>)

Safely get all types from a set of assemblies.

Declaration
public static TypesResult SafeGetTypes(this IEnumerable<Assembly> assemblies)
Parameters
Type Name Description
IEnumerable<Assembly> assemblies

The assemblies.

Returns
Type Description
TypesResult

A sequence of all available instances, along with errors and warnings.

  • View Source
Back to top by the community, for the community... #DNNCMS