다음을 통해 공유


ITaskFactory.Initialize Method

Initializes this factory for instantiating tasks with a particular inline task block.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:  Microsoft.Build.Framework
Assembly:  Microsoft.Build.Framework (in Microsoft.Build.Framework.dll)

Syntax

'Declaration
Function Initialize ( _
    taskName As String, _
    parameterGroup As IDictionary(Of String, TaskPropertyInfo), _
    taskBody As String, _
    taskFactoryLoggingHost As IBuildEngine _
) As Boolean
bool Initialize(
    string taskName,
    IDictionary<string, TaskPropertyInfo> parameterGroup,
    string taskBody,
    IBuildEngine taskFactoryLoggingHost
)
bool Initialize(
    String^ taskName, 
    IDictionary<String^, TaskPropertyInfo^>^ parameterGroup, 
    String^ taskBody, 
    IBuildEngine^ taskFactoryLoggingHost
)
abstract Initialize : 
        taskName:string * 
        parameterGroup:IDictionary<string, TaskPropertyInfo> * 
        taskBody:string * 
        taskFactoryLoggingHost:IBuildEngine -> bool
function Initialize(
    taskName : String, 
    parameterGroup : IDictionary<String, TaskPropertyInfo>, 
    taskBody : String, 
    taskFactoryLoggingHost : IBuildEngine
) : boolean

Parameters

Return Value

Type: System.Boolean
A value indicating whether initialization was successful.

Remarks

The MSBuild engine calls this method to initialize the factory. After initialization, the factory can be asked whether or not task names can be created by the factory.

The taskFactoryLoggingHost will log messages in the context of the target where the task is first used.

.NET Framework Security

See Also

Reference

ITaskFactory Interface

Microsoft.Build.Framework Namespace