Show / Hide Table of Contents

Class AssemblyEx

Class containing some extension methods for System.Reflection.Assembly.

Inheritance
System.Object
AssemblyEx
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:Extend
Assembly:Extend.dll
Syntax
public static class AssemblyEx

Methods

| Improve this Doc View Source

GetTypesWithAttribute<T>(Boolean, Assembly[])

Gets all types of the given assemblies which is decorated with an attribute of the specified type.

Declaration
public static IEnumerable<IAttributeDefinitionType<T>> GetTypesWithAttribute<T>(bool inherit, params Assembly[] assemblies)where T : Attribute
Parameters
Type Name Description
System.Boolean inherit

true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.

System.Reflection.Assembly[] assemblies

The assemblies to search in.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><IAttributeDefinitionType<T><T>>

Returns the found types and their attributes.

Type Parameters
Name Description
T The type of the attribute.
Exceptions
Type Condition
System.ArgumentNullException

assemblies can not be null.

| Improve this Doc View Source

GetTypesWithAttribute<T>(Boolean, Type, Assembly[])

Gets all types of the given assemblies which is decorated with an attribute of the specified type and are sub classes of the specified base type.

Declaration
public static IEnumerable<IAttributeDefinitionType<T>> GetTypesWithAttribute<T>(bool inherit, Type baseType, params Assembly[] assemblies)where T : Attribute
Parameters
Type Name Description
System.Boolean inherit

true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events; see Remarks.

System.Type baseType

The base type to search for, or null.

System.Reflection.Assembly[] assemblies

The assemblies to search in.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><IAttributeDefinitionType<T><T>>

Returns the found types and their attributes.

Type Parameters
Name Description
T The type of the attribute.
Exceptions
Type Condition
System.ArgumentNullException

assemblies can not be null.

| Improve this Doc View Source

GetTypesWithAttribute<T>(Assembly[])

Gets all types of the given assemblies which is decorated with an attribute of the specified type.

Declaration
public static IEnumerable<IAttributeDefinitionType<T>> GetTypesWithAttribute<T>(params Assembly[] assemblies)where T : Attribute
Parameters
Type Name Description
System.Reflection.Assembly[] assemblies

The assemblies to search in.

Returns
Type Description
System.Collections.Generic.IEnumerable<T><IAttributeDefinitionType<T><T>>

Returns the found types and their attributes.

Type Parameters
Name Description
T The type of the attribute.
Exceptions
Type Condition
System.ArgumentNullException

assemblies can not be null.

  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX