1 write to Key
System.Configuration.ConfigurationManager (1)
System\Configuration\ConfigurationElementCollection.cs (1)
1278_current.Key = entry.GetKey(_thisCollection) ?? "key";
141 references to Key
Aspire.Hosting (1)
Dcp\DcpHost.cs (1)
210var key = de.Key?.ToString();
dotnet-svcutil-lib (12)
FrameworkFork\Microsoft.Xml\Xml\schema\ContentValidator.cs (3)
227return ((XmlQualifiedName)de.Key).ToString(); 236return (string)de.Key + ":*"; 2340names.Add(entry.Key);
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaCollectionPreprocessor.cs (3)
708redefine.Schema.Groups.Insert((XmlQualifiedName)entry.Key, (XmlSchemaObject)entry.Value); 712redefine.Schema.AttributeGroups.Insert((XmlQualifiedName)entry.Key, (XmlSchemaObject)entry.Value); 716redefine.Schema.SchemaTypes.Insert((XmlQualifiedName)entry.Key, (XmlSchemaObject)entry.Value);
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaNamespaceManager.cs (1)
56return (string)entry.Key;
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaSet.cs (1)
1013if (schemaUri.Equals(locationsTable[i].Key))
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (1)
778return de.Key as Type;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (1)
1600UnreferencedObject((string)target.Key, target.Value);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (1)
1476string prefix = (string)entry.Key;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DataContractSerializerOperationGenerator.cs (1)
140targetCompileUnit.UserData[userData.Key] = userData.Value;
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
Internal\Json\JsonConverterHelper.cs (1)
144existingValue[item.Key] = item.Value;
Internal\Json\StructConverter.cs (1)
33var k = (string)entry.Key;
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
259map[value.Key] = value.Value;
Microsoft.AspNetCore.Grpc.Swagger (1)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
259map[value.Key] = value.Value;
Microsoft.Build.Framework (2)
ProjectStartedEventArgs.cs (2)
386var validProperties = properties.Cast<DictionaryEntry>().Where(entry => entry.Key != null && entry.Value != null); 397writer.Write((string)propertyPair.Key);
Microsoft.CodeAnalysis.Scripting (1)
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (1)
594FormatObjectRecursive(result, entry.Key, isRoot: false, debuggerDisplayName: out _);
Microsoft.CodeAnalysis.UnitTests (4)
Collections\ImmutableDictionaryBuilderTestBase.cs (2)
205Assert.Equal(enumerator.Key, enumerator.Entry.Key); 222Assert.Equal(enumerator.Key, ((DictionaryEntry)enumerator.Current).Key);
Collections\ImmutableDictionaryTestBase.cs (2)
193Assert.Equal(enumerator.Key, enumerator.Entry.Key); 210Assert.Equal(enumerator.Key, ((DictionaryEntry)enumerator.Current).Key);
Microsoft.DotNet.ArcadeLogging (1)
PipelinesLogger.cs (1)
245string propertyCategory = e.Properties?.Cast<DictionaryEntry>().LastOrDefault(p => p.Key.ToString().Equals(s_TelemetryMarker)).Value?.ToString();
Microsoft.Extensions.Configuration.EnvironmentVariables (1)
EnvironmentVariablesConfigurationProvider.cs (1)
81string key = (string)e.Entry.Key;
Microsoft.Extensions.Localization (1)
Internal\ResourceManagerStringProvider.cs (1)
79if (entry?.Key is string key)
Microsoft.ML.CodeGenerator (1)
Utils.cs (1)
82return sampleData.Cast<DictionaryEntry>().ToDictionary(k => (string)k.Key, v => (string)v.Value);
Microsoft.ML.Maml (4)
MAML.cs (4)
278if (Contracts.IsMarkedKey.Equals(kvp.Key)) 280if (Contracts.SensitivityKey.Equals(kvp.Key)) 288if (ConsoleEnvironment.ComponentHistoryKey.Equals(kvp.Key)) 304writer.WriteLine(" {0}: {1}", kvp.Key, kvp.Value);
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\FileIO\FileSystem.vb (1)
997IOException.Data.Add(Entry.Key, Entry.Value)
PresentationBuildTasks (1)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (1)
371ReflectionHelper.LoadAssembly(entry.Key as String, entry.Value as String);
PresentationCore (7)
System\Windows\Input\AccessKeyManager.cs (2)
683return (string)entry.Key; 716return (string)entry.Key;
System\Windows\Media\Animation\Clock.cs (2)
4371removeTable[e.Key] = weakRef; 4378_objectTable.Remove(e.Key);
System\Windows\Media\Animation\Timeline.cs (2)
1164removeTable[e.Key] = weakRef; 1171_objectTable.Remove(e.Key);
System\Windows\Media\Imaging\ImagingCache.cs (1)
78al.Add(de.Key);
PresentationFramework (17)
MS\Internal\Data\StaticPropertyChangedEventManager.cs (1)
399Debug.Assert((String)de.Key != AllListenersKey, "special key should not appear");
MS\Internal\Data\ValueTable.cs (1)
247ValueTableKey key = (ValueTableKey)de.Key;
MS\Internal\Data\ViewManager.cs (2)
249WeakRefKey key = (WeakRefKey)de.Key; 790WeakRefKey key = (WeakRefKey)de.Key;
System\Windows\Controls\Grid.cs (1)
1304SpanKey key = (SpanKey)e.Key;
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (1)
53get => (BamlLocalizableResourceKey)Entry.Key;
System\Windows\Markup\Primitives\ElementMarkupObject.cs (4)
505return String.Compare(one.Key.ToString(), two.Key.ToString()); 513subItem.SetKey(new ElementKey(entry.Key, keyType, subItem)); 1167item.SetKey(new ElementKey(entry.Key, typeof(object), item));
System\Windows\Markup\XamlTypeMapper.cs (2)
301newDict.Add(de.Key, de.Value); 371ReflectionHelper.LoadAssembly(entry.Key as String, entry.Value as String);
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (2)
60_piNamespaces.Add((string)entry.Key, clrNs); 149XmlNamespace = (string)piEntry.Key,
System\Windows\Media\Animation\Storyboard.cs (1)
611ObjectPropertyPair key = (ObjectPropertyPair)entry.Key;
System\Windows\ResourceDictionary.cs (1)
97OnGettingValuePrivate(entry.Key, ref value, out canCache);
System\Windows\StyleHelper.cs (1)
2296DependencyProperty dp = (DependencyProperty)entry.Key;
ReachFramework (1)
Serialization\VisualTreeFlattener.cs (1)
775string key = e.Key as string;
System.Collections.Specialized (10)
System\Collections\Specialized\OrderedDictionary.cs (10)
170object key = ((DictionaryEntry)objectsArray[index]!).Key; 288object o = ((DictionaryEntry)_objectsArray[i]!).Key; 337object key = ((DictionaryEntry)objectsArray[index]!).Key; 434objectsTable.Add(entry.Key, entry.Value); 468return ((DictionaryEntry)_arrayEnumerator.Current).Key; 486return new DictionaryEntry(((DictionaryEntry)_arrayEnumerator.Current).Key, ((DictionaryEntry)_arrayEnumerator.Current).Value); 498return ((DictionaryEntry)_arrayEnumerator.Current).Key; 564array.SetValue(IsKeys ? ((DictionaryEntry)o).Key : ((DictionaryEntry)o).Value, index); 606object entryKey = ((DictionaryEntry)_objects[i]!).Key; 636return IsKeys ? entry.Key : entry.Value;
System.ComponentModel.TypeConverter (6)
System\ComponentModel\ComponentResourceManager.cs (1)
254sd[(string)de.Key] = de.Value;
System\ComponentModel\Design\DesigntimeLicenseContextSerializer.cs (1)
47writer.Write(keyAndValue.Key.ToString()!);
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
1485Type? keyType = de.Key as Type;
System\ComponentModel\TypeDescriptor.cs (3)
2343Type? nodeType = de.Key as Type; 2427Type? nodeType = de.Key as Type; 2488Type? nodeType = de.Key as Type;
System.Configuration.ConfigurationManager (9)
System\Configuration\ClientSettingsStore.cs (2)
187SettingElement se = sec.Get((string)entry.Key); 192se.Name = (string)entry.Key;
System\Configuration\ConfigurationElementCollection.cs (1)
1294object IDictionaryEnumerator.Key => _current.Key;
System\Configuration\ConfigurationLockCollection.cs (2)
73sb.Append(de.Key); 283removeList.Add(de.Key);
System\Configuration\MgmtConfigurationRecord.cs (1)
1538string configKey = (string)de.Key;
System\Configuration\SectionUpdates.cs (2)
212string group = (string)de.Key; 233string group = (string)de.Key;
System\Configuration\SettingsPropertyValueCollection.cs (1)
60al.Add(de.Key);
System.Data.Common (4)
System\Data\PropertyCollection.cs (1)
35clone.Add(pair.Key, pair.Value);
System\Data\xmlsaver.cs (3)
74if (entry.Key is INullable) 76s = (string)SqlConvert.ChangeTypeForXML(entry.Key, typeof(string)); 80s = Convert.ToString(entry.Key, CultureInfo.InvariantCulture)!;
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Collections\DictionaryEntry.cs (1)
42key = Key;
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (1)
227genericDictionaryObj.Add(entry.Key, entry.Value);
System.Private.Xml (6)
System\Xml\Schema\SchemaCollectionpreProcessor.cs (3)
698redefine.Schema!.Groups.Insert((XmlQualifiedName)entry.Key!, (XmlSchemaObject)entry.Value!); 703redefine.Schema!.AttributeGroups.Insert((XmlQualifiedName)entry.Key!, (XmlSchemaObject)entry.Value!); 708redefine.Schema!.SchemaTypes.Insert((XmlQualifiedName)entry.Key!, (XmlSchemaObject)entry.Value!);
System\Xml\Schema\XmlSchemaSet.cs (1)
859if (schemaUri.Equals(locationsTable[i].Key))
System\Xml\Serialization\Types.cs (1)
748return de.Key as Type;
System\Xml\Serialization\XmlSerializationReader.cs (1)
1499UnreferencedObject((string)target.Key, target.Value!);
System.Runtime.Caching (1)
System\Runtime\Caching\MemoryCacheStore.cs (1)
233MemoryCacheKey key = e.Key as MemoryCacheKey;
System.Text.RegularExpressions.Generator (4)
RegexGenerator.Emitter.cs (4)
156AppendHashtableContents(writer, rm.Tree.CaptureNumberSparseMapping.Cast<DictionaryEntry>().OrderBy(de => de.Key as int?)); 162AppendHashtableContents(writer, rm.Tree.CaptureNameToNumberMapping.Cast<DictionaryEntry>().OrderBy(de => de.Key as string, StringComparer.Ordinal)); 191if (en.Key is int key) 197writer.Write($"\"{en.Key}\"");
System.Windows.Forms (2)
System\Windows\Forms\Layout\DefaultLayout.cs (2)
1049IArrangedElement element = (IArrangedElement)entry.Key; 1056dictionary.Remove(entry.Key);
System.Windows.Forms.Design (7)
System\ComponentModel\Design\Serialization\StatementContext.cs (1)
232public readonly object Key => Entry.Key;
System\Drawing\Design\ToolboxItem.cs (2)
712propertyNames.Add((string)de.Key); 713info.AddValue((string)de.Key, de.Value);
System\Resources\Tools\StronglyTypedResourceBuilder.cs (3)
171string keyname = (string)entry.Key; 190resourceTypes.Add((string)entry.Key, data); 281resourceList.Add((string)entry.Key, data);
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
233properties[de.Key] = TypeDescriptor.CreateProperty(descriptor.ComponentType, descriptor, BrowsableAttribute.No, DesignerSerializationVisibilityAttribute.Hidden);
System.Windows.Forms.Tests (22)
misc\CollectionHelperTests.cs (4)
105Assert.Equal("key-one", (string)firstTargetItem.Key); 110Assert.Equal("key-two", (string)secondTargetItem.Key); 127Assert.Equal("key-one", (string)firstTargetItem.Key); 131Assert.Equal("key-two", (string)secondTargetItem.Key);
System\Resources\ResXResourceWriterTests.cs (7)
141Assert.Equal(_testString1, currentEntry.Key); 162Assert.Equal(_testString1, currentEntry.Key); 183Assert.Equal(_testString1, currentEntry.Key); 204Assert.Equal(_testString1, currentEntry.Key); 225Assert.Equal(_testString1, currentEntry.Key); 246Assert.Equal(_testString1, currentEntry.Key); 268Assert.Equal(_testString1, currentEntry.Key);
System\Windows\Forms\BindingContextTests.cs (11)
175Assert.NotNull(Assert.IsType<DictionaryEntry>(array[1]).Key); 786Assert.True(entry1.Key.Equals(entry1.Key)); 787Assert.True(entry1.Key.Equals(entry2.Key)); 788Assert.False(entry1.Key.Equals(entry3.Key)); 789Assert.False(entry1.Key.Equals(entry4.Key)); 791Assert.False(entry1.Key.Equals(new object())); 792Assert.False(entry1.Key.Equals(null));
System.Xaml (8)
System\Xaml\NameScope.cs (1)
122array[arrayIndex++] = new KeyValuePair<string, object>((string)entry.Key, entry.Value);
System\Xaml\XamlObjectReader.cs (7)
440if (entry.Key is not null) 442actualKeyType = context.GetXamlType(entry.Key.GetType()); 445if (entry.Key is not null && actualKeyType != keyType) 448keyValue = ObjectMarkupInfo.ForObject(entry.Key, context, tc); 454keyValue = GetPropertyValueInfoInternal(entry.Key, vs, tc, false, null, context); 487return entry.Key is null; 489else if (dkpObject.Equals(entry.Key))
XmlFileLogger (1)
PropertyBag.cs (1)
89AddProperty(property.Key.ToString(), property.Value.ToString());