Export (0) Print
Expand All

ITaskFactory.Initialize Method

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

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

bool Initialize(
	string taskName,
	IDictionary<string, TaskPropertyInfo> parameterGroup,
	string taskBody,
	IBuildEngine taskFactoryLoggingHost
)

Parameters

taskName
Type: System.String

Name of the task.

parameterGroup
Type: System.Collections.Generic.IDictionary<String, TaskPropertyInfo>

The parameter group.

taskBody
Type: System.String

The task body.

taskFactoryLoggingHost
Type: Microsoft.Build.Framework.IBuildEngine

The task factory logging host.

Return Value

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

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

Supported in: 4.5, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft