1 write to Key
System.Configuration.ConfigurationManager (1)
System\Configuration\ConfigurationElementCollection.cs (1)
1278_current.Key = entry.GetKey(_thisCollection) ?? "key";
163 references to Key
Aspire.Hosting (1)
Dcp\DcpHost.cs (1)
279var key = de.Key?.ToString();
csc (1)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (1)
504var key = (string)entry.Key;
dotnet (1)
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.9.0-1.26304.104\contentFiles\cs\net11.0\BuildServerConnection.cs (1)
504var key = (string)entry.Key;
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.Build (24)
BackEnd\Client\MSBuildClient.cs (1)
509envVars[(string)envVar.Key] = (envVar.Value as string) ?? string.Empty;
BackEnd\Components\Communications\LogMessagePacket.cs (1)
232list.Add((dictionaryEntry.Key as string, dictionaryEntry.Value));
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
220keyValuePairList.Add(new KeyValuePair<string, string>((string)kvp.Key, (string)kvp.Value));
BackEnd\Components\RequestBuilder\TaskHost.cs (1)
1194propertyDictionaries[i].Set(ProjectPropertyInstance.Create(entry.Key as string, entry.Value as string, _taskLocation));
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
1550yield return new KeyValuePair<string, string>((string)de.Key, EscapingUtilities.Escape((string)de.Value));
Evaluation\Expander.cs (1)
1580builder.Append(EscapingUtilities.Escape(ConvertToString(entry.Key)));
Instance\ProjectInstance.cs (2)
3059string environmentVariableName = environmentVariable.Key as string; 3084Environment.SetEnvironmentVariable(clearedVariable.Key as string, clearedVariable.Value as string);
Logging\BaseConsoleLogger.cs (5)
98return string.Compare((string)a.Key, (string)b.Key, StringComparison.CurrentCultureIgnoreCase); 538WritePretty($"{prop.Key,-30} = "); 565string itemType = (string)entry.Key; 596string key = (string)item.Key;
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
1036string key = (string)dictionaryEntry.Key;
Logging\ParallelLogger\ParallelConsoleLogger.cs (4)
618if (string.Equals((string)item.Key, ItemMetadataNames.ProjectConfigurationDescription, StringComparison.OrdinalIgnoreCase)) 781string propertyString = $"{prop.Key} = {EscapingUtilities.UnescapeAll((string)(prop.Value))}"; 919WriteMessageAligned($"{new String(' ', 4 * tabWidth)}{metadatum.Key} = {item.GetMetadata(metadatum.Key as string)}", false);
src\msbuild\src\Shared\TaskHostBuildRequest.cs (1)
90result[i]![(string)entry.Key] = entry.Value?.ToString() ?? string.Empty;
src\msbuild\src\Shared\TaskParameter.cs (2)
582_customEscapedMetadata[(string)entry.Key] = (string)entry.Value ?? string.Empty; 602_customEscapedMetadata[(string)entry.Key] = EscapingUtilities.Escape((string)entry.Value) ?? string.Empty;
Utilities\Utilities.cs (3)
710else if (item is DictionaryEntry dictionaryEntry && dictionaryEntry.Key is string key && !string.IsNullOrEmpty(key)) 871string itemType = dictionaryEntry.Key as string; 900itemType = dictionaryEntry.Key as string;
Microsoft.Build.Framework (5)
BackEnd\CommunicationsUtilities.cs (2)
279if (!lastEnvironmentVariables.TryGetValue((string)entry.Key, out string? value) 300string key = Strings.WeakIntern((string)entry.Key);
MultiThreadedTaskEnvironmentDriver.cs (1)
50_environmentVariables[(string)entry.Key] = (string)entry.Value!;
ProjectStartedEventArgs.cs (2)
385var validProperties = properties.Cast<DictionaryEntry>().Where(entry => entry.Key != null && entry.Value != null); 396writer.Write((string)propertyPair.Key);
Microsoft.Build.Tasks.CodeAnalysis (3)
src\roslyn\src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (2)
265.Where(e => ((string)e.Key).StartsWith(RuntimeHostInfo.DotNetRootEnvironmentName, StringComparison.OrdinalIgnoreCase)) 266.Select(e => $"{e.Key}="),
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (1)
504var key = (string)entry.Key;
Microsoft.Build.Tasks.Core (5)
ManifestUtil\XmlUtil.cs (1)
112string key = entry.Key.ToString();
src\msbuild\src\Shared\TaskParameter.cs (2)
582_customEscapedMetadata[(string)entry.Key] = (string)entry.Value ?? string.Empty; 602_customEscapedMetadata[(string)entry.Key] = EscapingUtilities.Escape((string)entry.Value) ?? string.Empty;
WriteCodeFragment.cs (2)
214string name = (string)entry.Key; 323string key = (string)entry.Key;
Microsoft.Build.Utilities.Core (1)
TaskItem.cs (1)
132string key = (string)singleMetadata.Key;
Microsoft.CodeAnalysis.Scripting (1)
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (1)
594FormatObjectRecursive(result, entry.Key, isRoot: false, debuggerDisplayName: out _);
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.TestPlatform.CommunicationUtilities (1)
Serialization\TestObjectBaseConverter.cs (1)
179writer.WritePropertyName(Convert.ToString(entry.Key, CultureInfo.InvariantCulture)!);
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\FileIO\FileSystem.vb (1)
997IOException.Data.Add(Entry.Key, Entry.Value)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (2)
XML\XmlPersistence.cs (2)
361SaveObject(de.Key, itemXml, keyLocation, parameters); 379SaveObject(de.Key, itemXml, keyLocation, parameters);
MSBuild (3)
src\msbuild\src\Shared\TaskHostBuildRequest.cs (1)
90result[i]![(string)entry.Key] = entry.Value?.ToString() ?? string.Empty;
src\msbuild\src\Shared\TaskParameter.cs (2)
582_customEscapedMetadata[(string)entry.Key] = (string)entry.Value ?? string.Empty; 602_customEscapedMetadata[(string)entry.Key] = EscapingUtilities.Escape((string)entry.Value) ?? string.Empty;
PresentationBuildTasks (1)
src\wpf\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 (3)
System\ComponentModel\ComponentResourceManager.cs (1)
244sd[(string)de.Key] = de.Value;
System\ComponentModel\Design\DesigntimeLicenseContextSerializer.cs (1)
47writer.Write(keyAndValue.Key.ToString()!);
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
1478Type? keyType = 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.Data.OleDb (1)
DbConnectionOptions.cs (1)
841string keyname = (string)entry.Key;
System.Diagnostics.Process (1)
System\Diagnostics\ProcessStartInfo.cs (1)
112_environmentVariables.Add((string)entry.Key, (string?)entry.Value);
System.DirectoryServices (3)
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (2)
991str.Append(Utils.GetEscapedFilterValue((string)val.Key)); 1051ADAMEntry = DirectoryEntryManager.GetDirectoryEntry(context, "CN=NTDS Settings," + e.Key);
System\DirectoryServices\PropertyCollection.cs (1)
214public object Key => Entry.Key;
System.DirectoryServices.AccountManagement (2)
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_LoadStore.cs (1)
195Debug.Assert(propertyEntry.propertyName == (string)dictEntry.Key);
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (1)
118Debug.Assert(propertyEntry.propertyName == (string)dictEntry.Key);
System.Management (1)
System\Management\ManagementOperationWatcher.cs (1)
180copiedSinkTable.Add(entry.Key, entry.Value);
System.Net.Primitives (1)
System\Net\CookieContainer.cs (1)
353tempDomain = (string)entry.Key;
System.Net.Requests (1)
System\Net\TimerThread.cs (1)
143garbage.Add(pair.Key);
System.Private.CoreLib (1)
src\runtime\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)
695redefine.Schema!.Groups.Insert((XmlQualifiedName)entry.Key!, (XmlSchemaObject)entry.Value!); 700redefine.Schema!.AttributeGroups.Insert((XmlQualifiedName)entry.Key!, (XmlSchemaObject)entry.Value!); 705redefine.Schema!.SchemaTypes.Insert((XmlQualifiedName)entry.Key!, (XmlSchemaObject)entry.Value!);
System\Xml\Schema\XmlSchemaSet.cs (1)
847if (schemaUri.Equals(locationsTable[i].Key))
System\Xml\Serialization\Types.cs (1)
811return de.Key as Type;
System\Xml\Serialization\XmlSerializationReader.cs (1)
1531UnreferencedObject((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)
183AppendHashtableContents(writer, rm.Tree.CaptureNumberSparseMapping.Cast<DictionaryEntry>().OrderBy(de => de.Key as int?)); 189AppendHashtableContents(writer, rm.Tree.CaptureNameToNumberMapping.Cast<DictionaryEntry>().OrderBy(de => de.Key as string, StringComparer.Ordinal)); 218if (en.Key is int key) 224writer.Write($"\"{en.Key}\"");
System.Windows.Forms (2)
System\Windows\Forms\Layout\DefaultLayout.cs (2)
1057IArrangedElement element = (IArrangedElement)entry.Key; 1064dictionary.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.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))
vbc (1)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (1)
504var key = (string)entry.Key;
VBCSCompiler (1)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (1)
504var key = (string)entry.Key;
vstest.console (1)
InProcessVsTestConsoleWrapper.cs (1)
117environmentVariableBaseline[entry?.Key.ToString()!] = entry?.Value?.ToString();
vstest.console.arm64 (1)
src\vstest\src\vstest.console\InProcessVsTestConsoleWrapper.cs (1)
117environmentVariableBaseline[entry?.Key.ToString()!] = entry?.Value?.ToString();