TaskItem Constructors

Definition

Initializes a new instance of the TaskItem class.

Overloads

TaskItem()

Default constructor -- we need it so this type is COM-createable.

TaskItem(ITaskItem)

This constructor creates a new TaskItem, using the given ITaskItem.

TaskItem(String)

This constructor creates a new task item, given the item spec.

TaskItem(String, IDictionary)

This constructor creates a new TaskItem, using the given item spec and metadata.

TaskItem()

Source:
TaskItem.cs

Default constructor -- we need it so this type is COM-createable.

C#
public TaskItem();

Remarks

This constructor exists only so that the type is COM-creatable. Prefer TaskItem(String).

Applies to

MSBuild 17 i druge verzije
Proizvod Verzije
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

TaskItem(ITaskItem)

Source:
TaskItem.cs

This constructor creates a new TaskItem, using the given ITaskItem.

C#
public TaskItem(Microsoft.Build.Framework.ITaskItem sourceItem);

Parameters

sourceItem
ITaskItem

The item to copy.

Applies to

MSBuild 17 i druge verzije
Proizvod Verzije
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

TaskItem(String)

Source:
TaskItem.cs

This constructor creates a new task item, given the item spec.

C#
public TaskItem(string itemSpec);

Parameters

itemSpec
String

The item-spec string.

Applies to

MSBuild 17 i druge verzije
Proizvod Verzije
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

TaskItem(String, IDictionary)

Source:
TaskItem.cs

This constructor creates a new TaskItem, using the given item spec and metadata.

C#
public TaskItem(string itemSpec, System.Collections.IDictionary itemMetadata);

Parameters

itemSpec
String

The item-spec string.

itemMetadata
IDictionary

Custom metadata on the item.

Applies to

MSBuild 17 i druge verzije
Proizvod Verzije
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17