ProjectItemInstance ProjectItemInstance ProjectItemInstance ProjectItemInstance Class

Definition

Wraps an evaluated item for build purposes.

public ref class ProjectItemInstance : Microsoft::Build::Framework::ITaskItem2
public class ProjectItemInstance : Microsoft.Build.Framework.ITaskItem2
type ProjectItemInstance = class
    interface ITaskItem
    interface ITaskItem2
Public Class ProjectItemInstance
Implements ITaskItem2
Inheritance
ProjectItemInstanceProjectItemInstanceProjectItemInstanceProjectItemInstance
Implements

Remarks

Does not store item element information, because all evaluation and verification has already been performed.

Properties

DirectMetadataCount DirectMetadataCount DirectMetadataCount DirectMetadataCount

Gets the number of pieces of metadata on this item.

EvaluatedInclude EvaluatedInclude EvaluatedInclude EvaluatedInclude

Gets the evaluated Include attribute value.

ItemType ItemType ItemType ItemType

Gets the item type. For example, "Compile".

Metadata Metadata Metadata Metadata

Gets an enumerator over the evaluated metadata of the item. This is a read-only collection.

MetadataCount MetadataCount MetadataCount MetadataCount

Gets the number of metadata entries, including metadata inherited from item definitions.

MetadataNames MetadataNames MetadataNames MetadataNames

Gets all metadata names of this item, including metadata inherited from item definitions.

Project Project Project Project

Gets the owning project.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetMetadata(String) GetMetadata(String) GetMetadata(String) GetMetadata(String)

Gets the metadata with the given name, including metadata inherited from item definitions.

GetMetadataValue(String) GetMetadataValue(String) GetMetadataValue(String) GetMetadataValue(String)

Gets the value of the metadata with the given name, including metadata inherited from item definitions.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
HasMetadata(String) HasMetadata(String) HasMetadata(String) HasMetadata(String)

Determines whether the metadata with the given name is defined on this item (even if its value is empty string).

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveMetadata(String) RemoveMetadata(String) RemoveMetadata(String) RemoveMetadata(String)

Removes metadata with the given name.

SetMetadata(IEnumerable<KeyValuePair<String,String>>) SetMetadata(IEnumerable<KeyValuePair<String,String>>) SetMetadata(IEnumerable<KeyValuePair<String,String>>) SetMetadata(IEnumerable<KeyValuePair<String,String>>)

Adds metadata with the given names and values. Overwrites any metadata with the same name already in the collection.

SetMetadata(String, String) SetMetadata(String, String) SetMetadata(String, String) SetMetadata(String, String)

Add metadata with the given name and value. Overwrites any metadata with the same name already in the collection.

ToString() ToString() ToString() ToString()

Gets a string that represents the current item.

Explicit Interface Implementations

ITaskItem.CloneCustomMetadata() ITaskItem.CloneCustomMetadata() ITaskItem.CloneCustomMetadata() ITaskItem.CloneCustomMetadata()

ITaskItem implementation. Gets the collection of custom metadata.

ITaskItem.CopyMetadataTo(ITaskItem) ITaskItem.CopyMetadataTo(ITaskItem) ITaskItem.CopyMetadataTo(ITaskItem) ITaskItem.CopyMetadataTo(ITaskItem)

ITaskItem implementation. Copies the custom metadata entries to another item.

ITaskItem.GetMetadata(String) ITaskItem.GetMetadata(String) ITaskItem.GetMetadata(String) ITaskItem.GetMetadata(String)

ITaskItem implementation. Gets the value of the specified metadata entry.

ITaskItem.ItemSpec ITaskItem.ItemSpec ITaskItem.ItemSpec ITaskItem.ItemSpec

ITaskItem implementation. Gets or sets the item specification.

ITaskItem.MetadataNames ITaskItem.MetadataNames ITaskItem.MetadataNames ITaskItem.MetadataNames

ITaskItem implementation. Gets the names of the metadata entries associated with the item.

ITaskItem.SetMetadata(String, String) ITaskItem.SetMetadata(String, String) ITaskItem.SetMetadata(String, String) ITaskItem.SetMetadata(String, String)

ITaskItem implementation. Adds or changes a custom metadata entry to the item.

ITaskItem2.CloneCustomMetadataEscaped() ITaskItem2.CloneCustomMetadataEscaped() ITaskItem2.CloneCustomMetadataEscaped() ITaskItem2.CloneCustomMetadataEscaped()

ITaskItem2 implementation. Returns a clone of the metadata on this object. Values returned are in their original escaped form.

ITaskItem2.EvaluatedIncludeEscaped ITaskItem2.EvaluatedIncludeEscaped ITaskItem2.EvaluatedIncludeEscaped ITaskItem2.EvaluatedIncludeEscaped

ITaskItem2 implementation. Evaluated include value, escaped as necessary. May be empty string. Gets or sets the item include value e.g. for disk-based items this would be the file path.

ITaskItem2.GetMetadataValueEscaped(String) ITaskItem2.GetMetadataValueEscaped(String) ITaskItem2.GetMetadataValueEscaped(String) ITaskItem2.GetMetadataValueEscaped(String)

ITaskItem2 implementation. Allows the values of metadata on the item to be queried.

ITaskItem2.SetMetadataValueLiteral(String, String) ITaskItem2.SetMetadataValueLiteral(String, String) ITaskItem2.SetMetadataValueLiteral(String, String) ITaskItem2.SetMetadataValueLiteral(String, String)

ITaskItem2 implementation. 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.

Applies to