Partilhar via


ITaskFactory.Initialize Method

Definition

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

public:
 bool Initialize(System::String ^ taskName, System::Collections::Generic::IDictionary<System::String ^, Microsoft::Build::Framework::TaskPropertyInfo ^> ^ parameterGroup, System::String ^ taskBody, Microsoft::Build::Framework::IBuildEngine ^ taskFactoryLoggingHost);
public bool Initialize (string taskName, System.Collections.Generic.IDictionary<string,Microsoft.Build.Framework.TaskPropertyInfo> parameterGroup, string taskBody, Microsoft.Build.Framework.IBuildEngine taskFactoryLoggingHost);
abstract member Initialize : string * System.Collections.Generic.IDictionary<string, Microsoft.Build.Framework.TaskPropertyInfo> * string * Microsoft.Build.Framework.IBuildEngine -> bool
Public Function Initialize (taskName As String, parameterGroup As IDictionary(Of String, TaskPropertyInfo), taskBody As String, taskFactoryLoggingHost As IBuildEngine) As Boolean

Parameters

taskName
String

Name of the task.

parameterGroup
IDictionary<String,TaskPropertyInfo>

The parameter group.

taskBody
String

The task body.

taskFactoryLoggingHost
IBuildEngine

The task factory logging host.

Returns

A value indicating whether initialization was successful.

Remarks

MSBuild engine will call this to initialize the factory. This should initialize the factory enough so that 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.

Applies to