4 writes to _metadata
Microsoft.Build.Utilities.Core (4)
TaskItem.cs (4)
123
_metadata
= new CopyOnWriteDictionary<string>(MSBuildNameIgnoreCaseComparer.Default);
249
_metadata
= value;
289
_metadata
??= new CopyOnWriteDictionary<string>(MSBuildNameIgnoreCaseComparer.Default);
507
_metadata
??= new CopyOnWriteDictionary<string>(MSBuildNameIgnoreCaseComparer.Default);
25 references to _metadata
Microsoft.Build.Utilities.Core (25)
TaskItem.cs (25)
131
_metadata
[key] = (string)singleMetadata.Value ?? string.Empty;
214
int count = (
_metadata
?.Count ?? 0) + FileUtilities.ItemSpecModifiers.All.Length;
218
if (
_metadata
is not null)
220
metadataNames.AddRange(
_metadata
.Keys);
233
public int MetadataCount => (
_metadata
?.Count ?? 0) + FileUtilities.ItemSpecModifiers.All.Length;
245
return
_metadata
;
267
_metadata
?.Remove(metadataName);
291
_metadata
[metadataName] = metadataValue ?? string.Empty;
323
if (
_metadata
!= null)
331
copiedMetadata =
_metadata
.Clone(); // Copy on write!
333
else if (destinationAsTaskItem.Metadata.Count <
_metadata
.Count)
335
copiedMetadata =
_metadata
.Clone(); // Copy on write!
341
copiedMetadata.SetItems(
_metadata
.Where(entry => !destinationAsTaskItem.Metadata.TryGetValue(entry.Key, out string val) || String.IsNullOrEmpty(val)));
347
foreach (KeyValuePair<string, string> entry in
_metadata
)
402
if (
_metadata
!= null)
404
foreach (KeyValuePair<string, string> entry in
_metadata
)
464
_metadata
?.TryGetValue(metadataName, out metadataValue);
483
IDictionary ITaskItem2.CloneCustomMetadataEscaped() =>
_metadata
== null
485
:
_metadata
.Clone();
508
_metadata
.SetItems(metadata.Select(kvp => new KeyValuePair<string, string>(kvp.Key, kvp.Value ?? string.Empty)));
513
if (
_metadata
== null)
518
int count =
_metadata
.Count;
521
foreach (var kvp in
_metadata
)
532
if (
_metadata
== null)
537
foreach (var kvp in
_metadata
)