11 implementations of Key
Microsoft.Build (10)
Definition\ProjectItem.cs (1)
313string IKeyed.Key
Definition\ProjectItemDefinition.cs (1)
110string IKeyed.Key
Definition\ProjectMetadata.cs (1)
241string IKeyed.Key
Definition\ProjectProperty.cs (1)
229string IKeyed.Key
Instance\ProjectItemDefinitionInstance.cs (1)
133string IKeyed.Key
Instance\ProjectItemInstance.cs (2)
276string IKeyed.Key 1031string Microsoft.Build.Collections.IKeyed.Key
Instance\ProjectMetadataInstance.cs (1)
130string IKeyed.Key
Instance\ProjectPropertyInstance.cs (1)
134string IKeyed.Key => Name;
Instance\ProjectTargetInstance.cs (1)
443string IKeyed.Key
Microsoft.Build.Engine.UnitTests (1)
Collections\CopyOnWritePropertyDictionary_Tests.cs (1)
205public string Key { get; }
55 references to Key
Microsoft.Build (55)
Collections\CopyOnWritePropertyDictionary.cs (8)
107ErrorUtilities.VerifyThrow(String.Equals(name, value.Key, StringComparison.OrdinalIgnoreCase), "Key must match value's key"); 188if (!thatBacking.TryGetValue(thisProp.Key, out T thatProp) || 238if (!otherDict.TryGetValue(thisProp.Key, out T thatProp) || 258ErrorUtilities.VerifyThrow(key == value.Key, "Key must match value's key"); 310ErrorUtilities.VerifyThrow(item.Key == item.Value.Key, "Key must match value's key"); 348_backing = _backing.SetItem(projectProperty.Key, projectProperty); 364builder[kvp.Value.Key] = kvp.Value; 372builder[property.Key] = property;
Collections\ItemDictionary.cs (4)
274_itemLists.Remove(projectItem.Key); 316ErrorUtilities.VerifyThrow(String.Equals(itemType, item.Key, StringComparison.OrdinalIgnoreCase), "Item type mismatch"); 338if (!_itemLists.TryGetValue(projectItem.Key, out LinkedList<T> list)) 341_itemLists[projectItem.Key] = list;
Collections\PropertyDictionary.cs (10)
210ErrorUtilities.VerifyThrow(String.Equals(name, value.Key, StringComparison.OrdinalIgnoreCase), "Key must match value's key"); 301T rightProp = other[leftProp.Key]; 371ErrorUtilities.VerifyThrow(key == value.Key, "Key must match value's key"); 455ErrorUtilities.VerifyThrow(item.Key == item.Value.Key, "Key must match value's key"); 467return ((IDictionary<string, T>)this).TryGetValue(item.Key, out T existingItem) && 481bool ICollection<T>.Remove(T item) => Remove(item.Key); 530_properties[projectProperty.Key] = projectProperty; 556Remove(property.Key); 573dictionary[property.Key] = property.EscapedValue; 593yield return new(kvp.Key, EscapingUtilities.UnescapeAll(kvp.EscapedValue));
Collections\RetrievableEntryHashSet\IRetrievableUnescapedValuedEntryHashSet.cs (2)
16/// Gets the unescaped value of the item whose <see cref="IKeyed.Key"/> matches <paramref name="key"/>. 20/// <returns>True if an item whose <see cref="IKeyed.Key"/> matches <paramref name="key"/> was found. False otherwise.</returns>
Collections\RetrievableEntryHashSet\IRetrievableValuedEntryHashSet.cs (2)
24/// Gets the <see cref="IValued.EscapedValue"/> of the item whose <see cref="IKeyed.Key"/> matches <paramref name="key"/>. 28/// <returns>True if an item whose <see cref="IKeyed.Key"/> matches <paramref name="key"/> was found. False otherwise.</returns>
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (17)
212keys[i] = item.Key; 238Debug.Assert(String.Equals(name, value.Key, StringComparison.Ordinal)); 287Debug.Assert(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal)); 288return Get(entry.Value.Key) != null; 309return Get(item.Key) != null; 371if (_slots[i].hashCode == hashCode && _constrainedComparer != null ? _constrainedComparer.Equals(_slots[i].value.Key, item, index, length) : _comparer.Equals(_slots[i].value.Key, item)) 396return Remove(item.Key); 401Debug.Assert(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal)); 424if (_slots[i].hashCode == hashCode && _comparer.Equals(_slots[i].value.Key, item)) 496yield return new KeyValuePair<string, T>(entry.Key, entry); 597if (key != item.Key) 607Debug.Assert(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal)); 646array[i] = new KeyValuePair<string, T>(entry.Key, entry); 824string key = value.Key; 829if (_slots[i].hashCode == hashCode && _comparer.Equals(_slots[i].value.Key, key)) 883if (!TryGetValue(element.Key, out ours) || !Object.ReferenceEquals(element, ours))
Collections\RetrievableEntryHashSet\RetrievableValuedEntryHashSet.cs (2)
23/// <param name="comparer">A comparer with which the items' <see cref="IKeyed.Key"/> key values are compared.</param> 33/// <param name="comparer">A comparer with which the items' <see cref="IKeyed.Key"/> key values are compared.</param>
Evaluation\Evaluator.cs (1)
862var pluginSettings = item.Metadata.ToDictionary(m => m.Key, m => m.EscapedValue);
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (2)
114return $"{OperationItem.Key} : {OperationItem.EvaluatedInclude}; CapturedItems: {referencedItemsString}"; 150if (itemType?.Equals(_operationItem.Key, StringComparison.OrdinalIgnoreCase) != false)
Evaluation\LazyItemEvaluator.UpdateOperation.cs (1)
136capturedItemsFromReferencedItemTypes[referencedItem.Item.Key] = referencedItem.Item;
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (3)
55public bool Contains(T item) => _projectElements.ContainsKey(item.Key); 136return _projectElements.ContainsKey(item.Key); 174array[index] = new KeyValuePair<string, T>(itemInstance.Key, itemInstance);
Instance\ImmutableProjectCollections\ImmutableItemDefinitionsListConverter.cs (2)
143if (MSBuildNameIgnoreCaseComparer.Default.Equals(cachedItem.Key, item.Key))
Utilities\Utilities.cs (1)
886itemType = iitem.Key;