Defines a single item of the project as it is passed into a task.
public ref class TaskItem sealed : MarshalByRefObject, Microsoft::Build::Framework::ITaskItem2
public sealed class TaskItem : MarshalByRefObject, Microsoft.Build.Framework.ITaskItem2
type TaskItem = class inherit MarshalByRefObject interface ITaskItem interface ITaskItem2
Public NotInheritable Class TaskItem Inherits MarshalByRefObject Implements ITaskItem2
TaskItem objects do not exactly correspond to item elements in project files. If they did, then tasks would have access to data that was not explicitly passed into the task through the project file. This is not a security issue, but rather an issue with project file clarity and transparency.
This class has to be sealed since the build engine instantiates its own copy of this type. If a third party were to extend this class, then the build engine will yield an undesired behavior.
Initializes a new instance of the TaskItem class.
Initializes a new instance of the TaskItem class using the specified item-specification string.
Initializes a new instance of the TaskItem class using the specified item-specification string and its metadata.
Gets or sets the item specification.
Gets the number of metadata set on the item.
Gets the names of all the metadata on the item.
Clones the collection of custom metadata for the item specification.
Copies the item-specification metadata to the specified destination task item.
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject)
Determines whether the specified object is equal to the current object.(Inherited from Object)
Serves as the default hash function.(Inherited from Object)
Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject)
Retrieves the specified metadata on the item.
Gets the Type of the current instance.(Inherited from Object)
When overridden in a derived class, gives task items infinite lease time.
Creates a shallow copy of the current Object.(Inherited from Object)
Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject)
Removes the specified metadata on the item.
Sets or modifies the value of the specified metadata on the item.
Gets the item specification.
|Explicit(TaskItem to String)|
Explicit Interface Implementations
ITaskItem2 implementation which returns a clone of the metadata on this object. Values returned are in their original escaped form.
ITaskItem2 implementation which gets or sets the item include value. For disk-based items this would be the file path.
ITaskItem2 implementation which allows the values of metadata on the item to be queried.
ITaskItem2 implementation which allows a piece of custom metadata to be set on the item. Assumes that the value passed in is unescaped, and escapes the value as necessary in order to maintain its value.