Project.AddItemFast Method

Definition

Adds an item with no metadata to the project. Makes no effort to see if an existing wildcard would already match the new item, unless it is the first item in an item group. Makes no effort to locate the new item near similar items.

Overloads

AddItemFast(String, String)

Adds an item with no metadata to the project. Makes no effort to see if an existing wildcard would already match the new item, unless it is the first item in an item group. Makes no effort to locate the new item near similar items. Appends the item to the first item group that does not have a condition and has either no children or whose first child is an item of the same type. Evaluates on a best-effort basis: -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be. -only this item is evaluated. Other items that might depend on it is not affected. This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.

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

Adds an item with metadata to the project. Metadata may be null, indicating no metadata. Makes no effort to see if an existing wildcard would already match the new item, unless it is the first item in an item group. Makes no effort to locate the new item near similar items. Appends the item to the first item group that does not have a condition and has either no children or whose first child is an item of the same type. Evaluates on a best-effort basis: -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be. -only this item is evaluated. Other items that might depend on it is not affected. This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.

AddItemFast(String, String)

Source:
Project.cs

Adds an item with no metadata to the project. Makes no effort to see if an existing wildcard would already match the new item, unless it is the first item in an item group. Makes no effort to locate the new item near similar items. Appends the item to the first item group that does not have a condition and has either no children or whose first child is an item of the same type. Evaluates on a best-effort basis: -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be. -only this item is evaluated. Other items that might depend on it is not affected. This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.

public:
 System::Collections::Generic::IList<Microsoft::Build::Evaluation::ProjectItem ^> ^ AddItemFast(System::String ^ itemType, System::String ^ unevaluatedInclude);
public System.Collections.Generic.IList<Microsoft.Build.Evaluation.ProjectItem> AddItemFast (string itemType, string unevaluatedInclude);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public System.Collections.Generic.IList<Microsoft.Build.Evaluation.ProjectItem> AddItemFast (string itemType, string unevaluatedInclude);
member this.AddItemFast : string * string -> System.Collections.Generic.IList<Microsoft.Build.Evaluation.ProjectItem>
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.AddItemFast : string * string -> System.Collections.Generic.IList<Microsoft.Build.Evaluation.ProjectItem>
Public Function AddItemFast (itemType As String, unevaluatedInclude As String) As IList(Of ProjectItem)

Parameters

itemType
String

The item type to be added.

unevaluatedInclude
String

The unevaluated Include attribute to be added to the item.

Returns

A list of the project items added.

Attributes

Remarks

Appends the item to the first item group that does not have a condition and has either no children or whose first child is an item of the same type.

Evaluates on a best-effort basis: -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be.

Only this item is evaluated. Other items that might depend on it are not affected.

This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.

Applies to

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

Source:
Project.cs

Adds an item with metadata to the project. Metadata may be null, indicating no metadata. Makes no effort to see if an existing wildcard would already match the new item, unless it is the first item in an item group. Makes no effort to locate the new item near similar items. Appends the item to the first item group that does not have a condition and has either no children or whose first child is an item of the same type. Evaluates on a best-effort basis: -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be. -only this item is evaluated. Other items that might depend on it is not affected. This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.

public:
 System::Collections::Generic::IList<Microsoft::Build::Evaluation::ProjectItem ^> ^ AddItemFast(System::String ^ itemType, System::String ^ unevaluatedInclude, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::String ^>> ^ metadata);
public System.Collections.Generic.IList<Microsoft.Build.Evaluation.ProjectItem> AddItemFast (string itemType, string unevaluatedInclude, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>> metadata);
member this.AddItemFast : string * string * seq<System.Collections.Generic.KeyValuePair<string, string>> -> System.Collections.Generic.IList<Microsoft.Build.Evaluation.ProjectItem>
Public Function AddItemFast (itemType As String, unevaluatedInclude As String, metadata As IEnumerable(Of KeyValuePair(Of String, String))) As IList(Of ProjectItem)

Parameters

itemType
String

The item type to be added.

unevaluatedInclude
String

The unevaluated Include attribute to be added to the item.

metadata
IEnumerable<KeyValuePair<String,String>>

The metadata to be added.

Returns

A list of the project items added.

Remarks

Appends the item to the first item group that does not have a condition and has either no children or whose first child is an item of the same type.

Evaluates on a best-effort basis: -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be.

Only this item is evaluated. Other items that might depend on it is not affected.

This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.

Applies to