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
taskName
Type: System.StringName of the task.
parameterGroup
Type: IDictionary<String, TaskPropertyInfo>The parameter group.
taskBody
Type: System.StringThe task body.
taskFactoryLoggingHost
Type: Microsoft.Build.Framework.IBuildEngineThe task factory logging host.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.