Share via


AllClasses.FromAssemblies Method (Boolean, array<Assembly[])

Returns all visible, non-abstract classes from assemblies, and optionally skips errors.

Namespace: Microsoft.Practices.Unity
Assembly: Microsoft.Practices.Unity (in Microsoft.Practices.Unity.dll) Version: 3.0.0.0 (3.0.1304.0)

Syntax

public static IEnumerable<Type> FromAssemblies(
    bool skipOnError,
    params Assembly[] assemblies
)
'Declaration
Public Shared Function FromAssemblies ( 
    skipOnError As Boolean,
    ParamArray assemblies As Assembly()
) As IEnumerable(Of Type)
public:
static IEnumerable<Type^>^ FromAssemblies(
    bool skipOnError, 
    ... array<Assembly^>^ assemblies
)

Parameters

  • skipOnError
    Type: System.Boolean
    truetrue (True in Visual Basic) to skip errors; otherwise, truetrue (True in Visual Basic).

Return Value

Type: IEnumerable<Type>
All visible, non-abstract classes.

Remarks

If skipOnError is truetrue (True in Visual Basic), all exceptions thrown while getting types from the assemblies are ignored, and the types that can be retrieved are returned; otherwise, the original exception is thrown.

Exceptions

Exception Condition
System.ArgumentNullException assemblies is nulla null reference (Nothing in Visual Basic).
System.ArgumentException assemblies contains nulla null reference (Nothing in Visual Basic) elements.

See Also

AllClasses Class

AllClasses Members

FromAssemblies Overload

Microsoft.Practices.Unity Namespace