11 writes to _directMetadata
Microsoft.Build (11)
Instance\ProjectItemInstance.cs (11)
841
_directMetadata
= (directMetadata == null || directMetadata.Count == 0) ? null : directMetadata; // If the metadata was all removed, toss the dictionary
1084
_directMetadata
??= new CopyOnWritePropertyDictionary<ProjectMetadataInstance>();
1430
destinationAsTaskItem.
_directMetadata
= _directMetadata?.DeepClone(); // copy on write!
1548
ref
_directMetadata
,
1561
_directMetadata
= null;
1796
_directMetadata
= new CopyOnWritePropertyDictionary<ProjectMetadataInstance>();
1801
_directMetadata
= null;
1843
_directMetadata
= metadata.DeepClone(); // Copy on write !
1860
_directMetadata
??= new CopyOnWritePropertyDictionary<ProjectMetadataInstance>();
1882
_directMetadata
??= new CopyOnWritePropertyDictionary<ProjectMetadataInstance>();
1891
_directMetadata
??= new CopyOnWritePropertyDictionary<ProjectMetadataInstance>();
28 references to _directMetadata
Microsoft.Build (28)
Instance\ProjectItemInstance.cs (28)
1043
get { return (
_directMetadata
== null) ? 0 :
_directMetadata
.Count; }
1054
var list = _itemDefinitions != null ? MetadataCollection :
_directMetadata
;
1085
_directMetadata
.ImportProperties(metadata.Select(kvp => new ProjectMetadataInstance(kvp.Key, kvp.Value, allowItemSpecModifiers: true)));
1142
return (
_directMetadata
== null) ? new CopyOnWritePropertyDictionary<ProjectMetadataInstance>() :
_directMetadata
.DeepClone(); // copy on write!
1171
if (
_directMetadata
!= null)
1173
foreach (ProjectMetadataInstance metadatum in (IEnumerable<ProjectMetadataInstance>)
_directMetadata
)
1323
if (
_directMetadata
!= null)
1325
string escapedValue =
_directMetadata
.GetEscapedValue(metadataName);
1384
_directMetadata
?.Remove(metadataName);
1425
if (destinationItem is TaskItem destinationAsTaskItem && destinationAsTaskItem.
_directMetadata
== null)
1430
destinationAsTaskItem._directMetadata =
_directMetadata
?.DeepClone(); // copy on write!
1558
if (
_directMetadata
?.Count == 0)
1628
int capacity = _itemDefinitions?.Count ?? 0 +
_directMetadata
?.Count ?? 0;
1639
if (
_directMetadata
is not null)
1641
foreach (ProjectMetadataInstance metadatum in (IEnumerable<ProjectMetadataInstance>)
_directMetadata
)
1691
if ((
_directMetadata
?.Contains(name) == true) ||
1784
if (translator.TranslateNullable(
_directMetadata
))
1797
_directMetadata
.ImportProperties(metaData);
1815
if (
_directMetadata
!= null)
1817
value =
_directMetadata
[name];
1841
if (
_directMetadata
== null)
1847
_directMetadata
.ImportProperties(metadata);
1862
_directMetadata
.Set(metadatum);
1884
_directMetadata
.Set(metadatum);
1897
_directMetadata
.ImportProperties(metadata);
2103
return new ProjectItemInstance(_project, ItemType, includeEscaped, includeBeforeWildcardExpansionEscaped, source._taskItem.
_directMetadata
, itemDefinitionsClone, definingProject, useItemDefinitionsWithoutModification: false);