5 writes to _itemDefinitions
Microsoft.Build (5)
Instance\ProjectItemInstance.cs (5)
842_itemDefinitions = itemDefinitions; 1436destinationAsTaskItem._itemDefinitions = (_itemDefinitions == null) ? null : new List<ProjectItemDefinitionInstance>(_itemDefinitions); 1542ref _itemDefinitions, 1555_itemDefinitions = null; 1753ref _itemDefinitions,
23 references to _itemDefinitions
Microsoft.Build (23)
Instance\ProjectItemInstance.cs (23)
1054var list = _itemDefinitions != null ? MetadataCollection : _directMetadata; 1140if (_itemDefinitions == null) 1155for (int i = _itemDefinitions.Count - 1; i >= 0; i--) 1157foreach (ProjectMetadataInstance metadatum in _itemDefinitions[i].Metadata) 1165Debug.Fail($"metadatum from {_itemDefinitions[i]} is null, see https://github.com/dotnet/msbuild/issues/5267"); 1434if (destinationAsTaskItem._itemDefinitions == null) 1436destinationAsTaskItem._itemDefinitions = (_itemDefinitions == null) ? null : new List<ProjectItemDefinitionInstance>(_itemDefinitions); 1438else if (_itemDefinitions != null) 1440for (int i = 0; i < _itemDefinitions.Count; i++) 1442destinationAsTaskItem._itemDefinitions.Add(_itemDefinitions[i]); 1552if (_itemDefinitions?.Count == 0) 1628int capacity = _itemDefinitions?.Count ?? 0 + _directMetadata?.Count ?? 0; 1631if (_itemDefinitions is not null) 1633for (int i = 0; i < _itemDefinitions.Count; i++) 1635thisNames.UnionWith(_itemDefinitions[i].MetadataNames); 1946if (_itemDefinitions != null) 1948for (int i = 0; i < _itemDefinitions.Count; i++) 1950ProjectMetadataInstance metadataFromDefinition = _itemDefinitions[i].GetMetadata(metadataName); 2090if (source._taskItem._itemDefinitions != null) 2092itemDefinitionsClone ??= new List<ProjectItemDefinitionInstance>(source._taskItem._itemDefinitions.Count + 1); 2093itemDefinitionsClone.AddRange(source._taskItem._itemDefinitions);