11 implementations of Key
Microsoft.Build (10)
Definition\ProjectItem.cs (1)
313
string IKeyed.
Key
Definition\ProjectItemDefinition.cs (1)
111
string IKeyed.
Key
Definition\ProjectMetadata.cs (1)
241
string IKeyed.
Key
Definition\ProjectProperty.cs (1)
229
string IKeyed.
Key
Instance\ProjectItemDefinitionInstance.cs (1)
132
string IKeyed.
Key
Instance\ProjectItemInstance.cs (2)
270
string IKeyed.
Key
1002
string Microsoft.Build.Collections.IKeyed.
Key
Instance\ProjectMetadataInstance.cs (1)
130
string IKeyed.
Key
Instance\ProjectPropertyInstance.cs (1)
134
string IKeyed.
Key
=> Name;
Instance\ProjectTargetInstance.cs (1)
443
string IKeyed.
Key
Microsoft.Build.Engine.UnitTests (1)
Collections\CopyOnWritePropertyDictionary_Tests.cs (1)
205
public string
Key
{ get; }
55 references to Key
Microsoft.Build (55)
Collections\CopyOnWritePropertyDictionary.cs (7)
107
ErrorUtilities.VerifyThrow(String.Equals(name, value.
Key
, StringComparison.OrdinalIgnoreCase), "Key must match value's key");
181
if (!thatBacking.TryGetValue(thisProp.
Key
, out T thatProp) ||
231
if (!otherDict.TryGetValue(thisProp.
Key
, out T thatProp) ||
251
ErrorUtilities.VerifyThrow(key == value.
Key
, "Key must match value's key");
303
ErrorUtilities.VerifyThrow(item.Key == item.Value.
Key
, "Key must match value's key");
341
_backing = _backing.SetItem(projectProperty.
Key
, projectProperty);
356
yield return new(property.
Key
, property);
Collections\ItemDictionary.cs (8)
283
_itemLists.Remove(projectItem.
Key
);
299
ErrorUtilities.VerifyThrow(existingItem.
Key
== newItem.
Key
, "Cannot replace an item {0} with an item {1} with a different name.", existingItem.
Key
, newItem.
Key
);
340
ErrorUtilities.VerifyThrow(String.Equals(itemType, item.
Key
, StringComparison.OrdinalIgnoreCase), "Item type mismatch");
396
if (!_itemLists.TryGetValue(projectItem.
Key
, out LinkedList<T> list))
399
_itemLists[projectItem.
Key
] = list;
Collections\PropertyDictionary.cs (8)
203
ErrorUtilities.VerifyThrow(String.Equals(name, value.
Key
, StringComparison.OrdinalIgnoreCase), "Key must match value's key");
288
T rightProp = other[leftProp.
Key
];
353
ErrorUtilities.VerifyThrow(key == value.
Key
, "Key must match value's key");
437
ErrorUtilities.VerifyThrow(item.Key == item.Value.
Key
, "Key must match value's key");
483
_properties[projectProperty.
Key
] = projectProperty;
509
Remove(property.
Key
);
526
dictionary[property.
Key
] = property.EscapedValue;
539
yield return new(kvp.
Key
, EscapingUtilities.UnescapeAll(kvp.EscapedValue));
Collections\RetrievableEntryHashSet\IRetrievableValuedEntryHashSet.cs (2)
27
/// Gets the <see cref="IValued.EscapedValue"/> of the item whose <see cref="IKeyed.
Key
"/> matches <paramref name="key"/>.
31
/// <returns>True if an item whose <see cref="IKeyed.
Key
"/> matches <paramref name="key"/> was found. False otherwise.</returns>
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (17)
212
keys[i] = item.
Key
;
238
Debug.Assert(String.Equals(name, value.
Key
, StringComparison.Ordinal));
287
Debug.Assert(String.Equals(entry.Key, entry.Value.
Key
, StringComparison.Ordinal));
288
return Get(entry.Value.
Key
) != null;
309
return Get(item.
Key
) != null;
371
if (_slots[i].hashCode == hashCode && _constrainedComparer != null ? _constrainedComparer.Equals(_slots[i].value.
Key
, item, index, length) : _comparer.Equals(_slots[i].value.
Key
, item))
396
return Remove(item.
Key
);
401
Debug.Assert(String.Equals(entry.Key, entry.Value.
Key
, StringComparison.Ordinal));
424
if (_slots[i].hashCode == hashCode && _comparer.Equals(_slots[i].value.
Key
, item))
496
yield return new KeyValuePair<string, T>(entry.
Key
, entry);
597
if (key != item.
Key
)
607
Debug.Assert(String.Equals(entry.Key, entry.Value.
Key
, StringComparison.Ordinal));
646
array[i] = new KeyValuePair<string, T>(entry.
Key
, entry);
824
string key = value.
Key
;
829
if (_slots[i].hashCode == hashCode && _comparer.Equals(_slots[i].value.
Key
, key))
883
if (!TryGetValue(element.
Key
, out ours) || !Object.ReferenceEquals(element, ours))
Collections\RetrievableEntryHashSet\RetrievableValuedEntryHashSet.cs (2)
24
/// <param name="comparer">A comparer with which the items' <see cref="IKeyed.
Key
"/> key values are compared.</param>
34
/// <param name="comparer">A comparer with which the items' <see cref="IKeyed.
Key
"/> key values are compared.</param>
Evaluation\Evaluator.cs (1)
849
var pluginSettings = item.Metadata.ToDictionary(m => m.
Key
, m => m.EscapedValue);
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (2)
114
return $"{OperationItem.
Key
} : {OperationItem.EvaluatedInclude}; CapturedItems: {referencedItemsString}";
150
if (itemType?.Equals(_operationItem.
Key
, StringComparison.OrdinalIgnoreCase) != false)
Evaluation\LazyItemEvaluator.UpdateOperation.cs (1)
136
capturedItemsFromReferencedItemTypes[referencedItem.Item.
Key
] = referencedItem.Item;
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (3)
55
public bool Contains(T item) => _projectElements.ContainsKey(item.
Key
);
136
return _projectElements.ContainsKey(item.
Key
);
174
array[index] = new KeyValuePair<string, T>(itemInstance.
Key
, itemInstance);
Instance\ImmutableProjectCollections\ImmutableItemDefinitionsListConverter.cs (2)
146
if (MSBuildNameIgnoreCaseComparer.Default.Equals(cachedItem.
Key
, item.
Key
))
Instance\ImmutableProjectCollections\ImmutablePropertyCollectionConverter.cs (1)
61
if (!other.TryGetValue(thisProp.
Key
, out T? thatProp) ||
Utilities\Utilities.cs (1)
791
itemType = iitem.
Key
;