Delen via


TeamFoundationExtensionUtility.LoadExtensions<T> Method (String, Boolean)

Loads and instantiates classes of type T that are directly attributed with an ExportAttribute or inherit from a type attributed with an InheritedExportAttribute. The target classes must have a default constructor.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Shared Function LoadExtensions(Of T) ( _
    pluginDirectory As String, _
    throwOnError As Boolean _
) As DisposableCollection(Of T)
public static DisposableCollection<T> LoadExtensions<T>(
    string pluginDirectory,
    bool throwOnError
)
public:
generic<typename T>
static DisposableCollection<T>^ LoadExtensions(
    String^ pluginDirectory, 
    bool throwOnError
)
static member LoadExtensions : 
        pluginDirectory:string * 
        throwOnError:bool -> DisposableCollection<'T> 
JScript does not support generic types or methods.

Type Parameters

  • T

Parameters

  • pluginDirectory
    Type: System.String

    The directory of the assemblies used to load the extensions. If empty or null, only the currently executing assembly will be searched.

  • throwOnError
    Type: System.Boolean

    If true, any exception during plugin loading will be not be handled and no plugins will be loaded. If false, all exceptions during plugin loading will be traced, and any plugins that were loaded will be returned.

Return Value

Type: Microsoft.TeamFoundation.Framework.Server.DisposableCollection<T>

.NET Framework Security

See Also

Reference

TeamFoundationExtensionUtility Class

LoadExtensions Overload

Microsoft.TeamFoundation.Framework.Server Namespace