ProjectItemInstance.SetMetadata Method

Definition

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

Overloads

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

Add a metadata with the specified names and values. Overwrites any metadata with the same name already in the collection.

SetMetadata(String, String)

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

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

Source:
ProjectItemInstance.cs

Add a metadata with the specified names and values. Overwrites any metadata with the same name already in the collection.

public:
 void SetMetadata(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::String ^>> ^ metadataDictionary);
public void SetMetadata (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>> metadataDictionary);
member this.SetMetadata : seq<System.Collections.Generic.KeyValuePair<string, string>> -> unit
Public Sub SetMetadata (metadataDictionary As IEnumerable(Of KeyValuePair(Of String, String)))

Parameters

metadataDictionary
IEnumerable<KeyValuePair<String,String>>

The metadata to add.

Applies to

SetMetadata(String, String)

Source:
ProjectItemInstance.cs

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

public:
 Microsoft::Build::Execution::ProjectMetadataInstance ^ SetMetadata(System::String ^ name, System::String ^ evaluatedValue);
public Microsoft.Build.Execution.ProjectMetadataInstance SetMetadata (string name, string evaluatedValue);
member this.SetMetadata : string * string -> Microsoft.Build.Execution.ProjectMetadataInstance
Public Function SetMetadata (name As String, evaluatedValue As String) As ProjectMetadataInstance

Parameters

name
String

The name of the metadata to add.

evaluatedValue
String

The evaluated value of the metadata to add.

Returns

The new metadata.

Applies to