ProjectItemInstance Class

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Wraps an evaluated item for build purposes.

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

System.Object
  Microsoft.Build.Execution.ProjectItemInstance

public class ProjectItemInstance : ITaskItem, ITaskItem2

NameDescription
System_CAPS_pubpropertyDirectMetadataCount

Gets the number of pieces of metadata on this item.

System_CAPS_pubpropertyEvaluatedInclude

Gets the evaluated Include attribute value.

System_CAPS_pubpropertyItemType

Gets the item type, for example "Compile".

System_CAPS_pubpropertyMetadata

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

System_CAPS_pubpropertyMetadataCount

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

System_CAPS_pubpropertyMetadataNames

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

System_CAPS_pubpropertyProject

Gets the owning project.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetMetadata(String)

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

System_CAPS_pubmethodGetMetadataValue(String)

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

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodHasMetadata(String)

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

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRemoveMetadata(String)

Removes metadata with the given name.

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

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

System_CAPS_pubmethodSetMetadata(String, String)

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

System_CAPS_pubmethodToString()

Gets a String that represents the current item.(Overrides Object.ToString().)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodITaskItem.CloneCustomMetadata()

ITaskItem implementation. Gets the collection of custom metadata.

System_CAPS_pubinterfaceSystem_CAPS_privmethodITaskItem.CopyMetadataTo(ITaskItem)

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

System_CAPS_pubinterfaceSystem_CAPS_privmethodITaskItem.GetMetadata(String)

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

System_CAPS_pubinterfaceSystem_CAPS_privmethodITaskItem.SetMetadata(String, String)

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

System_CAPS_pubinterfaceSystem_CAPS_privmethodITaskItem2.CloneCustomMetadataEscaped()

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

System_CAPS_pubinterfaceSystem_CAPS_privmethodITaskItem2.GetMetadataValueEscaped(String)

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

System_CAPS_pubinterfaceSystem_CAPS_privmethodITaskItem2.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.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyITaskItem.ItemSpec

ITaskItem implementation. Gets or sets the item specification.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyITaskItem.MetadataNames

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

System_CAPS_pubinterfaceSystem_CAPS_privpropertyITaskItem2.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.

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

.NET Framework
Available since 4.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: