6634 references to Value
aspire (43)
Backchannel\ResourceSnapshotMapper.cs (2)
89p => p.Value?.DeepClone()); 136p => ConvertJsonNodeToString(p.Value));
Commands\AgentMcpCommand.cs (5)
172Name = tool.Value.Name, 173Description = tool.Value.Description, 174InputSchema = tool.Value.GetInputSchema() 200Description = x.Value.Tool.Description, 201InputSchema = x.Value.Tool.InputSchema
Commands\ConfigCommand.cs (1)
339$"[yellow]{kvp.Value.EscapeMarkup()}[/]");
Commands\PipelineCommandBase.cs (1)
1190choice => choice.Value.EscapeMarkup(),
Commands\RenderCommand.cs (2)
218InteractionService.DisplayPlainText($"{choice.Key}: {choice.Value}"); 225InteractionService.DisplayPlainText($"{scenario.Key}: {scenario.Value}");
Commands\TelemetryTracesCommand.cs (1)
282foreach (var (_, info) in traceInfos.OrderBy(x => x.Value.StartTimeNano ?? 0))
Configuration\ConfigurationService.cs (3)
348if (kvp.Value is JsonObject nestedObj) 352else if (kvp.Value is not null) 354result[key] = kvp.Value.ToString();
Configuration\FlexibleBooleanDictionaryConverter.cs (1)
66writer.WriteBoolean(kvp.Key, kvp.Value);
DotNet\DotNetCliRunner.cs (1)
272execution.EnvironmentVariables.Select(kvp => new EnvVar { Name = kvp.Key, Value = kvp.Value }).ToList(),
DotNet\ProcessExecution.cs (2)
179.Where(static kvp => kvp.Value is not null) 180.ToDictionary(static kvp => kvp.Key, static kvp => kvp.Value!, ProcessEnvironment.Comparer);
DotNet\ProcessExecutionFactory.cs (2)
63effectiveLogger.LogDebug("{FileName} env: {EnvKey}={EnvValue}", fileName, envKvp.Key, envKvp.Value); 93startInfo.Environment[envKvp.Key] = envKvp.Value;
Migrations\TypeScriptAppHostMigration.cs (1)
296if (script.Value is JsonValue value &&
Packaging\NuGetConfigMerger.cs (2)
353var sourceElement = urlToExistingKey.FirstOrDefault(kvp => string.Equals(kvp.Value, sourceKey, StringComparison.OrdinalIgnoreCase)); 711sourcesInUse.Contains(kvp.Value));
Packaging\PackagingService.cs (2)
710.Where(static kvp => kvp.Value.Count > 1) 717$"{kvp.Key} ({string.Join(", ", kvp.Value)})"));
Processes\WindowsProcessInterop.cs (1)
627blockBuilder.Append(kvp.Value);
Projects\DotNetAppHostProject.cs (1)
1639env[kvp.Key] = kvp.Value;
Projects\ExtensionGuestLauncher.cs (1)
53effectiveEnvironmentVariables.Select(kvp => new EnvVar { Name = kvp.Key, Value = kvp.Value }).ToList(),
Projects\GuestAppHostProject.cs (2)
466launchSettingsEnvVars[kvp.Key] = kvp.Value; 1033result[kvp.Key] = kvp.Value;
src\Shared\ConsoleLogs\SharedAIHelpers.cs (2)
365.Select(kvp => new OtlpTraceDto(kvp.Key, kvp.Value)) 514foreach (var key in obj.Where(kvp => kvp.Value is null).Select(kvp => kvp.Key).ToList())
src\Shared\IntegrationPackageProbeManifest.cs (1)
293static pair => (IReadOnlyList<string>)pair.Value,
src\Shared\Json\JsonFlattener.cs (4)
50current[keys[^1]] = kvp.Value?.DeepClone(); 66if (kvp.Value is JsonObject nestedObject) 70else if (kvp.Value is JsonArray array) 87result[key] = kvp.Value?.DeepClone();
src\Shared\UserSecrets\SecretsStore.cs (1)
139var value = kvp.Value?.ToString();
Telemetry\AspireCliTelemetry.cs (1)
210tags[tag.Key] = tag.Value;
Telemetry\CliTagEnrichmentProcessor.cs (1)
31activity.SetTag(tag.Key, tag.Value);
Utils\ConfigurationHelper.cs (1)
315colonKeys.Add((kvp.Key, kvp.Value?.DeepClone()));
Utils\FileSystemHelper.cs (1)
187.GroupBy(kvp => kvp.Value, comparer)
aspire-managed (1)
src\Shared\IntegrationPackageProbeManifest.cs (1)
293static pair => (IReadOnlyList<string>)pair.Value,
Aspire.Acquisition.Tests (2)
tests\Shared\TemplatesTesting\ToolCommand.cs (2)
249_testOutput.WriteLine($"{_msgPrefix}\t[{item.Key}] = {item.Value}"); 250psi.Environment[item.Key] = item.Value;
Aspire.Azure.Messaging.EventHubs.Tests (2)
tests\Aspire.Azure.Security.KeyVault.Tests\MockTransport.cs (2)
116protected override IEnumerable<HttpHeader> EnumerateHeaders() => _headers.Select(h => new HttpHeader(h.Key, JoinHeaderValue(h.Value))); 207protected override IEnumerable<HttpHeader> EnumerateHeaders() => _headers.Select(h => new HttpHeader(h.Key, JoinHeaderValue(h.Value)));
Aspire.Azure.Security.KeyVault.Tests (2)
MockTransport.cs (2)
116protected override IEnumerable<HttpHeader> EnumerateHeaders() => _headers.Select(h => new HttpHeader(h.Key, JoinHeaderValue(h.Value))); 207protected override IEnumerable<HttpHeader> EnumerateHeaders() => _headers.Select(h => new HttpHeader(h.Key, JoinHeaderValue(h.Value)));
Aspire.Cli.EndToEnd.Tests (5)
Helpers\CaptureWorkspaceOnFailureAttribute.cs (4)
65kvp.Value is string path && 73kvp.Value is string filePath && 97kvp.Value is string path && 106kvp.Value is string filePath &&
Helpers\CliInstallStrategyTests.cs (1)
1012return new EnvironmentVariableScope([.. cleanVariables.Select(variable => (variable.Key, variable.Value))]);
Aspire.Cli.Tests (64)
Agents\TelemetryHookScriptTests.cs (3)
445environment[pair.Key] = pair.Value; 499if (pair.Value is null) 505psi.Environment[pair.Key] = pair.Value;
Backchannel\ResourceSnapshotMapperTests.cs (4)
102var stopCommand = command.Value; 273var argumentInputs = Assert.Single(result.Commands!).Value.ArgumentInputs!; 303Assert.Null(command.Value.DisplayName); 304Assert.Equal("Run custom command", command.Value.Description);
Commands\AgentTelemetryCommandTests.cs (6)
39var tags = activity.Tags.ToDictionary(t => t.Key, t => t.Value); 69var tags = activity.Tags.ToDictionary(t => t.Key, t => t.Value); 100var tags = activity.Tags.ToDictionary(t => t.Key, t => t.Value); 132var tags = activity.Tags.ToDictionary(t => t.Key, t => t.Value); 158var tags = activity.Tags.ToDictionary(t => t.Key, t => t.Value); 252var tags = activity.Tags.ToDictionary(t => t.Key, t => t.Value);
Commands\AppHostLauncherTests.cs (3)
1317.Where(static kvp => kvp.Value is not null) 1318.ToDictionary(static kvp => kvp.Key, static kvp => kvp.Value!); 1429environment?.ToDictionary(static kvp => kvp.Key, static kvp => (string?)kvp.Value)
Commands\RunCommandTests.cs (3)
971var tags = fixture.CapturedActivity.TagObjects.ToDictionary(t => t.Key, t => t.Value); 997var tags = fixture.CapturedActivity.TagObjects.ToDictionary(t => t.Key, t => t.Value); 4285var tags = fixture.CapturedActivity.TagObjects.ToDictionary(t => t.Key, t => t.Value);
DotNet\DotNetCliRunnerTests.cs (2)
807.Where(activity => activity.Tags.Any(tag => tag.Key == ProfilingTelemetry.Tags.ProfilingSessionId && tag.Value == sessionId)) 2688public IReadOnlyDictionary<string, string?> EnvironmentVariables { get; } = environmentVariables?.ToDictionary(kvp => kvp.Key, kvp => (string?)kvp.Value)
DotNet\ProcessExecutionDetachedTests.cs (1)
503environment?.ToDictionary(static kvp => kvp.Key, static kvp => kvp.Value),
Projects\DotNetAppHostProjectTests.cs (1)
609: new TestEnvironment(environmentVariables.ToDictionary(pair => pair.Key, pair => (string?)pair.Value));
Telemetry\AspireCliTelemetryTests.cs (23)
52var activityTags = activity.Tags.ToDictionary(t => t.Key, t => t.Value); 56Assert.Equal(tag.Value?.ToString(), activityTags[tag.Key]); 126var eventTags = exceptionEvent.Tags.ToDictionary(t => t.Key, t => t.Value); 138Assert.Equal(tag.Value?.ToString(), eventTags[tag.Key]?.ToString()); 225Assert.Contains(tags, t => t.Key == "machine.device_id" && (string?)t.Value == "test-device-id"); 226Assert.Contains(tags, t => t.Key == "machine.mac_address_hash" && (string?)t.Value == "test-mac-hash"); 238Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.OsName && (string?)t.Value == expectedOsName); 239Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.OsVersion && t.Value is string s && s == Environment.OSVersion.Version.ToString()); 240Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.OsType && (string?)t.Value == expectedOsType); 286Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.InternalMicrosoft && t.Value is true); 287Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.InternalMicrosoftSource && (string?)t.Value == "test source"); 288Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.InternalMicrosoftAlias && (string?)t.Value == "test.alias"); 289Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.InternalMicrosoftDomain && (string?)t.Value == "TEST"); 309Assert.True((bool?)tag.Value); 314Assert.Equal("test source", tag.Value); 377Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.MacAddressHash && (string?)t.Value == "test-mac-hash"); 378Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.DeviceId && (string?)t.Value == "test-device-id"); 422var activityTags = activity.Tags.ToDictionary(t => t.Key, t => t.Value); 426Assert.Equal(tag.Value?.ToString(), activityTags[tag.Key]); 481Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.IdentityVersion && (string?)t.Value == "13.5.0-preview.1.26310.9"); 482Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.IdentityChannel && (string?)t.Value == "daily"); 483Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.IdentityCommit && (string?)t.Value == "95f0d2968"); 505Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.IdentityVersion && (string?)t.Value == "13.5.0");
Telemetry\CliTagEnrichmentProcessorTests.cs (2)
88Assert.Contains(activity.Tags, t => t.Key == "aspire.cli.version" && (string?)t.Value == "1.0.0-test"); 89Assert.Contains(activity.Tags, t => t.Key == "machine.device_id" && (string?)t.Value == "test-device-id");
Telemetry\InternalMicrosoftDetectorTests.cs (1)
614environment?.ToDictionary(kvp => kvp.Key, kvp => (string?)kvp.Value)
Telemetry\TelemetryConfigurationTests.cs (2)
32result[s_telemetryOptInOverride.Key] = s_telemetryOptInOverride.Value; 181.AddInMemoryCollection(config.Select(pair => new KeyValuePair<string, string?>(pair.Key, pair.Value)))
Telemetry\TelemetryFixture.cs (1)
67activity.SetTag(tag.Key, tag.Value);
tests\Shared\Logging\LogTestHelpers.cs (1)
31return list?.SingleOrDefault(kvp => kvp.Key == key).Value;
tests\Shared\Logging\LogValuesAssert.cs (3)
54return string.Join(",", logValues.Select(kvp => $"[{kvp.Key} {kvp.Value}]")); 61return string.Equals(x.Key, y.Key) && object.Equals(x.Value, y.Value);
TestServices\FakePeerInstallProbe.cs (1)
29_responses[kvp.Key] = kvp.Value;
TestServices\TestProcessExecutionFactory.cs (3)
129.Where(static kvp => kvp.Value is not null) 130.ToDictionary(static kvp => kvp.Key, static kvp => kvp.Value!); 158EnvironmentVariables = env?.ToDictionary(kvp => kvp.Key, kvp => (string?)kvp.Value)
Utils\SdkInstallHelperTests.cs (3)
33var tags = fixture.CapturedActivity.Tags.ToDictionary(t => t.Key, t => t.Value); 59var tags = fixture.CapturedActivity.Tags.ToDictionary(t => t.Key, t => t.Value); 85var tags = fixture.CapturedActivity.Tags.ToDictionary(t => t.Key, t => t.Value);
Utils\TestEnvironment.cs (1)
29return Variables.Select(pair => (pair.Key, pair.Value));
Aspire.Components.Common.TestUtilities (2)
ConformanceTests.cs (2)
402Assert.Contains(healthReport.Entries, entry => entry.Value.Status == expected); 438Assert.Equal(error, detail.Errors!.First().Value);
Aspire.Confluent.Kafka (2)
ConsumerConnectionFactory.cs (1)
18_consumerConfig.Set(property.Key, property.Value);
ProducerConnectionFactory.cs (1)
18_producerConfig.Set(property.Key, property.Value);
Aspire.Confluent.Kafka.Tests (60)
Aspire8MetricsTests.cs (60)
79Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 80Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 83Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 84Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 87Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 88Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 91Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 92Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 93Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 96Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 97Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 98Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 101Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 102Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 103Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 106Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 107Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 108Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 111Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 112Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 113Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 116Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 117Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 118Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 121Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 122Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 123Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 126Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 127Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 128Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 194Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 195Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 198Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 199Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 202Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 203Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 206Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 207Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 208Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 211Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 212Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 213Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 216Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 217Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 218Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 221Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 222Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 223Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 226Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 227Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 228Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 231Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 232Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 233Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 236Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 237Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 238Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 241Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 242Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 243Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
Aspire.Dashboard (61)
Components\Controls\Chart\ChartContainer.razor.cs (1)
228dimensionModel.Values.AddRange(item.Value.Select(v =>
Components\Controls\Chart\ChartDataCalculator.cs (5)
95trace.Value.Values.Add(null); 102item.Value.Values.Reverse(); 109var currentTrace = trace.Value; 127Traces = traces.OrderBy(kvp => kvp.Key).Select(kvp => kvp.Value).ToList(), 253percentileValues.Value.Values.Add(percentileValue);
Components\Controls\Chart\MetricTable.razor.cs (3)
127var previousMetric = newMetrics.LastOrDefault(dt => dt.Key < xValue).Value; 217Debug.Assert(exemplars.Count == newMetrics.Sum(m => m.Value.Exemplars.Count), $"Expected {exemplars.Count} exemplars but got {newMetrics.Sum(m => m.Value.Exemplars.Count)} exemplars.");
Components\Controls\Chart\PlotlyChart.razor.cs (1)
157foreach (var exemplar in exemplarGroups.SelectMany(g => g.Value))
Components\Controls\GridValue.razor.cs (1)
177_componentParameters[parameter.Key] = parameter.Value;
Components\Controls\StructuredLogDetails.razor.cs (1)
77.Select(a => new TelemetryPropertyViewModel { Name = a.Key, Key = $"unknown-{a.Key}", Value = a.Value })
Components\Dialogs\FilterDialog.razor.cs (1)
171.Select(kvp => new FieldValue { Value = kvp.Key, Count = kvp.Value })
Components\Dialogs\ManageDataDialog.razor.cs (1)
562.Where(kvp => kvp.Value.Contains(AspireDataType.ConsoleLogs))
Components\Pages\ConsoleLogs.razor.cs (5)
961.Where(r => !r.Value.IsResourceHidden(showHiddenResources)) 962.OrderBy(c => c.Value, ResourceViewModelNameComparer.Instance) 963.GroupBy(r => r.Value.DisplayName, StringComparers.ResourceName)) 979resourceName = grouping.First().Value.DisplayName; 982foreach (var resource in grouping.Select(g => g.Value).OrderBy(r => r, ResourceViewModelNameComparer.Instance))
Components\Pages\Resources.razor.cs (4)
537return _resourceByName.Any(r => !r.Value.IsResourceHidden(PageViewModel.ShowHiddenResources) && _collapsedResourceNames.Contains(r.Value.PersistentKey)); 576UpdateFromResource(resourceViewModel.Value); 967var escapedFilters = filters.Where(kvp => !kvp.Value).Select(kvp => StringUtils.Escape(kvp.Key)).ToList();
Configuration\EndpointInfo.cs (2)
53var address = kvp.Value.First().Address; 54groups.Add(new KeyValuePair<BindingAddress, List<EndpointInfo>>(address, kvp.Value));
DashboardWebApplication.cs (1)
360.SelectMany(kvp => kvp.Value)
Model\EnvHelpers.cs (1)
26var value = envVar.Value ?? string.Empty;
Model\GenAI\GenAIItemPartViewModel.cs (2)
61? genericPart.AdditionalProperties?.Select(p => new GenAIPartPropertyViewModel { Name = p.Key, Value = p.Value.ToString() ?? string.Empty }).ToList() 144jsonObject[kvp.Key] = JsonNode.Parse(kvp.Value.GetRawText());
Model\GenAI\GenAISchemaHelpers.cs (1)
32if (prop.Value is JsonObject propSchemaObj)
Model\GenAI\GenAIVisualizerDialogViewModel.cs (1)
481message[fieldName] = attr.Value;
Model\Interaction\InputViewModel.cs (1)
46.Select(option => new SelectViewModel<string> { Id = option.Key, Name = option.Value, })
Model\Markdown\HighlightedCodeBlockRenderer.cs (1)
89copyButtonAttributes.AddProperty(item.Key, item.Value.ToString()!);
Model\TelemetryExportService.cs (8)
63var hasResourceDetailsSelected = selectedResources.Any(kvp => kvp.Value.Contains(AspireDataType.ResourceDetails)); 70.Where(kvp => kvp.Value.Contains(AspireDataType.ResourceDetails) && resourcesByName.ContainsKey(kvp.Key)) 76.Where(kvp => kvp.Value.Contains(AspireDataType.ConsoleLogs)) 634Value = new OtlpAnyValueJson { StringValue = property.Value } 671Value = new OtlpAnyValueJson { StringValue = attributes[i].Value } 682Value = new OtlpAnyValueJson { StringValue = additionalAttributes[i].Value } 767p => ConvertPropertyValueToJsonNode(p.Value.Value)) 810jsonObject[field.Key] = ConvertPropertyValueToJsonNode(field.Value);
Model\TraceHelpers.cs (1)
84return resourceFirstTimes.Select(kvp => kvp.Value)
Otlp\Model\OtlpHelpers.cs (5)
217if (existingAttribute.Value != value) 294if (existingAttribute.Value != value) 316return values[i].Value; 415sb.Append(string.IsNullOrEmpty(kv.Value) ? "\'\'" : kv.Value);
Otlp\Model\OtlpInstrument.cs (3)
135newInstrument.KnownAttributeValues.Add(item.Key, item.Value.ToList()); 139newInstrument.Dimensions.Add(item.Key, DimensionScope.Clone(item.Value, valuesStart, valuesEnd)); 161hashcode.Add(pair.Value);
Otlp\Model\OtlpResource.cs (4)
275instruments.Add(instrument.Value.Summary); 353if (!string.Equals(x[i].Value, y[i].Value, StringComparisons.OtlpAttribute)) 368hashCode.Add(StringComparers.OtlpAttribute.GetHashCode(obj[i].Value));
Otlp\Model\OtlpResourceView.cs (1)
56props.Add(new OtlpDisplayField { DisplayName = kv.Key, Key = $"unknown-{kv.Key}", Value = kv.Value });
Otlp\Model\OtlpSpan.cs (1)
132props.Add(new OtlpDisplayField { DisplayName = kv.Key, Key = $"unknown-{kv.Key}", Value = kv.Value });
Otlp\Storage\TelemetryRepository.cs (5)
149return kvp.Value; 870attribute.Value.Contains(fragment, StringComparisons.FullTextSearch)) 936attribute.Value.Contains(fragment, StringComparisons.FullTextSearch)) 2139values = values.Union(knownAttributeValues.Value).ToList(); 2143values = knownAttributeValues.Value.ToList();
Aspire.Dashboard.Components.Tests (24)
Pages\ResourcesTests.cs (14)
62Assert.True(kvp.Value); 68Assert.True(kvp.Value); 74Assert.True(kvp.Value); 95Assert.True(kvp.Value); 100Assert.True(kvp.Value); 106Assert.True(kvp.Value); 112Assert.True(kvp.Value); 117Assert.True(kvp.Value); 392Assert.True(kvp.Value); 397Assert.False(kvp.Value); 403Assert.False(kvp.Value); 408Assert.True(kvp.Value); 416Assert.True(kvp.Value); 421Assert.True(kvp.Value);
tests\Shared\Logging\LogTestHelpers.cs (1)
31return list?.SingleOrDefault(kvp => kvp.Key == key).Value;
tests\Shared\Logging\LogValuesAssert.cs (3)
54return string.Join(",", logValues.Select(kvp => $"[{kvp.Key} {kvp.Value}]")); 61return string.Equals(x.Key, y.Key) && object.Equals(x.Value, y.Value);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (6)
61scope.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 124point.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 149e.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 181span.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 206logRecord.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 227resource.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } });
Aspire.Dashboard.Tests (112)
GlobalizationHelpersTests.cs (1)
18.SelectMany(kvp => kvp.Value)
Integration\OtlpHttpJsonTests.cs (6)
552Assert.Equal("some value", a.Value); 608Assert.Equal("some string", a.Value); 613Assert.Equal("true", a.Value); 618Assert.Equal("10", a.Value); 623Assert.Equal("637.704", a.Value); 681Assert.Equal("some event attribute", a.Value);
Integration\ResponseCompressionTests.cs (1)
53Assert.Contains(response.Content.Headers, h => h.Key == "Content-Encoding" && h.Value.Contains("br"));
Model\ResourceViewModelTests.cs (17)
85var (key, vm) = (e.Key, e.Value); 137Assert.Equal("Property1", p.Value.Name); 138Assert.Equal("Value1", p.Value.Value.StringValue); 139Assert.Equal(123, p.Value.SortOrder); 140Assert.Same(kp, p.Value.KnownProperty); 141Assert.Equal("Property one", p.Value.DisplayName); 142Assert.True(p.Value.IsHighlighted); 143Assert.False(p.Value.IsValueMasked); 144Assert.False(p.Value.IsValueSensitive); 149Assert.Equal("Property2", p.Value.Name); 150Assert.Equal("Value2", p.Value.Value.StringValue); 151Assert.Equal(123, p.Value.SortOrder); 152Assert.Same(kp, p.Value.KnownProperty); 153Assert.Null(p.Value.DisplayName); 154Assert.False(p.Value.IsHighlighted); 155Assert.True(p.Value.IsValueMasked); 156Assert.True(p.Value.IsValueSensitive);
Model\TelemetryExportServiceTests.cs (1)
411return (peerService.Value, null);
Model\TelemetryImportServiceTests.cs (1)
374Assert.Contains(importedLogs.Items[0].Attributes, a => a.Key == "custom.attr" && a.Value == "custom-value");
Telemetry\ComponentTelemetryContextTests.cs (4)
85Assert.Equal("ComponentTelemetryContextTests", kvp.Value.Value); 90Assert.Equal("Page", kvp.Value.Value); 95Assert.Equal("mozilla", kvp.Value.Value); 100Assert.Equal("Value", kvp.Value.Value);
TelemetryRepositoryTests\LogTests.cs (10)
84Assert.Equal("Value!", p.Value); 676Assert.Equal("01234", p.Value); 681Assert.Equal("0123456789", p.Value); 686Assert.Equal("012345678901234", p.Value); 691Assert.Equal("0123456789012345", p.Value); 696Assert.Equal("0123456789012345", p.Value); 943Assert.Equal("Value!", p.Value); 966Assert.Equal("Value!", p.Value); 1039Assert.Equal("value-1", p.Value); 1050Assert.Equal("value-2", p.Value);
TelemetryRepositoryTests\MetricsTests.cs (21)
164Assert.Equal("01234", p.Value); 169Assert.Equal("0123456789", p.Value); 174Assert.Equal("012345678901234", p.Value); 179Assert.Equal("0123456789012345", p.Value); 184Assert.Equal("0123456789012345", p.Value); 193Assert.Equal("01234", p.Value); 198Assert.Equal("0123456789", p.Value); 203Assert.Equal("012345678901234", p.Value); 208Assert.Equal("0123456789012345", p.Value); 213Assert.Equal("0123456789012345", p.Value); 280Assert.Equal("01234", p.Value); 289Assert.Equal("01234", p.Value); 294Assert.Equal("01234", p.Value); 299Assert.Equal("0123456789", p.Value); 304Assert.Equal("012345678901234", p.Value); 309Assert.Equal("0123456789012345", p.Value); 384Assert.Equal(new[] { null, "value1", "value2" }, e.Value); 389Assert.Equal(new[] { null, "value1", "" }, e.Value); 398Assert.Equal("value1", exemplar.Attributes[0].Value); 423exemplar.FilteredAttributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 622Assert.Collection(knownValues.Value.Order(),
TelemetryRepositoryTests\OtlpHelpersTests.cs (22)
182Assert.Equal("value1", a.Value); 212Assert.Equal("value1", a.Value); 217Assert.Equal("value2", a.Value); 222Assert.Equal("value3", a.Value); 256Assert.Equal("value1-2", a.Value); 261Assert.Equal("value2-2", a.Value); 266Assert.Equal("value3-2", a.Value); 295Assert.Equal("parentvalue1", a.Value); 300Assert.Equal("value1", a.Value); 331Assert.Equal("parentvalue1", a.Value); 336Assert.Equal("value1", a.Value); 341Assert.Equal("value2", a.Value); 374Assert.Equal("parentvalue1", a.Value); 379Assert.Equal("parentvalue2", a.Value); 384Assert.Equal("parentvalue3", a.Value); 407Assert.Equal("value1", a.Value); 412Assert.Equal("value2", a.Value); 443Assert.Equal("value1-2", a.Value); 448Assert.Equal("value2", a.Value); 491Assert.Equal("value1-2", a.Value); 496Assert.Equal("value2", a.Value); 501Assert.Equal("value3", a.Value);
TelemetryRepositoryTests\TraceTests.cs (18)
574Assert.Equal("Value!", a.Value); 651Assert.Equal("Value!", a.Value); 662Assert.Equal("Value!", a.Value); 676Assert.Equal("Value!", a.Value); 687Assert.Equal("Value!", a.Value); 817Assert.Equal("01234", p.Value); 822Assert.Equal("0123456789", p.Value); 827Assert.Equal("012345678901234", p.Value); 832Assert.Equal("0123456789012345", p.Value); 837Assert.Equal("0123456789012345", p.Value); 1633Assert.Equal("value1", p.Value); 1642Assert.Equal("value2", p.Value); 1647Assert.Equal("value1", p.Value); 1668Assert.Equal("value1", p.Value); 1678Assert.Equal("value2", p.Value); 1683Assert.Equal("value1", p.Value); 1693Assert.Equal("value2", p.Value); 1698Assert.Equal("value1", p.Value);
tests\Shared\Logging\LogTestHelpers.cs (1)
31return list?.SingleOrDefault(kvp => kvp.Key == key).Value;
tests\Shared\Logging\LogValuesAssert.cs (3)
54return string.Join(",", logValues.Select(kvp => $"[{kvp.Key} {kvp.Value}]")); 61return string.Equals(x.Key, y.Key) && object.Equals(x.Value, y.Value);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (6)
61scope.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 124point.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 149e.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 181span.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 206logRecord.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } }); 227resource.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } });
Aspire.EndToEnd.Tests (4)
tests\Shared\TemplatesTesting\AspireProject.cs (2)
194AppHostProcess.StartInfo.Environment[item.Key] = item.Value; 195_testOutput.WriteLine($"\t[{item.Key}] = {item.Value}");
tests\Shared\TemplatesTesting\ToolCommand.cs (2)
249_testOutput.WriteLine($"{_msgPrefix}\t[{item.Key}] = {item.Value}"); 250psi.Environment[item.Key] = item.Value;
Aspire.Hosting (72)
ApplicationModel\CertificateTrustExecutionConfigurationGatherer.cs (1)
121additionalData.CustomBundlesFactories[bundleFactory.Key] = bundleFactory.Value;
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (3)
113return node.Value.Value switch 119Entries = node.Value.SelectMany(GetItems), 123_ => throw new InvalidOperationException($"Unknown file system item type: {node.Value.GetType().Name}"),
ApplicationModel\EnvironmentVariablesConfigurationGatherer.cs (1)
33context.EnvironmentVariables[kvp.Key] = kvp.Value;
ApplicationModel\ExecutableLaunchRecipe.cs (1)
400static variable => variable.Value,
ApplicationModel\ExecutionConfigurationGathererContext.cs (4)
62var resolvedValue = await resource.ResolveValueAsync(executionContext, resourceLogger, kvp.Value, null, cancellationToken).ConfigureAwait(false); 65resolvedEnvironmentVariables[kvp.Key] = (kvp.Value, resolvedValue.Value); 66if (kvp.Value is IValueProvider or IManifestExpressionProvider) 68references.Add(kvp.Value);
ApplicationModel\ExecutionConfigurationResult.cs (1)
24public IEnumerable<KeyValuePair<string, string>> EnvironmentVariables => EnvironmentVariablesWithUnprocessed.Select(kvp => new KeyValuePair<string, string>(kvp.Key, kvp.Value.Processed));
ApplicationModel\ResourceLoggerService.cs (2)
35value((logger.Key, logger.Value)); 887logger.Value.Complete();
ApplicationModel\ResourceNotificationService.cs (6)
733foreach (var matchingResource in _resourceNotificationStates.Where(s => string.Equals(s.Value.Resource.Name, resourceId, StringComparisons.ResourceName))) 747if (nameMatch is { } m && m.Value.LastSnapshot != null) 749resourceEvent = new ResourceEvent(m.Value.Resource, m.Key, m.Value.LastSnapshot); 783if (state.Value.LastSnapshot is { } snapshot) 787yield return new ResourceEvent(state.Value.Resource, resourceId, snapshot);
Ats\HealthCheckExports.cs (1)
61pair => (object)pair.Value,
Backchannel\AuxiliaryBackchannelRpcTarget.cs (3)
381values[property.Key] = ConvertArgumentValue(property.Key, property.Value); 1408jsonObject[property.Key] = property.Value; 1492result[option.Key] = option.Value;
ConnectionPropertiesExtensions.cs (2)
29dict[kv.Key] = kv.Value; 34dict[kv.Key] = kv.Value;
Dashboard\DashboardService.cs (1)
459values[field.Key] = ConvertArgumentValue(field.Key, field.Value);
Dashboard\ResourcePublisher.cs (1)
55InitialState: _snapshot.Select(r => r.Value.Snapshot).ToImmutableArray(),
Dashboard\ResourceSnapshot.cs (1)
79structValue.Fields[property.Key] = ConvertToValue(property.Value);
Dcp\ContainerCreator.cs (6)
347spec.Env = configuration.EnvironmentVariables.Select(kvp => new EnvVar { Name = kvp.Key, Value = kvp.Value }).ToList(); 752var bundleBytes = await bundleFactory.Value(certificateTrustConfiguration.Certificates, cancellationToken).ConfigureAwait(false); 939var valueString = buildArgument.Value switch 945_ => buildArgument.Value.ToString() 955var valueString = buildSecret.Value switch 962if (buildSecret.Value is FileInfo)
Dcp\DcpResourceWatcher.cs (1)
884foreach (var ((resourceKind, resourceName), _) in _resourceState.ResourceAssociatedServicesMap.Where(e => e.Value.Contains(service.Metadata.Name)))
Dcp\ExecutableConfigurationResolver.cs (1)
104var bundleBytes = await bundleFactory.Value(
Dcp\ExecutableCreator.cs (1)
181.Select(static variable => new EnvVar { Name = variable.Key, Value = variable.Value })
Dcp\ResourceSnapshotBuilder.cs (4)
318e.Value.Spec.ServiceName == serviceName 319&& e.Value.Metadata.OwnerReferences?.Any(or => or.Kind == resource.Kind && or.Name == name) == true) 320.Value; 352var isActive = _resourceState.EndpointsMap.Any(e => e.Value.Spec.ServiceName == endpointOwnerEndpoint?.Metadata.Name);
Devcontainers\DevcontainerSettingsWriter.cs (1)
146let attrs = props.Value as JsonObject
Orchestrator\ApplicationOrchestrator.cs (1)
92connectionProperties[property.Key] = await property.Value.GetValueAsync(token).ConfigureAwait(false);
ParameterResourceBuilderExtensions.cs (1)
271Options = options.Options is { Count: > 0 } optionValues ? optionValues.Select(static option => KeyValuePair.Create(option.Key, option.Value)).ToArray() : null,
Pipelines\DistributedApplicationPipeline.cs (1)
1330var stepsByLevel = executionLevels.GroupBy(kvp => kvp.Value)
Pipelines\Internal\JsonFlattener.cs (4)
56current[keys[^1]] = kvp.Value?.DeepClone(); 72if (kvp.Value is JsonObject nestedObject) 76else if (kvp.Value is JsonArray array) 93result[key] = kvp.Value?.DeepClone();
ProjectResourceBuilderExtensions.cs (1)
790var value = Environment.ExpandEnvironmentVariables(envVar.Value);
Publishing\ContainerRuntimeBase.cs (5)
234result += buildArg.Value is not null 235? $" --build-arg \"{buildArg.Key}={buildArg.Value}\"" 252if (buildSecret.Value.Type == BuildImageSecretType.File) 254result += $" --secret \"id={buildSecret.Key},type=file,src={buildSecret.Value.Value}\""; 256else if (requireValue && buildSecret.Value.Value is null)
Publishing\DockerContainerRuntime.cs (3)
95if (buildSecret.Value.Type == BuildImageSecretType.Environment && buildSecret.Value.Value is not null) 97environmentVariables[buildSecret.Key.ToUpperInvariant()] = buildSecret.Value.Value;
Publishing\ManifestPublishingContext.cs (1)
554var (unprocessed, processed) = kvp.Value;
Publishing\PodmanContainerRuntime.cs (4)
142Publishers = g.Value 203if (buildSecret.Value.Type == BuildImageSecretType.Environment && buildSecret.Value.Value is not null) 205environmentVariables[buildSecret.Key.ToUpperInvariant()] = buildSecret.Value.Value;
Publishing\ResourceContainerImageManager.cs (3)
466resolvedBuildArguments[buildArg.Key] = await ResolveValue(buildArg.Value, cancellationToken).ConfigureAwait(false); 473var secretType = buildSecret.Value is FileInfo ? BuildImageSecretType.File : BuildImageSecretType.Environment; 474var resolvedValue = await ResolveValue(buildSecret.Value, cancellationToken).ConfigureAwait(false);
ResourceBuilderExtensions.cs (2)
1156context.EnvironmentVariables[$"{prefix}{connectionProperty.Key.ToUpperInvariant()}"] = connectionProperty.Value; 1175return connectionProperty.Value;
UserSecrets\UserSecretsManagerFactory.cs (3)
202.Where(i => i.Value != null) 203.ToDictionary(i => i.Key, i => i.Value); 211contents[secret.Key] = secret.Value;
Utils\FileSystemService.cs (1)
118kvp.Value.Dispose();
Aspire.Hosting.Azure (23)
AzureBicepResource.cs (4)
90ProcessAzureReferences(azureReferences, parameter.Value); 257object? inputValue = input.Value is Func<object?> f ? f() : input.Value; 276context.TryAddDependentResources(input.Value);
AzureProvisioningController.cs (3)
3200string.Equals(option.Value, location, StringComparisons.AzureLocation)) 3267.OrderBy(static option => option.Value)]; 3290.OrderBy(static option => option.Value)];
AzureProvisioningResource.cs (3)
94File.WriteAllText(moduleSourcePath, compiledBicep.Value); 288var isSecure = aspireParameter.Value is ParameterResource { Secret: true } || aspireParameter.Value is BicepSecretOutputReference;
AzurePublishingContext.cs (6)
194await VisitAsync(parameter.Value, MapParameterAsync, cancellationToken).ConfigureAwait(false); 323if (parameter.Key == AzureBicepResource.KnownParameters.UserPrincipalId && parameter.Value is null) 328if (parameter.Key == AzureBicepResource.KnownParameters.PrincipalId && parameter.Value is null) 334var value = ResolveValue(Eval(parameter.Value)); 368Visit(parameter.Value, CaptureBicepOutputs); 529await File.WriteAllTextAsync(bicepPath, compiledBicep.Value).ConfigureAwait(false);
Provisioning\BicepUtilities.cs (2)
46var parameterValue = parameter.Value is Func<object?> f ? f() : parameter.Value;
Provisioning\Internal\BaseProvisioningContextProvider.cs (3)
285.OrderBy(kvp => kvp.Value) 314.OrderBy(kvp => kvp.Value)]; 410.OrderBy(kvp => kvp.Value)
Provisioning\Provisioners\BicepProvisioner.cs (2)
106resource.Outputs[item.Key] = item.Value?.Prop("value")?.ToString(); 809resource.Outputs[item.Key] = item.Value?.Prop("value")?.ToString();
Aspire.Hosting.Azure.AppContainers (4)
AzureContainerAppExtensions.cs (3)
170.Select(pair => pair.Value.Where(environment => includedEnvironmentNames.Contains(environment.Key)).ToArray()) 184.GroupBy(environment => environment.Value.Expression, StringComparer.Ordinal) 190.Select(environment => environment.Value.NamingMode)
BaseContainerAppContext.cs (1)
435var (val, secretType) = ProcessValue(kv.Value);
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceWebsiteContext.cs (2)
499var (val, secretType) = ProcessValue(kv.Value, isSlot: isSlot); 519if (kv.Value is EndpointReference)
Aspire.Hosting.Azure.Kusto.Tests (8)
AzureKustoConnectionPropertiesTests.cs (8)
24Assert.Equal("{kusto.outputs.clusterUri}", property.Value.ValueExpression); 41Assert.Equal("{kusto.bindings.http.url}", property.Value.ValueExpression); 53var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 60Assert.Equal("{kusto.outputs.clusterUri}", property.Value.ValueExpression); 65Assert.Equal("testdb", property.Value.ValueExpression); 77var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 84Assert.Equal("{kusto.bindings.http.url}", property.Value.ValueExpression); 89Assert.Equal("testdb", property.Value.ValueExpression);
Aspire.Hosting.Azure.Network (1)
AzurePrivateDnsZoneResource.cs (1)
91var vnetLink = vnetLinkEntry.Value;
Aspire.Hosting.Azure.PostgreSQL (5)
AzurePostgresExtensions.cs (4)
258var innerDb = postgresContainer.AddDatabase(database.Key, database.Value); 272appBuilder.Resources.Remove(database.Value); 509var databaseName = databaseNames.Value; 573Value = BicepFunction.Interpolate($"Host={postgres.FullyQualifiedDomainName};Username={administratorLogin};Password={administratorLoginPassword};Database={database.Value}")
AzurePostgresFlexibleServerResource.cs (1)
302var propertiesDictionary = properties.ToDictionary(kvp => kvp.Key, kvp => kvp.Value, StringComparers.ResourceName);
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusRule.cs (1)
61rule.CorrelationFilter.ApplicationProperties[property.Key] = property.Value;
Aspire.Hosting.Azure.Sql (6)
AzureSqlExtensions.cs (5)
209var innerDb = sqlContainer.AddDatabase(database.Key, database.Value.DatabaseName); 223appBuilder.Resources.Remove(database.Value); 236var sqlDatabase = CreateAzureSQLDatabase(sqlServer, database.Key, database.Value); 251var sqlDatabase = CreateAzureSQLDatabase(sqlServer, database.Key, database.Value.DatabaseName); 255if (database.Value.UseDefaultAzureSku == false)
AzureSqlServerResource.cs (1)
170kvp => kvp.Value.DatabaseName
Aspire.Hosting.Azure.Tests (185)
AzureBlobStorageConnectionPropertiesTests.cs (2)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("{storage.outputs.blobEndpoint}", property.Value.ValueExpression);
AzureBlobStorageContainerConnectionPropertiesTests.cs (3)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("{storage.outputs.blobEndpoint}", property.Value.ValueExpression); 31Assert.Equal("mycontainer", property.Value.ValueExpression);
AzureCosmosDBConnectionPropertiesTests.cs (7)
22Assert.Equal("{cosmos.outputs.connectionString}", property.Value.ValueExpression); 40Assert.Equal("{cosmos.outputs.connectionString}", property.Value.ValueExpression); 45Assert.Equal("{cosmos-kv.secrets.primaryaccesskey--cosmos}", property.Value.ValueExpression); 50Assert.Equal("{cosmos-kv.secrets.connectionstrings--cosmos}", property.Value.ValueExpression); 74Assert.Equal("{cosmos.bindings.emulator.url}", property.Value.ValueExpression); 79Assert.Equal("C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==", property.Value.ValueExpression); 84Assert.Equal(expectedConnectionString, property.Value.ValueExpression);
AzureCosmosDBContainerConnectionPropertiesTests.cs (15)
20var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 27Assert.Equal("{cosmosdb.outputs.connectionString}", property.Value.ValueExpression); 32Assert.Equal("mydb", property.Value.ValueExpression); 37Assert.Equal("mycontainer", property.Value.ValueExpression); 50var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 57Assert.Equal("{cosmosdb.outputs.connectionString}", property.Value.ValueExpression); 62Assert.Equal("{cosmosdb-kv.secrets.primaryaccesskey--cosmosdb}", property.Value.ValueExpression); 67Assert.Equal("{cosmosdb-kv.secrets.connectionstrings--cosmosdb}", property.Value.ValueExpression); 72Assert.Equal("mydb", property.Value.ValueExpression); 77Assert.Equal("mycontainer", property.Value.ValueExpression); 103Assert.Equal("{cosmosdb.bindings.emulator.url}", property.Value.ValueExpression); 108Assert.Equal("C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==", property.Value.ValueExpression); 113Assert.Equal(expectedConnectionString, property.Value.ValueExpression); 118Assert.Equal("mydb", property.Value.ValueExpression); 123Assert.Equal("mycontainer", property.Value.ValueExpression);
AzureCosmosDBDatabaseConnectionPropertiesTests.cs (12)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("{cosmosdb.outputs.connectionString}", property.Value.ValueExpression); 31Assert.Equal("mydb", property.Value.ValueExpression); 43var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 50Assert.Equal("{cosmosdb.outputs.connectionString}", property.Value.ValueExpression); 55Assert.Equal("{cosmosdb-kv.secrets.primaryaccesskey--cosmosdb}", property.Value.ValueExpression); 60Assert.Equal("{cosmosdb-kv.secrets.connectionstrings--cosmosdb}", property.Value.ValueExpression); 65Assert.Equal("mydb", property.Value.ValueExpression); 90Assert.Equal("{cosmosdb.bindings.emulator.url}", property.Value.ValueExpression); 95Assert.Equal("C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==", property.Value.ValueExpression); 100Assert.Equal(expectedConnectionString, property.Value.ValueExpression); 105Assert.Equal("mydb", property.Value.ValueExpression);
AzureDataLakeStorageFileSystemConnectionPropertiesTests.cs (3)
20.ToDictionary(x => x.Key, x => x.Value); 27Assert.Equal("{storage.outputs.dataLakeEndpoint}", property.Value.ValueExpression); 32Assert.Equal("my-file-system", property.Value.ValueExpression);
AzureDataLakeStorageResourceGetConnectionPropertiesTests.cs (1)
23Assert.Equal("{storage.outputs.dataLakeEndpoint}", property.Value.ValueExpression);
AzureEventHubConnectionPropertiesTests.cs (4)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("{eventhubs.outputs.eventHubsHostName}", property.Value.ValueExpression); 31Assert.Equal("{eventhubs.outputs.eventHubsEndpoint}", property.Value.ValueExpression); 36Assert.Equal("myhub", property.Value.ValueExpression);
AzureEventHubConsumerGroupConnectionPropertiesTests.cs (5)
20var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 27Assert.Equal("{eventhubs.outputs.eventHubsHostName}", property.Value.ValueExpression); 32Assert.Equal("{eventhubs.outputs.eventHubsEndpoint}", property.Value.ValueExpression); 37Assert.Equal("myhub", property.Value.ValueExpression); 42Assert.Equal("mygroup", property.Value.ValueExpression);
AzureEventHubsConnectionPropertiesTests.cs (6)
24Assert.Equal("{eventhubs.outputs.eventHubsHostName}", property.Value.ValueExpression); 29Assert.Equal("{eventhubs.outputs.eventHubsEndpoint}", property.Value.ValueExpression); 46Assert.Equal("{eventhubs.bindings.emulator.host}", property.Value.ValueExpression); 51Assert.Equal("{eventhubs.bindings.emulator.port}", property.Value.ValueExpression); 56Assert.Equal("sb://{eventhubs.bindings.emulator.host}:{eventhubs.bindings.emulator.port}", property.Value.ValueExpression); 61Assert.Equal("Endpoint={eventhubs.bindings.emulator.host}:{eventhubs.bindings.emulator.port};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true", property.Value.ValueExpression);
AzureKeyVaultConnectionPropertiesTests.cs (1)
24Assert.Equal("{keyvault.outputs.vaultUri}", property.Value.ValueExpression);
AzureKeyVaultTests.cs (2)
85Assert.Same("my secret value", runKvp.Value); 88Assert.Equal("{myKeyVault.secrets.mySecret}", pubishKvp.Value);
AzureManagedRedisConnectionPropertiesTests.cs (7)
24Assert.Equal("{redis.outputs.hostName}", property.Value.ValueExpression); 29Assert.Equal("10000", property.Value.ValueExpression); 34Assert.Equal("rediss://{redis.outputs.hostName}:10000", property.Value.ValueExpression); 51Assert.Equal("{redis.outputs.hostName}", property.Value.ValueExpression); 56Assert.Equal("10000", property.Value.ValueExpression); 61Assert.Equal("rediss://:{redis-kv.secrets.primaryaccesskey--redis}@{redis.outputs.hostName}:10000", property.Value.ValueExpression); 66Assert.Equal("{redis-kv.secrets.primaryaccesskey--redis}", property.Value.ValueExpression);
AzureOpenAIConnectionPropertiesTests.cs (2)
18var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 25Assert.Equal("{openai.outputs.endpoint}", property.Value.ValueExpression);
AzureOpenAIDeploymentConnectionPropertiesTests.cs (3)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("{openai.outputs.endpoint}", property.Value.ValueExpression); 31Assert.Equal("mydeployment", property.Value.ValueExpression);
AzurePostgresExtensionsTests.cs (1)
396Assert.Equal("postgresql://postgres:p%40ssw0rd1@postgres.dev.internal:5432/db", databaseUri.Value);
AzurePostgresFlexibleServerConnectionPropertiesTests.cs (12)
18var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 25Assert.Equal("{postgres.outputs.hostName}", property.Value.ValueExpression); 30Assert.Equal("5432", property.Value.ValueExpression); 35Assert.Equal("postgresql://{postgres.outputs.hostName}", property.Value.ValueExpression); 40Assert.Equal("jdbc:postgresql://{postgres.outputs.hostName}?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin", property.Value.ValueExpression); 51var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 58Assert.Equal("{postgres.outputs.hostName}", property.Value.ValueExpression); 63Assert.Equal("jdbc:postgresql://{postgres.outputs.hostName}?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin", property.Value.ValueExpression); 68Assert.Equal("{postgres-password.value}", property.Value.ValueExpression); 73Assert.Equal("5432", property.Value.ValueExpression); 78Assert.Equal("postgresql://{postgres-username.value}:{postgres-password.value}@{postgres.outputs.hostName}", property.Value.ValueExpression); 83Assert.Equal("{postgres-username.value}", property.Value.ValueExpression);
AzurePostgresFlexibleServerDatabaseConnectionPropertiesTests.cs (14)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("mydb", property.Value.ValueExpression); 31Assert.Equal("{postgres.outputs.hostName}", property.Value.ValueExpression); 36Assert.Equal("jdbc:postgresql://{postgres.outputs.hostName}/mydb?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin", property.Value.ValueExpression); 41Assert.Equal("5432", property.Value.ValueExpression); 46Assert.Equal("postgresql://{postgres.outputs.hostName}/mydb", property.Value.ValueExpression); 58var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 65Assert.Equal("mydb", property.Value.ValueExpression); 70Assert.Equal("{postgres.outputs.hostName}", property.Value.ValueExpression); 75Assert.Equal("jdbc:postgresql://{postgres.outputs.hostName}/mydb?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin", property.Value.ValueExpression); 80Assert.Equal("{postgres-password.value}", property.Value.ValueExpression); 85Assert.Equal("5432", property.Value.ValueExpression); 90Assert.Equal("postgresql://{postgres-username.value}:{postgres-password.value}@{postgres.outputs.hostName}/mydb", property.Value.ValueExpression); 95Assert.Equal("{postgres-username.value}", property.Value.ValueExpression);
AzureQueueStorageConnectionPropertiesTests.cs (2)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("{storage.outputs.queueEndpoint}", property.Value.ValueExpression);
AzureQueueStorageQueueConnectionPropertiesTests.cs (3)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("{storage.outputs.queueEndpoint}", property.Value.ValueExpression); 31Assert.Equal("myqueue", property.Value.ValueExpression);
AzureSearchConnectionPropertiesTests.cs (2)
18var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 25Assert.Equal("{search.outputs.endpoint}", property.Value.ValueExpression);
AzureServiceBusConnectionPropertiesTests.cs (6)
24Assert.Equal("{servicebus.outputs.serviceBusHostName}", property.Value.ValueExpression); 29Assert.Equal("{servicebus.outputs.serviceBusEndpoint}", property.Value.ValueExpression); 46Assert.Equal("{servicebus.bindings.emulator.host}", property.Value.ValueExpression); 51Assert.Equal("{servicebus.bindings.emulator.port}", property.Value.ValueExpression); 56Assert.Equal("sb://{servicebus.bindings.emulator.host}:{servicebus.bindings.emulator.port}", property.Value.ValueExpression); 61Assert.Equal("Endpoint=sb://{servicebus.bindings.emulator.host}:{servicebus.bindings.emulator.port};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;", property.Value.ValueExpression);
AzureServiceBusQueueConnectionPropertiesTests.cs (4)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("{servicebus.outputs.serviceBusHostName}", property.Value.ValueExpression); 31Assert.Equal("{servicebus.outputs.serviceBusEndpoint}", property.Value.ValueExpression); 36Assert.Equal("myqueue", property.Value.ValueExpression);
AzureServiceBusSubscriptionConnectionPropertiesTests.cs (5)
20var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 27Assert.Equal("{servicebus.outputs.serviceBusHostName}", property.Value.ValueExpression); 32Assert.Equal("{servicebus.outputs.serviceBusEndpoint}", property.Value.ValueExpression); 37Assert.Equal("mytopic", property.Value.ValueExpression); 42Assert.Equal("mysubscription", property.Value.ValueExpression);
AzureServiceBusTopicConnectionPropertiesTests.cs (4)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("{servicebus.outputs.serviceBusHostName}", property.Value.ValueExpression); 31Assert.Equal("{servicebus.outputs.serviceBusEndpoint}", property.Value.ValueExpression); 36Assert.Equal("mytopic", property.Value.ValueExpression);
AzureSignalRConnectionPropertiesTests.cs (1)
24Assert.Equal("https://{signalr.outputs.hostName}", property.Value.ValueExpression);
AzureSqlConnectionPropertiesTests.cs (5)
18var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 25Assert.Equal("{sql.outputs.sqlServerFqdn}", property.Value.ValueExpression); 30Assert.Equal("1433", property.Value.ValueExpression); 35Assert.Equal("mssql://{sql.outputs.sqlServerFqdn}:1433", property.Value.ValueExpression); 40Assert.Equal("jdbc:sqlserver://{sql.outputs.sqlServerFqdn}:1433;encrypt=true;trustServerCertificate=false", property.Value.ValueExpression);
AzureSqlDatabaseConnectionPropertiesTests.cs (26)
18var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 25Assert.Equal("{sql.outputs.sqlServerFqdn}", property.Value.ValueExpression); 30Assert.Equal("jdbc:sqlserver://{sql.outputs.sqlServerFqdn}:1433;encrypt=true;trustServerCertificate=false", property.Value.ValueExpression); 35Assert.Equal("1433", property.Value.ValueExpression); 40Assert.Equal("mssql://{sql.outputs.sqlServerFqdn}:1433", property.Value.ValueExpression); 52var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 59Assert.Equal("mydb", property.Value.ValueExpression); 64Assert.Equal("{sql.outputs.sqlServerFqdn}", property.Value.ValueExpression); 69Assert.Equal("jdbc:sqlserver://{sql.outputs.sqlServerFqdn}:1433;database=mydb;encrypt=true;trustServerCertificate=false", property.Value.ValueExpression); 74Assert.Equal("1433", property.Value.ValueExpression); 79Assert.Equal("mssql://{sql.outputs.sqlServerFqdn}:1433/mydb", property.Value.ValueExpression); 97var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 104Assert.Equal("{sql.bindings.tcp.host}", property.Value.ValueExpression); 109Assert.Equal("jdbc:sqlserver://{sql.bindings.tcp.host}:{sql.bindings.tcp.port};trustServerCertificate=true", property.Value.ValueExpression); 114Assert.NotEmpty(property.Value.ValueExpression); 119Assert.Equal("{sql.bindings.tcp.port}", property.Value.ValueExpression); 124Assert.Equal("mssql://sa:{sql-password.value}@{sql.bindings.tcp.host}:{sql.bindings.tcp.port}", property.Value.ValueExpression); 129Assert.Equal("sa", property.Value.ValueExpression); 148var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 155Assert.Equal("mydb", property.Value.ValueExpression); 160Assert.Equal("{sql.bindings.tcp.host}", property.Value.ValueExpression); 165Assert.Equal("jdbc:sqlserver://{sql.bindings.tcp.host}:{sql.bindings.tcp.port};databaseName=mydb;trustServerCertificate=true", property.Value.ValueExpression); 170Assert.NotEmpty(property.Value.ValueExpression); 175Assert.Equal("{sql.bindings.tcp.port}", property.Value.ValueExpression); 180Assert.Equal("mssql://sa:{sql-password.value}@{sql.bindings.tcp.host}:{sql.bindings.tcp.port}/mydb", property.Value.ValueExpression); 185Assert.Equal("sa", property.Value.ValueExpression);
AzureStorageConnectionPropertiesTests.cs (3)
25Assert.Equal("{storage.outputs.blobEndpoint}", property.Value.ValueExpression); 43Assert.Equal("{storage.outputs.queueEndpoint}", property.Value.ValueExpression); 61Assert.Equal("{storage.outputs.tableEndpoint}", property.Value.ValueExpression);
AzureTableStorageConnectionPropertiesTests.cs (2)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 26Assert.Equal("{storage.outputs.tableEndpoint}", property.Value.ValueExpression);
AzureWebPubSubConnectionPropertiesTests.cs (2)
18var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value); 25Assert.Equal("{webpubsub.outputs.endpoint}", property.Value.ValueExpression);
DefaultArmClientProviderTests.cs (1)
886=> _headers.Select(static header => new HttpHeader(header.Key, string.Join(",", header.Value)));
FoundryConnectionPropertiesTests.cs (5)
24Assert.Equal("{aifoundry.outputs.aiFoundryApiEndpoint}", property.Value.ValueExpression); 29Assert.Equal("{aifoundry.outputs.aiFoundryApiEndpoint}models", property.Value.ValueExpression); 50Assert.Equal("http://localhost:8080/", property.Value.ValueExpression); 55Assert.Equal("http://localhost:8080/", property.Value.ValueExpression); 60Assert.Equal("OPENAI_KEY", property.Value.ValueExpression);
FoundryDeploymentConnectionPropertiesTests.cs (11)
31Assert.Equal("http://localhost:8080/", property.Value.ValueExpression); 36Assert.Equal("http://localhost:8080/", property.Value.ValueExpression); 41Assert.Equal("OPENAI_KEY", property.Value.ValueExpression); 46Assert.Equal(FoundryModel.Local.Phi4.Name, property.Value.ValueExpression); 51Assert.Equal(FoundryModel.Local.Phi4.Format, property.Value.ValueExpression); 56Assert.Equal(FoundryModel.Local.Phi4.Version, property.Value.ValueExpression); 74Assert.Equal("{aifoundry.outputs.aiFoundryApiEndpoint}", property.Value.ValueExpression); 79Assert.Equal("{aifoundry.outputs.aiFoundryApiEndpoint}models", property.Value.ValueExpression); 85Assert.Equal("chat", property.Value.ValueExpression); 90Assert.Equal(FoundryModel.Microsoft.Phi4.Format, property.Value.ValueExpression); 95Assert.Equal(FoundryModel.Microsoft.Phi4.Version, property.Value.ValueExpression);
ProvisioningContextProviderTests.cs (3)
395inputsInteraction.Inputs[BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs[BaseProvisioningContextProvider.LocationName].Options!.First(kvp => kvp.Key == "westus").Value; 451inputsInteraction.Inputs[BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs[BaseProvisioningContextProvider.LocationName].Options!.First(kvp => kvp.Key == "westus").Value; 556inputsInteraction.Inputs[BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs[BaseProvisioningContextProvider.LocationName].Options!.First(kvp => kvp.Key == "westus").Value;
Aspire.Hosting.Azure.WebPubSub (1)
AzureWebPubSubExtensions.cs (1)
108var hubBuilder = setting.Value;
Aspire.Hosting.Browsers (1)
BrowserLogsConfigurationManager.cs (1)
252context.Input.Options = [.. options.Select(static pair => new KeyValuePair<string, string>(pair.Key, pair.Value))];
Aspire.Hosting.Browsers.Tests (3)
BrowserLogsBuilderExtensionsTests.cs (2)
133Assert.Contains(profileInput.Options!, option => option.Key == "Profile 1" && option.Value == "Profile 1"); 169Assert.Contains(profileInput.Options!, option => option.Key == "Profile 1" && option.Value == "Profile 1");
src\Aspire.Hosting.Browsers\BrowserLogsConfigurationManager.cs (1)
252context.Input.Options = [.. options.Select(static pair => new KeyValuePair<string, string>(pair.Key, pair.Value))];
Aspire.Hosting.CodeGeneration.Go (3)
AtsGoCodeGenerator.cs (3)
700=> $"map[{MapTypeRefToGo(typeRef.KeyType, isOptional: false)}]{MapTypeRefToGo(typeRef.ValueType, isOptional: false)}{{{string.Join(", ", obj.Select(pair => $"{AtsJsonCodeWriter.ToRelaxedJsonString(pair.Key)}: {RenderGoExportedValue(pair.Value, typeRef.ValueType!, dtoTypesById)}"))}}}", 776.OrderBy(kv => kv.Value, StringComparer.Ordinal) 1919foreach (var (typeId, implName) in _implNames.OrderBy(kv => kv.Value, StringComparer.Ordinal))
Aspire.Hosting.CodeGeneration.Java (1)
AtsJavaCodeGenerator.cs (1)
872=> $"({MapTypeRefToJava(typeRef, false, useBoxedTypes: true)})(Object)new HashMap<>(Map.ofEntries({string.Join(", ", obj.Select(pair => $"Map.entry({AtsJsonCodeWriter.ToRelaxedJsonString(pair.Key)}, {RenderJavaExportedValue(pair.Value, typeRef.ValueType!, dtoTypesById)})"))}))",
Aspire.Hosting.CodeGeneration.Java.Tests (3)
AtsJavaCodeGeneratorTests.cs (3)
390.Where(kvp => !kvp.Value.Contains("@SuppressWarnings({\"all\", \"unchecked\", \"serial\"})", StringComparison.Ordinal)) 409.Where(kvp => Regex.IsMatch(kvp.Value, @"^import\s+[\w.]+\.\*;", RegexOptions.Multiline)) 505.Select(kvp => $"// ===== {kvp.Key} =====\n{kvp.Value}"));
Aspire.Hosting.CodeGeneration.Python (5)
AtsPythonCodeGenerator.cs (1)
931=> "{" + string.Join(", ", obj.Select(pair => $"{AtsJsonCodeWriter.ToRelaxedJsonString(pair.Key)}: {RenderPythonExportedValue(pair.Value, typeRef.ValueType!, dtoTypesById, topLevel: false)}")) + "}",
PythonModuleBuilder.cs (4)
112output.Append(kvp.Value); 147output.Append(kvp.Value); 161output.Append(kvp.Value); 177output.Append(kvp.Value);
Aspire.Hosting.CodeGeneration.TypeScript (2)
AtsTypeScriptCodeGenerator.cs (2)
1331=> "{ " + string.Join(", ", obj.Select(pair => $"{RenderTypeScriptPropertyKey(pair.Key)}: {RenderTypeScriptExportedValue(pair.Value, typeRef.ValueType!, dtoTypesById)}")) + " }", 3287.Where(mapping => !string.Equals(mapping.Key, mapping.Value, StringComparison.Ordinal))
Aspire.Hosting.Containers.Tests (1)
ResourceFailureLoggingTests.cs (1)
127.Select(x => x?.Value!)];
Aspire.Hosting.Docker (5)
DockerComposeEnvironmentContext.cs (1)
157.Where(kvp => kvp.Value is EndpointReference epRef && epRef.Scheme == "https" && kvp.Key.StartsWith("services__", StringComparison.Ordinal))
DockerComposeEnvironmentResource.cs (1)
532var envVar = entry.Value;
DockerComposePublishingContext.cs (1)
158var envVar = entry.Value;
DockerComposeServiceResource.cs (2)
223var value = await this.ProcessValueAsync(kv.Value).ConfigureAwait(false); 232composeService.AddEnvironmentalVariable(variable.Key, variable.Value);
Aspire.Hosting.Docker.Tests (7)
DockerComposePublisherTests.cs (2)
982kv.Value.Resource?.Name == "yarp" && 983kv.Value.Source is ContainerMountAnnotation).Select(kv => kv.Key).ToList();
DockerComposeResourceExtensionsTests.cs (5)
22var network = Assert.Single(composeFile.Networks).Value; 40var service = Assert.Single(composeFile.Services).Value; 58var volume = Assert.Single(composeFile.Volumes).Value; 77var config = Assert.Single(composeFile.Configs).Value; 96var secret = Assert.Single(composeFile.Secrets).Value;
Aspire.Hosting.EntityFrameworkCore (3)
EFResourceBuilderExtensions.cs (3)
468startInfo.Environment[kvp.Key] = kvp.Value; 621if (isPublishMode && kvp.Value.Unprocessed is ConnectionStringReference) 626yield return new KeyValuePair<string, string>(kvp.Key, kvp.Value.Processed);
Aspire.Hosting.EntityFrameworkCore.Tests (3)
EFMigrationPipelineTests.cs (3)
746Assert.Contains(result, kvp => kvp.Key == "OTHER" && kvp.Value == "value"); 764Assert.Contains(result, kvp => kvp.Key == "ConnectionStrings__postgresdb" && kvp.Value == "Host=localhost;Database=postgresdb"); 830public IEnumerable<KeyValuePair<string, string>> EnvironmentVariables => EnvironmentVariablesWithUnprocessed.Select(kvp => new KeyValuePair<string, string>(kvp.Key, kvp.Value.Processed));
Aspire.Hosting.Foundry (6)
HostedAgent\HostedAgentBuilderExtension.cs (1)
415ctx.EnvironmentVariables["OTEL_EXPORTER_ENDPOINT"] = endpointVar.Value;
HostedAgent\HostedAgentConfiguration.cs (2)
144def.EnvironmentVariables[envVar.Key] = envVar.Value; 152options.Metadata[kvp.Key] = kvp.Value;
HostedAgent\HostedAgentOptions.cs (2)
69configuration.Metadata[kvp.Key] = kvp.Value; 74configuration.EnvironmentVariables[kvp.Key] = kvp.Value;
PromptAgent\AzurePromptAgentResource.cs (1)
273options.Metadata[kvp.Key] = kvp.Value;
Aspire.Hosting.Foundry.Tests (10)
HostedAgentExtensionTests.cs (2)
378kvp.Value == "{my-project.connectionString}"); 381kvp.Value == "Endpoint={my-project.outputs.endpoint}");
ProjectResourceTests.cs (2)
148Assert.Equal("{my-project.outputs.endpoint}", properties[0].Value.ValueExpression); 151Assert.Equal("{my-project.outputs.APPLICATION_INSIGHTS_CONNECTION_STRING}", properties[2].Value.ValueExpression);
ProjectWithReferenceTests.cs (6)
27&& kvp.Value == "{test-project.outputs.endpoint}"); 46&& kvp.Value == "{test-project.outputs.APPLICATION_INSIGHTS_CONNECTION_STRING}"); 83kvp.Key == "CHAT_MODELNAME" && kvp.Value == "chat"); 85kvp.Key == "CHAT_FORMAT" && kvp.Value == "OpenAI"); 87kvp.Key == "CHAT_VERSION" && kvp.Value == "1"); 91kvp.Key == "CHAT_AIINFERENCEURI" && kvp.Value == "{test-account.outputs.aiFoundryApiEndpoint}models");
Aspire.Hosting.Garnet.Tests (4)
ConnectionPropertiesTests.cs (4)
23Assert.Equal("{garnet.bindings.tcp.host}", property.Value.ValueExpression); 28Assert.Equal("{garnet.bindings.tcp.port}", property.Value.ValueExpression); 33Assert.Equal("{password.value}", property.Value.ValueExpression); 38Assert.Equal("redis://:{password.value}@{garnet.bindings.tcp.host}:{garnet.bindings.tcp.port}", property.Value.ValueExpression);
Aspire.Hosting.GitHub.Models.Tests (7)
ConnectionPropertiesTests.cs (7)
23Assert.Equal("https://models.github.ai/inference", property.Value.ValueExpression); 28Assert.Equal("{key.value}", property.Value.ValueExpression); 33Assert.Equal("gpt", property.Value.ValueExpression); 48Assert.Contains(properties, property => property.Key == "Uri" && property.Value.ValueExpression == "https://models.github.ai/orgs/{org.value}/inference"); 49Assert.Contains(properties, property => property.Key == "Key" && property.Value.ValueExpression == "{key.value}"); 50Assert.Contains(properties, property => property.Key == "ModelName" && property.Value.ValueExpression == "gpt"); 51Assert.Contains(properties, property => property.Key == "Organization" && property.Value.ValueExpression == "{org.value}");
Aspire.Hosting.Integration.Analyzers (7)
AspireExportAnalyzer.cs (7)
1683var methods = kvp.Value.ToArray(); 1705var exports = kvp.Value 1734var exports = kvp.Value 1842namedArgument.Value.Value is bool enabled) 1861namedArgument.Value.Value is string value) 2108namedArgument.Value.Value is bool enabled) 2489namedArgument.Value.Value is ITypeSymbol namedType)
Aspire.Hosting.Kafka.Tests (8)
AddKafkaTests.cs (6)
128Assert.Contains(config, kvp => kvp.Key == "KAFKA_LOG_DIRS" && kvp.Value == "/var/lib/kafka/data"); 146Assert.Contains(config, kvp => kvp.Key == "KAFKA_LOG_DIRS" && kvp.Value == "/var/lib/kafka/data"); 199config1.First(kvp => kvp.Key == "KAFKA_LISTENERS").Value, 200config2.First(kvp => kvp.Key == "KAFKA_LISTENERS").Value); 229Assert.Equal("kafka1", config1.First(kvp => kvp.Key == "KAFKA_CLUSTERS_0_NAME").Value); 230Assert.Equal("kafka1", config2.First(kvp => kvp.Key == "KAFKA_CLUSTERS_0_NAME").Value);
ConnectionPropertiesTests.cs (2)
22Assert.Equal("{kafka.bindings.tcp.host}", property.Value.ValueExpression); 27Assert.Equal("{kafka.bindings.tcp.port}", property.Value.ValueExpression);
Aspire.Hosting.Kubernetes (11)
Extensions\ResourceExtensions.cs (6)
85var expression = kvp.Value.ValueContainsHelmExpression 86? kvp.Value.ValueString! // If it contains an expression, its not null 87: kvp.Value.Expression // All secret values are strings 117var expression = kvp.Value.ValueContainsHelmExpression 118? kvp.Value.ValueString! // If it contains an expression, its not null 119: kvp.Value.Expression // All configmap values are strings
KubernetesResource.cs (5)
143resource.Metadata.Labels.TryAdd(label.Key, label.Value); 414if (IsUnresolvedAtPublishTime(environmentVariable.Value) && 415environmentVariable.Value is IValueProvider deferredVp) 422var value = await ProcessValueAsync(environmentContext, executionContext, environmentVariable.Value).ConfigureAwait(false); 492.Where(kvp => kvp.Value is EndpointReference epRef && epRef.Scheme == "https" && kvp.Key.StartsWith("services__", StringComparison.Ordinal))
Aspire.Hosting.Kubernetes.Tests (2)
KubernetesPublisherTests.cs (2)
232var spec = Assert.IsType<YamlMappingNode>(root.Children.Single(static entry => entry.Key is YamlScalarNode { Value: "spec" }).Value); 233var maxReplicaCount = Assert.IsType<YamlScalarNode>(spec.Children.Single(static entry => entry.Key is YamlScalarNode { Value: "maxReplicaCount" }).Value);
Aspire.Hosting.Maui (1)
Utilities\MauiEnvironmentHelper.cs (1)
53environmentVariables[normalizedKey] = envVar.Value;
Aspire.Hosting.Maui.Tests (5)
MauiPlatformExtensionsTests.cs (5)
213config.ExpectedMsBuildProperties?.Select(property => $"-p:{property.Key}={property.Value}").ToArray() ?? [], 321Assert.Contains(envVars, kvp => kvp.Key == "DEBUG_MODE" && kvp.Value == "true"); 322Assert.Contains(envVars, kvp => kvp.Key == "API_TIMEOUT" && kvp.Value == "30"); 550Assert.Contains(envVars, kvp => kvp.Key == "DEBUG_MODE" && kvp.Value == "true"); 551Assert.Contains(envVars, kvp => kvp.Key == "API_TIMEOUT" && kvp.Value == "30");
Aspire.Hosting.Milvus.Tests (11)
AddMilvusTests.cs (2)
114Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__my-milvus" && kvp.Value == "Endpoint=http://localhost:19530;Key=root:pass"); 125Assert.Contains(containerConfig, kvp => kvp.Key == "ConnectionStrings__my-milvus" && kvp.Value == "Endpoint=http://my-milvus.dev.internal:19530;Key=root:pass");
ConnectionPropertiesTests.cs (9)
23Assert.Equal("{milvus.bindings.grpc.host}", property.Value.ValueExpression); 28Assert.Equal("{milvus.bindings.grpc.port}", property.Value.ValueExpression); 33Assert.Equal("root:{apiKey.value}", property.Value.ValueExpression); 38Assert.Equal("{milvus.bindings.grpc.url}", property.Value.ValueExpression); 51Assert.Contains(properties, property => property.Key == "Host" && property.Value.ValueExpression == "{milvus.bindings.grpc.host}"); 52Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{milvus.bindings.grpc.port}"); 53Assert.Contains(properties, property => property.Key == "Token" && property.Value.ValueExpression == "root:{apiKey.value}"); 54Assert.Contains(properties, property => property.Key == "Uri" && property.Value.ValueExpression == "{milvus.bindings.grpc.url}"); 55Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Vectors");
Aspire.Hosting.MongoDB.Tests (22)
AddMongoDBTests.cs (7)
174Assert.Equal("mongo", e.Value); 179Assert.Equal("27017", e.Value); 184Assert.Equal("false", e.Value); 189Assert.Equal("admin", e.Value); 194Assert.NotEmpty(e.Value); 328config1.First(kvp => kvp.Key == "ME_CONFIG_MONGODB_SERVER").Value, 329config2.First(kvp => kvp.Key == "ME_CONFIG_MONGODB_SERVER").Value);
ConnectionPropertiesTests.cs (15)
25Assert.Equal("{mongo.bindings.tcp.host}", property.Value.ValueExpression); 30Assert.Equal("{mongo.bindings.tcp.port}", property.Value.ValueExpression); 35Assert.Equal("{user.value}", property.Value.ValueExpression); 40Assert.Equal("{password.value}", property.Value.ValueExpression); 45Assert.Equal("admin", property.Value.ValueExpression); 50Assert.Equal("SCRAM-SHA-256", property.Value.ValueExpression); 55Assert.Equal("mongodb://{user.value}:{password.value}@{mongo.bindings.tcp.host}:{mongo.bindings.tcp.port}/?authSource=admin&authMechanism=SCRAM-SHA-256", property.Value.ValueExpression); 69Assert.Contains(properties, property => property.Key == "Host" && property.Value.ValueExpression == "{mongo.bindings.tcp.host}"); 70Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{mongo.bindings.tcp.port}"); 71Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "{user.value}"); 72Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}"); 73Assert.Contains(properties, property => property.Key == "AuthenticationDatabase" && property.Value.ValueExpression == "admin"); 74Assert.Contains(properties, property => property.Key == "AuthenticationMechanism" && property.Value.ValueExpression == "SCRAM-SHA-256"); 75Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Products"); 79property.Value.ValueExpression == "mongodb://{user.value}:{password.value}@{mongo.bindings.tcp.host}:{mongo.bindings.tcp.port}/Products?authSource=admin&authMechanism=SCRAM-SHA-256");
Aspire.Hosting.MySql.Tests (17)
AddMySqlTests.cs (4)
69Assert.False(string.IsNullOrEmpty(env.Value)); 108Assert.Equal("pass", env.Value); 397config1.First(kvp => kvp.Key == "PMA_HOST").Value, 398config2.First(kvp => kvp.Key == "PMA_HOST").Value);
ConnectionPropertiesTests.cs (13)
24Assert.Equal("{mysql.bindings.tcp.host}", property.Value.ValueExpression); 29Assert.Equal("{mysql.bindings.tcp.port}", property.Value.ValueExpression); 34Assert.Equal("root", property.Value.ValueExpression); 39Assert.Equal("{password.value}", property.Value.ValueExpression); 44Assert.Equal("mysql://root:{password.value}@{mysql.bindings.tcp.host}:{mysql.bindings.tcp.port}", property.Value.ValueExpression); 49Assert.Equal("jdbc:mysql://{mysql.bindings.tcp.host}:{mysql.bindings.tcp.port}", property.Value.ValueExpression); 62Assert.Contains(properties, property => property.Key == "Host" && property.Value.ValueExpression == "{mysql.bindings.tcp.host}"); 63Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{mysql.bindings.tcp.port}"); 64Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "root"); 65Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}"); 66Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Orders"); 70property.Value.ValueExpression == "mysql://root:{password.value}@{mysql.bindings.tcp.host}:{mysql.bindings.tcp.port}/Orders"); 74property.Value.ValueExpression == "jdbc:mysql://{mysql.bindings.tcp.host}:{mysql.bindings.tcp.port}/Orders");
Aspire.Hosting.Nats.Tests (5)
ConnectionPropertiesTests.cs (5)
25Assert.Equal("{nats.bindings.tcp.host}", property.Value.ValueExpression); 30Assert.Equal("{nats.bindings.tcp.port}", property.Value.ValueExpression); 35Assert.Equal("{user.value}", property.Value.ValueExpression); 40Assert.Equal("{password.value}", property.Value.ValueExpression); 45Assert.Equal("nats://{user.value}:{password.value}@{nats.bindings.tcp.host}:{nats.bindings.tcp.port}", property.Value.ValueExpression);
Aspire.Hosting.OpenAI.Tests (7)
ConnectionPropertiesTests.cs (7)
26Assert.Equal("https://contoso.ai/v1", property.Value.ValueExpression); 31Assert.Equal("https://contoso.ai/v1", property.Value.ValueExpression); 36Assert.Equal("{key.value}", property.Value.ValueExpression); 52Assert.Contains(properties, property => property.Key == "Endpoint" && property.Value.ValueExpression == "https://contoso.ai/v1"); 53Assert.Contains(properties, property => property.Key == "Uri" && property.Value.ValueExpression == "https://contoso.ai/v1"); 54Assert.Contains(properties, property => property.Key == "Key" && property.Value.ValueExpression == "{key.value}"); 55Assert.Contains(properties, property => property.Key == "ModelName" && property.Value.ValueExpression == "gpt-4o-mini");
Aspire.Hosting.Oracle.Tests (15)
AddOracleTests.cs (3)
67Assert.False(string.IsNullOrEmpty(env.Value)); 106Assert.Equal("pass", env.Value); 188Assert.Equal("pass", env.Value);
ConnectionPropertiesTests.cs (12)
24Assert.Equal("{oracle.bindings.tcp.host}", property.Value.ValueExpression); 29Assert.Equal("{oracle.bindings.tcp.port}", property.Value.ValueExpression); 34Assert.Equal("system", property.Value.ValueExpression); 39Assert.Equal("{password.value}", property.Value.ValueExpression); 44Assert.Equal("oracle://system:{password.value}@{oracle.bindings.tcp.host}:{oracle.bindings.tcp.port}", property.Value.ValueExpression); 49Assert.Equal("jdbc:oracle:thin:@//{oracle.bindings.tcp.host}:{oracle.bindings.tcp.port}", property.Value.ValueExpression); 62Assert.Contains(properties, property => property.Key == "Host" && property.Value.ValueExpression == "{oracle.bindings.tcp.host}"); 63Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{oracle.bindings.tcp.port}"); 64Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "system"); 65Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}"); 66Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Orders"); 70property.Value.ValueExpression == "jdbc:oracle:thin:@//{oracle.bindings.tcp.host}:{oracle.bindings.tcp.port}/Orders");
Aspire.Hosting.PostgreSQL.Tests (27)
AddPostgresTests.cs (13)
78Assert.Equal("scram-sha-256", env.Value); 83Assert.Equal("--auth-host=scram-sha-256 --auth-local=scram-sha-256", env.Value); 88Assert.Equal("postgres", env.Value); 93Assert.False(string.IsNullOrEmpty(env.Value)); 132Assert.Equal("scram-sha-256", env.Value); 137Assert.Equal("--auth-host=scram-sha-256 --auth-local=scram-sha-256", env.Value); 142Assert.Equal("postgres", env.Value); 147Assert.Equal("pass", env.Value); 248Assert.Equal("scram-sha-256", env.Value); 253Assert.Equal("--auth-host=scram-sha-256 --auth-local=scram-sha-256", env.Value); 258Assert.Equal("postgres", env.Value); 263Assert.Equal("pass", env.Value); 730Assert.Equal(kvp.Value, config2[kvp.Key]);
ConnectionPropertiesTests.cs (13)
24Assert.Equal("{postgres.bindings.tcp.host}", property.Value.ValueExpression); 29Assert.Equal("{postgres.bindings.tcp.port}", property.Value.ValueExpression); 34Assert.Equal("{user.value}", property.Value.ValueExpression); 39Assert.Equal("{password.value}", property.Value.ValueExpression); 44Assert.Equal("postgresql://{user.value}:{password.value}@{postgres.bindings.tcp.host}:{postgres.bindings.tcp.port}", property.Value.ValueExpression); 49Assert.Equal("jdbc:postgresql://{postgres.bindings.tcp.host}:{postgres.bindings.tcp.port}", property.Value.ValueExpression); 63Assert.Contains(properties, property => property.Key == "Host" && property.Value.ValueExpression == "{postgres.bindings.tcp.host}"); 64Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{postgres.bindings.tcp.port}"); 65Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "{user.value}"); 66Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}"); 67Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Customers"); 71property.Value.ValueExpression == "postgresql://{user.value}:{password.value}@{postgres.bindings.tcp.host}:{postgres.bindings.tcp.port}/Customers"); 75property.Value.ValueExpression == "jdbc:postgresql://{postgres.bindings.tcp.host}:{postgres.bindings.tcp.port}/Customers");
PostgresMcpBuilderTests.cs (1)
95Assert.Equal("postgresql://postgres:p%40ssw0rd1@postgres.dev.internal:5432/db", databaseUri.Value);
Aspire.Hosting.Qdrant.Tests (13)
AddQdrantTests.cs (6)
79Assert.False(string.IsNullOrEmpty(env.Value)); 151Assert.Equal("pass", env.Value); 199Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__my-qdrant" && kvp.Value == "Endpoint=http://localhost:6334;Key=pass"); 200Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__my-qdrant_http" && kvp.Value == "Endpoint=http://localhost:6333;Key=pass"); 211Assert.Contains(containerConfig, kvp => kvp.Key == "ConnectionStrings__my-qdrant" && kvp.Value == "Endpoint=http://my-qdrant.dev.internal:6334;Key=pass"); 212Assert.Contains(containerConfig, kvp => kvp.Key == "ConnectionStrings__my-qdrant_http" && kvp.Value == "Endpoint=http://my-qdrant.dev.internal:6333;Key=pass");
ConnectionPropertiesTests.cs (7)
23Assert.Equal("{qdrant.bindings.grpc.host}", property.Value.ValueExpression); 28Assert.Equal("{qdrant.bindings.grpc.port}", property.Value.ValueExpression); 33Assert.Equal("{qdrant.bindings.http.host}", property.Value.ValueExpression); 38Assert.Equal("{qdrant.bindings.http.port}", property.Value.ValueExpression); 43Assert.Equal("{apiKey.value}", property.Value.ValueExpression); 48Assert.Equal("{qdrant.bindings.grpc.url}", property.Value.ValueExpression); 53Assert.Equal("{qdrant.bindings.http.url}", property.Value.ValueExpression);
Aspire.Hosting.RabbitMQ.Tests (5)
ConnectionPropertiesTests.cs (5)
25Assert.Equal("{rabbit.bindings.tcp.host}", property.Value.ValueExpression); 30Assert.Equal("{rabbit.bindings.tcp.port}", property.Value.ValueExpression); 35Assert.Equal("{user.value}", property.Value.ValueExpression); 40Assert.Equal("{password.value}", property.Value.ValueExpression); 45Assert.Equal("amqp://{user.value}:{password.value}@{rabbit.bindings.tcp.host}:{rabbit.bindings.tcp.port}", property.Value.ValueExpression);
Aspire.Hosting.Radius (9)
Publishing\RadiusInfrastructureBuilder.cs (7)
298((IBicepValue)kv.Value.ContainerPort).LiteralValue is int literalPort ? literalPort : -1, 299((IBicepValue)kv.Value.Protocol).LiteralValue is string literalProtocol ? literalProtocol : string.Empty), 319kv => (EnvId: kv.Value.Env?.BicepIdentifier, 320AppId: kv.Value.App.BicepIdentifier)), 323kv => kv.Value.ToDictionary( 324tkv => tkv.Key, tkv => tkv.Value.BicepIdentifier)), 1139.Where(kvp => kvp.Value is EndpointReference epRef
Secrets\RadiusSecretStoreValidation.cs (2)
363if (envCollision.Value is not null) 365ThrowDuplicateName(envCollision.Value, store, identifier);
Aspire.Hosting.Radius.Tests (3)
Publishing\ConfigureRadiusInfrastructureTests.cs (1)
226entry.Value.Value!.RecipeLocation = "ghcr.io/myorg/recipes/override:v2";
Publishing\RadiusDeployParametersTests.cs (2)
40Assert.Same(secret.Resource, binding.Value); 41Assert.True(binding.Value.Secret);
Aspire.Hosting.Redis.Tests (17)
AddRedisTests.cs (13)
302Assert.Equal($"{redis1.Resource.Name}.dev.internal", item.Value); 307Assert.Equal($"{redis1.Resource.PrimaryEndpoint.TargetPort!.Value}", item.Value); 312Assert.Equal(redis1.Resource.Name, item.Value); 318Assert.Equal(redis1.Resource.PasswordParameter!.Value, item.Value); 324Assert.Equal($"{redis2.Resource.Name}.dev.internal", item.Value); 329Assert.Equal($"{redis2.Resource.PrimaryEndpoint.TargetPort!.Value}", item.Value); 334Assert.Equal(redis2.Resource.Name, item.Value); 340Assert.Equal(redis2.Resource.PasswordParameter!.Value, item.Value); 346Assert.Equal($"{redis3.Resource.Name}.dev.internal", item.Value); 351Assert.Equal($"{redis3.Resource.PrimaryEndpoint.TargetPort!.Value}", item.Value); 356Assert.Equal(redis3.Resource.Name, item.Value); 778config1.First(kvp => kvp.Key == "RI_REDIS_HOST1").Value, 779config2.First(kvp => kvp.Key == "RI_REDIS_HOST1").Value);
ConnectionPropertiesTests.cs (4)
22Assert.Equal("{redis.bindings.tcp.host}", property.Value.ValueExpression); 27Assert.Equal("{redis.bindings.tcp.port}", property.Value.ValueExpression); 32Assert.Equal("{password.value}", property.Value.ValueExpression); 37Assert.Equal("{redis.bindings.tcp.scheme}://:{password.value}@{redis.bindings.tcp.host}:{redis.bindings.tcp.port}", property.Value.ValueExpression);
Aspire.Hosting.RemoteHost (5)
Ats\AtsMarshaller.cs (1)
644dict[prop.Key] = UnmarshalFromJson(prop.Value, valueType, valueContext);
Ats\PolyglotCapabilityInvocationException.cs (1)
533var replacement = alias.Value.First();
AtsCapabilityScanner.cs (1)
577var enumType = kvp.Value;
CancellationTokenRegistry.cs (1)
164kvp.Value.Dispose();
src\Shared\IntegrationPackageProbeManifest.cs (1)
293static pair => (IReadOnlyList<string>)pair.Value,
Aspire.Hosting.RemoteHost.Tests (1)
AtsCapabilityScannerTests.cs (1)
576m => m.Key.EndsWith("/withConfiguration", StringComparison.Ordinal)).Value;
Aspire.Hosting.Rust (6)
CargoMetadataReader.cs (4)
158.Where(static pair => pair.Value.Length >= 4 || IsSensitiveEnvironmentVariableName(pair.Key)) 159.Select(static pair => pair.Value); 161.Where(static pair => IsSensitiveEnvironmentVariableName(pair.Key) || ContainsCredentialUserInfo(pair.Value)) 162.Select(static pair => pair.Value);
RustHostingExtensions.cs (2)
776dockerfile.BuildArguments[buildArgument.Key] = buildArgument.Value; 781dockerfile.BuildSecrets[buildSecret.Key] = buildSecret.Value;
Aspire.Hosting.Seq.Tests (3)
ConnectionPropertiesTests.cs (3)
22Assert.Equal("{seq.bindings.http.host}", property.Value.ValueExpression); 27Assert.Equal("{seq.bindings.http.port}", property.Value.ValueExpression); 32Assert.Equal("{seq.bindings.http.url}", property.Value.ValueExpression);
Aspire.Hosting.SqlServer.Tests (16)
AddSqlServerTests.cs (3)
68Assert.Equal("Y", env.Value); 73Assert.NotNull(env.Value); 74Assert.True(env.Value.Length >= 8);
ConnectionPropertiesTests.cs (13)
23Assert.Equal("{sql.bindings.tcp.host}", property.Value.ValueExpression); 28Assert.Equal("jdbc:sqlserver://{sql.bindings.tcp.host}:{sql.bindings.tcp.port};trustServerCertificate=true", property.Value.ValueExpression); 33Assert.Equal("{password.value}", property.Value.ValueExpression); 38Assert.Equal("{sql.bindings.tcp.port}", property.Value.ValueExpression); 43Assert.Equal("mssql://sa:{password.value}@{sql.bindings.tcp.host}:{sql.bindings.tcp.port}", property.Value.ValueExpression); 48Assert.Equal("sa", property.Value.ValueExpression); 66Assert.Equal("Orders", property.Value.ValueExpression); 71Assert.Equal("{sql.bindings.tcp.host}", property.Value.ValueExpression); 76Assert.Equal("jdbc:sqlserver://{sql.bindings.tcp.host}:{sql.bindings.tcp.port};databaseName=Orders;trustServerCertificate=true", property.Value.ValueExpression); 81Assert.Equal("{password.value}", property.Value.ValueExpression); 86Assert.Equal("{sql.bindings.tcp.port}", property.Value.ValueExpression); 91Assert.Equal("mssql://sa:{password.value}@{sql.bindings.tcp.host}:{sql.bindings.tcp.port}/Orders", property.Value.ValueExpression); 96Assert.Equal("sa", property.Value.ValueExpression);
Aspire.Hosting.Testing (6)
DistributedApplicationEntryPointInvoker.cs (5)
186var args = ((DistributedApplicationOptions Options, HostApplicationBuilderSettings InnerBuilderOptions))value.Value!; 192owner._onConstructed?.Invoke((DistributedApplicationBuilder)value.Value!); 197owner._onBuilding?.Invoke((DistributedApplicationBuilder)value.Value!); 202owner._appTcs.TrySetResult((DistributedApplication)value.Value!); 279var (options, innerBuilderOptions) = ((DistributedApplicationOptions Options, HostApplicationBuilderSettings InnerBuilderOptions))value.Value!;
DistributedApplicationFactory.cs (1)
287launchProfile = firstLaunchProfile.Value;
Aspire.Hosting.Testing.Tests (5)
DashboardUrlTests.cs (1)
358(accumulated, pair) => accumulated + " " + pair.Value);
tests\Shared\Logging\LogTestHelpers.cs (1)
31return list?.SingleOrDefault(kvp => kvp.Key == key).Value;
tests\Shared\Logging\LogValuesAssert.cs (3)
54return string.Join(",", logValues.Select(kvp => $"[{kvp.Key} {kvp.Value}]")); 61return string.Equals(x.Key, y.Key) && object.Equals(x.Value, y.Value);
Aspire.Hosting.Tests (113)
AddParameterTests.cs (2)
648Assert.Equal("One", option.Value); 653Assert.Equal("Two", option.Value);
AtsHealthCheckExportsTests.cs (3)
36Assert.Equal(HealthStatus.Degraded, entry.Value.Status); 37Assert.Equal("custom description", entry.Value.Description); 38Assert.Equal("custom value", entry.Value.Data["custom key"]);
Backchannel\BackchannelContractTests.cs (1)
397expectedDictionary.All(item => actualDictionary.TryGetValue(item.Key, out var actualValue) && item.Value == actualValue);
ConnectionPropertiesExtensionsTests.cs (1)
30dict[property.Key] = property.Value.ValueExpression;
Dashboard\DashboardEventHandlersTests.cs (1)
308Assert.Equal("true", envVars.Single(e => e.Key == "ASPIRE_DASHBOARD_PURPLE_MONKEY_DISHWASHER").Value);
Dashboard\DashboardResourceTests.cs (25)
127Assert.Equal("true", e.Value); 132Assert.Equal("http://localhost:5001", e.Value); 137Assert.Equal("http://localhost:5000", e.Value); 142Assert.Equal("Production", e.Value); 147Assert.Equal("http://localhost:5003", e.Value); 152Assert.Equal("Unsecured", e.Value); 157Assert.Equal("Unsecured", e.Value); 162Assert.Equal("http://localhost:5003", e.Value); 167Assert.Equal("Unsecured", e.Value); 172Assert.Equal("Unsecured", e.Value); 177Assert.Equal("json", e.Value); 384Assert.Equal("BrowserToken", config.Single(e => e.Key == DashboardConfigNames.DashboardFrontendAuthModeName.EnvVarName).Value); 385Assert.Equal("TestBrowserToken!", config.Single(e => e.Key == DashboardConfigNames.DashboardFrontendBrowserTokenName.EnvVarName).Value); 387Assert.Equal("ApiKey", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpAuthModeName.EnvVarName).Value); 388Assert.Equal("TestOtlpApiKey!", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpPrimaryApiKeyName.EnvVarName).Value); 424Assert.Equal("Unsecured", config.Single(e => e.Key == DashboardConfigNames.DashboardFrontendAuthModeName.EnvVarName).Value); 425Assert.Equal("Unsecured", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpAuthModeName.EnvVarName).Value); 460Assert.Equal("http://localhost:5000", config.Single(e => e.Key == DashboardConfigNames.ResourceServiceUrlName.EnvVarName).Value); 505Assert.Equal("http://localhost:5002", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpHttpUrlName.EnvVarName).Value); 506Assert.Equal(expectedAllowedOrigins, config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpCorsAllowedOriginsKeyName.EnvVarName).Value); 507Assert.Equal("*", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpCorsAllowedHeadersKeyName.EnvVarName).Value); 551Assert.Equal("https://localhost:5001", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpGrpcUrlName.EnvVarName).Value); 552Assert.Equal("https://localhost:5002", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpHttpUrlName.EnvVarName).Value); 553Assert.Equal(expectedAllowedOrigins, config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpCorsAllowedOriginsKeyName.EnvVarName).Value); 554Assert.Equal("*", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpCorsAllowedHeadersKeyName.EnvVarName).Value);
ExternalServiceTests.cs (9)
119Assert.Contains(config, kvp => kvp.Key == "services__nuget__https__0" && kvp.Value == "https://nuget.org/"); 120Assert.Contains(config, kvp => kvp.Key == "NUGET" && kvp.Value == "https://nuget.org/"); 136Assert.Contains(config, kvp => kvp.Key == "services__nuget__http__0" && kvp.Value == "http://nuget.org/"); 137Assert.Contains(config, kvp => kvp.Key == "NUGET" && kvp.Value == "http://nuget.org/"); 155Assert.Contains(config, kvp => kvp.Key == "services__nuget__https__0" && kvp.Value == "https://nuget.org/"); 156Assert.Contains(config, kvp => kvp.Key == "NUGET_HTTPS" && kvp.Value == "https://nuget.org/"); 178Assert.Contains(config, kvp => kvp.Key == "NUGET" && kvp.Value == urlValue); 563Assert.Contains(config, kvp => kvp.Key == "services__gateway__https__0" && kvp.Value == "https://gateway.example.com/orders-service/"); 564Assert.Contains(config, kvp => kvp.Key == "GATEWAY" && kvp.Value == "https://gateway.example.com/orders-service/");
KestrelConfigTests.cs (4)
151Assert.Equal("http://*:port_FirstHttpEndpoint", envVar.Value); 157Assert.Equal("http://localhost:port_SecondHttpEndpoint", envVar.Value); 162Assert.Equal("http://*:port_ExplicitProxiedHttp", envVar.Value); 167Assert.Equal("http://*:5018", envVar.Value);
Orchestrator\ApplicationOrchestratorTests.cs (1)
1262string.Join(';', kvConnectionString.Select(kv => $"{kv.Key}={kv.Value}"));
ProjectResourceTests.cs (16)
143Assert.Equal("in_memory", env.Value); 148Assert.Equal("true", env.Value); 153Assert.Equal("true", env.Value); 158Assert.Equal("http://localhost:18889", env.Value); 163Assert.Equal("grpc", env.Value); 168Assert.Equal("service.instance.id={{- index .Annotations \"otel-service-instance-id\" -}}", env.Value); 173Assert.Equal("{{- index .Annotations \"otel-service-name\" -}}", env.Value); 178var parts = env.Value.Split('='); 185Assert.Equal("1000", env.Value); 190Assert.Equal("1000", env.Value); 195Assert.Equal("1000", env.Value); 200Assert.Equal("always_on", env.Value); 205Assert.Equal("trace_based", env.Value); 210Assert.Equal("true", env.Value); 215Assert.Equal("true", env.Value); 220Assert.Equal("simple", env.Value);
ResourceExtensionsTests.cs (10)
230Assert.Equal("single-node", env.Value); 235Assert.Equal("true", env.Value); 240Assert.Equal("p@ssw0rd1", env.Value); 265Assert.Equal("single-node", env.Value); 270Assert.Equal("true", env.Value); 275Assert.Equal("p@ssw0rd1", env.Value); 300Assert.Equal("single-node", env.Value); 305Assert.Equal("true", env.Value); 309Assert.Equal("{ElasticPassword.value}", env.Value); 310Assert.False(string.IsNullOrEmpty(env.Value));
ResourceFailureLoggingTests.cs (1)
85.Select(x => x?.Value!)];
Schema\SchemaTests.cs (1)
839var errorMessages = results.Details?.Where(x => x.Errors is not null).SelectMany(e => e.Errors!).Select(e => e.Value);
SecretsStoreTests.cs (2)
90.Where(kvp => kvp.Value != null) 91.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
UserSecretsParameterDefaultTests.cs (4)
117var value = kvp.Value; 135Assert.Equal(kvp.Value, userSecrets[kvp.Key]); 402if (kvp.Value != null) 404secrets[kvp.Key] = kvp.Value;
WithEnvironmentTests.cs (3)
327Assert.Equal("""{{- portForServing "container1_primary" -}}""", pair.Value); 350Assert.Single(runConfig, kvp => kvp.Key == envVarName && kvp.Value == sourceCon); 356Assert.Single(publishConfig, kvp => kvp.Key == envVarName && kvp.Value == "{sourceService.connectionString}");
WithReferenceTests.cs (27)
416Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "123"); 520Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__bob" && kvp.Value == "123"); 544Assert.Contains(config, kvp => kvp.Key == "services__petstore__default__0" && kvp.Value == "https://petstore.swagger.io/v2"); 545Assert.Contains(config, kvp => kvp.Key == "petstore" && kvp.Value == "https://petstore.swagger.io/v2"); 561Assert.Contains(config, kvp => kvp.Key == "services__petstore__default__0" && kvp.Value == "https://petstore.swagger.io/"); 562Assert.Contains(config, kvp => kvp.Key == "petstore" && kvp.Value == "https://petstore.swagger.io/"); 583Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb"); 586Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST" && kvp.Value == "localhost"); 587Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT" && kvp.Value == "5432"); 608Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb"); 611Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST" && kvp.Value == "localhost"); 612Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT" && kvp.Value == "5432"); 633Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb"); 636Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST" && kvp.Value == "localhost"); 637Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT" && kvp.Value == "5432"); 660Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb"); 663Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST" && kvp.Value == "localhost"); 664Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT" && kvp.Value == "5432"); 685Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb"); 715Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST" && kvp.Value == "localhost"); 716Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT" && kvp.Value == "5432"); 741Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb"); 763Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__bob" && kvp.Value == "Server=localhost;Database=mydb"); 764Assert.Contains(config, kvp => kvp.Key == "BOB_HOST" && kvp.Value == "localhost"); 765Assert.Contains(config, kvp => kvp.Key == "BOB_PORT" && kvp.Value == "5432"); 785Assert.Contains(config, kvp => kvp.Key == "RESOURCE_WITH_DASH_HOST" && kvp.Value == "localhost"); 786Assert.Contains(config, kvp => kvp.Key == "RESOURCE_WITH_DASH_PORT" && kvp.Value == "5432");
WithTerminalTests.cs (2)
1189environment.Single(pair => pair.Key == KnownConfigNames.TerminalHostParentProcessId).Value); 1193environment.Single(pair => pair.Key == KnownConfigNames.TerminalHostParentProcessStartedStable).Value);
Aspire.Hosting.TestUtilities (4)
tests\Shared\Logging\LogTestHelpers.cs (1)
31return list?.SingleOrDefault(kvp => kvp.Key == key).Value;
tests\Shared\Logging\LogValuesAssert.cs (3)
54return string.Join(",", logValues.Select(kvp => $"[{kvp.Key} {kvp.Value}]")); 61return string.Equals(x.Key, y.Key) && object.Equals(x.Value, y.Value);
Aspire.Hosting.Valkey.Tests (4)
ConnectionPropertiesTests.cs (4)
23Assert.Equal("{valkey.bindings.tcp.host}", property.Value.ValueExpression); 28Assert.Equal("{valkey.bindings.tcp.port}", property.Value.ValueExpression); 33Assert.Equal("{password.value}", property.Value.ValueExpression); 38Assert.Equal("valkey://:{password.value}@{valkey.bindings.tcp.host}:{valkey.bindings.tcp.port}", property.Value.ValueExpression);
Aspire.Hosting.Yarp (2)
YarpEnvConfigGenerator.cs (2)
49FlattenToEnvVars(environmentVariables, kvp.Value, $"{prefix}__{kvp.Key}"); 56FlattenToEnvVars(environmentVariables, kvp.Value, $"{prefix}__{kvp.Key}");
Aspire.Hosting.Yarp.Tests (4)
YarpConfigGeneratorTests.cs (4)
235_validClusters.Select(c => new YarpCluster(c, c.Destinations!.First().Value.Address)).ToList()); 239sb.AppendLine($"{variable.Key}={variable.Value}"); 254_validClusters.Select(c => new YarpCluster(c, c.Destinations!.First().Value.Address)).ToList()); 258Assert.IsType<string>(variable.Value);
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests (2)
tests\Aspire.Azure.Security.KeyVault.Tests\MockTransport.cs (2)
116protected override IEnumerable<HttpHeader> EnumerateHeaders() => _headers.Select(h => new HttpHeader(h.Key, JoinHeaderValue(h.Value))); 207protected override IEnumerable<HttpHeader> EnumerateHeaders() => _headers.Select(h => new HttpHeader(h.Key, JoinHeaderValue(h.Value)));
Aspire.NATS.Net.Tests (1)
AspireNatsClientExtensionsTests.cs (1)
271Assert.Contains(activity.Tags, kvp => kvp.Key == "messaging.system" && kvp.Value == "nats");
Aspire.Playground.Tests (4)
tests\Shared\Logging\LogTestHelpers.cs (1)
31return list?.SingleOrDefault(kvp => kvp.Key == key).Value;
tests\Shared\Logging\LogValuesAssert.cs (3)
54return string.Join(",", logValues.Select(kvp => $"[{kvp.Key} {kvp.Value}]")); 61return string.Equals(x.Key, y.Key) && object.Equals(x.Value, y.Value);
Aspire.RabbitMQ.Client.Tests (7)
AspireRabbitMQLoggingTests.cs (7)
172Assert.Equal("System.InvalidOperationException", errorEvent[0].Value); 175Assert.Equal(exceptionMessage, errorEvent[1].Value); 178Assert.Contains("AspireRabbitMQLoggingTests.TestException", errorEvent[2].Value?.ToString()); 218Assert.Equal("System.InvalidOperationException", errorEvent[0].Value); 221Assert.Equal(exceptionMessage, errorEvent[1].Value); 224Assert.Contains("AspireRabbitMQLoggingTests.TestException", errorEvent[2].Value?.ToString()); 227Assert.Equal($"{innerException.GetType()}: {innerException.Message}", errorEvent[3].Value?.ToString());
Aspire.RabbitMQ.Client.v6.Tests (7)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (7)
172Assert.Equal("System.InvalidOperationException", errorEvent[0].Value); 175Assert.Equal(exceptionMessage, errorEvent[1].Value); 178Assert.Contains("AspireRabbitMQLoggingTests.TestException", errorEvent[2].Value?.ToString()); 218Assert.Equal("System.InvalidOperationException", errorEvent[0].Value); 221Assert.Equal(exceptionMessage, errorEvent[1].Value); 224Assert.Contains("AspireRabbitMQLoggingTests.TestException", errorEvent[2].Value?.ToString()); 227Assert.Equal($"{innerException.GetType()}: {innerException.Message}", errorEvent[3].Value?.ToString());
Aspire.StackExchange.Redis (2)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (2)
129var parent = entry.Value.Activity; 134var session = entry.Value.Session;
Aspire.StackExchange.Redis.DistributedCaching.Tests (3)
DistributedCacheConformanceTests.cs (3)
74Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis"); 79Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis"); 84Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis");
Aspire.StackExchange.Redis.OutputCaching.Tests (3)
OutputCacheConformanceTests.cs (3)
74Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis"); 79Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis"); 84Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis");
Aspire.StackExchange.Redis.Tests (1)
AspireRedisExtensionsTests.cs (1)
296Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis");
Aspire.Templates.Tests (4)
tests\Shared\TemplatesTesting\AspireProject.cs (2)
194AppHostProcess.StartInfo.Environment[item.Key] = item.Value; 195_testOutput.WriteLine($"\t[{item.Key}] = {item.Value}");
tests\Shared\TemplatesTesting\ToolCommand.cs (2)
249_testOutput.WriteLine($"{_msgPrefix}\t[{item.Key}] = {item.Value}"); 250psi.Environment[item.Key] = item.Value;
Binding.Http.IntegrationTests (1)
BasicHttpBindingTests.4.0.0.cs (1)
173message.Content.Headers.Add(header.Key, header.Value);
BlazorHosted.ClientServiceDefaults (2)
BackgroundExportHandler.cs (2)
93headers.Add(new(header.Key, header.Value.ToArray())); 112clone.Headers.TryAddWithoutValidation(header.Key, header.Value);
BlazorStandalone.ClientServiceDefaults (2)
BackgroundExportHandler.cs (2)
97headers.Add(new(header.Key, header.Value.ToArray())); 116clone.Headers.TryAddWithoutValidation(header.Key, header.Value);
Client.ClientBase.IntegrationTests (1)
ClientBaseTestHelpers.cs (1)
24return keyValue.Value;
CodeStyleConfigFileGenerator (1)
Program.cs (1)
127if (AddRule(rule.Value))
ConfigurationSchemaGenerator (1)
ConfigSchemaEmitter.cs (1)
750Write(writer, pair.Value, options);
crossgen2 (15)
Program.cs (15)
178var module = _typeSystemContext.GetModuleFromPath(inputFile.Value); 182Console.WriteLine(SR.IgnoringCompositeImage, inputFile.Value); 185_allInputFilePaths.Add(inputFile.Key, inputFile.Value); 186inputFilePaths.Add(inputFile.Key, inputFile.Value); 190compositeRootPath = Path.GetDirectoryName(inputFile.Value); 203var module = _typeSystemContext.GetModuleFromPath(unrootedInputFile.Value); 206_allInputFilePaths.Add(unrootedInputFile.Key, unrootedInputFile.Value); 207unrootedInputFilePaths.Add(unrootedInputFile.Key, unrootedInputFile.Value); 211compositeRootPath = Path.GetDirectoryName(unrootedInputFile.Value); 287singleCompilationInputFilePaths.Add(inputFile.Key, inputFile.Value); 312var tmpOutFile = inputFile.Value.Replace(".dll", ".ni.dll.tmp"); 313var outFile = inputFile.Value.Replace(".dll", ".ni.dll"); 334string inFilePath = e.Current.Value; 363EcmaModule module = typeSystemContext.GetModuleFromPath(inputFile.Value); 377EcmaModule module = typeSystemContext.GetModuleFromPath(unrootedInputFile.Value);
csc (3)
src\roslyn\src\Compilers\Shared\BuildProtocol.cs (1)
379WriteLengthPrefixedString(writer, pair.Value);
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
484envBlock.Append(kvp.Value); 647startInfo.EnvironmentVariables[kvp.Key] = kvp.Value;
dotnet (65)
_generated\103\WorkloadSearchVersionsJsonSerializerContext.DictionaryStringDictionaryStringString.g.cs (1)
60DictionaryStringStringSerializeHandler(writer, entry.Value);
_generated\104\WorkloadSearchVersionsJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\113\WorkloadHistoryJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\165\TelemetryDiskLoggerJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\28\RunFileApiJsonSerializerContext.IReadOnlyDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\6\CliSchemaJsonSerializerContext.DictionaryStringArgumentDetails.g.cs (1)
60global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, ArgumentDetails);
_generated\7\CliSchemaJsonSerializerContext.DictionaryStringCommandDetails.g.cs (1)
60CommandDetailsSerializeHandler(writer, entry.Value);
_generated\72\GlobalJsonWorkloadSetsJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\8\CliSchemaJsonSerializerContext.DictionaryStringOptionDetails.g.cs (1)
60global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, OptionDetails);
_generated\90\InstallStateJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
CommandFactory\CommandFactoryUsingResolver.cs (1)
114psi.Environment.Add(environmentVariable.Key, environmentVariable.Value);
CommandFactory\CommandSpec.cs (1)
23EnvironmentVariables.Add(environmentVariable.Key, environmentVariable.Value);
Commands\MSBuild\MSBuildLogger.cs (2)
267stringProperties[kvp.Key] = kvp.Value.ToString(CultureInfo.InvariantCulture); 284if (int.TryParse(kvp.Value, CultureInfo.InvariantCulture, out int count))
Commands\New\BuiltInTemplatePackageProvider.cs (8)
97var majorMinorDirVersion = new Version(dirInfo.Value.Major, dirInfo.Value.Minor); 101string coreAppVersion = $"{dirInfo.Value.Major}.{dirInfo.Value.Minor}"; 103|| dirInfo.Value.CompareTo(currentHighest.version) > 0) 105bestVersionsByBucket[coreAppVersion] = (dirInfo.Key, dirInfo.Value); 110return [.. bestVersionsByBucket.OrderBy(x => x.Value.version).Select(x => x.Value.path)];
Commands\Restore\RestoringCommand.cs (1)
123.ToDictionary(kvp => kvp.Key, kvp => kvp.Value, StringComparer.OrdinalIgnoreCase) is { } filteredList ? new(filteredList) : ReadOnlyDictionary<string, string>.Empty;
Commands\Test\MTP\IPC\Serializers\HandshakeMessageSerializer.cs (1)
45WriteField(stream, property.Value);
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.Help.cs (7)
139if (!commandOptionNames.Contains(option.Value.Name!)) 141if (option.Value.IsBuiltIn!.Value) 143builtInOptions.Add(option.Value); 147nonBuiltInOptions.Add(option.Value); 174foreach ((string module, string[] relatedOptions) in group.Value) 193groupedModules.Add(([.. kvp.Value], kvp.Key.Split(','))); 252foreach ((string[] modules, string[] missingOptions) in groupedModules.Value)
Commands\Test\MTP\SolutionAndProjectUtility.cs (2)
227globalProperties.Add(property.Key, property.Value); 239globalProperties.Add(property.Key, property.Value);
Commands\Test\MTP\Terminal\TerminalTestReporter.cs (2)
1373var assemblies = _assemblies.Select(asm => asm.Value).OrderBy(a => a.Assembly).Where(a => a is not null).ToList(); 1435var assemblies = _assemblies.Select(asm => asm.Value).Where(a => a is not null).OrderBy(a => a.Assembly).ToList();
Commands\Test\MTP\Terminal\TestNodeResultsState.cs (1)
54.Select(d => d.Value)
Commands\Test\MTP\Terminal\TestProgressState.cs (1)
386flaky.Add((entry.Value, _testUidToResults[entry.Key].Attempts));
Commands\Test\MTP\TestApplication.cs (2)
302processStartInfo.Environment[entry.Key] = entry.Value; 1123messageBuilder.AppendLine($"{kvp.Key}: {kvp.Value}");
Commands\Test\MTP\TestApplicationHandler.cs (1)
662logMessageBuilder.AppendLine($"{GetHandshakePropertyName(property.Key)}: {property.Value}");
Commands\Workload\GlobalJsonWorkloadSetFile.cs (1)
74if (updatedVersion == null || updatedVersion != kvp.Value)
Commands\Workload\Install\WorkloadGarbageCollector.cs (3)
59WorkloadSetsToKeep.AddRange(_workloadSets.Where(kvp => kvp.Value != GCAction.Collect).Select(kvp => kvp.Key)); 60ManifestsToKeep.AddRange(_manifests.Where(kvp => kvp.Value != GCAction.Collect).Select(kvp => kvp.Key)); 81_workloadSets = installedWorkloadSets.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.IsBaselineWorkloadSet ? GCAction.KeepWithoutPacks : GCAction.Collect);
Commands\Workload\Install\WorkloadManifestUpdater.Managed.cs (6)
171new ManifestVersion(m.Value.Split('/')[0]), 172m.Value.Split('/')[1])); 179kvp => (kvp.Key, new ManifestVersionWithBand(kvp.Value.Version, kvp.Value.FeatureBand)))); 205return versions.Select(kvp => (kvp.Key, new ManifestVersionWithBand(kvp.Value.Version, kvp.Value.FeatureBand)));
Commands\Workload\InstallingWorkloadCommand.cs (1)
348!currentInstallState.Manifests.All(m => oldInstallState.Manifests.TryGetValue(m.Key, out var val) && val.Equals(m.Value))))
Commands\Workload\List\WorkloadListCommand.cs (1)
119table.AddColumn(CliCommandStrings.WorkloadSourceColumn, workload => workload.Value);
Commands\Workload\Search\WorkloadSearchVersionsCommand.cs (2)
147table.AddColumn(CliCommandStrings.WorkloadManifestFeatureBandColumn, manifest => manifest.Value.FeatureBand.ToString()); 148table.AddColumn(CliCommandStrings.WorkloadManifestVersionColumn, manifest => manifest.Value.Version.ToString());
Commands\Workload\WorkloadHistoryRecord.cs (1)
79hc.Add(kvp.Value);
Commands\Workload\WorkloadInfoHelper.cs (1)
216reporter.WriteLine($" {workload.Value,align}");
ShellShim\ShellShimRepository.cs (1)
153FileAccessRetrier.RetryOnMoveAccessFailure(() => _fileSystem.File.Move(kvp.Value, kvp.Key));
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26424.106\contentFiles\cs\net11.0\BuildProtocol.cs (1)
379WriteLengthPrefixedString(writer, pair.Value);
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26424.106\contentFiles\cs\net11.0\BuildServerConnection.cs (2)
484envBlock.Append(kvp.Value); 647startInfo.EnvironmentVariables[kvp.Key] = kvp.Value;
Telemetry\TelemetryClient.cs (3)
371.Select(p => new KeyValuePair<string, object?>(p.Key, p.Value)); 373.Where(p => p.Value is not null) 374.Select(p => new KeyValuePair<string, object?>(p.Key, p.Value))
ToolPackage\LocalToolsResolverCache.cs (2)
49.Select(pair => ConvertToCacheRow(pair.Key, pair.Value)); 62mapWithSamePackageId.Value));
dotnet-aot (12)
_generated\24\TelemetryDiskLoggerJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\60\InstallStateJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\7\CliSchemaJsonSerializerContext.DictionaryStringArgumentDetails.g.cs (1)
60global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, ArgumentDetails);
_generated\8\CliSchemaJsonSerializerContext.DictionaryStringCommandDetails.g.cs (1)
60CommandDetailsSerializeHandler(writer, entry.Value);
_generated\9\CliSchemaJsonSerializerContext.DictionaryStringOptionDetails.g.cs (1)
60global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, OptionDetails);
src\sdk\src\Cli\dotnet\CommandFactory\CommandFactoryUsingResolver.cs (1)
114psi.Environment.Add(environmentVariable.Key, environmentVariable.Value);
src\sdk\src\Cli\dotnet\Commands\Workload\WorkloadInfoHelper.cs (1)
216reporter.WriteLine($" {workload.Value,align}");
src\sdk\src\Cli\dotnet\Telemetry\TelemetryClient.cs (3)
371.Select(p => new KeyValuePair<string, object?>(p.Key, p.Value)); 373.Where(p => p.Value is not null) 374.Select(p => new KeyValuePair<string, object?>(p.Key, p.Value))
src\sdk\src\Cli\dotnet\ToolPackage\LocalToolsResolverCache.cs (2)
49.Select(pair => ConvertToCacheRow(pair.Key, pair.Value)); 62mapWithSamePackageId.Value));
dotnet-format (6)
Analyzers\AnalyzerFormatter.cs (4)
170LogDiagnosticLocations(solution, result.Diagnostics.SelectMany(kvp => kvp.Value), options.SaveFormattedFiles, options.ChangesAreErrors, logger, options.LogLevel, formattedFiles); 172return result.Diagnostics.ToImmutableDictionary(kvp => kvp.Key.Id, kvp => kvp.Value.Select(diagnostic => diagnostic.Id).ToImmutableHashSet()); 210var reportedDiagnostics = projectDiagnostics.SelectMany(kvp => kvp.Value).Distinct().ToImmutableArray(); 249var hasDiagnostics = result.Diagnostics.Any(kvp => kvp.Value.Count > 0);
Analyzers\SolutionCodeFixApplier.cs (1)
32.SelectMany(kvp => kvp.Value)
Utilities\ProcessRunner.cs (1)
186processStartInfo.EnvironmentVariables[pair.Key] = pair.Value;
dotnet-openapi (2)
Commands\BaseCommand.cs (1)
198var version = urlPackages != null && urlPackages.TryGetValue(packageId, out var urlPackageVersion) ? urlPackageVersion : kvp.Value;
ProjectExtensions.cs (1)
17item.Xml.AddMetadata(kvp.Key, kvp.Value, expressAsAttribute: true);
dotnet-svcutil-lib (69)
CommandProcessorOptions.cs (2)
666var invalidNamespaces = this.NamespaceMappings.Where(nm => !CodeDomHelpers.IsValidNameSpace(nm.Value)); 670invalidNamespaces.Select(n => $"'{n.Key},{n.Value}'").Aggregate((msg, n) => $"{msg}, {n}")));
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentSchemaValidator.cs (1)
488defaultNS = _nameTable.Add(pair.Value);
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaInfo.cs (2)
363_elementDecls.Add(entry.Key, entry.Value); 370_elementDeclsByType.Add(entry.Key, entry.Value);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (1)
2172defaultNS = _nameTable.Add(pair.Value);
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (3)
2710Tuple<Type, string> key = new Tuple<Type, string>(item.Value.LocalType, item.Key); 2716freeLocalQueue.Enqueue(item.Value); 2721freeLocalQueue.Enqueue(item.Value);
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (2)
1179if (ShouldBeReplaced(pair.Value, structMapping.TypeDesc.Type, out replacedInfo)) 1194memberInfos[pair.Key] = pair.Value;
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigator.cs (1)
1984mngr.AddNamespace(pair.Key, pair.Value);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (6)
58DataContract dataContract = pair.Value; 80string clrNamespace = pair.Value; 267DataContract dataContract = pair.Value; 988if (dataContract.StableName != pair.Key && !dataContract.KnownDataContracts.ContainsKey(pair.Key) && !pair.Value.IsBuiltInDataContract) 989dataContract.KnownDataContracts.Add(pair.Key, pair.Value); 1318memberNames.Add(pair.Key, pair.Value);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (2)
29_kvpValue = kvPair.Value; 1512return new KeyValue<K, V>(current.Key, current.Value);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (2)
45Add(pair.Key, pair.Value); 52ProcessedContracts.Add(pair.Key, pair.Value);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeaderCollection.cs (1)
133if (count != pair.Value)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPool.cs (1)
97if (poolEntry.Value.CloseIfEmpty())
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (4)
36if (!httpHeaders.TryAddWithoutValidation(header.Key, header.Value)) 41header.Value, 53object value = property.Value; 117webHeaders[header.Key] = String.Join(",", header.Value);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageBuffer.cs (1)
100IDisposable disposable = _properties[i].Value as IDisposable;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (7)
428this[property.Key] = property.Value; 766if (pair.Value == null) 768UpdateProperty(pair.Key, pair.Value, true); 776if (pair.Value == null) 785return value.Equals(pair.Value); 838if (pair.Value == null) 848if (!value.Equals(pair.Value))
FrameworkFork\System.ServiceModel\System\ServiceModel\Configuration\SecurityElementBase.cs (4)
166if (!AreTokenParameterCollectionsMatching(operation1.Value.Endorsing, stp2.Endorsing, exactMessageSecurityVersion)) 169if (!AreTokenParameterCollectionsMatching(operation1.Value.SignedEncrypted, stp2.SignedEncrypted, exactMessageSecurityVersion)) 172if (!AreTokenParameterCollectionsMatching(operation1.Value.Signed, stp2.Signed, exactMessageSecurityVersion)) 175if (!AreTokenParameterCollectionsMatching(operation1.Value.SignedEndorsing, stp2.SignedEndorsing, exactMessageSecurityVersion))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ImportedPolicyConversionContext.cs (9)
67_operationBindingAssertions[entry.Key].AddRange(new MaxItemsEnumerable<XmlElement>(entry.Value, remainingAssertionsAllowed)); 73_messageBindingAssertions[entry.Key].AddRange(new MaxItemsEnumerable<XmlElement>(entry.Value, remainingAssertionsAllowed)); 79_faultBindingAssertions[entry.Key].AddRange(new MaxItemsEnumerable<XmlElement>(entry.Value, remainingAssertionsAllowed)); 261digits[i] = new KeyValuePair<K, IEnumerator<V>>(kvp.Key, kvp.Value.GetEnumerator()); 262if (!(digits[i].Value.MoveNext())) 267counterValue[digits[i].Key] = digits[i].Value.Current; 282for (currentDigit = 0; currentDigit < digits.Length && !digits[currentDigit].Value.MoveNext(); currentDigit++) 286digits[currentDigit].Value.MoveNext(); 300counterValue[digits[i].Key] = digits[i].Value.Current;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (7)
2351if (policyDocument.Value.NamespaceURI != MetadataStrings.WSPolicy.NamespaceUri 2352&& policyDocument.Value.NamespaceURI != MetadataStrings.WSPolicy.NamespaceUri15) 2354string warningMsg = string.Format(SRServiceModel.UnrecognizedPolicyDocumentNamespace, policyDocument.Value.NamespaceURI); 2359if (PolicyHelper.GetNodeType(policyDocument.Value) != PolicyHelper.NodeType.Policy) 2361string warningMsg = string.Format(SRServiceModel.UnsupportedPolicyDocumentRoot, policyDocument.Value.Name); 2366string key = CreateKeyFromPolicy(policyDocument.Key, policyDocument.Value); 2374_externalPolicyDictionary.Add(key, policyDocument.Value);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (2)
287multipleHeaderValues[headerDescription.Index].Value.Add(item); 319parameters[i] = multipleHeaderValues[i].Value.ToArray(multipleHeaderValues[i].Key);
ImportModule.cs (3)
224contractGenerator.NamespaceMappings.Add(namespaceMapping.Key, namespaceMapping.Value); 326dcOptions.Namespaces[namespaceMapping.Key] = namespaceMapping.Value; 348importOptions.ClrNamespace = options.NamespaceMappings.FirstOrDefault(m => m.Key == "*").Value;
Shared\MSBuildProj.cs (1)
985this._resolvedProperties[entry.Key] = entry.Value;
Shared\Options\ApplicationOptions.cs (2)
225var option = p.Value; 228}).Select(o => o.Value);
Shared\Options\OptionsSerializer.cs (4)
63ReadOption(option, jPropInfo.Value); 70var jOptionsObject = jPropInfo.Value as JObject ?? throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidOptionValueFormat, jPropInfo.Value?.Type, option.SerializationName)); 110ReadOption(option, jProperty.Value);
Shared\Options\OptionValueParser.cs (1)
135value = $"{pair.Key}, {pair.Value}";
dotnet-svcutil-lib.Tests (1)
TestInit.cs (1)
416failureMessage += string.Format(g_DiffBaselineErrorFormat, diffLines.Value.Key, diffLines.Value.Value, baseline, generated);
dotnet-user-jwts (7)
_generated\5\JwtSerializerContext.IDictionaryStringJwt.g.cs (1)
60JwtSerializeHandler(writer, entry.Value);
_generated\6\JwtSerializerContext.IDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
Commands\ClearCommand.cs (1)
76JwtAuthenticationSchemeSettings.RemoveScheme(appsettingsFilePath, jwt.Value.Scheme);
Commands\CreateCommand.cs (1)
218optionsString += $"{Resources.JwtPrint_CustomClaims}: [{string.Join(", ", claims.Select(kvp => $"{kvp.Key}={kvp.Value}"))}]{Environment.NewLine}";
Commands\ListCommand.cs (1)
87var jwt = jwtRow.Value;
Helpers\DevJwtCliHelpers.cs (1)
281: string.Join(", ", jwt.CustomClaims.Select(kvp => $"{kvp.Key}={kvp.Value}"));
Helpers\JwtIssuer.cs (1)
46identity.AddClaims(claimsToAdd.Select(kvp => new Claim(kvp.Key, kvp.Value)));
dotnet-user-secrets (6)
_generated\0\SecretManagerJsonSerializerContext.IDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
Internal\ListCommand.cs (2)
48context.Reporter.Output(Resources.FormatMessage_Secret_Value_Format(secret.Key, secret.Value)); 58secrets[item.Key] = item.Value;
Internal\SecretsStore.cs (2)
92.Where(i => i.Value != null) 93.ToDictionary(i => i.Key, i => i.Value, StringComparer.OrdinalIgnoreCase);
Internal\SetCommand.cs (1)
78context.SecretStore.Set(k.Key, k.Value);
dotnet-watch (2)
Watch\MSBuildFileSetResult.cs (1)
31.Select(entry => new StaticFileItem() { FilePath = entry.Key, StaticWebAssetPath = entry.Value }));
Watch\StaticFileHandler.cs (1)
59var tasks = refreshRequests.Select(request => request.Key.UpdateStaticAssetsAsync(request.Value, cancellationToken).AsTask());
DotNetWatchTasks (2)
FileSetSerializer.cs (1)
65projectItem.Value.PrepareForSerialization();
src\sdk\src\Dotnet.Watch\dotnet-watch\Watch\MSBuildFileSetResult.cs (1)
31.Select(entry => new StaticFileItem() { FilePath = entry.Key, StaticWebAssetPath = entry.Value }));
EventSourceGenerator (1)
EventSourceGenerator.Parser.cs (1)
111string value = arg.Value.Value?.ToString();
GenerateDocumentationAndConfigFiles (46)
Program.cs (10)
556DiagnosticDescriptor descriptor = ruleById.Value; 668foreach (var rule in assemblymetadata.Value.rules) 671var descriptor = rule.Value.rule; 694writer.Write("typeName", rule.Value.typeName); 696if (rule.Value.languages?.Length > 0) 700foreach (var language in rule.Value.languages.OrderBy(l => l, StringComparer.InvariantCultureIgnoreCase)) 795DiagnosticDescriptor descriptor = ruleById.Value; 1256if (!sortedRulesById.Any(r => !shouldSkipRule(r.Value))) 1266addRule(rule.Value); 1447if (AddRule(rule.Value, category))
src\b310f676f7308b7f\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
241foreach (var (symbol, write) in SymbolsWriteBuilder.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key))
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
44kvp.Value.Free();
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (1)
57this.Add(kv.Key, kv.Value);
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
747var replacementPrefix = kv.Value;
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
711builder.AddRange(kvp.Value); 833result.Add(entry.Key, createMembers(entry.Value)); 876var namedTypes = getOrCreateNamedTypes(entry.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
186&& EqualityComparer<TValue>.Default.Equals(value, pair.Value); 240result[item.Key] = item.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (2)
49readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 53readonly object? IDictionaryEnumerator.Value => Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
119=> Add(item.Key, item.Value); 127Add(pair.Key, pair.Value); 149&& EqualityComparer<TValue>.Default.Equals(value, item.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (1)
25public readonly TValue Current => _enumerator.Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (9)
210Add(pair.Key, pair.Value); 218Add(pair.Key, pair.Value); 271=> Add(keyValuePair.Key, keyValuePair.Value); 276if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 287if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234return new DictionaryEntry(_current.Key, _current.Value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1261return new DictionaryEntry(_current.Key, _current.Value); 1287return _current.Value;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
650dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
139wildcardNamesBuilder.ToImmutableDictionaryAndFree(x => x.Key, x => x.Value.ToImmutableDictionaryAndFree(), wildcardNamesBuilder.Comparer));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
81var added = instance.TryAdd(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
81instance.Add(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
80var severity = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
59this.Add(kv.Key, kv.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
48=> SymbolWritesMap.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key); 61return kvp.Value;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
25backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePair.Create(p.Value, p.Key))))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
239if (predicate(entry.Key, entry.Value, arg))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
236var importContainer = addImportsService.GetImportContainer(root, context, importToSyntax.First().Value, options); 247selector: kvp => kvp.Value);
GetDocument.Insider (4)
Commands\GetDocumentCommand.cs (1)
78keyValuePair.Value.Assembly = Assembly.Load(new AssemblyName(keyValuePair.Key));
src\44e1214b125d320f\HostFactoryResolver.cs (3)
343_configure?.Invoke(value.Value!); 347_hostTcs.TrySetResult(value.Value!); 357arbitraryAction.Invoke(value.Value);
ILAssembler (1)
GrammarVisitor.cs (1)
3401ParserRuleContext context = undefinedLabel.Value;
ilc (2)
Program.cs (2)
190EcmaModule module = typeSystemContext.GetModuleFromPath(inputFile.Value); 210EcmaModule module = typeSystemContext.GetModuleFromPath(inputFile.Value);
ILCompiler.Compiler (59)
Compiler\AnalysisBasedMetadataManager.cs (3)
189if ((pair.Value & MetadataCategory.RuntimeMapping) != 0) 208if ((pair.Value & MetadataCategory.RuntimeMapping) != 0) 217if ((pair.Value & MetadataCategory.RuntimeMapping) != 0)
Compiler\BodySubstitutionParser.cs (2)
251_bodySubstitutions[kvp.Key] = kvp.Value; 254_fieldSubstitutions[kvp.Key] = kvp.Value;
Compiler\Dataflow\ArrayValue.cs (5)
81if (!otherArr.IndexValues.TryGetValue(kvp.Key, out ValueBasicBlockPair value) || !kvp.Value.Equals(value)) 96foreach (SingleValue v in kvp.Value.Value.AsEnumerable()) 101newValue.IndexValues.Add(kvp.Key, new ValueBasicBlockPair(kvp.Value.Value.DeepCopy(), kvp.Value.BasicBlockIndex)); 115$"({element.Key},({string.Join(",", element.Value.Value.AsEnumerable())}))")));
Compiler\DependencyAnalysis\DehydratedDataNode.cs (3)
86Array.Sort(relocSort, (x, y) => y.Value.CompareTo(x.Value)); 95if (relocSort[i].Value < 3)
Compiler\DependencyAnalysis\ExternalTypeMapNode.cs (3)
40var (targetType, trimmingTargetType) = entry.Value; 61var (targetType, trimmingTargetType) = entry.Value; 86var (targetType, trimmingTargetType) = entry.Value;
Compiler\DependencyAnalysis\GenericVirtualMethodTableNode.cs (2)
104foreach (var implementationEntry in gvmEntry.Value) 108MethodDesc implementationMethod = implementationEntry.Value;
Compiler\DependencyAnalysis\InterfaceGenericVirtualMethodTableNode.cs (4)
159vertex = nativeFormatWriter.GetTuple(vertex, nativeFormatWriter.GetUnsignedConstant((uint)gvmEntry.Value.Count)); 160foreach (object impl in gvmEntry.Value) 203vertex = nativeFormatWriter.GetTuple(vertex, nativeFormatWriter.GetUnsignedConstant((uint)currentImpl.Value.Count)); 204foreach (var ifaceId in currentImpl.Value)
Compiler\ManifestResourceBlockingPolicy.cs (2)
59set.UnionWith(item.Value); 69copy.Add(moduleSet.Key, moduleSet.Value);
Compiler\MetadataManager.cs (1)
853methodMetadataMappings[methodMapping.Key] = writer.GetRecordHandle(methodMapping.Value);
Compiler\MstatObjectDumper.cs (3)
180blobs.LoadConstantI4(b.Value); 188deduplicatedMethods.LoadConstantI4(d.Value.Count); 189foreach (var o in d.Value)
Compiler\ReachabilityInstrumentationProvider.cs (2)
186builder.EmitInt(item.Value.Length); 188foreach (ExternSymbolMappedField field in item.Value)
Compiler\TypePreinit.cs (2)
108values.Add(new KeyValuePair<FieldDesc, ISerializableValue>(kvp.Key, kvp.Value)); 3795_fieldValues.Add(field.Key, field.Value);
Compiler\UsageBasedMetadataManager.cs (1)
1002yield return new ReflectableEntity<T>(entry.Key, entry.Value);
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (1)
310ModuleCycleInfo cycleInfo = actualProblem.Value;
src\runtime\src\coreclr\tools\Common\Compiler\ObjectDataInterner.cs (1)
70if (!b.TryGetValue(kvp.Key, out ISymbolNode value) || value != kvp.Value)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\OutputInfoBuilder.cs (2)
190if (symbolMethodPair.Value.Method.GetTypicalMethodDefinition() is EcmaMethod ecmaMethod) 195methodInfo.Name = FormatMethodName(symbolMethodPair.Value.Method, typeNameFormatter);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\PEObjectWriter.cs (1)
689List<ushort> entries = kv.Value;
src\runtime\src\coreclr\tools\Common\Compiler\TypeMapMetadata.cs (3)
170AddAssociatedTypeMapEntry(kvp.Key, kvp.Value); 200AddExternalTypeMapEntry(kvp.Key, kvp.Value.type, kvp.Value.trimmingTarget);
src\runtime\src\coreclr\tools\Common\Compiler\Win32Resources\ResourceData.cs (11)
138return _resTypeHeadID.SelectMany(typeIdPair => SelectResType(typeIdPair.Key, typeIdPair.Value)) 139.Concat(_resTypeHeadName.SelectMany(typeNamePair => SelectResType(typeNamePair.Key, typeNamePair.Value))); 143return resType.NameHeadID.SelectMany(nameIdPair => SelectResName(type, nameIdPair.Key, nameIdPair.Value)) 145SelectResName(type, nameNamePair.Key, nameNamePair.Value))); 150return resType.Languages.Select((lang) => (name, type, lang.Key, lang.Value.DataEntry)); 206resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable))); 210resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key))); 220resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable))); 224resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key))); 234resLanguages.Add(new Tuple<ResLanguage, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key))); 242foreach (ObjectDataBuilder.Reservation reservation in name.Value)
src\runtime\src\coreclr\tools\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (3)
184yield return new KeyValuePair<TypeSystemEntity, EntityHandle>(item.Key, item.Value); 189yield return new KeyValuePair<TypeSystemEntity, EntityHandle>(item.Key, item.Value); 194yield return new KeyValuePair<TypeSystemEntity, EntityHandle>(item.Key, item.Value);
src\runtime\src\tools\illink\src\ILLink.Shared\DataFlow\DefaultValueDictionary.cs (3)
63if (!Get(kvp.Key).Equals(kvp.Value)) 88sb.AppendLine().Append('\t').Append(kvp.Key.ToString()).Append(" -> ").Append(kvp.Value.ToString()); 105var value = kvp.Value;
src\runtime\src\tools\illink\src\ILLink.Shared\DataFlow\DictionaryLattice.cs (1)
33TValue rightValue = kvp.Value;
ILCompiler.MetadataTransform (3)
ILCompiler\Metadata\MetadataTransformResult.cs (1)
103if (entry.Value is Method m)
Internal\Metadata\NativeFormat\Writer\NativeMetadataWriter.cs (2)
214res.Add(kv.Key, Visit(src, kv.Value, true)); 436Log(keyValue.Value);
ILCompiler.ReadyToRun (69)
Compiler\CallChainProfile.cs (4)
78foreach (var methodAndHitCount in keyAndMethods.Value) 93resolvedProfileData[resolvedKeyMethod][resolvedCalledMethod] += methodAndHitCount.Value; 314foreach (var calledMethodAndCount in key.Value) 316Console.WriteLine($"\t{calledMethodAndCount.Key.ToString()} -> {calledMethodAndCount.Value} calls");
Compiler\DependencyAnalysis\ReadyToRun\CopiedMethodILDeduplicator.cs (1)
54symbolRemapping.TryAdd(entry.Key, entry.Value);
Compiler\DependencyAnalysis\ReadyToRun\InliningInfoNode.cs (4)
180List<EcmaMethod> sortedInliners = new List<EcmaMethod>(inlineeWithInliners.Value.Count); 181foreach (var inliner in inlineeWithInliners.Value) 245EcmaMethod[] sortedInliners = new EcmaMethod[inlineeWithInliners.Value.Count]; 246inlineeWithInliners.Value.CopyTo(sortedInliners);
Compiler\DependencyAnalysis\ReadyToRun\ManifestMetadataTableNode.cs (1)
304AssemblyNameInfo assemblyName = idAndAssemblyName.Value;
Compiler\FileLayoutOptimizer.cs (2)
292foreach (KeyValuePair<MethodDesc, int> callee in methodProfile.Value.Where(kvp => methodMap.ContainsKey(kvp.Key))) 294callList.Add(new CallerCalleeCount(methodProfile.Key, callee.Key, callee.Value));
Compiler\PettisHansenSort\PettisHansen.cs (5)
46AddEdge(i, kvp.Key.Index, kvp.Value); 47AddEdge(kvp.Key.Index, i, kvp.Value); 66queue.Enqueue((i, kvp.Key), -kvp.Value); // PriorityQueue gives lowest prio first 137AddEdge(winner, edge.Key, edge.Value); 138AddEdge(edge.Key, winner, edge.Value);
Compiler\ProfileData.cs (2)
86mergedCallWeights[entry.Key] = initialWeight + entry.Value; 90mergedCallWeights[entry.Key] = entry.Value;
Compiler\ProfileDataManager.cs (2)
480List<MethodDesc> list = new(kvp.Value); 487List<TypeDesc> list = new(kvp.Value);
Compiler\ReadyToRunExternalTypeMapNode.cs (1)
81yield return new DependencyListEntry(importProvider.GetImportToType(entry.Value.type, TriggeringModule), $"External type map entry target for key '{entry.Key}'");
Compiler\ReadyToRunProxyTypeMapNode.cs (1)
82yield return new DependencyListEntry(importProvider.GetImportToType(entry.Value, TriggeringModule), $"Proxy type map entry target for key '{entry.Key}'");
Compiler\ReadyToRunTypeMapManager.cs (2)
42yield return new ReadyToRunExternalTypeMapNode(triggeringModule, map.Key, map.Value, _importReferenceProvider); 50yield return new ReadyToRunProxyTypeMapNode(triggeringModule, map.Key, map.Value, _importReferenceProvider);
Compiler\TypeMapAssemblyTargetsNode.cs (6)
47if (map.Value.TargetModules.Count == 0 && map.Value.HasAssemblyTargetAttributes) 52foreach (var targetModule in map.Value.TargetModules) 78if (map.Value.TargetModules.Count == 0 && map.Value.HasAssemblyTargetAttributes) 84foreach (var targetModule in map.Value.TargetModules)
IBC\IBCProfileData.cs (4)
37case nameof(FormatVersion): config.FormatVersion = kvPair.Value; break; 38case nameof(Os): config.Os = kvPair.Value; break; 39case nameof(Arch): config.Arch = kvPair.Value; break; 40case nameof(Runtime): config.Runtime = kvPair.Value; break;
ObjectWriter\MapFileBuilder.cs (3)
170Array.Sort(relocTypeCounts, (a, b) => b.Value.CompareTo(a.Value)); 176writer.Write($"{relocTypeCount.Value,8} | ");
ObjectWriter\ProfileFileBuilder.cs (3)
138_symbolMethodMap.Add(kvpSymbolMethod.Value.Method, kvpSymbolMethod.Key); 163foreach (KeyValuePair<MethodDesc, int> kvpCalleeCount in kvpCallerCalleeCount.Value) 183callCount: kvpCalleeCount.Value,
src\runtime\src\coreclr\tools\aot\ILCompiler.Reflection.ReadyToRun\PEReaderExtensions.cs (1)
119Console.Error.WriteLine($" '{kvp.Key}': {kvp.Value}");
src\runtime\src\coreclr\tools\Common\Compiler\ObjectDataInterner.cs (1)
70if (!b.TryGetValue(kvp.Key, out ISymbolNode value) || value != kvp.Value)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\OutputInfoBuilder.cs (2)
190if (symbolMethodPair.Value.Method.GetTypicalMethodDefinition() is EcmaMethod ecmaMethod) 195methodInfo.Name = FormatMethodName(symbolMethodPair.Value.Method, typeNameFormatter);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\PEObjectWriter.cs (1)
689List<ushort> entries = kv.Value;
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WebCilObjectWriter.cs (1)
316List<ushort> entries = kv.Value;
src\runtime\src\coreclr\tools\Common\Compiler\TypeMapMetadata.cs (3)
170AddAssociatedTypeMapEntry(kvp.Key, kvp.Value); 200AddExternalTypeMapEntry(kvp.Key, kvp.Value.type, kvp.Value.trimmingTarget);
src\runtime\src\coreclr\tools\Common\Compiler\Win32Resources\ResourceData.cs (11)
138return _resTypeHeadID.SelectMany(typeIdPair => SelectResType(typeIdPair.Key, typeIdPair.Value)) 139.Concat(_resTypeHeadName.SelectMany(typeNamePair => SelectResType(typeNamePair.Key, typeNamePair.Value))); 143return resType.NameHeadID.SelectMany(nameIdPair => SelectResName(type, nameIdPair.Key, nameIdPair.Value)) 145SelectResName(type, nameNamePair.Key, nameNamePair.Value))); 150return resType.Languages.Select((lang) => (name, type, lang.Key, lang.Value.DataEntry)); 206resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable))); 210resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key))); 220resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable))); 224resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key))); 234resLanguages.Add(new Tuple<ResLanguage, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key))); 242foreach (ObjectDataBuilder.Reservation reservation in name.Value)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
663pin.Value.Free();
src\runtime\src\coreclr\tools\Common\JitInterface\JitConfigProvider.cs (1)
103_config[param.Key] = param.Value;
src\runtime\src\coreclr\tools\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (3)
184yield return new KeyValuePair<TypeSystemEntity, EntityHandle>(item.Key, item.Value); 189yield return new KeyValuePair<TypeSystemEntity, EntityHandle>(item.Key, item.Value); 194yield return new KeyValuePair<TypeSystemEntity, EntityHandle>(item.Key, item.Value);
TypeSystem\Mutable\MutableModule.cs (3)
220if (!Entities.ContainsKey(MetadataTokens.GetToken(item.Value))) 222Entities.Add(MetadataTokens.GetToken(item.Value), item.Key); 223ExistingEntities.Add(item.Key, MetadataTokens.GetToken(item.Value));
ILCompiler.RyuJit (13)
src\runtime\src\coreclr\tools\aot\ILCompiler.ReadyToRun\Compiler\PettisHansenSort\PettisHansen.cs (5)
46AddEdge(i, kvp.Key.Index, kvp.Value); 47AddEdge(kvp.Key.Index, i, kvp.Value); 66queue.Enqueue((i, kvp.Key), -kvp.Value); // PriorityQueue gives lowest prio first 137AddEdge(winner, edge.Key, edge.Value); 138AddEdge(edge.Key, winner, edge.Value);
src\runtime\src\coreclr\tools\aot\ILCompiler.ReadyToRun\Compiler\ProfileData.cs (2)
86mergedCallWeights[entry.Key] = initialWeight + entry.Value; 90mergedCallWeights[entry.Key] = entry.Value;
src\runtime\src\coreclr\tools\aot\ILCompiler.ReadyToRun\IBC\IBCProfileData.cs (4)
37case nameof(FormatVersion): config.FormatVersion = kvPair.Value; break; 38case nameof(Os): config.Os = kvPair.Value; break; 39case nameof(Arch): config.Arch = kvPair.Value; break; 40case nameof(Runtime): config.Runtime = kvPair.Value; break;
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
663pin.Value.Free();
src\runtime\src\coreclr\tools\Common\JitInterface\JitConfigProvider.cs (1)
103_config[param.Key] = param.Value;
illink (17)
ILLink.RoslynAnalyzer (11)
DataFlow\LocalDataFlowVisitor.cs (1)
1154new CapturedTargetValue<TValue>(evaluatedTargetValue.Value));
DataFlow\LValueFlowCaptureProvider.cs (1)
85var kind = kvp.Value;
RequiresAnalyzerBase.cs (1)
318var url = requiresAttribute?.NamedArguments.FirstOrDefault(na => na.Key == "Url").Value.Value?.ToString();
RequiresISymbolExtensions.cs (1)
46if (namedArg.Key == "ExcludeStatics" && namedArg.Value.Value is bool b)
src\runtime\src\tools\illink\src\ILLink.Shared\DataFlow\DefaultValueDictionary.cs (3)
63if (!Get(kvp.Key).Equals(kvp.Value)) 88sb.AppendLine().Append('\t').Append(kvp.Key.ToString()).Append(" -> ").Append(kvp.Value.ToString()); 105var value = kvp.Value;
src\runtime\src\tools\illink\src\ILLink.Shared\DataFlow\DictionaryLattice.cs (1)
33TValue rightValue = kvp.Value;
TrimAnalysis\ArrayValue.cs (3)
62if (!otherArr.IndexValues.TryGetValue(kvp.Key, out MultiValue value) || !kvp.Value.Equals(value)) 78foreach (SingleValue v in kvp.Value.AsEnumerable()) 84newArray.IndexValues.Add(kvp.Key, kvp.Value.DeepCopy());
ILLink.Tasks (3)
CreateRuntimeRootDescriptorFile.cs (3)
351foreach ((var fs, var members) in featureSwitchMembers.Select(kv => (kv.Key, kv.Value))) 376AddXmlTypeNode(doc, featureAssemblyNode, type.Key, type.Value); 386AddXmlTypeNode(doc, assemblyNode, type.Key, type.Value);
Infrastructure.Tests (12)
Pipelines\NpmCliPackageTests.cs (1)
723property => property.Value?.GetValue<string>() ?? throw new InvalidOperationException($"JSON property '{property.Key}' is not a string."),
PowerShellScripts\PowerShellCommand.cs (2)
235_testOutput.WriteLine($"{_msgPrefix}\t[{item.Key}] = {item.Value}"); 236psi.Environment[item.Key] = item.Value;
TestTriggerMap\TestTriggerMapTests.cs (1)
299var broken = expected.Where(kvp => referenced.Contains(kvp.Key) && !kvp.Value())
tools\GenerateCITimeline\GitHubApi.cs (3)
120var val = kv.Value.Count == 1 ? kv.Value[0] : $"[{string.Join(",", kv.Value)}]";
tools\GenerateCITimeline\TimelineRenderer.cs (2)
293.OrderByDescending(kv => kv.Value) 295.Select(kv => $"<code>{E(kv.Key)}</code>: {kv.Value}")
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (2)
44Assert.Equal("read", ((YamlScalarNode)entry.Value).Value); 48var gateJob = Assert.IsType<YamlMappingNode>(Assert.Single(jobs.Children).Value);
WorkflowScripts\ExtensionReleaseWorkflowTests.cs (1)
704if (jobEntry.Value is not YamlMappingNode job
installer.tasks (3)
GenerateFileVersionProps.cs (3)
109.Where(p => (p.Value.FileVersion ?? ZeroVersion) == ZeroVersion) 110.Select(p => p.Value.File.ItemSpec) 141var versions = fileData.Value;
Microsoft.Analyzers.Extra (3)
CallAnalyzer.Registrar.cs (3)
73foreach (var m in pair.Value) 151foreach (var m in pair.Value) 207foreach (var m in pair.Value)
Microsoft.Analyzers.Local (4)
CallAnalyzer.Registrar.cs (3)
73foreach (var m in pair.Value) 151foreach (var m in pair.Value) 207foreach (var m in pair.Value)
JsonObject.cs (1)
168keys[i] = new KeyValuePair(property.Key, property.Value);
Microsoft.Analyzers.Local.Tests (1)
JsonObjectTest.cs (1)
80Assert.True(obj.Contains(((KeyValuePair<string, JsonValue>)value).Value));
Microsoft.Arcade.Common (1)
Helpers.cs (1)
81public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> pair, out TKey key, out TValue value) { key = pair.Key; value = pair.Value; }
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
552app.Properties[item.Key] = item.Value;
Microsoft.AspNetCore.Analyzers (1)
StartupAnalysisBuilder.cs (1)
37v => v.Value.ToImmutableArray()));
Microsoft.AspNetCore.App.Analyzers (3)
Mvc\DetectOverriddenAuthorizeAttribute.cs (1)
126return (bool)arg.Value.Value!;
RouteEmbeddedLanguage\Infrastructure\RoutePatternParametersDetector.cs (1)
55var routeParameterNameConstant = namedArgument.Value;
src\aspnetcore\src\Shared\RoslynUtils\SymbolExtensions.cs (1)
287var routeParameterNameConstant = namedArgument.Value;
Microsoft.AspNetCore.Authentication (2)
PropertiesSerializer.cs (1)
56writer.Write(item.Value ?? string.Empty);
TicketSerializer.cs (1)
149writer.Write(property.Value ?? string.Empty);
Microsoft.AspNetCore.Authentication.Cookies (1)
CookieAuthenticationHandler.cs (1)
145newProperties.Items[item.Key] = item.Value;
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
333parameters.Add(additionalParameter.Key, additionalParameter.Value);
Microsoft.AspNetCore.Authentication.OpenIdConnect (6)
OpenIdConnectHandler.cs (6)
121message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 136message = new OpenIdConnectMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 325var message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 464message.Parameters.Add(additionalParameter.Key, additionalParameter.Value); 648authorizationResponse = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 675authorizationResponse = new OpenIdConnectMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
Microsoft.AspNetCore.Authentication.Twitter (5)
TwitterHandler.cs (5)
205signatureParts.Add(queryParameter.Key, queryParameter.Value); 212signatureParts.Add(formItem.Key, formItem.Value); 219stringBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}={1}&", Uri.EscapeDataString(signaturePart.Key), Uri.EscapeDataString(signaturePart.Value)); 241stringBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}={1}&", queryParam.Key, queryParam.Value); 251stringBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}=\"{1}\",", authorizationPart.Key, Uri.EscapeDataString(authorizationPart.Value));
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationHandler.cs (2)
164wsFederationMessage = new WsFederationMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 474var message = new WsFederationMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
Microsoft.AspNetCore.Authorization (5)
src\aspnetcore\src\Shared\Debugger\DebuggerHelpers.cs (5)
46if (HasValue(kvp.Value) || includeNullValues) 64if (kvp.Value is null) 68else if (kvp.Value is string s) 72else if (kvp.Value is IEnumerable enumerable) 90sb.Append(kvp.Value);
Microsoft.AspNetCore.Components (33)
DynamicComponent.cs (1)
101builder.AddComponentParameter(1, entry.Key, entry.Value);
ParameterView.cs (1)
308builder.Add(kvp.Key, kvp.Value);
Reflection\MemberAssignment.cs (2)
51if (item.Value is PropertyInfo property) 57var list = (List<PropertyInfo>)item.Value;
Rendering\RenderTreeBuilder.cs (1)
456AddAttribute(sequence, attribute.Key, attribute.Value);
RenderTree\RenderTreeDiffBuilder.cs (2)
296var value = keyValuePair.Value; 532InsertNewFrame(ref diffContext, kvp.Value);
RouteView.cs (1)
92builder.AddComponentParameter(1, kvp.Key, kvp.Value);
Routing\RouteTable.cs (2)
42if (kvp.Value is string value) 92if (kvp.Value is string value)
src\aspnetcore\src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (8)
258Add(kvp.Key, kvp.Value); 348values[i] = array[i].Value; 360Add(item.Key, item.Value); 411return TryGetValue(item.Key, out var value) && EqualityComparer<object>.Default.Equals(value, item.Value); 495if (index >= 0 && EqualityComparer<object>.Default.Equals(array[index].Value, item.Value)) 567value = array[index].Value; 737value = array[i].Value;
src\aspnetcore\src\Http\Routing\src\Patterns\RoutePatternFactory.cs (5)
465updatedDefaults.Add(kvp.Key, kvp.Value); 499var found = RouteValueEqualityComparer.Default.Equals(string.Empty, kvp.Value); 518RouteValueEqualityComparer.Default.Equals(kvp.Value, defaultValue)) 527$"'{kvp.Key}={kvp.Value}'. A non-null required value must correspond to a route parameter or the " + 537? parameterPolicyReferences.ToDictionary(kvp => kvp.Key, kvp => (IReadOnlyList<RoutePatternParameterPolicyReference>)kvp.Value.ToArray())
src\aspnetcore\src\Http\Routing\src\Patterns\RoutePatternMatcher.cs (2)
194values.Add(kvp.Key, kvp.Value); 495values[item.Key] = item.Value;
src\aspnetcore\src\Http\Routing\src\RouteConstraintBuilder.cs (3)
58if (kvp.Value.Count == 1) 60constraint = kvp.Value[0]; 64constraint = new CompositeRouteConstraint(kvp.Value.ToArray());
src\aspnetcore\src\Http\Routing\src\RouteConstraintMatcher.cs (1)
63var constraint = kvp.Value;
src\aspnetcore\src\Shared\Components\ComponentsActivityLinkStore.cs (3)
50var link = kvp.Value.Item1; 51var tag = kvp.Value.Item2; 58targetActivity.SetTag(tag.Value.Key, tag.Value.Value);
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
Microsoft.AspNetCore.Components.AI.SourceGenerators (1)
ToolBlockParser.cs (1)
229if (namedArg.Key == "Name" && namedArg.Value.Value is string nameOverride && !string.IsNullOrEmpty(nameOverride))
Microsoft.AspNetCore.Components.Analyzers (2)
ComponentFacts.cs (1)
68return kvp.Value.Value as bool? ?? false;
StateHasChangedAnalyzer.cs (1)
153var locations = methodAndLocations.Value;
Microsoft.AspNetCore.Components.Endpoints (23)
_generated\2\ImportMapSerializerContext.IReadOnlyDictionaryStringIReadOnlyDictionaryStringString.g.cs (1)
60IReadOnlyDictionaryStringStringSerializeHandler(writer, entry.Value);
_generated\25\BrowserOptionsJsonContext.IDictionaryStringJsonElement.g.cs (1)
60global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, JsonElement);
_generated\26\BrowserOptionsJsonContext.IDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\3\ImportMapSerializerContext.IReadOnlyDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\56\PrerenderComponentApplicationStoreSerializerContext.DictionaryStringByteArray.g.cs (1)
60WriteByteArrayValue(writer, entry.Value);
Assets\ImportMapDefinition.cs (4)
40_imports = imports?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 41_integrity = integrity?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 44kvp => kvp.Value.ToDictionary(scopeKvp => scopeKvp.Key, scopeKvp => scopeKvp.Value) as IReadOnlyDictionary<string, string>);
BrowserConfiguration\ConfigureBrowser.cs (2)
54target.InteractiveWebAssembly.EnvironmentVariables[kvp.Key] = kvp.Value; 63target.InteractiveServer.Extensions[kvp.Key] = kvp.Value;
Builder\ResourcePreloadCollection.cs (1)
48group.Value.Sort((a, b) => a.PreloadOrder.CompareTo(b.PreloadOrder));
Forms\DataAnnotationsClientValidationProvider.cs (1)
107writer.Param(kvp.Key, kvp.Value);
RazorComponentEndpointHost.cs (1)
59builder.AddComponentParameter(1, kvp.Key, kvp.Value);
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (2)
87server.Saved.Add(kvp.Key, kvp.Value); 88webAssembly.Saved.Add(kvp.Key, kvp.Value);
src\aspnetcore\src\Shared\Components\ComponentsActivityLinkStore.cs (3)
50var link = kvp.Value.Item1; 51var tag = kvp.Value.Item2; 58targetActivity.SetTag(tag.Value.Key, tag.Value.Value);
TempData\TempData.cs (4)
103_data[kvp.Key] = kvp.Value; 139((IDictionary<string, object?>)this).Add(item.Key, item.Value); 144return ContainsKey(item.Key) && Equals(Peek(item.Key), item.Value); 154if (ContainsKey(item.Key) && Equals(Peek(item.Key), item.Value))
Microsoft.AspNetCore.Components.Forms (3)
EditContext.cs (3)
124state.Value.IsModified = false; 138if (state.Value.IsModified) 159foreach (var message in state.Value.GetValidationMessages())
Microsoft.AspNetCore.Components.Media (1)
FileDownload.cs (1)
86copy.Add(kvp.Key, kvp.Value!);
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentFacts.cs (1)
68return kvp.Value.Value as bool? ?? false;
Microsoft.AspNetCore.Components.Server (7)
_generated\42\PrerenderComponentApplicationStoreSerializerContext.DictionaryStringByteArray.g.cs (1)
60WriteByteArrayValue(writer, entry.Value);
Circuits\CircuitPersistenceManager.cs (1)
168if (serverComponentDeserializer.TryDeserializeWebRootComponentDescriptor(marker.Value, out var descriptor))
src\aspnetcore\src\Components\Shared\src\RootComponentOperation.cs (1)
38var parameters = string.Join(", ", Parameters.Parameters.ToDictionary().Select(p => $"{p.Key}: {p.Value}"));
src\aspnetcore\src\Shared\Components\ComponentsActivityLinkStore.cs (3)
50var link = kvp.Value.Item1; 51var tag = kvp.Value.Item2; 58targetActivity.SetTag(tag.Value.Key, tag.Value.Value);
src\aspnetcore\src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (1)
602writer.Write(header.Value);
Microsoft.AspNetCore.Components.Testing (5)
_generated\5\E2EManifestJsonContext.DictionaryStringE2EAppEntry.g.cs (1)
60E2EAppEntrySerializeHandler(writer, entry.Value);
_generated\6\E2EManifestJsonContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
Infrastructure\PlaywrightExtensions.cs (1)
38var headers = options.ExtraHTTPHeaders?.ToDictionary(h => h.Key, h => h.Value)
Infrastructure\ServerInstance.cs (1)
187sb.Append('|').Append(kvp.Key).Append('=').Append(kvp.Value);
Infrastructure\TestServiceOverrideObserver.cs (1)
48value.Value is Microsoft.Extensions.Hosting.IHostBuilder hostBuilder)
Microsoft.AspNetCore.Components.Web (3)
_generated\6\WebRendererSerializerContext.DictionaryStringJSComponentParameterArray.g.cs (1)
60JSComponentParameterArraySerializeHandler(writer, entry.Value);
_generated\7\WebRendererSerializerContext.DictionaryStringListString.g.cs (1)
60ListStringSerializeHandler(writer, entry.Value);
Forms\InputBase.cs (1)
399result.Add(item.Key, item.Value);
Microsoft.AspNetCore.Components.WebAssembly (2)
_generated\24\PrerenderComponentApplicationStoreSerializerContext.DictionaryStringByteArray.g.cs (1)
60WriteByteArrayValue(writer, entry.Value);
src\aspnetcore\src\Components\Shared\src\RootComponentOperation.cs (1)
38var parameters = string.Join(", ", Parameters.Parameters.ToDictionary().Select(p => $"{p.Key}: {p.Value}"));
Microsoft.AspNetCore.Components.WebAssembly.Authentication (1)
Services\AccountClaimsPrincipalFactory.cs (1)
49var value = kvp.Value;
Microsoft.AspNetCore.Components.WebView (3)
_generated\6\SourceGenerationContext.DictionaryStringStaticWebAssetNode.g.cs (1)
62global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, StaticWebAssetNode);
_generated\7\SourceGenerationContext.IDictionaryStringStaticWebAssetNode.g.cs (1)
62global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, StaticWebAssetNode);
src\aspnetcore\src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
123var match = child.Value.Match;
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
393 string.Join(Environment.NewLine, headers.Select(kvp => $"{kvp.Key}: {kvp.Value}"));
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
393 string.Join(Environment.NewLine, headers.Select(kvp => $"{kvp.Key}: {kvp.Value}"));
Microsoft.AspNetCore.Connections.Abstractions (2)
ConnectionItems.cs (1)
116if (Items.TryGetValue(item.Key, out var value) && Equals(item.Value, value))
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
Microsoft.AspNetCore.CookiePolicy (1)
ResponseCookiesWrapper.cs (1)
147var value = keyValuePair.Value;
Microsoft.AspNetCore.Cors (5)
src\aspnetcore\src\Shared\Debugger\DebuggerHelpers.cs (5)
46if (HasValue(kvp.Value) || includeNullValues) 64if (kvp.Value is null) 68else if (kvp.Value is string s) 72else if (kvp.Value is IEnumerable enumerable) 90sb.Append(kvp.Value);
Microsoft.AspNetCore.DataProtection (4)
KeyManagement\XmlKeyManager.cs (1)
106keyEncryptor = keyRepositoryEncryptorPair.Value;
XmlEncryption\XmlEncryptionExtensions.cs (3)
65entry.Key.ReplaceWith(entry.Value); 151new XAttribute(XmlConstants.DecryptorTypeAttributeName, entry.Value.DecryptorType.AssemblyQualifiedName!), 152entry.Value.EncryptedElement));
Microsoft.AspNetCore.Diagnostics (8)
_generated\2\ExtensionsExceptionJsonContext.IHeaderDictionary.g.cs (1)
60StringValuesSerializeHandler(writer, entry.Value);
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
242sb.AppendLine(FormattableString.Invariant($"{pair.Key}: {pair.Value}"));
DeveloperExceptionPage\Views\ErrorPage.Designer.cs (4)
899foreach (var v in kv.Value) 1001Write(kv.Value); 1070foreach (var v in kv.Value) 1438Write(kv.Value!);
src\aspnetcore\src\Shared\Diagnostics\ActivityCreator.cs (2)
84activity.AddTag(tag.Key, tag.Value); 122activity.AddBaggage(baggageItem.Key, baggageItem.Value);
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (3)
DatabaseErrorPageMiddleware.cs (1)
164switch (keyValuePair.Value)
src\aspnetcore\src\Shared\Diagnostics\ActivityCreator.cs (2)
84activity.AddTag(tag.Key, tag.Value); 122activity.AddBaggage(baggageItem.Key, baggageItem.Value);
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Logging.g.cs (1)
35var enricher = s.TagArray[0].Value ?? "(null)";
Logging\HeaderReader.cs (1)
42var provider = _redactorProvider.GetRedactor(header.Value);
Logging\IncomingHttpRouteUtility.cs (1)
39parametersToRedact.Add(defaultParameter.Key, defaultParameter.Value);
Logging\RequestHeadersLogEnricher.cs (1)
71var redactor = _redactorProvider!.GetRedactor(header.Value);
Microsoft.AspNetCore.Diagnostics.Middleware.PerformanceTests (5)
RedactionBenchmark.cs (5)
87if (((string)item.Value!).AsSpan().SequenceEqual(segment)) 134if (item.Value is not null) 136newDict.Add((string)item.Value, item.Key); 202if (((string)item.Value!).AsSpan().SequenceEqual(segment)) 280if (((string)item.Value!).AsSpan().SequenceEqual(segment))
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (91)
Latency\Internal\HttpLatencyLogEnricherTests.cs (1)
87httpContextMock.Request.Headers[header.Key] = header.Value;
Logging\AcceptanceTests.cs (56)
233Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 234Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == TelemetryConstants.Unknown); 235Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 236Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 238x.Value != null && 239int.Parse(x.Value, CultureInfo.InvariantCulture) == SlashRouteProcessingTimeMs); 243Assert.Single(state, x => x.Key == HttpLoggingTagNames.ResponseBody && x.Value == "Server: hello!Server: world!"); 293Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 294Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == TelemetryConstants.Unknown); 295Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 296Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 298x.Value != null && 299int.Parse(x.Value, CultureInfo.InvariantCulture) == SlashRouteProcessingTimeMs); 303Assert.Single(state, x => x.Key == HttpLoggingTagNames.RequestBody && x.Value == Content); 346Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 347Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == "/myroute/123"); 348Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 349Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 351x.Value != null && 352int.Parse(x.Value, CultureInfo.InvariantCulture) == SlashRouteProcessingTimeMs); 407Assert.Single(requestState, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 408Assert.Single(requestState, x => x.Key == HttpLoggingTagNames.Path && x.Value == TelemetryConstants.Unknown); 409Assert.Single(requestState, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 410Assert.Single(requestState, x => x.Key == "Protocol" && x.Value == "HTTP/1.1"); 413Assert.Single(requestBodyState, x => x.Key == "Body" && x.Value == Content); 417Assert.Single(responseState, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 420Assert.Single(responseBodyState, x => x.Key == "Body" && x.Value == "Server: hello!Server: world!"); 423Assert.Single(durationState, x => x.Key == HttpLoggingTagNames.Duration && x.Value != null); 463Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 464Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == TelemetryConstants.Unknown); 465Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 467x.Value != null && 468int.Parse(x.Value, CultureInfo.InvariantCulture) == SlashRouteProcessingTimeMs); 470Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 507Assert.Single(state, x => x.Key == TestHttpLogEnricher.Key1 && x.Value == TestHttpLogEnricher.Value1); 508Assert.Single(state, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.InvariantCulture)); 509Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Delete.ToString()); 549Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == RequestPath); 581Assert.DoesNotContain(firstState, x => x.Key == TestHttpLogEnricher.Key1 && x.Value == TestHttpLogEnricher.Value1); 582Assert.DoesNotContain(firstState, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.InvariantCulture)); 585Assert.Single(secondState, x => x.Key == TestHttpLogEnricher.Key1 && x.Value == TestHttpLogEnricher.Value1); 586Assert.Single(secondState, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.InvariantCulture)); 635Assert.Single(secondRecord!, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 636Assert.Single(fithRecord!, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 640Assert.Single(thirdRecord, x => x.Key == HttpLoggingTagNames.Duration && x.Value != null); 641Assert.Single(sixthRecord, x => x.Key == HttpLoggingTagNames.Duration && x.Value != null); 668Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 669Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 670Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == TelemetryConstants.Unknown); 671Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == expectedStatus); 673x.Value != null && 674int.Parse(x.Value, CultureInfo.InvariantCulture) == ErrorRouteProcessingTimeMs); 709Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Put.ToString()); 710Assert.Single(state, x => x.Key == HttpLoggingTagNames.RequestBody && x.Value == Content); 711Assert.Single(state, x => x.Key == HttpLoggingTagNames.ResponseBody && x.Value == "test body"); 743Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Put.ToString());
Logging\AcceptanceTests.Mvc.cs (32)
81Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 82Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == redactedPath); 83Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 84Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 86x.Value != null && 87int.Parse(x.Value, CultureInfo.InvariantCulture) == ControllerProcessingTimeMs); 116Assert.Single(state, x => x.Key == UserIdParamName && x.Value == redactedUserId); 117Assert.Single(state, x => x.Key == NoDataClassParamName && x.Value == TelemetryConstants.Redacted); 119Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 120Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == ActionRouteTemplate); 121Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 122Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 124x.Value != null && 125int.Parse(x.Value, CultureInfo.InvariantCulture) == ControllerProcessingTimeMs); 165Assert.Single(state, x => x.Key == UserIdParamName && x.Value == redactedUserId); 166Assert.Single(state, x => x.Key == NoDataClassParamName && x.Value == NoDataClassParamValue); 170Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 172Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == expectedPath); 173Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 174Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 176x.Value != null && 177int.Parse(x.Value, CultureInfo.InvariantCulture) == ControllerProcessingTimeMs); 206Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 207Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == $"/api/users/testUserId/someTestData"); 208Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 209Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 211x.Value != null && 212int.Parse(x.Value, CultureInfo.InvariantCulture) == ControllerProcessingTimeMs); 249Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value)); 250Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == expectedPath); 251Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus); 252Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString());
Logging\HeaderReaderTests.cs (1)
63Assert.Equal($"<redacted:{MediaTypeNames.Text.Xml}>", redacted.Value);
Logging\TestLogEnrichmentTagCollector.cs (1)
19_tags.Add(kvp.Key, kvp.Value);
Microsoft.AspNetCore.Grpc.JsonTranscoding (9)
Internal\Json\EnumNameHelpers.cs (1)
98removeEnumPrefixMapping[item.Key] = item.Value;
Internal\Json\MessageTypeInfoResolver.cs (1)
56var propertyInfo = CreatePropertyInfo(typeInfo, mapping.Key, mapping.Value, isSerializable: false);
Internal\JsonRequestHelpers.cs (4)
285ServiceDescriptorHelpers.RecursiveSetValue(requestMessage, parameterDescriptor.Value.DescriptorsPath, routeValue); 297var value = item.Value.Count == 1 ? (object?)item.Value[0] : item.Value;
Internal\JsonTranscodingServerCallContext.cs (2)
157_requestHeaders.Add(header.Key, GrpcProtocolHelpers.ParseBinaryHeader(header.Value!)); 161_requestHeaders.Add(header.Key, header.Value!);
src\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
487existingParameters.Add(routeParameter.Value.DescriptorsPath.Last());
Microsoft.AspNetCore.HeaderParsing (6)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Logging.g.cs (4)
36var headerName = s.TagArray[1].Value ?? "(null)"; 37var error = s.TagArray[0].Value ?? "(null)"; 77var headerName = s.TagArray[0].Value ?? "(null)"; 117var headerName = s.TagArray[0].Value ?? "(null)";
HeaderParsingOptionsManualValidator.cs (2)
16if (item.Value < 0) 19$"Negative cached value count of {item.Value} specified for the {item.Key} header",
Microsoft.AspNetCore.Hosting (5)
_generated\6\SourceGenerationContext.DictionaryStringStaticWebAssetNode.g.cs (1)
62global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, StaticWebAssetNode);
_generated\7\SourceGenerationContext.IDictionaryStringStaticWebAssetNode.g.cs (1)
62global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, StaticWebAssetNode);
src\aspnetcore\src\Shared\Diagnostics\ActivityCreator.cs (2)
84activity.AddTag(tag.Key, tag.Value); 122activity.AddBaggage(baggageItem.Key, baggageItem.Value);
src\aspnetcore\src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
123var match = child.Value.Match;
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingAbstractionsWebHostBuilderExtensions.cs (1)
28hostBuilder.UseSetting(setting.Key, setting.Value);
Microsoft.AspNetCore.Http (18)
Features\QueryFeature.cs (1)
210_accumulator[entry.Key] = new StringValues(entry.Value.ToArray());
Features\RequestCookiesFeature.cs (1)
86headers.Add(new CookieHeaderValue(pair.Key, pair.Value).ToString());
HeaderDictionary.cs (3)
202Store.Add(item.Key, item.Value); 236!StringValues.Equals(value, item.Value)) 289if (Store.TryGetValue(item.Key, out var value) && StringValues.Equals(item.Value, value))
Internal\ItemsDictionary.cs (1)
122if (_items.TryGetValue(item.Key, out var value) && Equals(item.Value, value))
Internal\RequestCookieCollection.cs (1)
203return new KeyValuePair<string, string>(current.Key, (string)current.Value!);
Internal\ResponseCookies.cs (1)
96cookies[position] = string.Concat(keyValuePair.Key, "=", Uri.EscapeDataString(keyValuePair.Value), cookieSuffix);
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
src\aspnetcore\src\Shared\Debugger\StringValuesDictionaryDebugView.cs (1)
28keyValuePairs.Add(new DictionaryItemDebugView<string, string>(kvp.Key, kvp.Value.ToString()));
src\aspnetcore\src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (8)
189values[i] = array[i].Value; 206Add(item.Key, item.Value); 270return TryGetValue(item.Key, out var value) && EqualityComparer<object>.Default.Equals(value, item.Value); 356if (index >= 0 && EqualityComparer<TValue>.Default.Equals(array[index].Value, item.Value)) 430value = array[index].Value; 521_dictionaryStorage[item.Key] = item.Value; 584value = item.Value;
Microsoft.AspNetCore.Http.Abstractions (18)
QueryString.cs (3)
131AppendKeyValuePair(builder, pair.Key, pair.Value, first); 151if (StringValues.IsNullOrEmpty(pair.Value)) 158foreach (var value in pair.Value)
Routing\RouteValueDictionary.cs (9)
219Add(kvp.Key, kvp.Value); 258Add(kvp.Key, kvp.Value); 348values[i] = array[i].Value; 360Add(item.Key, item.Value); 411return TryGetValue(item.Key, out var value) && EqualityComparer<object>.Default.Equals(value, item.Value); 495if (index >= 0 && EqualityComparer<object>.Default.Equals(array[index].Value, item.Value)) 567value = array[index].Value; 737value = array[i].Value;
src\aspnetcore\src\Shared\Debugger\DebuggerHelpers.cs (5)
46if (HasValue(kvp.Value) || includeNullValues) 64if (kvp.Value is null) 68else if (kvp.Value is string s) 72else if (kvp.Value is IEnumerable enumerable) 90sb.Append(kvp.Value);
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
Microsoft.AspNetCore.Http.Connections (3)
Internal\HttpConnectionDispatcher.cs (1)
1023requestHeaders[header.Key] = header.Value;
Internal\HttpConnectionManager.cs (2)
149var connection = c.Value; 197tasks.Add(DisposeAndRemoveAsync(c.Value, closeGracefully: false, HttpConnectionStopStatus.AppShutdown));
Microsoft.AspNetCore.Http.Connections.Client (5)
HttpConnection.cs (4)
668if (string.IsNullOrEmpty(header.Value)) 675httpClient.DefaultRequestHeaders.Add(header.Key, header.Value); 679httpClient.DefaultRequestHeaders.Add(header.Key, header.Value); 684httpClient.DefaultRequestHeaders.Add(header.Key, header.Value);
Internal\WebSocketsTransport.cs (1)
124webSocket.Options.SetRequestHeader(header.Key, header.Value);
Microsoft.AspNetCore.Http.Extensions (4)
_generated\4\ProblemDetailsJsonContext.IDictionaryStringStringArray.g.cs (1)
60StringArraySerializeHandler(writer, entry.Value);
QueryBuilder.cs (2)
42: this(parameters.SelectMany(kvp => kvp.Value, (kvp, v) => KeyValuePair.Create(kvp.Key, v ?? string.Empty))) 81builder.Append(UrlEncoder.Default.Encode(pair.Value));
RequestDelegateFactory.cs (1)
2958errorMessage.AppendLine(FormattableString.Invariant($"{kv.Key,-19} | {kv.Value,-15}"));
Microsoft.AspNetCore.Http.Features (1)
IResponseCookies.cs (1)
36Append(keyValuePair.Key, keyValuePair.Value, options);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\aspnetcore\src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
33result.Add((entry.Key, index, entry.Value.ToImmutable()));
src\aspnetcore\src\Shared\RoslynUtils\SymbolExtensions.cs (1)
287var routeParameterNameConstant = namedArgument.Value;
Microsoft.AspNetCore.Http.Results (2)
Results.cs (1)
826problemDetails.Extensions[extension.Key] = extension.Value;
TypedResults.cs (1)
880problemDetails.Extensions[extension.Key] = extension.Value;
Microsoft.AspNetCore.HttpLogging (2)
HttpLog.cs (2)
52builder.Append(kvp.Value?.ToString()); 61builder.Append(kvp.Value?.ToString());
Microsoft.AspNetCore.InternalTesting (4)
Logging\LogValuesAssert.cs (3)
56return string.Join(",", logValues.Select(kvp => $"[{kvp.Key} {kvp.Value}]")); 63return string.Equals(x.Key, y.Key) && object.Equals(x.Value, y.Value);
xunit\AspNetTestCollectionRunner.cs (1)
44CollectionFixtureMappings.Add(mapping.Key, mapping.Value);
Microsoft.AspNetCore.Mvc.Abstractions (6)
ModelBinding\ModelStateDictionary.cs (5)
456ErrorCount += source.Value.Errors.Count - target.Errors.Count; 457target.Copy(source.Value); 522entry.Value.Errors.Clear(); 523entry.Value.ValidationState = ModelValidationState.Unvalidated; 1241Current = current.Value;
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
Microsoft.AspNetCore.Mvc.Analyzers (2)
TopLevelParameterNameAnalyzer.cs (2)
162var namedArgumentValue = namedArgument.Value; 185var namedArgumentValue = namedArgument.Value;
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
ApiResponseTypeProvider.cs (1)
123.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
DefaultApiDescriptionProvider.cs (1)
296RouteInfo = routeParameter.Value,
Microsoft.AspNetCore.Mvc.Core (35)
ApplicationModels\ApplicationModelFactory.cs (2)
139routeValues.TryAdd(kvp.Key, kvp.Value); 144routeValues.TryAdd(kvp.Key, kvp.Value);
ApplicationModels\ControllerActionDescriptorBuilder.cs (5)
153actionDescriptor.Properties[item.Key] = item.Value; 158actionDescriptor.Properties[item.Key] = item.Value; 163actionDescriptor.Properties[item.Key] = item.Value; 227actionDescriptor.RouteValues.Add(kvp.Key, kvp.Value); 236actionDescriptor.RouteValues.Add(kvp.Key, kvp.Value);
ControllerBase.cs (2)
1896problemDetails.Extensions[extension.Key] = extension.Value; 2021validationProblem.Extensions[extension.Key] = extension.Value;
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
68problemDetails.Extensions[extension.Key] = extension.Value;
ModelBinding\Binders\DictionaryModelBinder.cs (3)
159var valueMetadata = elementMetadata.Properties[nameof(KeyValuePair<TKey, TValue>.Value)]!; 181modelName: kvp.Value, 194if (kvp.Value.EndsWith(']'))
ModelBinding\JQueryKeyValuePairNormalizer.cs (1)
28dictionary[normalizedKey] = originalValue.Value;
ModelBinding\ModelBindingHelper.cs (2)
408kvp.Value.Errors.Clear(); 409kvp.Value.ValidationState = ModelValidationState.Unvalidated;
ModelBinding\UnsupportedContentTypeFilter.cs (1)
45var errors = kvp.Value.Errors;
ModelBinding\Validation\ShortFormDictionaryValidationStrategy.cs (1)
98if (_model.TryGetValue(_keyMappingEnumerator.Current.Value, out value))
ModelBinding\Validation\ValidationVisitor.cs (4)
343if (item.Value.ValidationState == ModelValidationState.Unvalidated) 345item.Value.ValidationState = ModelValidationState.Valid; 461if (entry.Value.ValidationState != ModelValidationState.Invalid) 463entry.Value.ValidationState = ModelValidationState.Skipped;
MvcCoreLoggerExtensions.cs (1)
94.Select(pair => pair.Key + "=" + Convert.ToString(pair.Value, CultureInfo.InvariantCulture))
Routing\ActionEndpointFactory.cs (2)
285if (!RouteValueEqualityComparer.Default.Equals(routeValue.Value, string.Empty)) 301updatedDefaults[routeValue.Key] = routeValue.Value;
Routing\AttributeRoute.cs (2)
84defaults.Add(kvp.Key, kvp.Value); 216kvp.Value);
Routing\DynamicControllerEndpointMatcherPolicy.cs (2)
123"{ " + string.Join(", ", dynamicValues.Select(kvp => $"{kvp.Key}: {kvp.Value}")) + " }."); 140values.TryAdd(kvp.Key, kvp.Value);
Routing\MvcAttributeRouteHandler.cs (2)
63if (!string.IsNullOrEmpty(kvp.Value)) 65context.RouteData.Values[kvp.Key] = kvp.Value;
Routing\UrlHelperBase.cs (2)
86_routeValueDictionary.Add(kvp.Key, kvp.Value); 97_routeValueDictionary.Add(kvp.Key, kvp.Value);
SerializableError.cs (1)
41var errors = keyModelStatePair.Value.Errors;
ValidationProblemDetails.cs (1)
42var errors = keyModelStatePair.Value.Errors;
Microsoft.AspNetCore.Mvc.Formatters.Xml (3)
ProblemDetailsWrapper.cs (1)
155var value = keyValuePair.Value;
SerializableErrorWrapper.cs (1)
90var value = keyValuePair.Value;
ValidationProblemDetailsWrapper.cs (1)
92var value = keyValuePair.Value;
Microsoft.AspNetCore.Mvc.NewtonsoftJson (7)
AnnotatedProblemDetails.cs (2)
25Extensions[kvp.Key] = kvp.Value; 57problemDetails.Extensions[kvp.Key] = kvp.Value;
BsonTempDataSerializer.cs (3)
62if (item.Value is JArray jArrayValue && jArrayValue.Count > 0) 83else if (item.Value is JObject jObjectValue) 110else if (item.Value is long longValue)
ValidationProblemDetailsConverter.cs (2)
61Errors[kvp.Key] = kvp.Value; 74problemDetails.Errors[kvp.Key] = kvp.Value;
Microsoft.AspNetCore.Mvc.Razor (2)
ViewLocationCacheKey.cs (2)
111!string.Equals(item.Value, yValue, StringComparison.Ordinal)) 141hashCode.Add(item.Value, StringComparer.Ordinal);
Microsoft.AspNetCore.Mvc.RazorPages (3)
Infrastructure\DynamicPageEndpointMatcherPolicy.cs (2)
122"{ " + string.Join(", ", dynamicValues.Select(kvp => $"{kvp.Key}: {kvp.Value}")) + " }."); 139values.TryAdd(kvp.Key, kvp.Value);
Infrastructure\PageActionDescriptorProvider.cs (1)
114descriptor.RouteValues.Add(kvp.Key, kvp.Value);
Microsoft.AspNetCore.Mvc.TagHelpers (6)
Cache\CacheTagKey.cs (4)
321.Append(item.Value); 340hashCode.Add(item.Value); 360!string.Equals(values1[i].Value, values2[i].Value, StringComparison.Ordinal))
TagHelperOutputExtensions.cs (2)
94tagHelperOutput.Attributes.Add(attribute.Key, attribute.Value); 103new ClassAttributeHtmlContent(classAttribute.Value, attribute.Value),
Microsoft.AspNetCore.Mvc.Testing (9)
_generated\0\CustomJsonSerializerContext.IDictionaryStringString.g.cs (1)
61writer.WriteString(entry.Key, entry.Value);
DeferredHostBuilder.cs (1)
32b.Properties[pair.Key] = pair.Value;
Handlers\RedirectHandler.cs (4)
90contentCopy.Headers.TryAddWithoutValidation(header.Key, header.Value); 91newRequestContent.Headers.TryAddWithoutValidation(header.Key, header.Value); 106redirectRequestHeaders.TryAddWithoutValidation(header.Key, header.Value); 163redirect.Options.Set(key, property.Value);
src\44e1214b125d320f\HostFactoryResolver.cs (3)
343_configure?.Invoke(value.Value!); 347_hostTcs.TrySetResult(value.Value!); 357arbitraryAction.Invoke(value.Value);
Microsoft.AspNetCore.Mvc.ViewFeatures (21)
AttributeDictionary.cs (9)
35return Get(index).Value; 207return string.Equals(item.Value, Get(index).Value, StringComparison.OrdinalIgnoreCase); 263else if (string.Equals(item.Value, Get(index).Value, StringComparison.OrdinalIgnoreCase)) 304value = Get(index).Value; 500if (string.Equals(item, _attributes.Get(i).Value, StringComparison.OrdinalIgnoreCase)) 520array[arrayIndex + i] = _attributes.Get(i).Value; 557public string? Current => _attributes.Get(_index).Value;
DefaultHtmlGenerator.cs (1)
1015.Where(kvp => string.Equals(integerString, kvp.Value, StringComparison.Ordinal))
HtmlHelper.cs (1)
1388Value = keyValuePair.Value,
Infrastructure\DefaultTempDataSerializer.cs (1)
204writer.WriteString(element.Key, element.Value);
ModelExplorerExtensions.cs (1)
57if (string.Equals(kvp.Value, enumStringValue, StringComparison.Ordinal))
Rendering\TagBuilder.cs (4)
243string.IsNullOrEmpty(attribute.Value)) 251if (attribute.Value != null) 253encoder.Encode(writer, attribute.Value); 313var value = Convert.ToString(entry.Value, CultureInfo.InvariantCulture);
TemplateBuilder.cs (2)
110if (kvp.Value == value) 126viewData[kvp.Key] = kvp.Value;
ValidationHelpers.cs (2)
69if (!entries.Contains(entry.Value)) 71entries.Add(entry.Value);
Microsoft.AspNetCore.OpenApi (6)
Schemas\OpenApiJsonSchema.Helpers.cs (2)
296schema.Properties = props?.ToDictionary(p => p.Key, p => p.Value.Schema as IOpenApiSchema); 335schema.Discriminator.Mapping[kvp.Key] = new OpenApiSchemaReference(kvp.Value);
Services\OpenApiGenerator.cs (1)
201var (_, contentTypes) = annotation.Value;
Services\Schemas\OpenApiSchemaService.cs (3)
450discriminator.Mapping[mapping.Key] = ResolveSchemaReference(document, mapping.Value); 620if (property.Value != null) 622var processedValue = ResolveReferencesRecursive(property.Value, rootSchema);
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
src\aspnetcore\src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
33result.Add((entry.Key, index, entry.Value.ToImmutable()));
Microsoft.AspNetCore.OutputCaching (4)
Memory\MemoryOutputCacheStore.cs (1)
24internal Dictionary<string, HashSet<string>> TaggedEntries => _taggedEntries.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Select(t => t.Key).ToHashSet());
OutputCacheEntry.cs (1)
95arr[index++] = (header.Key, header.Value);
OutputCacheKeyProvider.cs (1)
223var queryValueArray = queryArray[i].Value.ToArray();
Policies\VaryByValuePolicy.cs (1)
23rules.VaryByValues[result.Key] = result.Value;
Microsoft.AspNetCore.Owin (8)
DictionaryStringArrayWrapper.cs (2)
20private static KeyValuePair<string, StringValues> Convert(KeyValuePair<string, string[]> item) => new(item.Key, item.Value); 22private static KeyValuePair<string, string[]> Convert(KeyValuePair<string, StringValues> item) => new(item.Key, item.Value);
DictionaryStringValuesWrapper.cs (2)
21private static KeyValuePair<string, StringValues> Convert(KeyValuePair<string, string[]> item) => new(item.Key, item.Value); 23private static KeyValuePair<string, string[]> Convert(KeyValuePair<string, StringValues> item) => new(item.Key, item.Value);
OwinEnvironment.cs (4)
86.Where(pair => pair.Value.TryGet(_context, out _)).Select(pair => pair.Key) 214if (entryPair.Value.TryGet(_context, out value)) 221yield return new KeyValuePair<string, object>(Convert.ToString(entryPair.Key, CultureInfo.InvariantCulture), entryPair.Value); 616_contextEntries[entry.Key] = entry.Value;
Microsoft.AspNetCore.RateLimiting (1)
RateLimitingMiddleware.cs (1)
52_policyMap.Add(unactivatedPolicy.Key, unactivatedPolicy.Value(serviceProvider));
Microsoft.AspNetCore.Razor.Runtime (1)
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
650dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
Microsoft.AspNetCore.ResponseCaching (4)
CacheEntry\CacheEntryHelpers.cs (1)
27size += (item.Key.Length * sizeof(char)) + EstimateStringValuesSize(item.Value);
ResponseCachingKeyProvider.cs (1)
162var queryValueArray = queryArray[i].Value.ToArray();
ResponseCachingMiddleware.cs (2)
175response.Headers[header.Key] = header.Value; 353context.CachedResponse.Headers[header.Key] = header.Value;
Microsoft.AspNetCore.Routing (87)
DataTokensMetadata.cs (1)
36return DebuggerHelpers.GetDebugText(nameof(DataTokens), DataTokens.Select(t => $"{t.Key}={t.Value ?? "(null)"}"));
DecisionTree\DecisionTreeBuilder.cs (6)
132if (!criterion.TryGetValue(kvp.Value, out var branch)) 135criterion.Add(kvp.Value, branch); 151foreach (var criterion in criteria.OrderByDescending(c => c.Value.Count)) 155foreach (var branch in criterion.Value) 159foreach (var item in branch.Value) 172var newBranch = GenerateNode(childContext, comparer, branch.Value);
DefaultLinkGenerator.cs (1)
458builder.Append(kvp.Value);
DefaultLinkParser.cs (4)
96for (var i = 0; i < kvp.Value.Count; i++) 98var policy = _parameterPolicyFactory.Create(parameter, kvp.Value[i]); 132for (var i = 0; i < kvp.Value.Count; i++) 134var constraint = kvp.Value[i];
EndpointNameAddressScheme.cs (2)
80if (group.Key is not null && group.Value.Length > 1) 85foreach (var endpoint in group.Value)
Internal\DfaGraphWriter.cs (2)
77writer.WriteLine($"{label} -> {visited[literal.Value]} [label=\"/{literal.Key}\"]"); 95writer.WriteLine($"{label} -> {visited[policy.Value]} [label=\"{policy.Key}\"]");
Matching\AcceptsMatcherPolicy.cs (3)
183kvp.Value.Add(endpoint); 209kvp.Value.Add(endpoint); 243result[index] = new PolicyNodeEdge(kvp.Key, kvp.Value);
Matching\DfaMatcher.cs (2)
306if (!constraint.Value.Match(httpContext, NullRouter.Instance, constraint.Key, values, RouteDirection.IncomingRequest)) 308Log.CandidateRejectedByConstraint(_logger, httpContext.Request.Path, endpoint, constraint.Key, constraint.Value, values[constraint.Key]);
Matching\DfaMatcherBuilder.cs (3)
603var transition = Transition(kvp.Value); 641policyEntries[index++] = new PolicyJumpTableEdge(kvp.Key, Transition(kvp.Value)); 814var parameterPolicyReferences = kvp.Value;
Matching\DfaNode.cs (3)
86kvp.Value.Visit(visitor); 106kvp.Value.Visit(visitor); 124builder.AppendJoin(", ", Literals.Select(kvp => $"{kvp.Key}->({FormatNode(kvp.Value)})"));
Matching\DictionaryJumpTable.cs (1)
50builder.AppendJoin(", ", _dictionary.Select(kvp => $"{kvp.Key}: {kvp.Value}"));
Matching\HostMatcherPolicy.cs (4)
240kvp.Value.Add(endpoint); 257kvp.Value.Add(endpoint); 263kvp.Value.Add(endpoint); 275result[index] = new PolicyNodeEdge(kvp.Key, kvp.Value);
Matching\HttpMethodMatcherPolicy.cs (4)
239kvp.Value.Add(endpoint); 293policyNodeEdges[index++] = new PolicyNodeEdge(kvp.Key, kvp.Value); 339var destination = httpMethodDestination.Value; 346corsPreflightDestination = corsPreflightDestinations[0].Value;
Matching\NegotiationMatcherPolicy.cs (3)
285edge.Value.Add(endpoint); 317new NegotiationEdgeKey(kvp.Key, CalculateEndpointQualities(kvp.Value)), 318kvp.Value);
Patterns\DefaultRoutePatternTransformer.cs (7)
51if (RouteValueEqualityComparer.Default.Equals(kvp.Value, string.Empty)) 66!RouteValueEqualityComparer.Default.Equals(kvp.Value, defaultValue)) 79else if (RoutePattern.IsRequiredValueAny(kvp.Value)) 116RouteValueEqualityComparer.Default.Equals(kvp.Value, defaultValue)) 167!RoutePattern.IsRequiredValueAny(kvp.Value) && 169!RouteValueEqualityComparer.Default.Equals(kvp.Value, defaultValue)) 185requiredValues.TryAdd(kvp.Key, kvp.Value);
Patterns\RoutePatternFactory.cs (10)
465updatedDefaults.Add(kvp.Key, kvp.Value); 499var found = RouteValueEqualityComparer.Default.Equals(string.Empty, kvp.Value); 518RouteValueEqualityComparer.Default.Equals(kvp.Value, defaultValue)) 527$"'{kvp.Key}={kvp.Value}'. A non-null required value must correspond to a route parameter or the " + 537? parameterPolicyReferences.ToDictionary(kvp => kvp.Key, kvp => (IReadOnlyList<RoutePatternParameterPolicyReference>)kvp.Value.ToArray()) 659if (kvp.Value is IParameterPolicy parameterPolicy) 663else if (kvp.Value is string) 666policyReferences.Add(Constraint(kvp.Value)); 668else if (kvp.Value is IEnumerable multiplePolicies) 679kvp.Value ?? "null",
Patterns\RoutePatternMatcher.cs (2)
194values.Add(kvp.Key, kvp.Value); 495values[item.Key] = item.Value;
RouteBase.cs (3)
191pathData.DataTokens.Add(dataToken.Key, dataToken.Value); 215constraintBuilder.AddConstraint(kvp.Key, kvp.Value); 284destination[kvp.Key] = kvp.Value;
RouteConstraintBuilder.cs (3)
58if (kvp.Value.Count == 1) 60constraint = kvp.Value[0]; 64constraint = new CompositeRouteConstraint(kvp.Value.ToArray());
RouteConstraintMatcher.cs (2)
63var constraint = kvp.Value; 75Log.ConstraintNotMatched(logger, routeValue!, kvp.Key, kvp.Value);
RouteValuesAddress.cs (1)
33_toString ??= $"{RouteName}({string.Join(',', ExplicitValues.Select(kv => $"{kv.Key}=[{kv.Value}]"))})";
src\aspnetcore\src\Shared\Debugger\DebuggerHelpers.cs (5)
46if (HasValue(kvp.Value) || includeNullValues) 64if (kvp.Value is null) 68else if (kvp.Value is string s) 72else if (kvp.Value is IEnumerable enumerable) 90sb.Append(kvp.Value);
Template\DefaultTemplateBinderFactory.cs (2)
49for (var i = 0; i < kvp.Value.Count; i++) 51var parameterPolicy = _policyFactory.Create(parameter, kvp.Value[i]);
Template\TemplateBinder.cs (8)
258var value = slots[i].Value; 359var value = slots[i + parameterCount].Value; 368if (!RoutePartsEqual(value, filters[i].Value)) 398acceptedValues.Add(kvp.Key, kvp.Value); 602var values = kvp.Value as IEnumerable; 612wroteFirst |= AddQueryKeyValueToContext(context, kvp.Key, kvp.Value, wroteFirst); 709if (IsRoutePartNonEmpty(kvp.Value)) 714combinedValues.Add(kvp.Key, kvp.Value);
Tree\LinkGenerationDecisionTree.cs (3)
45if (RoutePattern.IsRequiredValueAny(kvp.Value)) 179results.Add(kvp.Key, new DecisionCriterionValue(kvp.Value ?? string.Empty)); 257FlattenTree(branchStack, sb, branch.Value);
Tree\TreeRouter.cs (1)
309inputValues.Add(kvp.Key, kvp.Value);
ValidationEndpointFilterFactory.cs (1)
85elementSelector: kvp => kvp.Value.Select(e => e.ErrorMessage).ToArray());
Microsoft.AspNetCore.Routing.Abstractions (6)
RouteData.cs (5)
170if (kvp.Value != null) 172Values[kvp.Key] = kvp.Value; 181DataTokens[kvp.Key] = kvp.Value; 246_routeData._dataTokens.Add(kvp.Key, kvp.Value); 308_routeData._values.Add(kvp.Key, kvp.Value);
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
Microsoft.AspNetCore.Server.HttpSys (14)
RequestProcessing\Response.cs (3)
631trailerCount += trailerPair.Value.Count; 647if (headerPair.Value.Count == 0) 653var headerValues = headerPair.Value;
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
src\aspnetcore\src\Shared\Debugger\StringValuesDictionaryDebugView.cs (1)
28keyValuePairs.Add(new DictionaryItemDebugView<string, string>(kvp.Key, kvp.Value.ToString()));
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (2)
170ValidateHeaderCharacters(item.Value); 300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
147((IDictionary<string, StringValues>)this).Add(item.Key, item.Value); 161return ((IDictionary<string, StringValues>)this).TryGetValue(item.Key, out var value) && Equals(value, item.Value);
StandardFeatureCollection.cs (1)
100var feature = featureFunc.Value(_featureContext);
UrlPrefixCollection.cs (4)
153if (pair.Value.Equals(item)) 156_urlGroup?.UnregisterPrefix(pair.Value.FullPrefix); 193var urlPrefix = pair.Value; 206_urlGroup.RegisterPrefix(pair.Value.FullPrefix, pair.Key);
Microsoft.AspNetCore.Server.IIS (12)
Core\IISHttpContext.cs (5)
649var headerValues = headerPair.Value; 651if (headerPair.Value.Count == 0) 693var headerValues = headerPair.Value; 769await entry.Key.Invoke(entry.Value); 793await entry.Key.Invoke(entry.Value);
Core\IISHttpContext.FeatureCollection.cs (1)
70return kv.Value;
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
src\aspnetcore\src\Shared\Debugger\StringValuesDictionaryDebugView.cs (1)
28keyValuePairs.Add(new DictionaryItemDebugView<string, string>(kvp.Key, kvp.Value.ToString()));
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (2)
170ValidateHeaderCharacters(item.Value); 300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
147((IDictionary<string, StringValues>)this).Add(item.Key, item.Value); 161return ((IDictionary<string, StringValues>)this).TryGetValue(item.Key, out var value) && Equals(value, item.Value);
Microsoft.AspNetCore.Server.IntegrationTesting (4)
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (2)
177environmentVariable.SetAttributeValue("value", envVariablePair.Value); 233var environmentVariables = string.Join("`,", _deploymentParameters.EnvironmentVariables.Select(envVariable => $"{envVariable.Key}={envVariable.Value}"));
ProcessHelpers.cs (1)
17SetEnvironmentVariable(environment, environmentVariable.Key, environmentVariable.Value, logger);
src\aspnetcore\src\Shared\Process\ProcessEx.cs (1)
118startInfo.EnvironmentVariables[envVar.Key] = envVar.Value;
Microsoft.AspNetCore.Server.Kestrel.Core (30)
Internal\ConfigSectionClone.cs (1)
45if (kvp.Value != child)
Internal\Http\HttpHeaders.cs (4)
121ICollection<StringValues> IDictionary<string, StringValues>.Values => ((IDictionary<string, StringValues>)this).Select(pair => pair.Value).ToList(); 186((IDictionary<string, StringValues>)this).Add(item.Key, item.Value); 219value.Equals(item.Value); 249value.Equals(item.Value) &&
Internal\Http\HttpProtocol.cs (2)
846await entry.Key.Invoke(entry.Value); 874await entry.Key.Invoke(entry.Value);
Internal\Http\HttpProtocol.Generated.cs (1)
142return kv.Value;
Internal\Http\HttpResponseHeaders.cs (2)
61foreach (var value in kv.Value) 80foreach (var value in kv.Value)
Internal\Http3\Http3Connection.cs (2)
178session.Value.Abort(new ConnectionAbortedException(ex.Message, ex.InnerException), errorCode); 182session.Value.Abort(new ConnectionAbortedException(ex.Message), errorCode);
Internal\Http3\Http3HeadersEnumerator.cs (4)
29public (int index, bool matchedValue) GetQPackStaticTableId() => HttpHeadersCompression.MatchKnownHeaderQPack(_knownHeaderType, Current.Value); 80? SetCurrent(_headersEnumerator.Current.Key, _headersEnumerator.Current.Value, _headersEnumerator.CurrentKnownType) 86? SetCurrent(_trailersEnumerator.Current.Key, _trailersEnumerator.Current.Value, _trailersEnumerator.CurrentKnownType) 92? SetCurrent(_genericEnumerator.Current.Key, _genericEnumerator.Current.Value, default)
Internal\Http3\QPackHeaderWriter.cs (1)
67var value = headersEnumerator.Current.Value;
Internal\Infrastructure\ConnectionManager.cs (1)
71var reference = kvp.Value;
Internal\Infrastructure\KestrelConnection.cs (2)
113var task = entry.Key.Invoke(entry.Value); 143await entry.Key.Invoke(entry.Value);
Internal\Infrastructure\TransportConnectionManager.cs (2)
61if (kvp.Value.TryGetConnection(out var connection)) 78if (kvp.Value.TryGetConnection(out var connection))
Internal\WebTransport\WebTransportSession.cs (3)
82stream.Value.DisposeAsync().AsTask().GetAwaiter().GetResult(); 109stream.Value.Abort(new ConnectionAbortedException(exception.Message, exception.InnerException)); 113stream.Value.Abort(new ConnectionAbortedException(exception.Message));
src\aspnetcore\src\Servers\Kestrel\shared\HPackHeaderWriter.cs (1)
125var value = headersEnumerator.Current.Value;
src\aspnetcore\src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (2)
95? SetCurrent(_headersEnumerator.Current.Key, _headersEnumerator.Current.Value, _headersEnumerator.CurrentKnownType) 101? SetCurrent(_trailersEnumerator.Current.Key, _trailersEnumerator.Current.Value, _trailersEnumerator.CurrentKnownType)
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
src\aspnetcore\src\Shared\Debugger\StringValuesDictionaryDebugView.cs (1)
28keyValuePairs.Add(new DictionaryItemDebugView<string, string>(kvp.Key, kvp.Value.ToString()));
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (2)
src\aspnetcore\src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
84return kv.Value;
TlsEventPump.cs (1)
1113long deadline = kvp.Value.HandshakeDeadlineTimestamp;
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\aspnetcore\src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
84return kv.Value;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (4)
src\aspnetcore\src\Servers\Kestrel\shared\ConnectionCompletion.cs (2)
28var task = entry.Key.Invoke(entry.Value); 58await entry.Key.Invoke(entry.Value);
src\aspnetcore\src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
84return kv.Value;
src\aspnetcore\src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (1)
71return kv.Value;
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
src\aspnetcore\src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
84return kv.Value;
Microsoft.AspNetCore.Session (3)
DistributedSession.cs (3)
328SerializeNumAs4Bytes(output, entry.Value.Length); 329output.Write(entry.Value, 0, entry.Value.Length);
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1100var reader = kvp.Value;
Microsoft.AspNetCore.SignalR.Core (6)
DefaultHubLifetimeManager.cs (2)
152if (include != null && !include(connection.Value, state)) 162var task = connection.Value.WriteAsync(message, cancellationToken);
HubConnectionStore.cs (1)
85public HubConnectionContext Current => _enumerator.Current.Value;
src\aspnetcore\src\Shared\Diagnostics\ActivityCreator.cs (2)
84activity.AddTag(tag.Key, tag.Value); 122activity.AddBaggage(baggageItem.Key, baggageItem.Value);
StreamTracker.cs (1)
114converter.Value.Converter.TryComplete(ex);
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
586writer.WriteString(value.Key, value.Value);
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Protocol\MessagePackHubProtocolWorker.cs (1)
602writer.Write(header.Value);
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Protocol\NewtonsoftJsonHubProtocol.cs (1)
585writer.WriteValue(value.Value);
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
Internal\AckHandler.cs (1)
55var elapsed = currentTick - pair.Value.CreatedTick;
Microsoft.AspNetCore.SpaServices.Extensions (6)
Npm\NodeScriptRunner.cs (1)
56processStartInfo.Environment[keyValuePair.Key] = keyValuePair.Value;
Proxying\SpaProxy.cs (5)
152if (!requestMessage.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray()) && requestMessage.Content != null) 154requestMessage.Content?.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray()); 175context.Response.Headers[header.Key] = header.Value.ToArray(); 180context.Response.Headers[header.Key] = header.Value.ToArray(); 226client.Options.SetRequestHeader(headerEntry.Key, headerEntry.Value);
Microsoft.AspNetCore.TestHost (10)
ClientHandler.cs (6)
147req.Headers.Append(header.Key, header.Value.ToArray()); 162req.Headers.Append(header.Key, string.Join(' ', header.Value)); 166req.Headers.Append(header.Key, header.Value.ToArray()); 204bool success = response.TrailingHeaders.TryAddWithoutValidation(trailer.Key, (IEnumerable<string>)trailer.Value); 221if (!response.Headers.TryAddWithoutValidation(header.Key, (IEnumerable<string>)header.Value)) 223bool success = response.Content.Headers.TryAddWithoutValidation(header.Key, (IEnumerable<string>)header.Value);
HttpContextBuilder.cs (1)
235newFeatures[pair.Key] = pair.Value;
src\44e1214b125d320f\HostFactoryResolver.cs (3)
343_configure?.Invoke(value.Value!); 347_hostTcs.TrySetResult(value.Value!); 357arbitraryAction.Invoke(value.Value);
Microsoft.AspNetCore.WebUtilities (4)
KeyValueAccumulator.cs (1)
101_accumulator[entry.Key] = new StringValues(entry.Value.ToArray());
QueryHelpers.cs (3)
65return AddQueryString(uri, queryString.SelectMany(kvp => kvp.Value, (kvp, v) => KeyValuePair.Create<string, string?>(kvp.Key, v))); 100if (parameter.Value == null) 108sb.Append(UrlEncoder.Default.Encode(parameter.Value));
Microsoft.Build (305)
BackEnd\BuildManager\BuildManager.cs (2)
1156BuildResult result = _resultsCache!.GetResultsForConfiguration(projectStartedEvent.Value.BuildEventContext!.ProjectInstanceId); 2670result.AddResultsForTarget(cacheResultInner.Key, cacheResultInner.Value);
BackEnd\BuildManager\BuildParameters.cs (1)
521_globalProperties[property.Key] = ProjectPropertyInstance.Create(property.Key, property.Value);
BackEnd\BuildManager\BuildRequestData.cs (1)
152GlobalPropertiesDictionary.Set(ProjectPropertyInstance.Create(propertyPair.Key, propertyPair.Value));
BackEnd\BuildManager\GlobalPropertiesLookup.cs (1)
34.Select(p => new KeyValuePair<string, string?>(p.Key, ExtractEscapedValue(p.Value)))
BackEnd\BuildManager\RequestedProjectState.cs (4)
53kvp => kvp.Value == null ? null : new List<string>(kvp.Value)); 102if (kvp.Value is null) 113foreach (string metadatum in kvp.Value)
BackEnd\Client\MSBuildClient.cs (1)
642envVars[pair.Key] = pair.Value;
BackEnd\Components\BuildComponentFactoryCollection.cs (2)
104if (componentEntry.Value.Pattern == CreationPattern.Singleton) 106componentEntry.Value.ShutdownSingletonInstance();
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (1)
444_outstandingResults[requestEntry.Key] = new BuildResult(requestEntry.Value, new BuildAbortedException());
BackEnd\Components\Caching\ConfigCache.cs (6)
167config.Value.ClearCacheFile(); 205BuildRequestConfiguration configuration = metadata.Value; 254BuildRequestConfiguration configuration = kvp.Value; 288yield return configuration.Value; 391_byMetadata[new ConfigurationMetadata(kvp.Value)] = kvp.Value;
BackEnd\Components\Caching\ResultsCache.cs (1)
96result.Value.ClearCachedFiles();
BackEnd\Components\Communications\LogMessagePacket.cs (3)
132WriteProfiledLocation(translator, item.Value); 207writer.Write(item.Value); 277writer.Write(kvp.Value ?? string.Empty);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
887CommunicationsUtilities.Trace($"Writing handshake part {component.Key} ({component.Value}) to pipe {pipeName}"); 888nodeStream.WriteIntForHandshake(component.Value);
BackEnd\Components\Logging\LoggingService.cs (11)
841eventSinkNames.Add(kvp.Value.Name); 1242if (sinkPair.Value == forwardingLoggerSink) 1423if (loggingPacket.NodeBuildEvent.Value.Value is ProjectStartedEventArgs projectStartedEventArgs && _configCache.Value != null) 1441else if (loggingPacket.NodeBuildEvent.Value.Value is TaskParameterEventArgs taskParameterEventArgs && 1656BuildEventArgs buildEventArgs = loggingEvent as BuildEventArgs ?? (loggingEvent as KeyValuePair<int, BuildEventArgs>?)?.Value; 1793if (loggingEventKeyValuePair.Value != buildEventArgs) 1808TryRaiseProjectStartedEvent(nodeEvent.Value); 1815sink.Consume(nodeEvent.Value, nodeEvent.Key); 1818TryRaiseProjectFinishedEvent(nodeEvent.Value); 1846IBuildEventSink sink = pair.Value; 1863IBuildEventSink sink = pair.Value;
BackEnd\Components\Logging\ProjectTelemetry.cs (1)
225properties[propertyName] = kvp.Value.ToString(CultureInfo.InvariantCulture);
BackEnd\Components\ProjectCache\Experimental\ProxyTargets.cs (1)
38_proxyTargetToRealTargetMap = proxyTargetToRealTargetMap.ToDictionary(kvp => kvp.Key, kvp => kvp.Value, StringComparer.OrdinalIgnoreCase);
BackEnd\Components\ProjectCache\ProjectCacheDescriptorEqualityComparer.cs (1)
55dictHash ^= (pluginSetting.Key.GetHashCode() * -1521134295) + pluginSetting.Value.GetHashCode();
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
975ProjectCachePlugin plugin = await kvp.Value.Value;
BackEnd\Components\ProjectCache\ProxyTargets.cs (1)
37_proxyTargetToRealTargetMap = proxyTargetToRealTargetMap.ToDictionary(kvp => kvp.Key, kvp => kvp.Value, StringComparer.OrdinalIgnoreCase);
BackEnd\Components\RequestBuilder\BatchingEngine.cs (3)
316ICollection<ProjectItemInstance> items = entry.Value ?? lookup.GetItems(itemName); 404string metadataItemName = consumedMetadataReference.Value.ItemName; 405string metadataName = consumedMetadataReference.Value.MetadataName;
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
235sb.Append(kvp.Value);
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (2)
617combinedTable.Add(entry.Key, entry.Value); 624combinedTable.Add(entry.Key, entry.Value);
BackEnd\Components\RequestBuilder\Lookup.cs (14)
343foreach (KeyValuePair<ProjectItemInstance, MetadataModifications> modify in entry.Value) 350SecondaryModifyTable.Add(entry.Key, entry.Value); 382_baseItems.ImportItemsOfType(kvp.Key, kvp.Value); 390_baseItems.RemoveItemsOfType(kvp.Key, kvp.Value); 398ApplyModificationsToTable(_baseItems, entry.Key, entry.Value); 951if (modificationPair.Value.Remove) 955else if (modificationPair.Value.NewValue != null) 957taskItem.SetMetadata(modificationPair.Key, modificationPair.Value.NewValue); 1015existingMetadataChanges.ApplyModifications(modify.Value); 1020foreach (var metadataChange in modify.Value.ExplicitModifications) 1027existingMetadataChanges[metadataChange.Key] = metadataChange.Value; 1034modifiesOfType.Add(modify.Key, modify.Value); 1196if (modificationPair.Value.KeepValue && _modifications.TryGetValue(modificationPair.Key, out existingModification)) 1207_modifications[modificationPair.Key] = modificationPair.Value;
BackEnd\Components\RequestBuilder\RequestBuilder.cs (7)
1294foreach (var proxyMapping in proxyTargetMapping.Where(kvp => kvp.Value != null)) 1297var realTarget = proxyMapping.Value; 1363projectTargetInstance.Value.Location.Equals(targetResult.TargetLocation); 1372if (FileUtilities.IsMetaprojectFilename(projectTargetInstance.Value.FullPath)) 1381isFromNuget = FileClassifier.Shared.IsInNugetCache(projectTargetInstance.Value.FullPath); 1382isCustom = !FileClassifier.Shared.IsBuiltInLogic(projectTargetInstance.Value.FullPath) || 1384(isFromNuget && FileClassifier.Shared.IsMicrosoftPackageInNugetCache(projectTargetInstance.Value.FullPath));
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (3)
628IList<ProjectItemInstance> outputItems = outputEntry.Value; 864if (GetItemSpecsFromItemVectors(itemVectors, item.Key, item.Value).Any()) 884itemSpecs.AddRange(GetItemSpecsFromItemVectors(itemVectors, item.Key, item.Value));
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
262taskParameters.Add(taskParameter.Value.Item1);
BackEnd\Components\RequestBuilder\TaskHost.cs (4)
308targetOutputsPerProject[i].Add(output.Key, output.Value); 1236ITaskItem[] clonedTaskItem = new ITaskItem[resultEntry.Value.Items.Length]; 1237for (int j = 0; j < resultEntry.Value.Items.Length; j++) 1239clonedTaskItem[j] = ((TaskItem)resultEntry.Value.Items[j]).DeepClone();
BackEnd\Components\Scheduler\Scheduler.cs (1)
1840config.GlobalProperties.ToDictionary().Select(kvp => $"{kvp.Key}={kvp.Value}"));
BackEnd\Components\Scheduler\SchedulingPlan.cs (8)
117file.WriteLine(String.Format(CultureInfo.InvariantCulture, "{0} {1} {2}", configuration.Key, configuration.Value, _configCache[configuration.Key].ProjectFullPath)); 237projectsInOrderOfTotalPlanTime.Sort((left, right) => Comparer<double>.Default.Compare(right.Value.TotalPlanTime, left.Value.TotalPlanTime)); 240PlanConfigData config = configuration.Value; 260projectsInOrderOfImmediateChildCount.Sort((left, right) => Comparer<int>.Default.Compare(right.Value.ReferencesCount, left.Value.ReferencesCount)); 263Console.WriteLine("{0}: {1} {2}", configuration.Key, configuration.Value.ReferencesCount, configuration.Value.ConfigFullPath);
BackEnd\Components\SdkResolution\SdkResult.cs (6)
134if (result._propertiesToAdd[propertyToAdd.Key] != propertyToAdd.Value) 145if (!result._itemsToAdd[itemToAdd.Key].Equals(itemToAdd.Value)) 157if (!result._environmentVariablesToAdd.TryGetValue(envVarToAdd.Key, out string otherEnvVarValue) || otherEnvVarValue != envVarToAdd.Value) 191hashCode = (hashCode * -1521134295) + propertyToAdd.Value.GetHashCode(); 199hashCode = (hashCode * -1521134295) + itemToAdd.Value.GetHashCode(); 207hashCode = (hashCode * -1521134295) + envVarToAdd.Value.GetHashCode();
BackEnd\Node\OutOfProcNode.cs (2)
607BuildEventArgs buildEvent = logMessage.NodeBuildEvent.Value.Value; 748Environment.SetEnvironmentVariable(environmentPair.Key, environmentPair.Value);
BackEnd\Shared\BuildResult.cs (5)
392if ((result.Value.ResultCode == TargetResultCode.Failure && !result.Value.TargetFailureDoesntCauseBuildFailure) 393|| result.Value.AfterTargetsHaveFailed) 603_resultsByTarget![targetResult.Key] = targetResult.Value; 736targetResultPair.Value.CacheItems(ConfigurationId, targetResultPair.Key);
BackEnd\Shared\ConfigurationMetadata.cs (1)
43_globalProperties[entry.Key] = ProjectPropertyInstance.Create(entry.Key, entry.Value);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (4)
587success = SetTaskParameter(parameter.Key, parameter.Value.Item1, parameter.Value.Item2, requiredParameters.ContainsKey(parameter.Key), out taskParameterSet); 1843yield return new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.Escape(kvp.Value)); 1850yield return new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.Escape(kvp.Value));
BuildCheck\Checks\CopyAlwaysCheck.cs (1)
77if (MSBuildNameIgnoreCaseComparer.Default.Equals(keyValuePair.Value, ItemMetadataNames.copyAlways))
BuildCheck\Checks\EmbeddedResourceCheck.cs (1)
66keyValuePair.Value.IsMSBuildFalseString())
BuildCheck\Checks\PropertiesUsageCheck.cs (3)
219if (propWithLocation.Value != null && !_readProperties.Contains(propWithLocation.Key)) 223propWithLocation.Value, 234uninitializedRead.Value,
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (1)
209=> title + Environment.NewLine + String.Join(Environment.NewLine, rowData.Select(a => $"{a.Key},{a.Value}")) + Environment.NewLine;
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
578projectFullPath = _projectsByInstanceId.FirstOrDefault().Value; 588projectFullPath = _projectsByEvaluationId.FirstOrDefault().Value;
BuildCheck\Infrastructure\BuildEventsProcessor.cs (1)
57static (dict, kvp) => dict.Add(kvp.Key, kvp.Value));
BuildCheck\Infrastructure\ConfigurationProvider.cs (1)
176filteredConfig[newKey] = kv.Value;
BuildCheck\Infrastructure\CustomConfigurationData.cs (1)
76if (!ConfigurationData.TryGetValue(keyVal.Key, out var value) || value != keyVal.Value)
BuildCheck\Infrastructure\EditorConfig\EditorConfigParser.cs (1)
94resultingDictionary[property.Key] = property.Value;
Collections\ArrayDictionary.cs (2)
110Add(item.Key, item.Value); 124if (keyComparer.Equals(item.Key, keys[i]) && valueComparer.Equals(item.Value, values[i]))
Collections\CopyOnWritePropertyDictionary.cs (6)
280((IDictionary<string, T>)this).Add(item.Key, item.Value); 290return EqualityComparer<T>.Default.Equals(value, item.Value); 307Assumed.Equal(item.Key, item.Value.Key, "Key must match value's key"); 361builder[kvp.Value.Key] = kvp.Value; 410Current = _dictionaryEnumerator.Current.Value;
Collections\HashTableUtility.cs (1)
51comparison = String.Compare(h1Entry.Value, h2[h1Entry.Key],
Collections\ItemDictionary.cs (3)
186if (itemTypeBucket.Value == null || itemTypeBucket.Value.Count == 0) 192yield return (itemTypeBucket.Key, itemTypeBucket.Value);
Collections\ItemDictionarySlim.cs (1)
58List<ProjectItemInstance> itemsToAdd = kvp.Value;
Collections\PropertyDictionary.cs (3)
414((IDictionary<string, T>)this).Add(item.Key, item.Value); 434return ReferenceEquals(value, item.Value); 452Assumed.Equal(item.Key, item.Value.Key, "Key must match value's key");
Collections\ReadOnlyConvertingDictionary.cs (1)
198return new KeyValuePair<K, N>(original.Key, _converter(original.Value));
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (6)
284Debug.Assert(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal)); 285return Get(entry.Value.Key) != null; 398Debug.Assert(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal)); 399return Remove(entry.Value); 604Debug.Assert(String.Equals(entry.Key, entry.Value.Key, StringComparison.Ordinal)); 606AddEvenIfPresent(entry.Value);
Collections\WeakValueDictionary.cs (5)
67if (pair.Value?.TryGetTarget(out _) ?? false) 202if (entry.Value == null) 209if (!entry.Value.TryGetTarget(out _)) 241if (kvp.Value is null) 245else if (kvp.Value.TryGetTarget(out V target))
Construction\ProjectItemGroupElement.cs (1)
144newItem.AddMetadata(metadatum.Key, metadatum.Value);
Construction\ProjectTaskElement.cs (2)
153parametersClone[entry.Key] = entry.Value.Item1; 182parameterLocations.Add(new KeyValuePair<string, ElementLocation>(entry.Key, entry.Value.Item2));
Construction\Solution\SolutionFile.cs (1)
453ParseAspNetCompilerProperty(proj, property.Key, property.Value);
Definition\Project.cs (2)
3498item.SetMetadataValue(metadatum.Key, metadatum.Value); 3672globalPropertiesCollection.Set(ProjectPropertyInstance.Create(pair.Key, pair.Value));
Definition\ProjectCollection.cs (3)
442_globalProperties.Set(ProjectPropertyInstance.Create(pair.Key, pair.Value)); 1325mergedProperties[property.Key] = property.Value; 2194if (!String.Equals(leftProperty.Value, rightValue, StringComparison.OrdinalIgnoreCase))
Definition\ProjectItem.cs (1)
1022item.SetMetadata(metadatum.Key, metadatum.Value);
Definition\Toolset.cs (1)
201_properties.Set(ProjectPropertyInstance.Create(keyValuePair.Key, keyValuePair.Value, true));
Evaluation\Evaluator.cs (10)
815_usingTaskElements.Select(p => (p.Value, p.Key)), 1972_data.AddSdkResolvedEnvironmentVariable(environmentVariable.Key, environmentVariable.Value); 2014hash.Add(property.Value); 2027hash.Add(item.Value); 2058propertyGroup.AddProperty(propertyNameAndValue.Key, EscapingUtilities.Escape(propertyNameAndValue.Value)); 2069if (item.Value.Metadata != null) 2071escapedMetadata = new Dictionary<string, string>(item.Value.Metadata.Count, StringComparer.OrdinalIgnoreCase); 2072foreach (var metadata in item.Value.Metadata) 2074escapedMetadata[metadata.Key] = EscapingUtilities.Escape(metadata.Value); 2078itemGroup.AddItem(item.Key, EscapingUtilities.Escape(item.Value.ItemSpec), escapedMetadata);
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (1)
113: string.Join(";", CapturedItems.Select(kvp => $"{kvp.Key} : {kvp.Value.EvaluatedInclude}"));
Evaluation\LazyItemEvaluator.UpdateOperation.cs (1)
161if (!string.IsNullOrWhiteSpace(metadataReference.Value.ItemName))
Evaluation\ParserIgnoreConfiguration.cs (5)
152sb.Append($" {kvp.Key} ({kvp.Value} occurrence{(kvp.Value > 1 ? "s" : string.Empty)});"); 252names.UnionWith(kvp.Value); 260destination.AddOrUpdate(kvp.Key, kvp.Value, (_, count) => count + kvp.Value);
Evaluation\Profiler\ProfilerResultPrettyPrinter.cs (3)
53.OrderByDescending(l => l.Value.ExclusiveTime); 59var time = pair.Value; 75var time = pair.Value;
Evaluation\ProjectRootElementCache.cs (6)
492if (kvp.Value is null) 497if (kvp.Value.IsExplicitlyLoaded) 499_weakCache[kvp.Key] = kvp.Value; 502if (oldStrongCache.Contains(kvp.Value)) 504if (kvp.Value.IsExplicitlyLoaded) 506_strongCache.AddFirst(kvp.Value);
Graph\GraphBuilder.cs (11)
152var currentNode = parsedProject.Value.GraphNode; 156foreach (var referenceInfo in parsedProject.Value.ReferenceInfos) 218var projectPath = project.Value.GraphNode.ProjectInstance.FullPath; 222value.Add(project.Value.GraphNode); 226projectsByPath[projectPath] = new List<ProjectGraphNode> { project.Value.GraphNode }; 236var referencedNodes = solutionDependency.Value.SelectMany( 414var partiallyMarchedConfig = projectConfigs.FirstOrDefault(pc => pc.Value.ConfigurationName.Equals(solutionConfig.ConfigurationName, StringComparison.OrdinalIgnoreCase)).Value; 415return partiallyMarchedConfig ?? projectConfigs.First().Value; 686propertyDictionary[entry.Key] = ProjectPropertyInstance.Create(entry.Key, entry.Value); 758kvp => kvp.Value);
Graph\GraphBuildResult.cs (1)
66if (result.Value.OverallResult == BuildResultCode.Failure)
Graph\ParallelWorkSet.cs (1)
53WorkItem workItem = kvp.Value;
Graph\ProjectGraph.cs (5)
493: string.Join(", ", e.GlobalProperties.Select(kvp => $"{kvp.Key} = {kvp.Value}")); 551.Select(kvp => $"{kvp.Key}={kvp.Value}")); 784var targetList = pair.Value; 801if (targetList != pair.Value) 810targetLists[pair.Key] = pair.Value;
Graph\ProjectInterpretation.cs (2)
290ProjectGraphNode outerBuild = node.Value.GraphNode; 456destination[pair.Key] = ProjectPropertyInstance.Create(pair.Key, pair.Value);
Instance\HostServices.cs (6)
345foreach (var hostObjectMapPair in pair.Value._hostObjects) 347if (hostObjectMapPair.Value.IsMoniker) 358foreach (var hostObjectMapPair in pair.Value._hostObjects) 360if (hostObjectMapPair.Value.IsMoniker) 365translator.Writer.Write(hostObjectMapPair.Value.MonikerName); 428return _hostObjects.Any(h => h.Value.IsTaskHost);
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (1)
191T instance = _getElementInstance(kvp.Value);
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (1)
76public bool Contains(KeyValuePair<string, ProjectPropertyInstance> itemKvp) => _values.Contains(itemKvp.Value);
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (3)
72if (kvp.Value == null || kvp.Value.Count == 0) 78itemTypeCallback(kvp.Key, new ListConverter(kvp.Key, kvp.Value, _getInstance));
Instance\ProjectInstance.cs (7)
408_globalProperties.Set(ProjectPropertyInstance.Create(property.Key, property.Value)); 609_globalProperties[property.Key] = ProjectPropertyInstance.Create(property.Key, property.Value, false /* may not be reserved */, _isImmutable); 889if (itemFilter.Value == null) 902if (!itemFilter.Value.Contains(metadataName, StringComparer.OrdinalIgnoreCase)) 1049=> new KeyValuePair<string, string>(directMetadatum.Key, directMetadatum.Value.EvaluatedValueEscaped)); 1987_sdkResolvedEnvironmentVariableProperties.Set(ProjectPropertyInstance.Create(environmentVariable.Key, environmentVariable.Value, importElement.Location, isImmutable: true)); 3331_globalProperties.Set(ProjectPropertyInstance.Create(globalProperty.Key, globalProperty.Value, false /* may not be reserved */, _isImmutable));
Instance\ProjectItemDefinitionInstance.cs (2)
110IEnumerable<ProjectMetadataInstance> metadata = _metadata.Select(kvp => new ProjectMetadataInstance(kvp.Key, kvp.Value, allowItemSpecModifiers: true)); 223element.AddMetadata(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value));
Instance\ProjectItemInstance.cs (10)
1220yield return new KeyValuePair<string, string>(projectMetadataInstance.Key, EscapingUtilities.UnescapeAll(projectMetadataInstance.Value)); 1266builder[kvp.Key] = kvp.Value; 1275builder[kvp.Key] = kvp.Value; 1289yield return new ProjectMetadataInstance(metadatum.Key, metadatum.Value, allowItemSpecModifiers: true); 1637clonedMetadata[metadatum.Key] = EscapingUtilities.UnescapeAll(metadatum.Value); 1654clonedMetadata[metadatum.Key] = metadatum.Value; 1849SetMetadata(metadataEntry.Key, metadataEntry.Value); 1909int value = interner.Intern(metadatum.Value); 2141if (Expander<ProjectProperty, ProjectItem>.ExpressionMayContainExpandableExpressions(kvp.Value)) 2304IEnumerable<KeyValuePair<string, string>> projectMetadataInstances = metadataList.Select(metadatum => new KeyValuePair<string, string>(metadatum.Key.Name, metadatum.Value));
Instance\ProjectTargetInstance.cs (1)
488taskElement.SetParameter(taskParameterEntry.Key, taskParameterEntry.Value);
Instance\ProjectTaskInstance.cs (1)
240filteredParameters[parameter.Key] = parameter.Value.Item1;
Instance\TaskFactories\TaskHostTask.cs (6)
455result[kvp.Key] = kvp.Value; 642_setParameters[outputParam.Key] = outputParam.Value?.WrappedParameter; 672this.BuildEngine.LogErrorEvent((BuildErrorEventArgs)logMessagePacket.NodeBuildEvent.Value.Value); 675this.BuildEngine.LogWarningEvent((BuildWarningEventArgs)logMessagePacket.NodeBuildEvent.Value.Value); 679this.BuildEngine.LogMessageEvent((BuildMessageEventArgs)logMessagePacket.NodeBuildEvent.Value.Value); 682BuildEventArgs buildEvent = logMessagePacket.NodeBuildEvent.Value.Value;
Instance\TaskRegistry.cs (1)
659.SelectMany(tp => tp.Value)
Logging\BaseConsoleLogger.cs (3)
499Internal.Utilities.EnumerateProperties(properties, list, static (list, kvp) => list.Add(new DictionaryEntry(kvp.Key, kvp.Value))); 522WriteLinePretty(entry.Value); 641WriteMetadata(metadatum.Key, metadatum.Value);
Logging\BinaryLogger\BuildEventArgsReader.cs (2)
1293kvp => TimeSpan.FromTicks(long.Parse(kvp.Value)))); 1516list[i] = new DictionaryEntry(property.Key, property.Value);
Logging\BinaryLogger\BuildEventArgsWriter.cs (3)
392Write(item.Value); 1260Write(kvp.Value); 1284var (valueIndex, valueHash) = HashString(kvp.Value);
Logging\ParallelLogger\ParallelConsoleLogger.cs (3)
241WriteEnvironment(e.BuildEnvironment?.Where(kvp => EnvironmentUtilities.IsWellKnownEnvironmentDerivedProperty(kvp.Key)).ToDictionary(kvp => kvp.Key, kvp => kvp.Value)); 510foreach (BuildEventArgs errorWarningEvent in valuePair.Value) 802string environmentMessage = $"{entry.Key} = {entry.Value}";
Logging\ProfilerLogger.cs (7)
184var profiledLocation = AggregateProfiledLocation(existingProfiledLocation, pairToMerge.Value); 199aggregatedLocations[pairToMerge.Key.WithParentId(mergedParent)] = pairToMerge.Value; 204aggregatedLocations[pairToMerge.Key] = pairToMerge.Value; 222pair => new KeyValuePair<EvaluationLocation, ProfiledLocation>(pair.Key, pair.Value)); 226pair.Key.IsEvaluationPass || !IsTooSmall(pair.Value))) 231result[key.WithParentId(parentId)] = prunedPair.Value; 252while (!pair.Key.IsEvaluationPass && IsTooSmall(pair.Value))
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2.cs (2)
186&& EqualityComparer<TValue>.Default.Equals(value, pair.Value); 240result[item.Key] = item.Value;
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+Enumerator.cs (2)
49readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 53readonly object? IDictionaryEnumerator.Value => Current.Value;
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
119=> Add(item.Key, item.Value); 127Add(pair.Key, pair.Value); 149&& EqualityComparer<TValue>.Default.Equals(value, item.Value);
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (1)
25public readonly TValue Current => _enumerator.Current.Value;
src\5057ed6cf5d6323b\SegmentedDictionary`2.cs (9)
210Add(pair.Key, pair.Value); 218Add(pair.Key, pair.Value); 271=> Add(keyValuePair.Key, keyValuePair.Value); 276if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 287if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234return new DictionaryEntry(_current.Key, _current.Value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1261return new DictionaryEntry(_current.Key, _current.Value); 1287return _current.Value;
src\9f0d3f3da306d8cf\ImmutableArrayExtensions.cs (3)
872builder.AddRange(kvp.Value); 1183result.Add(entry.Key, createMembers(entry.Value)); 1226var namedTypes = getOrCreateNamedTypes(entry.Value);
src\msbuild\artifacts\.packages\microsoft.codeanalysis.pooledobjects\5.0.0-1.25277.114\contentFiles\cs\netstandard2.0\ArrayBuilder.cs (1)
583dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
src\msbuild\src\Shared\LogMessagePacketBase.cs (1)
299_buildEvent = nodeBuildEvent.Value.Value;
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (5)
452$"Handshake failed. Received {result.Value} from host for {component.Key} but expected {component.Value}. Probably the host is a different MSBuild build."); 573if (handshakePart == component.Value) 586isAllowedMismatch = IsAllowedBitnessMismatch(component.Value, handshakePart); 598isAllowedMismatch = _versionHandshakeGroup.Contains(component.Key) && component.Value == Handshake.NetTaskHostHandshakeVersion; 608$"Handshake failed. Received {handshakePart} from host for {component.Key} but expected {component.Value}. Probably the host is a different MSBuild build.");
src\msbuild\src\Shared\TaskHostBuildResponse.cs (2)
70dict[entry.Key] = (ITaskItem[]?)entry.Value?.WrappedParameter ?? []; 101dict[entry.Key] = new TaskParameter(entry.Value);
src\msbuild\src\Shared\TaskHostConfiguration.cs (1)
237_taskParameters[parameter.Key] = new TaskParameter(parameter.Value);
src\msbuild\src\Shared\TaskHostTaskComplete.cs (1)
129_taskOutputParameters[parameter.Key] = new TaskParameter(parameter.Value);
src\msbuild\src\Shared\TaskParameter.cs (4)
820destinationItem.SetMetadata(entry.Key, entry.Value); 848clonedMetadata.Add(metadatum.Key, EscapingUtilities.UnescapeAll(metadatum.Value)); 946var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 955SetMetadata(kvp.Key, kvp.Value);
src\msbuild\src\Shared\Tracing.cs (1)
150Trace.WriteLine("# " + count.Key + "=" + count.Value);
src\msbuild\src\Shared\TypeLoader.cs (1)
552return desiredTypeInAssembly.Value;
TelemetryInfra\InternalTelemetryConsumingLogger.cs (7)
54Console.WriteLine($"{target.Key} : {target.Value}"); 67foreach (var task in _workerNodeTelemetryData.TasksExecutionData.OrderByDescending(t => t.Value.CumulativeExecutionTime)) 69Console.WriteLine($"{task.Key} - {task.Value.CumulativeExecutionTime}"); 74foreach (var task in _workerNodeTelemetryData.TasksExecutionData.OrderByDescending(t => t.Value.TotalMemoryBytes)) 76Console.WriteLine($"{task.Key} - {task.Value.TotalMemoryBytes / 1024.0:0.00}kB"); 81foreach (var task in _workerNodeTelemetryData.TasksExecutionData.OrderByDescending(t => t.Value.ExecutionsCount)) 83Console.WriteLine($"{task.Key} - {task.Value.ExecutionsCount}");
Utilities\Utilities.cs (4)
591ProjectPropertyInstance environmentProperty = ProjectPropertyInstance.Create(environmentVariableName, environmentVariable.Value); 675yield return entry.Value; 716yield return new(kvp.Key, kvp.Value); 720yield return new(keyTimeSpanValue.Key, keyTimeSpanValue.Value.Ticks.ToString());
Microsoft.Build.Framework (65)
BackEnd\CommunicationsUtilities.cs (1)
361|| !string.Equals(entry.Value, otherValue, StringComparison.Ordinal))
BackEnd\TranslatorHelpers.cs (1)
214string value = kvp.Value;
BinaryTranslator.cs (9)
1490string value = pair.Value; 1502string value = pair.Value; 1522string value = pair.Value; 1545V value = pair.Value; 1570V value = pair.Value; 1591T value = pair.Value; 1613T value = pair.Value; 1635T value = pair.Value; 1657DateTime val = kvp.Value;
BinaryWriterExtensions.cs (2)
129writer.WriteOptionalString(kvp.Value); 140writer.Write(kvp.Value.Ticks);
BuildCheck\BuildCheckTracingData.cs (2)
41.GroupBy(d => d.Value.CheckFriendlyName) 42.ToDictionary(g => g.Key, g => g.First().Value.TotalRuntime);
BuildCheck\EnumerableExtensions.cs (2)
93dict[pair.Key] = pair.Value; 97dict[pair.Key] = mergeValues(value, pair.Value);
BuildException\BuildExceptionBase.cs (1)
107writer.WriteOptionalString(pair.Value);
BuildSubmissionStartedEventArgs.cs (1)
59writer.WriteOptionalString(entry.Value);
Collections\CopyOnWriteDictionary.cs (2)
258_backing = _backing.SetItem(item.Key, item.Value); 376array.SetValue(new DictionaryEntry(entry.Key, entry.Value), index + i);
DotnetHostEnvironmentHelper.cs (2)
126if (kvp.Value is null) 132environment[kvp.Key] = kvp.Value;
ImmutableDictionaryExtensions.cs (1)
39builder[item.Key] = item.Value ?? string.Empty;
MultiThreadedTaskEnvironmentDriver.cs (2)
112_environmentVariables[entry.Key] = entry.Value; 127startInfo.EnvironmentVariables[kvp.Key] = kvp.Value;
MutableTaskItem.cs (1)
36destinationItem.SetMetadata(metadatum.Key, metadatum.Value);
Sdk\SdkResultItem.cs (2)
45return Metadata.All(m => item.Metadata.TryGetValue(m.Key, out var itemValue) && itemValue == m.Value); 59hashCode ^= StringComparer.OrdinalIgnoreCase.GetHashCode(kvp.Key) * (StringComparer.OrdinalIgnoreCase.GetHashCode(kvp.Value ?? "V") + 1);
TaskItemData.cs (1)
44dictionary.Add(item.Key, item.Value);
TaskParameterEventArgs.cs (1)
258writer.Write(kvp.Value);
Telemetry\BuildCheckTelemetry.cs (4)
49int customRulesCount = data.TelemetryData.Count(t => !t.Value.IsBuiltIn); 50int violationsCount = data.TelemetryData.Sum(t => t.Value.ViolationsCount); 51long runtimeTicks = data.ExtractCheckStats().Sum(v => v.Value.Ticks); 52runtimeTicks += data.InfrastructureTracingData.Sum(v => v.Value.Ticks);
Telemetry\DiagnosticActivity.cs (1)
31_ = SetTag(tag.Key, tag.Value);
Telemetry\TelemetryDataUtils.cs (12)
72valuePair.Value.WasExecuted, 76valuePair.Value.SkipReason)); 97string? factoryName = GetFactoryNameForTelemetry(valuePair.Value.TaskFactoryName); 101valuePair.Value.CumulativeExecutionTime.TotalMilliseconds, 102valuePair.Value.ExecutionsCount, 103valuePair.Value.TotalMemoryBytes, 107valuePair.Value.TaskHostRuntime)); 252if (kv.Value.WasExecuted) 306taskInfo.Total.Accumulate(kv.Value); 310taskInfo.FromNuget.Accumulate(kv.Value); 344if (kv.Value.WasExecuted) 351_ = kv.Value.SkipReason switch
Telemetry\WorkerNodeTelemetryData.cs (7)
24AddTask(task.Key, task.Value.CumulativeExecutionTime, task.Value.ExecutionsCount, task.Value.TotalMemoryBytes, task.Value.TaskFactoryName, task.Value.TaskHostRuntime); 29AddTarget(target.Key, target.Value.WasExecuted, target.Value.SkipReason);
Telemetry\WorkerNodeTelemetryEventArgs.cs (7)
24writer.Write(entry.Value.CumulativeExecutionTime.Ticks); 25writer.Write(entry.Value.ExecutionsCount); 26writer.Write(entry.Value.TotalMemoryBytes); 27writer.Write(entry.Value.TaskFactoryName ?? string.Empty); 28writer.Write(entry.Value.TaskHostRuntime ?? string.Empty); 35writer.Write(entry.Value.WasExecuted); 36writer.Write((int)entry.Value.SkipReason);
TelemetryEventArgs.cs (1)
42writer.WriteOptionalString(kvp.Value);
Utilities\CollectionHelpers.cs (2)
73if (!valueComparer.Equals(aKvp.Value, bValue)) 80if (!Equals(aKvp.Value, bValue))
Microsoft.Build.Tasks.CodeAnalysis (3)
src\roslyn\src\Compilers\Shared\BuildProtocol.cs (1)
379WriteLengthPrefixedString(writer, pair.Value);
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
484envBlock.Append(kvp.Value); 647startInfo.EnvironmentVariables[kvp.Key] = kvp.Value;
Microsoft.Build.Tasks.Core (50)
AssemblyDependency\GenerateBindingRedirects.cs (3)
106new XAttribute("oldVersion", "0.0.0.0-" + redirect.Value), 107new XAttribute("newVersion", redirect.Value)))); 288string maxVerStr = entry.Value;
AssemblyDependency\Node\OutOfProcRarClient.cs (1)
76BuildEventArgs buildEvent = logMessagePacket.NodeBuildEvent?.Value!;
AssemblyDependency\ReferenceTable.cs (8)
1424Reference assemblyReference = assembly.Value; 1588Reference assemblyReference = assembly.Value; 1811AddReference(newEntry.Key, newEntry.Value); 1824Reference reference = assembly.Value; 2221Reference reference = assemblyNameWithReference.Value; 2247if (kvp.Value.Count == 1) 2631Reference reference = kvp.Value; 3110Reference reference = assembly.Value;
AssemblyDependency\ResolveAssemblyReference.cs (3)
1252Reference primaryCandidate = assembly.Value; 1265Reference dependencyCandidate = assembly.Value; 1278Reference conflictCandidate = assembly.Value;
BootstrapperUtil\BootstrapperBuilder.cs (2)
227var fi = new FileInfo(de.Value); 1873return altCulturePair.Value;
CreateItem.cs (1)
127newItem.SetMetadata(nameAndValue.Key, nameAndValue.Value);
GetInstalledSDKLocations.cs (3)
174string sdkInfo = ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("GetInstalledSDKs.SDKNameAndLocation", sdk.Key, sdk.Value.Item1); 177var item = new TaskItem(sdk.Value.Item1); 179item.SetMetadata("PlatformVersion", sdk.Value.Item2);
GetSDKReferenceFiles.cs (1)
624List<string> redistFiles = directoryToFileList.Value;
MSBuild.cs (2)
559combinedTable.Add(entry.Key, entry.Value); 566combinedTable.Add(entry.Key, entry.Value);
ResolveSDKReference.cs (6)
1048FrameworkIdentitiesFromManifest.Add(kvp.Key, kvp.Value); 1065AppxLocationsFromManifest.Add(kvp.Key, kvp.Value); 1396AddStatusMessage("ResolveSDKReference.FoundAppxLocation", appxLocation.Key + "=" + appxLocation.Value); 1400AddStatusMessage("ResolveSDKReference.ReplaceAppxLocation", architectureComponent, architectureLocation, appxLocation.Value); 1403architectureLocations[architectureComponent] = appxLocation.Value; 1411appxLocationComponents.Add(location.Value);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
545if (validLanguage.Value.Contains(languageAttribute.Value))
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersEx.cs (1)
430List<string> frameworkList = entry.Value;
src\msbuild\src\Shared\LogMessagePacketBase.cs (1)
299_buildEvent = nodeBuildEvent.Value.Value;
src\msbuild\src\Shared\NodePipeClient.cs (2)
83CommunicationsUtilities.Trace($"Writing handshake part {component.Key} ({component.Value}) to pipe {PipeName}"); 84_pipeClient.WriteIntForHandshake(component.Value);
src\msbuild\src\Shared\NodePipeServer.cs (2)
203if (handshakePart.Value != component.Value) 205CommunicationsUtilities.Trace($"Handshake failed. Received {handshakePart} from host not {component.Value}. Probably the host is a different MSBuild build.");
src\msbuild\src\Shared\TaskParameter.cs (4)
820destinationItem.SetMetadata(entry.Key, entry.Value); 848clonedMetadata.Add(metadatum.Key, EscapingUtilities.UnescapeAll(metadatum.Value)); 946var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 955SetMetadata(kvp.Key, kvp.Value);
src\msbuild\src\Shared\Tracing.cs (1)
150Trace.WriteLine("# " + count.Key + "=" + count.Value);
system.design\stronglytypedresourcebuilder.cs (6)
153ResourceData data = resource.Value is LiveObjectResource liveObject 155: new ResourceData(resource.Value.TypeFullName, resource.Value.TypeAssemblyQualifiedName); 275bool r = DefineResourceFetchingProperty(propertyName, resourceName, entry.Value, srClass, internalClass, useStatic); 769if (typeof(void) == entry.Value.Type) 814ResourceData value = entry.Value;
SystemState.cs (2)
621FileState fileState = kvp.Value; 647instanceLocalOutgoingFileStateCache = instanceLocalFileStateCache.ToDictionary(kvp => FileUtilities.MakeRelative(Path.GetDirectoryName(stateFile), kvp.Key), kvp => kvp.Value);
Microsoft.Build.Tasks.Git (7)
GitDataReader\GitConfig.cs (1)
104=> Variables.Select(kvp => new KeyValuePair<string, ImmutableArray<string>>(kvp.Key.ToString(), kvp.Value));
GitDataReader\GitConfig.Reader.cs (2)
85return new GitConfig(variables.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableArray())); 95return new GitConfig(variables.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableArray()));
GitDataReader\GitRepository.cs (2)
306path = variable.Value.Last(); 310url = variable.Value.Last();
GitOperations.cs (2)
108remoteUrl = remoteVariable.Value.Last(); 127foreach (var prefix in variable.Value)
Microsoft.Build.Utilities.Core (19)
MuxLogger.cs (1)
865Traits.LogAllEnvironmentVariables ? _buildStartedEvent.BuildEnvironment : _buildStartedEvent.BuildEnvironment?.Where(kvp => EnvironmentUtilities.IsWellKnownEnvironmentDerivedProperty(kvp.Key)).ToDictionary(kvp => kvp.Key, kvp => kvp.Value));
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersEx.cs (1)
430List<string> frameworkList = entry.Value;
src\msbuild\src\Shared\Tracing.cs (1)
150Trace.WriteLine("# " + count.Key + "=" + count.Value);
TaskItem.cs (6)
419copiedMetadata = _metadata.SetItems(destinationMetadata.Where(entry => !String.IsNullOrEmpty(entry.Value))); 465destinationAsITaskItem2.SetMetadata(entry.Key, entry.Value); 474destinationItem.SetMetadata(entry.Key, EscapingUtilities.Escape(entry.Value)); 514dictionary.Add(entry.Key, EscapingUtilities.UnescapeAll(entry.Value)); 619_metadata = _metadata.SetItems(metadata.Select(kvp => new KeyValuePair<string, string>(kvp.Key, kvp.Value ?? string.Empty))); 652var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value));
ToolLocationHelper.cs (6)
410extensionSDKs[extension.Key] = extension.Value; 457extensionSDKsAndVersions[extension.Key] = Tuple.Create<string, string>(extension.Value, moniker.TargetPlatformVersion.ToString()); 627ExtensionSDK extensionSDK = new ExtensionSDK(sdk.Key, sdk.Value); 632filteredExtensionSdks.Add(sdk.Key, sdk.Value); 2625foreach (string version in directoryUnderRoot.Value) 2723foreach (string version in registryVersions.Value)
ToolTask.cs (4)
695startInfo.Environment[entry.Key] = entry.Value; 705startInfo.Environment[variable.Key] = variable.Value; 1625alreadyLoggedEnvironmentHeader = LogEnvironmentVariable(alreadyLoggedEnvironmentHeader, entry.Key, entry.Value); 1635alreadyLoggedEnvironmentHeader = LogEnvironmentVariable(alreadyLoggedEnvironmentHeader, variable.Key, variable.Value);
Microsoft.CodeAnalysis (145)
CodeGen\CompilationTestData.cs (3)
60return Methods.Single(p => predicate(p.Key)).Value.ILBuilder; 78map.Add(name, pair.Value); 81var methodsByName = map.Where(p => p.Value.Method != null).ToImmutableDictionary();
CodeGen\PrivateImplementationDetails.cs (3)
180_orderedSynthesizedMethods = _synthesizedMethods.OrderBy(kvp => kvp.Key).Select(kvp => kvp.Value).AsImmutable(); 183_orderedNestedTypes = _dataFieldTypes.OrderBy(kvp => kvp.Key.Size).ThenBy(kvp => kvp.Key.Alignment).Select(kvp => kvp.Value).OfType<ExplicitSizeStruct>() 184.Concat<Cci.INestedTypeDefinition>(_dataSectionStringLiteralTypes.OrderBy(kvp => kvp.Key).Select(kvp => kvp.Value)).AsImmutable();
CodeGen\SwitchIntegralJumpTableEmitter.cs (3)
335object caseLabel = c.Value; 342EmitRangeCheckedBranch(switchBucket.StartConstant, switchBucket.EndConstant, switchBucket[0].Value); 384labels[i] = switchBucket[nextCaseIndex].Value;
CodeGen\SwitchIntegralJumpTableEmitter.SwitchBucket.cs (3)
145var lastLabel = allLabels[_startLabelIndex].Value; 151if (lastLabel != switchLabel.Value || 161lastLabel = switchLabel.Value;
CodeGen\SwitchStringJumpTableEmitter.cs (2)
131HashBucket hashBucket = kvPair.Value; 174this.EmitCondBranchForStringSwitch(kvPair.Key, kvPair.Value);
Collections\CachingDictionary.cs (1)
120array.AddRange(kvp.Value);
Collections\Grouping.cs (1)
28: this(pair.Key, pair.Value)
Collections\OrderPreservingMultiDictionary.cs (1)
44kvp.Value.Free();
Collections\SmallDictionary.cs (1)
57this.Add(kv.Key, kv.Value);
CommandLine\AnalyzerConfigSet.cs (1)
559var result = dict.ToImmutableDictionary(d => d.Key, d => d.Value.value, Section.PropertiesKeyComparer);
CommandLine\ReportAnalyzerUtil.cs (5)
74var totalAnalyzerExecutionTime = analyzerDriver.AnalyzerExecutionTimes.Sum(kvp => kvp.Value.TotalSeconds); 84.OrderByDescending(kvp => kvp.Sum(entry => entry.Value.Ticks)); 87var executionTime = analyzerGroup.Sum(kvp => kvp.Value.TotalSeconds); 92foreach (var kvp in analyzerGroup.OrderByDescending(kvp => kvp.Value)) 94executionTime = kvp.Value.TotalSeconds;
CommandLine\SarifErrorLogger.cs (1)
108_writer.Write(pair.Key, pair.Value);
CommandLine\SarifV1ErrorLogger.cs (2)
158DiagnosticDescriptor descriptor = pair.Value; 293list.Add(new KeyValuePair<string, DiagnosticDescriptor>(pair.Value, pair.Key));
CommandLine\SarifV2ErrorLogger.cs (2)
505list.Add((pair.Value.Index, pair.Key, pair.Value.Info));
Compilation\CompilationOptions.cs (2)
642this.SpecificDiagnosticOptions.SequenceEqual(other.SpecificDiagnosticOptions, (left, right) => (left.Key == right.Key) && (left.Value == right.Value)) &&
Compilation\ParseOptions.cs (1)
196Hash.Combine(kv.Value.GetHashCode(), value));
CvtRes.cs (7)
703RoslynDebug.Assert(keyValuePair.Value != null); 705ushort cbBlock = SizeofVerString(keyValuePair.Key, keyValuePair.Value); 707int cbVal = (keyValuePair.Value.Length + 1) * 2; // includes terminating NUL 713writer.Write((WORD)(keyValuePair.Value.Length + 1)); //add 1 for nul 719writer.Write(keyValuePair.Value.ToCharArray()); 748sum += SizeofVerString(verString.Key, verString.Value); 853System.Diagnostics.Debug.Assert(entry.Value != null);
DiagnosticAnalyzer\AnalysisResult.cs (3)
120foreach (var diagnosticsByAnalyzer in diagnosticsByTree.Value) 127builder.AddRange(diagnosticsByAnalyzer.Value); 144builder.AddRange(diagnosticsByAnalyzer.Value);
DiagnosticAnalyzer\AnalysisResultBuilder.cs (3)
550foreach (var diagnosticsByAnalyzer in diagnosticsByTree.Value) 554var diagnostics = diagnosticsByAnalyzer.Value.Where(shouldInclude).ToImmutableArray(); 590var diagnostics = diagnosticsByAnalyzer.Value.Where(shouldInclude).ToImmutableArray();
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
396return _resolvedToOriginalPathMap.Select(x => (x.Value, x.Key)).ToImmutableArray();
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
908var analyzersSuppressedForSomeTree = SuppressedAnalyzersForTreeMap.SelectMany(kvp => kvp.Value).ToImmutableHashSet(); 909totalAnalyzerExecutionTime = AnalyzerExecutionTimes.Sum(kvp => kvp.Value.TotalSeconds);
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
234return _analyzerExecutionTimeMap.ToImmutableDictionary(pair => pair.Key, pair => TimeSpan.FromTicks(pair.Value.Value));
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
257return typeNameMap.ToImmutableSortedDictionary(g => g.Key, g => g.Value.ToImmutable(), StringComparer.OrdinalIgnoreCase);
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
174if (lazyDiagnosticsMap != null && lazyDiagnosticsMap.Any(kvp => kvp.Value.TryDequeue(out diag)))
DocumentationComments\DocumentationCommentIncludeCache.cs (1)
37return GetOrMakeValue(resolvedPath).Value;
Emit\CommonPEModuleBuilder.cs (2)
1070builder.Add(entry.Key, entry.Value.GetAllMembers()); 1078builder.Add(entry.Key, entry.Value.ToImmutableArray<ISymbolInternal>());
Emit\EditAndContinue\DeltaMetadataWriter.cs (4)
195addedOrChangedMethodsByIndex.Add(MetadataTokens.GetRowNumber(GetMethodDefinitionHandle(pair.Key)), pair.Value); 266result.Add(pair.Key, pair.Value); 289result[pair.Key] = pair.Value; 1009? _previousGeneration.CustomAttributesAdded.Max(static entry => entry.Value[^1])
Emit\EditAndContinue\EmitBaseline.cs (2)
422Debug.Assert(customAttributesAdded.All(entry => !entry.Value.IsDefaultOrEmpty && entry.Value.IsSorted()));
Emit\EditAndContinue\SymbolChanges.cs (2)
471elementSelector: static e => e.Value.ToImmutableAndFree()) ?? ImmutableSegmentedDictionary<ISymbolInternal, ImmutableArray<ISymbolInternal>>.Empty; 475elementSelector: static e => e.Value.ToImmutableAndFree());
Emit\EditAndContinue\SymbolMatcher.cs (2)
88result.Add(key, pair.Value); 101result.Add(pair.Key, pair.Value.MapTypes(this));
FileSystem\PathUtilities.cs (1)
747var replacementPrefix = kv.Value;
InternalUtilities\ConcurrentLruCache.cs (1)
55this.UnsafeAdd(kvp.Key, kvp.Value, true);
InternalUtilities\ImmutableSetWithInsertionOrder`1.cs (1)
124get { return _map.OrderBy(kv => kv.Value).Select(kv => kv.Key); }
MetadataReader\MetadataHelpers.cs (2)
926nestedNamespaces[keyIndex] = KeyValuePair.Create(primaryPair.Key, primaryPair.Value.Concat(pair.Value));
MetadataReader\PEModule.cs (6)
687result.Add(new Grouping<string, TypeDefinitionHandle>(pair.Key, pair.Value ?? SpecializedCollections.EmptyEnumerable<TypeDefinitionHandle>())); 783builder.AddRange(kvp.Value); 787namespaces.Add(@namespace, kvp.Value); 1417isOptional = (bool)namedArgValues.nameValuePair.Value.ValueInternal!; 1580allowMultiple = (bool)namedArgValues.nameValuePair.Value.ValueInternal; 1583inherited = (bool)namedArgValues.nameValuePair.Value.ValueInternal;
MetadataReference\AssemblyIdentityMap.cs (4)
49value = sameName[i].Value; 68value = sameName[minHigherVersionCandidate].Value; 86if (comparer(identity.Version, currentIdentity.Version, sameName[i].Value) && 89value = sameName[i].Value;
NativePdbWriter\PdbWriter.cs (4)
705foreach (var definition in kvp.Value) 721foreach (var definition in kvp.Value) 781.Where(kvp => !_documentIndex.ContainsKey(kvp.Value)) 784AddDocumentIndex(kvp.Value);
Operations\ControlFlowGraphBuilder.ImplicitInstanceInfo.cs (1)
70AnonymousTypePropertyValues.Add(pair.Key, pair.Value);
PEWriter\MetadataWriter.cs (1)
1126signatureBlob = existing.Value;
PEWriter\MetadataWriter.DynamicAnalysis.cs (1)
311int heapOffset = MetadataTokens.GetHeapOffset(entry.Value);
PEWriter\MetadataWriter.PortablePdb.cs (2)
795.Where(kvp => !_documentIndex.ContainsKey(kvp.Value)) 798AddDocument(kvp.Value, _documentIndex);
ReferenceManager\CommonReferenceManager.State.cs (4)
523for (int i = 1; i < assemblyReference.Value.Count; i++) 525int assemblyIndex = assemblyReference.Value[i].GetAssemblyIndex(explicitlyReferencedAssemblyCount); 682return ReferencedAssembliesMap.Select(ra => KeyValuePair.Create(ra.Key, (IAssemblySymbolInternal)ReferencedAssemblies[ra.Value])); 704if ((object)ReferencedAssemblies[entry.Value] == assemblySymbol)
RuleSet\RuleSet.cs (8)
91if (item.Value != ReportDiagnostic.Suppress && item.Value != ReportDiagnostic.Default) 159if (IsStricterThan(item.Value, value)) 161effectiveSpecificOptions[item.Key] = item.Value; 166effectiveSpecificOptions.Add(item.Key, item.Value); 177effectiveSpecificOptions[item.Key] = item.Value; 181effectiveSpecificOptions.Add(item.Key, item.Value); 310diagnosticOptions.Add(rule.Key, rule.Value);
RuleSet\RuleSetProcessor.cs (1)
114var action = rule.Value;
SourceGeneration\Nodes\GeneratorRunStateTable.cs (1)
68resultBuilder.Add(stepsByName.Key, stepsByName.Value.ToImmutableArrayOrEmpty());
SourceGeneration\Nodes\StateTableStore.cs (2)
52var cachedValue = kvp.Value.AsCached(); 53if (cachedValue != kvp.Value)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
711builder.AddRange(kvp.Value); 833result.Add(entry.Key, createMembers(entry.Value)); 876var namedTypes = getOrCreateNamedTypes(entry.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
186&& EqualityComparer<TValue>.Default.Equals(value, pair.Value); 240result[item.Key] = item.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (2)
49readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 53readonly object? IDictionaryEnumerator.Value => Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
119=> Add(item.Key, item.Value); 127Add(pair.Key, pair.Value); 149&& EqualityComparer<TValue>.Default.Equals(value, item.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (1)
25public readonly TValue Current => _enumerator.Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (9)
210Add(pair.Key, pair.Value); 218Add(pair.Key, pair.Value); 271=> Add(keyValuePair.Key, keyValuePair.Value); 276if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 287if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234return new DictionaryEntry(_current.Key, _current.Value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1261return new DictionaryEntry(_current.Key, _current.Value); 1287return _current.Value;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
650dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
Symbols\Attributes\CommonAttributeData.cs (5)
172return index >= 0 ? namedArguments[index].Value.DecodeValue<T>(specialType) : defaultValue; 452var value = (MethodImplAttributes)namedArg.Value.DecodeValue<int>(SpecialType.System_Enum); 509charSet = namedArg.Value.DecodeValue<CharSet>(SpecialType.System_Enum); 530alignment = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32); 542size = namedArg.Value.DecodeValue<int>(Microsoft.CodeAnalysis.SpecialType.System_Int32);
Symbols\Attributes\CommonAttributeDataComparer.cs (3)
87hash = hashCombine(arg.Value.GetHashCode(), hash, _considerNamedArgumentsOrder); 145bool equals = pair1.Key == pair2.Key && TypedConstantComparer.IgnoreAll.Equals(pair1.Value, pair2.Value);
Symbols\Attributes\MarshalAsAttributeDecoder.cs (10)
131typeName = namedArg.Value.DecodeValue<string>(SpecialType.System_String); 142typeSymbol = namedArg.Value.DecodeValue<ITypeSymbolInternal>(SpecialType.None); 147cookie = namedArg.Value.DecodeValue<string>(SpecialType.System_String); 187parameterIndex = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32); 223elementType = namedArg.Value.DecodeValue<UnmanagedType>(SpecialType.System_Enum); 237elementCount = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32); 252parameterIndex = namedArg.Value.DecodeValue<short>(SpecialType.System_Int16); 311elementTypeVariant = namedArg.Value.DecodeValue<Cci.VarEnum>(SpecialType.System_Enum); 321elementTypeSymbol = namedArg.Value.DecodeValue<ITypeSymbolInternal>(SpecialType.None); 379elementCount = namedArg.Value.DecodeValue<int>(SpecialType.System_Int32);
Syntax\SyntaxNodeExtensions_Tracking.cs (1)
220_idToNodeMap = map.ToImmutableSegmentedDictionary(kv => kv.Key, kv => (IReadOnlyList<SyntaxNode>)ImmutableArray.CreateRange(kv.Value));
TreeDumper.cs (1)
273var currentNode = currentEdge.Value;
Microsoft.CodeAnalysis.Analyzers (45)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (1)
361return builder.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutable());
MetaAnalyzers\CompilerExtensionTargetFrameworkAnalyzer.cs (1)
79displayName = appliedTargetFrameworkAttribute.NamedArguments.FirstOrDefault(arg => arg.Key == nameof(TargetFrameworkAttribute.FrameworkDisplayName)).Value.Value as string
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (1)
465var analyzerToDescriptorLocationsMap = kvp.Value;
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.FixAllProvider.cs (1)
97ImmutableArray<Diagnostic> diagnostics = pair.Value;
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (2)
104var diagnostics = kvp.Value; 129var fixInfos = kvp.Value;
MetaAnalyzers\SymbolIsBannedInAnalyzersAnalyzer.cs (1)
116return result.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableArray());
src\b310f676f7308b7f\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
241foreach (var (symbol, write) in SymbolsWriteBuilder.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key))
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
44kvp.Value.Free();
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (1)
57this.Add(kv.Key, kv.Value);
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
747var replacementPrefix = kv.Value;
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
711builder.AddRange(kvp.Value); 833result.Add(entry.Key, createMembers(entry.Value)); 876var namedTypes = getOrCreateNamedTypes(entry.Value);
src\roslyn\src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
18value = keyValuePair.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
186&& EqualityComparer<TValue>.Default.Equals(value, pair.Value); 240result[item.Key] = item.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (2)
49readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 53readonly object? IDictionaryEnumerator.Value => Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
119=> Add(item.Key, item.Value); 127Add(pair.Key, pair.Value); 149&& EqualityComparer<TValue>.Default.Equals(value, item.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (1)
25public readonly TValue Current => _enumerator.Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (9)
210Add(pair.Key, pair.Value); 218Add(pair.Key, pair.Value); 271=> Add(keyValuePair.Key, keyValuePair.Value); 276if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 287if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234return new DictionaryEntry(_current.Key, _current.Value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1261return new DictionaryEntry(_current.Key, _current.Value); 1287return _current.Value;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
650dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (1)
226foreach (var entry in kvp.Value)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
139wildcardNamesBuilder.ToImmutableDictionaryAndFree(x => x.Key, x => x.Value.ToImmutableDictionaryAndFree(), wildcardNamesBuilder.Comparer));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
81var added = instance.TryAdd(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
81instance.Add(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
80var severity = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
59this.Add(kv.Key, kv.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
48=> SymbolWritesMap.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key); 61return kvp.Value;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
25backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePair.Create(p.Value, p.Key))))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
253if (predicate(entry.Key, entry.Value, arg))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
236var importContainer = addImportsService.GetImportContainer(root, context, importToSyntax.First().Value, options); 247selector: kvp => kvp.Value);
Microsoft.CodeAnalysis.AnalyzerUtilities (92)
src\2e2796bccd1466f6\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (2)
52kvp.Value.SinkKinds.ToImmutable(), 53kvp.Value.SourceOrigins.ToImmutable()));
src\683181b2796de991\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (1)
371var syntaxNode = kvp.Value;
src\a03b2aad21e28a8a\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (6)
368if (kvp.Value.AbstractLocationsToAssignments != null) 377if (!kvp.Value.AbstractLocationsToAssignments.TryGetValue( 414if (kvp.Value.AssignmentsWithUnknownLocation != null) 420foreach (IAssignmentOperation assignmentOperation in kvp.Value.AssignmentsWithUnknownLocation) 679this._hazardousUsageBuilder[kvp.Key] = MergeHazardousUsageEvaluationResult(kvp.Value, existingValue); 683this._hazardousUsageBuilder.Add(kvp.Key, kvp.Value);
src\b310f676f7308b7f\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
241foreach (var (symbol, write) in SymbolsWriteBuilder.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key))
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
44kvp.Value.Free();
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (1)
57this.Add(kv.Key, kv.Value);
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
747var replacementPrefix = kv.Value;
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
711builder.AddRange(kvp.Value); 833result.Add(entry.Key, createMembers(entry.Value)); 876var namedTypes = getOrCreateNamedTypes(entry.Value);
src\roslyn\src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
18value = keyValuePair.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
186&& EqualityComparer<TValue>.Default.Equals(value, pair.Value); 240result[item.Key] = item.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (2)
49readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 53readonly object? IDictionaryEnumerator.Value => Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
119=> Add(item.Key, item.Value); 127Add(pair.Key, pair.Value); 149&& EqualityComparer<TValue>.Default.Equals(value, item.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (1)
25public readonly TValue Current => _enumerator.Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (9)
210Add(pair.Key, pair.Value); 218Add(pair.Key, pair.Value); 271=> Add(keyValuePair.Key, keyValuePair.Value); 276if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 287if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234return new DictionaryEntry(_current.Key, _current.Value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1261return new DictionaryEntry(_current.Key, _current.Value); 1287return _current.Value;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
650dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
139wildcardNamesBuilder.ToImmutableDictionaryAndFree(x => x.Key, x => x.Value.ToImmutableDictionaryAndFree(), wildcardNamesBuilder.Comparer));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
81var added = instance.TryAdd(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
81instance.Add(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
80var severity = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
59this.Add(kv.Key, kv.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysis.CopyDataFlowOperationVisitor.cs (1)
528var copyValue = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysis.CoreCopyAnalysisDataDomain.cs (1)
38var value1 = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisData.cs (7)
133var predicatedValue = kvp.Value; 175coreAnalysisData[kvp.Key] = kvp.Value; 180Debug.Assert(predicatedData.All(kvp => kvp.Value.AnalysisEntities.IsSubsetOf(coreAnalysisData[kvp.Key].AnalysisEntities))); 212Debug.Assert(kvp.Value.AnalysisEntities.Contains(kvp.Key)); 213foreach (var analysisEntity in kvp.Value.AnalysisEntities) 216Debug.Assert(map[analysisEntity] == kvp.Value); 228Debug.Assert(kvp.Value.AnalysisEntities.Contains(defaultCopyValyeEntity));
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisData.cs (1)
131AssertValidPointsToAnalysisKeyValuePair(kvp.Key, kvp.Value, isDisposable);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.cs (2)
271allResults[kvp.Key] = PropertySetAnalysis.MergeHazardousUsageEvaluationResult(existingValue, kvp.Value); 275allResults.Add(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataConfig.cs (2)
151ImmutableHashSet<SinkInfo> sinks = kvp.Value.SinkInfos.ToImmutable(); 155foreach (SinkKind sinkKind in kvp.Value.SinkKinds)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (1)
677var newValue = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityMapAbstractDomain.cs (3)
70AssertValidEntryForMergedMap(kvp.Key, kvp.Value); 91TValue value1 = entry1.Value; 202var value2 = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResult.cs (2)
134return kvp.Value; 138value = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResultBuilder.cs (1)
66var blockAnalysisData = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (2)
542AnalysisEntity analysisEntity = kvp.Value; 593AnalysisEntity analysisEntity = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (1)
94_coreAnalysisData.Add(item.Key, item.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\MapAbstractDomain.cs (4)
59var value = kvp.Value; 105value = ValueDomain.Merge(value, entry.Value); 118result.Add(entry.Key, entry.Value); 138result.Add(kvp.Key, intersect(kvp.Value, value2));
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\PredicatedAnalysisData.cs (20)
168coreAnalysisData[kvp.Key] = kvp.Value; 180if (kvp.Value.TruePredicatedData != null) 182RemoveEntryInPredicatedData(key, kvp.Value.TruePredicatedData); 185if (kvp.Value.FalsePredicatedData != null) 187RemoveEntryInPredicatedData(key, kvp.Value.FalsePredicatedData); 210clonedMap.Add(kvp.Key, new PerEntityPredicatedAnalysisData(kvp.Value)); 250var resultTruePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.TruePredicatedData, coreAnalysisDataForOtherBranch, coreDataAnalysisDomain); 251var resultFalsePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.FalsePredicatedData, coreAnalysisDataForOtherBranch, coreDataAnalysisDomain); 289resultTruePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.TruePredicatedData, coreAnalysisData2, coreDataAnalysisDomain); 290resultFalsePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.FalsePredicatedData, coreAnalysisData2, coreDataAnalysisDomain); 295resultTruePredicatedData = Merge(kvp.Value.TruePredicatedData, value2.TruePredicatedData, 297resultFalsePredicatedData = Merge(kvp.Value.FalsePredicatedData, value2.FalsePredicatedData, 311var resultTruePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.TruePredicatedData, coreAnalysisData1, coreDataAnalysisDomain); 312var resultFalsePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.FalsePredicatedData, coreAnalysisData1, coreDataAnalysisDomain); 398!EqualsHelper(kvp.Value.TruePredicatedData, otherValue.TruePredicatedData) || 399!EqualsHelper(kvp.Value.FalsePredicatedData, otherValue.FalsePredicatedData)) 451if (kvp.Value.TruePredicatedData != null) 453assertValidAnalysisData(kvp.Value.TruePredicatedData); 456if (kvp.Value.FalsePredicatedData != null) 458assertValidAnalysisData(kvp.Value.FalsePredicatedData);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
48=> SymbolWritesMap.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key); 61return kvp.Value;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
25backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePair.Create(p.Value, p.Key))))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
253if (predicate(entry.Key, entry.Value, arg))
Microsoft.CodeAnalysis.CodeStyle (32)
src\b310f676f7308b7f\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
241foreach (var (symbol, write) in SymbolsWriteBuilder.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key))
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
214properties = properties.AddRange(tagIndices.Select(kvp => new KeyValuePair<string, string?>(kvp.Key, EncodeIndices(kvp.Value, additionalLocations.Count()))));
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
913Value: { Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string namedValue },
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
44kvp.Value.Free();
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (1)
57this.Add(kv.Key, kv.Value);
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
747var replacementPrefix = kv.Value;
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
711builder.AddRange(kvp.Value); 833result.Add(entry.Key, createMembers(entry.Value)); 876var namedTypes = getOrCreateNamedTypes(entry.Value);
src\roslyn\src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
18value = keyValuePair.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
186&& EqualityComparer<TValue>.Default.Equals(value, pair.Value); 240result[item.Key] = item.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (2)
49readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 53readonly object? IDictionaryEnumerator.Value => Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
119=> Add(item.Key, item.Value); 127Add(pair.Key, pair.Value); 149&& EqualityComparer<TValue>.Default.Equals(value, item.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (1)
25public readonly TValue Current => _enumerator.Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (9)
210Add(pair.Key, pair.Value); 218Add(pair.Key, pair.Value); 271=> Add(keyValuePair.Key, keyValuePair.Value); 276if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 287if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234return new DictionaryEntry(_current.Key, _current.Value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1261return new DictionaryEntry(_current.Key, _current.Value); 1287return _current.Value;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
650dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
48=> SymbolWritesMap.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key); 61return kvp.Value;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
25backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePair.Create(p.Value, p.Key))))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
253if (predicate(entry.Key, entry.Value, arg))
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
204var memberToAssignTo = parameterToExistingMember.FirstOrDefault().Value;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
236var importContainer = addImportsService.GetImportContainer(root, context, importToSyntax.First().Value, options); 247selector: kvp => kvp.Value);
Microsoft.CodeAnalysis.CSharp (87)
Binder\Binder_Conversions.cs (1)
1791method, requiredMembers.First().Value);
Binder\Binder_Lambda.cs (1)
451int count = pair.Value;
Binder\Binder_Lookup.cs (1)
2032addAliasSymbolToResult(result, pair.Value.Alias, options, originalBinder);
Binder\DecisionDagBuilder.cs (3)
1239Debug.Assert(kvp.Key == kvp.Value); 1332!existingState.RemainingValues.All(kv => newRemainingValues.TryGetValue(kv.Key, out IValueSet? values) && kv.Value.Equals(values))) 2861var remainingValues = state.RemainingValues.Select(kvp => $"{tempName(kvp.Key)}:{kvp.Value}");
Binder\Imports.cs (3)
53UsingAliases.OrderBy(x => x.Value.UsingDirective.Location.SourceSpan.Start).Select(ua => $"{ua.Key} = {ua.Value.Alias.Target}").Concat( 77var directive = pair.Value;
Binder\LocalScopeBinder.cs (5)
472result.AddSymbol(label.Value, label.Key, 0); 482if (originalBinder.CanAddLookupSymbolInfo(local.Value, options, result, null)) 484result.AddSymbol(local.Value, local.Key, 0); 492if (originalBinder.CanAddLookupSymbolInfo(local.Value, options, result, null)) 494result.AddSymbol(local.Value, local.Key, 0);
Binder\PatternExplainer.cs (1)
749var propertyString = needsPropertyString ? (deconstruction != null ? " {" : "{") + string.Join(", ", properties.Select(kvp => $" {kvp.Key.Name}: {kvp.Value}")) + " }" : null;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1135ArrayBuilder<TMember> others = pair.Value;
Binder\WithCrefTypeParametersBinder.cs (1)
154foreach (TypeParameterSymbol typeParameter in kvp.Value)
Binder\WithExternAndUsingAliasesBinder.cs (1)
251return _usingAliases.SelectAsArray(static pair => pair.Value);
BoundTree\UnboundLambda.cs (5)
1315return candidates.First().Value; 1318IEnumerable<KeyValuePair<T, BoundLambda>> minDiagnosticsGroup = candidates.GroupBy(lambda => lambda.Value.Diagnostics.Diagnostics.Length).OrderBy(group => group.Key).First(); 1323.OrderBy(lambda => GetLambdaSortString((LambdaSymbol)lambda.Value.Symbol)) 1325.Value; 1379var convBags = from boundLambda in _bindingCache select boundLambda.Value.Diagnostics;
CodeGen\Optimizer.cs (1)
153from d in i.Value.LocalDefs
CommandLine\CSharpCommandLineParser.cs (2)
1408diagnosticOptions[o.Key] = o.Value; 1414diagnosticOptions[o.Key] = o.Value;
Compilation\CSharpCompilation.cs (1)
2777ImmutableArray<AssemblySymbol> dependencies = pair.Value;
Compilation\CSharpSemanticModel.cs (1)
5481imports.UsingAliases.SelectAsArray(static kvp => kvp.Value.Alias.GetPublicSymbol()),
Compiler\ClsComplianceChecker.cs (1)
620TypedConstant argument = pair.Value;
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
176result[pair.Value] = pair.Key;
Emitter\Model\AttributeDataAdapter.cs (1)
67builder.Add(CreateMetadataNamedArgument(namedArgument.Key, namedArgument.Value, context));
Emitter\Model\SynthesizedPrivateImplementationDetailsStaticConstructor.cs (1)
50ArrayTypeSymbol payloadArrayType = (ArrayTypeSymbol)payloadRoot.Value.Type.GetInternalSymbol();
FlowAnalysis\AbstractFlowPass.PendingBranchesCollection.cs (1)
108branches.AddRange(pair.Value);
FlowAnalysis\NullableWalker.cs (1)
974=> containingType.AllRequiredMembers.SelectManyAsArray(static kvp => getAllMembersToBeDefaulted(kvp.Value, filterOverridingProperties: true)),
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
175var snapshotsArray = EnumerableExtensions.SelectAsArray<KeyValuePair<int, Snapshot>, (int, Snapshot)>(_incrementalSnapshots, (kvp) => (kvp.Key, kvp.Value));
FlowAnalysis\NullableWalker.Variables.cs (2)
172var index = pair.Value; 179_variableTypes.Add(pair.Key, pair.Value);
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (2)
271group ft.Key by ft.Value into g 449var proxy = p.Value;
Lowering\LocalRewriter\LocalRewriter_BasePatternSwitchLocalRewriter.cs (2)
63entry.Value.Free(); 76var switchSections = _switchArms.ToImmutableDictionary(kv => kv.Key, kv => kv.Value.ToImmutableAndFree());
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
85builder.AppendLine(kv.Value.Dump());
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
89foreach (var syntax in kvp.Value) 109foreach (var syntax in kvp.Value)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (3)
137this.proxies.Add(proxy.Key, proxy.Value); 253orderby kv.Value[0] 254select F.SwitchSection(kv.Value.SelectAsArray(state => (int)state), F.Goto(kv.Key));
Symbols\AbstractTypeParameterMap.cs (1)
45result.Append(' ').Append(kv.Key).Append(':').Append(kv.Value.Type);
Symbols\Attributes\AttributeData.cs (2)
172stringBuilder.Append(namedArgument.Value.ToCSharpString()); 525var fileName = (string?)namedArg.Value.ValueInternal;
Symbols\Compilation_WellKnownMembers.cs (1)
434wellKnownMember.Name, arg.Value));
Symbols\Metadata\PE\PEModuleSymbol.cs (4)
659Debug.Assert(forwarder.Value.FirstIndex >= 0, "First index should never be negative"); 660AssemblySymbol firstSymbol = this.GetReferencedAssemblySymbol(forwarder.Value.FirstIndex); 663if (forwarder.Value.SecondIndex >= 0) 665var secondSymbol = this.GetReferencedAssemblySymbol(forwarder.Value.SecondIndex);
Symbols\Metadata\PE\PENamespaceSymbol.cs (2)
88builder.Add(pair.Value); 266var c = new PENestedNamespaceSymbol(child.Key, this, child.Value);
Symbols\Metadata\PE\SymbolFactory.cs (1)
149TypeMap substitution = new TypeMap(typeParameters, arguments.SelectAsArray(arg => CreateType(arg.Key, arg.Value)));
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
1275TypedConstant oldConstant = oldArgument.Value;
Symbols\Source\ConstantEvaluationHelpers.cs (1)
337var node = pair.Value;
Symbols\Source\ExtensionGroupingInfo.cs (2)
60builder.Add(new ExtensionGroupingType(pair.Key, pair.Value)); 696builder.Add(new ExtensionMarkerType(this, name: pair.Key, extensions: pair.Value));
Symbols\Source\SourceAssemblySymbol.cs (4)
744diagnostics.Add(ErrorCode.ERR_FriendAssemblySNReq, oneKey.Value.Item1, oneKey.Value.Item2); 978string moduleName = _modules[pair.Value].Name; 2568wrapNonExceptionThrows = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean);
Symbols\Source\SourceMemberContainerSymbol.cs (9)
1778dictionary.Add(pair.Key, pair.Value is ArrayBuilder<Symbol> arrayBuilder 1780: ImmutableArray.Create((Symbol)pair.Value)); 2227foreach (var symbol in pair.Value) 2646membersByName[pair.Key] = concatMembers(members, extension, pair.Value, ref membersUnordered); 2650membersByName.Add(pair.Key, concatMembers([], extension, pair.Value, ref membersUnordered)); 4171if (pair.Value is ArrayBuilder<Symbol> arrayBuilder) 4221var symbol = (Symbol)pair.Value; 4286if (pair.Value is ArrayBuilder<Symbol> arrayBuilder) 4295fixupNotMergedPartialProperty((Symbol)pair.Value);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (8)
893importName = namedArg.Value.ValueInternal as string; 906charSet = namedArg.Value.DecodeValue<CharSet>(SpecialType.System_Enum); 911setLastError = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 916exactSpelling = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 920preserveSig = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 925callingConvention = namedArg.Value.DecodeValue<CallingConvention>(SpecialType.System_Enum); 929bestFitMapping = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean); 933throwOnUnmappable = namedArg.Value.DecodeValue<bool>(SpecialType.System_Boolean);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
168MultiDictionary<NamedTypeSymbol, NamedTypeSymbol>.ValueSet set = pair.Value;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
934appendAttributeArgument(namedArgument.Value, builder);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (1)
301diagnostics.Add(ErrorCode.ERR_DuplicateAlias, pair.Value.Alias.GetFirstLocation(), pair.Key);
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
125return capturedParameters.OrderBy(static pair => pair.Key.Ordinal).Select(static pair => pair.Value);
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
171static kvp => (string?)kvp.Value.Name);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
23return dictionary.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.AsImmutable());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (3)
75return (default(SyntaxTriviaList), GetLeadingTriviaAtBeginningOfTree(pair.Key, pair.Value, cancellationToken)); 78if (pair.Value is TriviaDataWithList csharpTriviaData) 89var text = pair.Value.GetTextChanges(GetTextSpan(pair.Key)).Single().NewText ?? "";
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
175var orderedKVPs = properties.OrderBy(kvp => constructor.Parameters.FirstOrDefault(p => p.Name == kvp.Value)?.Ordinal);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
183if (firstMember == constructorDeclaration || removedMembers.Any(kvp => kvp.Value.memberNode == firstMember)) 227if (!removedMembers.Any(kvp => kvp.Value.memberNode == priorMember))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
94GenerateAttributeSyntax(argument.Value)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
299var result = MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, memberAccess, IdentifierName(constant.Value));
Microsoft.CodeAnalysis.CSharp.Features (8)
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (3)
133Contract.ThrowIfFalse(keyValuePair.Value.Count > 0); 137foreach (var statement in keyValuePair.Value) 149VariableDeclaration(keyValuePair.Value.First().Declaration.Type, [.. variables]));
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
85var interfaceTypes = directlyImplementedMembers.SelectMany(kvp => kvp.Value).Select(
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
171static kvp => (string?)kvp.Value.Name);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
175var orderedKVPs = properties.OrderBy(kvp => constructor.Parameters.FirstOrDefault(p => p.Name == kvp.Value)?.Ordinal);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (2)
183if (firstMember == constructorDeclaration || removedMembers.Any(kvp => kvp.Value.memberNode == firstMember)) 227if (!removedMembers.Any(kvp => kvp.Value.memberNode == priorMember))
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
FileBasedPrograms\FileBasedProgramService.cs (1)
31result.Add(kvp.Key, kvp.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
23return dictionary.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.AsImmutable());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (3)
75return (default(SyntaxTriviaList), GetLeadingTriviaAtBeginningOfTree(pair.Key, pair.Value, cancellationToken)); 78if (pair.Value is TriviaDataWithList csharpTriviaData) 89var text = pair.Value.GetTextChanges(GetTextSpan(pair.Key)).Single().NewText ?? "";
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
94GenerateAttributeSyntax(argument.Value)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
299var result = MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, memberAccess, IdentifierName(constant.Value));
Microsoft.CodeAnalysis.Extensions.Package (22)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
711builder.AddRange(kvp.Value); 833result.Add(entry.Key, createMembers(entry.Value)); 876var namedTypes = getOrCreateNamedTypes(entry.Value);
src\roslyn\src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
18value = keyValuePair.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
186&& EqualityComparer<TValue>.Default.Equals(value, pair.Value); 240result[item.Key] = item.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (2)
49readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 53readonly object? IDictionaryEnumerator.Value => Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
119=> Add(item.Key, item.Value); 127Add(pair.Key, pair.Value); 149&& EqualityComparer<TValue>.Default.Equals(value, item.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (1)
25public readonly TValue Current => _enumerator.Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (9)
210Add(pair.Key, pair.Value); 218Add(pair.Key, pair.Value); 271=> Add(keyValuePair.Key, keyValuePair.Value); 276if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 287if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234return new DictionaryEntry(_current.Key, _current.Value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1261return new DictionaryEntry(_current.Key, _current.Value); 1287return _current.Value;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
650dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
Microsoft.CodeAnalysis.ExternalAccess.HotReload (1)
Api\HotReloadService.cs (1)
208RestartWhenChangesHaveNoEffect = e.Value.RestartWhenChangesHaveNoEffect
Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler (1)
GeneratorExtensions.cs (1)
35public static ImmutableArray<(string Key, string Value)> GetHostOutputs(this GeneratorRunResult runResult) => runResult.HostOutputs.ToImmutableArray().SelectAsArray(a => (a.Key, a.Value.ToString() ?? ""));
Microsoft.CodeAnalysis.Features (56)
ChangeSignature\ChangeSignatureTelemetryLogger.cs (3)
187m[kv.Key.ToString()] = kv.Value.GetCount(); 192var statistics = kv.Value.GetStatisticResult(); 198kv.Value.WriteTelemetryPropertiesTo(m, prefix: kv.Key.ToString());
CodeFixes\Service\CodeFixService.cs (2)
932return mutableMap.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableAndFree()); 1019return builder.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableAndFree());
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (2)
92var source = documentsAndDiagnosticsToFixMap.WhereAsArray(static (kvp, _) => !kvp.Value.IsDefaultOrEmpty, arg: false); 292return documentIdToFinalText.SelectAsArray(kvp => (kvp.Key, kvp.Value));
Completion\Log\CompletionProvidersLogger.cs (3)
90var statistics = kv.Value.GetStatisticResult(); 96m[kv.Key.ToString()] = kv.Value.GetCount(); 101kv.Value.WriteTelemetryPropertiesTo(m, prefix: kv.Key.ToString());
Completion\Providers\AbstractSymbolCompletionProvider.cs (3)
180if (symbolGroup.Value.Count == 1) 184CreateAndAddItem([symbolGroup.Value.Single()], false); 188var symbolLists = DeduplicateSymbols(symbolGroup.Value);
Completion\Providers\CompletionUtilities.cs (1)
76return item.AddProperty(property.Key, property.Value);
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
328var overloadInfo = pair.Value;
Copilot\CopilotChangeAnalysisUtilities.cs (1)
112=> string.Join(",", dictionary.Select(kvp => FormattableString.Invariant($"{kvp.Key}_{Stringify(kvp.Value)}")).OrderBy(v => v));
Diagnostics\DiagnosticAnalyzerExtensions.cs (1)
43=> analysisResult.SelectAsArray(kv => new AnalyzerPerformanceInfo(kv.Key.GetAnalyzerId(), analyzerInfo.IsTelemetryCollectionAllowed(kv.Key), kv.Value.ExecutionTime));
Diagnostics\Service\DiagnosticAnalyzerService_CoreAnalyze.cs (1)
66var result = builderMap.ToImmutableDictionary(kv => kv.Key, kv => DiagnosticAnalysisResult.CreateFromBuilder(kv.Value));
Diagnostics\Service\DiagnosticAnalyzerService_GetDiagnosticsForSpan.cs (1)
333list.AddRange(diagnosticsMap.SelectMany(kvp => kvp.Value));
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (1)
147kvp => kvp.Value.SelectAsArray(d => d.ToDiagnosticDescriptor()));
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
280list.Add(new DocumentHighlights(kvp.Key, [.. kvp.Value]));
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (6)
847=> string.Join(",", features.OrderBy(kvp => kvp.Key).Select(kvp => $"{kvp.Key}={kvp.Value}")); 1658map.ToDictionary(keySelector: entry => entry.Value, elementSelector: entry => entry.Key), 6062static item => new RuntimeRudeEdit(item.Value.ToDiagnostic(item.Key.SyntaxTree).ToString(), (int)item.Value.Kind)); 6995TypedConstantComparer.Instance.Equals(x.Value, y.Value);
EditAndContinue\ActiveStatementsMap.cs (2)
51Debug.Assert(documentPathMap.All(entry => entry.Value.IsSorted(Comparer))); 95elementSelector: entry => entry.Value.SelectAsArray(item => new ActiveStatement(
EditAndContinue\CommittedSolution.cs (1)
125return _documentState.SelectAsArray(e => (e.Key, e.Value));
EditAndContinue\EditSession.cs (1)
1582var diagnostics = diagnosticBuilders.SelectAsArray(entry => new ProjectDiagnostics(entry.Key, entry.Value.ToImmutableAndFree()));
EditAndContinue\Utilities\BidirectionalMap.cs (6)
33forward.Add(entry.Key, entry.Value); 34reverse.Add(entry.Value, entry.Key); 55forward.Add(entry.Key, entry.Value); 56reverse.Add(entry.Value, entry.Key); 61forward.Add(entry.Key, entry.Value); 62reverse.Add(entry.Value, entry.Key);
EmbeddedLanguages\AbstractEmbeddedLanguageFeatureService.cs (1)
75kvp => kvp.Key, kvp => kvp.Value.ToImmutableAndFree(), StringComparer.OrdinalIgnoreCase);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerLogger.cs (1)
140m[change] = kv.Value.GetCount();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (1)
220foreach (var lazyProvider in kv.Value)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
282return first.Value;
ExtractMethod\MethodExtractor.Analyzer.cs (1)
887var tokens = pair.Value;
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (2)
334syntaxNode: (SyntaxNode)parameterAndExpressionPair.Value)); 341.Select(kvp => (parameter: kvp.Key, syntaxNode: syntaxGenerator.IdentifierName(kvp.Value)));
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (2)
197var hasAtLeastOneTupleWhichAppearsMultipleTimes = transitiveReferences.Any(kvp => kvp.Key.IsTupleType && kvp.Value.count >= 2); 201foreach (var (namedType, _) in transitiveReferences.OrderBy(kvp => kvp.Value.order))
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (1)
142return documentToTextSpans.SelectAsArray(kvp => (kvp.Key, new NormalizedTextSpanCollection(kvp.Value)))!;
QuickInfo\OnTheFlyDocsLogger.cs (1)
47m[kv.Key.ToString()] = kv.Value.GetCount();
Shared\Utilities\AnnotatedSymbolMapping.cs (2)
101annotatedSolution = document.WithSyntaxRoot(root.Value).Project.Solution; 106elementSelector: (kvp) => kvp.Value.ToImmutableArray());
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
174.SelectMany(kvp => kvp.Value.Order())
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
214properties = properties.AddRange(tagIndices.Select(kvp => new KeyValuePair<string, string?>(kvp.Key, EncodeIndices(kvp.Value, additionalLocations.Count()))));
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
913Value: { Kind: TypedConstantKind.Primitive, Type.SpecialType: SpecialType.System_String, Value: string namedValue },
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
204var memberToAssignTo = parameterToExistingMember.FirstOrDefault().Value;
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
105.SelectMany(kvp => kvp.Value)
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (1)
58.ToImmutableDictionary(t => t.Key, t => t.Value.ToImmutableDictionary(l => l.Key.Split('/')[0], l => l.Key));
Microsoft.CodeAnalysis.Features.ExternalAccess (2)
Copilot\Internal\Analyzer\CSharp\CSharpCopilotCodeAnalysisService.cs (2)
174ReplacementNode = nodeToWrapper.Value.ReplacementNode, 175Message = nodeToWrapper.Value.Message
Microsoft.CodeAnalysis.NetAnalyzers (132)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CollectionsShouldImplementGenericInterface.cs (5)
104Debug.Assert(interfacePairs.All(kvp => kvp.Key.TypeKind == TypeKind.Interface && kvp.Value.All(x => x.TypeKind == TypeKind.Interface))); 141if (allInterfaces.Contains(kvp.Key) && !allInterfaces.Intersect(kvp.Value, SymbolEqualityComparer.Default).Any()) 143if (kvp.Value.Length > 1) 145ReportDiagnosticAlt(kvp.Key, kvp.Value); 149ReportDiagnostic(kvp.Key, kvp.Value[0]);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidMultipleEnumerations\FlowAnalysis\GlobalFlowStateDictionaryAnalysisValue.cs (5)
51builder[kvp.Key] = kvp.Value; 57var trackedEntities1 = kvp.Value; 66builder[key] = kvp.Value; 84var invocationSet = kvp.Value; 109var invocationSet = kvp.Value;
Microsoft.CodeQuality.Analyzers\QualityGuidelines\ValidateArgumentsOfPublicMethods.cs (1)
103SyntaxNode node = kvp.Value;
Microsoft.NetCore.Analyzers\InteropServices\PlatformCompatibilityAnalyzer.cs (10)
369var symbol = platformSpecificOperation.Value is IMethodSymbol method && method.IsConstructor() ? 370platformSpecificOperation.Value.ContainingType : platformSpecificOperation.Value; 608if (attribute.Value.IsSet()) 672bool allowList = AllowList(csAttributes.First().Value); 864callsiteAttributes != null && callsiteAttributes.Any(csa => DenyList(csa.Value)); 1595callSiteAttributes.Any(ca => DenyList(ca.Value))) 1847!pAttributes.Any(ca => AllowList(ca.Value))) 1965if (AllowList(childAttribute.Value)) 2257return attribute.NamedArguments[0].Value.Value?.ToString();
Microsoft.NetCore.Analyzers\Performance\AvoidPotentiallyExpensiveCallWhenLogging.cs (1)
350.Value.Value as int?
Microsoft.NetCore.Analyzers\Performance\ConstantExpectedAnalyzer.cs (4)
393&& !namedArg.Value.IsNull) 398&& !namedArg.Value.IsNull) 562minConstant = ToObject(namedArg.Value); 566maxConstant = ToObject(namedArg.Value);
Microsoft.NetCore.Analyzers\Performance\PreferHashDataOverComputeHash.cs (1)
634var arrayBuilder = kvp.Value;
Microsoft.NetCore.Analyzers\Performance\PreferHashDataOverComputeHash.Fixer.cs (1)
101ImmutableArray<Diagnostic> diagnostics = pair.Value;
Microsoft.NetCore.Analyzers\Performance\PreferReadOnlySpanOverSpan.cs (1)
113kvp.Value.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat),
Microsoft.NetCore.Analyzers\Performance\UseConcreteTypeAnalyzer.Collector.cs (1)
67kvp.Value.Dispose();
Microsoft.NetCore.Analyzers\Performance\UseConcreteTypeAnalyzer.cs (5)
181var methods = pair.Value; 193var methods = pair.Value; 205var methods = pair.Value; 217var methods = pair.Value; 235var returns = pair.Value;
Microsoft.NetCore.Analyzers\Runtime\AttributeStringLiteralsShouldParseCorrectly.cs (3)
204if (namedArgument.Value.IsNull || 205namedArgument.Value.Type?.SpecialType != SpecialType.System_String) 213namedArgument.Value.Value is string value)
Microsoft.NetCore.Analyzers\Runtime\DetectPreviewFeatureAnalyzer.cs (2)
890namedArgument.Value.Value is string messageValue) 896namedArgument.Value.Value is string urlValue)
Microsoft.NetCore.Analyzers\Runtime\DisposableFieldsShouldBeDisposed.cs (2)
230PointsToAbstractValue pointsToValue = fieldWithPointsToValue.Value; 275bool disposed = kvp.Value;
Microsoft.NetCore.Analyzers\Runtime\DisposeObjectsBeforeLosingScope.cs (1)
205DisposeAbstractValue disposeValue = kvp.Value;
Microsoft.NetCore.Analyzers\Runtime\PreferStringContainsOverIndexOfAnalyzer.cs (1)
198context.ReportDiagnostic(variableNameAndLocation.Value.CreateDiagnostic(Rule));
Microsoft.NetCore.Analyzers\Security\DoNotDisableHttpClientCRLCheck.cs (2)
221switch (kvp.Value) 232Debug.Fail($"Unhandled result value {kvp.Value}");
Microsoft.NetCore.Analyzers\Security\DoNotInstallRootCert.cs (2)
210switch (kvp.Value) 221Debug.Fail($"Unhandled result value {kvp.Value}");
Microsoft.NetCore.Analyzers\Security\DoNotUseCreateEncryptorWithNonDefaultIV.cs (2)
186switch (kvp.Value) 197Debug.Fail($"Unhandled result value {kvp.Value}");
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJavascriptSerializerWithSimpleTypeResolver.cs (2)
245switch (kvp.Value) 256Debug.Fail($"Unhandled result value {kvp.Value}");
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJsonNetWithoutBinder.cs (2)
225switch (kvp.Value) 236Debug.Fail($"Unhandled result value {kvp.Value}");
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerWithoutBinderBase.cs (2)
209switch (kvp.Value) 220Debug.Fail($"Unhandled result value {kvp.Value}");
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureSettingsForJsonNet.cs (2)
252switch (kvp.Value) 263Debug.Fail($"Unhandled result value {kvp.Value}");
Microsoft.NetCore.Analyzers\Security\DoNotUseWeakKDFInsufficientIterationCount.cs (2)
206switch (kvp.Value) 217Debug.Fail($"Unhandled result value {kvp.Value}");
Microsoft.NetCore.Analyzers\Security\PotentialReferenceCycleInDeserializedObjectGraph.cs (3)
86var leftVertices = inDegree.Where(s => s.Value > 0).Select(s => s.Key).ToImmutableHashSet(); 87var invertedLeftVertices = outDegree.Where(s => s.Value > 0).Select(s => s.Key).ToImmutableHashSet(); 230var stack = new Stack<ISymbol>(degree.Where(s => s.Value == 0).Select(s => s.Key));
Microsoft.NetCore.Analyzers\Security\SetHttpOnlyForHttpCookie.cs (1)
183if (kvp.Value == HazardousUsageEvaluationResult.Flagged)
Microsoft.NetCore.Analyzers\Security\UseSecureCookiesASPNetCore.cs (2)
204switch (kvp.Value) 215Debug.Fail($"Unhandled result value {kvp.Value}");
Microsoft.NetFramework.Analyzers\DoNotUseInsecureDtdProcessing.cs (2)
203XmlDocumentEnvironment env = p.Value; 213XmlTextReaderEnvironment env = p.Value;
src\0437c1690f5501bd\CopyAnalysis.CopyDataFlowOperationVisitor.cs (1)
528var copyValue = kvp.Value;
src\0437c1690f5501bd\CopyAnalysis.CoreCopyAnalysisDataDomain.cs (1)
37var value1 = kvp.Value;
src\11b41c7305441175\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (6)
365if (kvp.Value.AbstractLocationsToAssignments != null) 374if (!kvp.Value.AbstractLocationsToAssignments.TryGetValue( 411if (kvp.Value.AssignmentsWithUnknownLocation != null) 417foreach (IAssignmentOperation assignmentOperation in kvp.Value.AssignmentsWithUnknownLocation) 676this._hazardousUsageBuilder[kvp.Key] = MergeHazardousUsageEvaluationResult(kvp.Value, existingValue); 680this._hazardousUsageBuilder.Add(kvp.Key, kvp.Value);
src\40daf5e1cab76dff\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (2)
50kvp.Value.SinkKinds.ToImmutable(), 51kvp.Value.SourceOrigins.ToImmutable()));
src\47c588c5b8785708\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (1)
369var syntaxNode = kvp.Value;
src\9382845807600969\AnalysisEntityDataFlowOperationVisitor.cs (1)
676var newValue = kvp.Value;
src\9382845807600969\AnalysisEntityMapAbstractDomain.cs (3)
69AssertValidEntryForMergedMap(kvp.Key, kvp.Value); 90TValue value1 = entry1.Value; 201var value2 = kvp.Value;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (1)
13value = pair.Value;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
137wildcardNamesBuilder.ToImmutableDictionaryAndFree(x => x.Key, x => x.Value.ToImmutableDictionaryAndFree(), wildcardNamesBuilder.Comparer));
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\ArrayBuilder.cs (1)
424dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
79var added = instance.TryAdd(kvp.Key, kvp.Value);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
107instance.Add(kvp.Key, kvp.Value);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
79var severity = kvp.Value;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\SmallDictionary.cs (1)
57this.Add(kv.Key, kv.Value);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisData.cs (7)
132var predicatedValue = kvp.Value; 174coreAnalysisData[kvp.Key] = kvp.Value; 179Debug.Assert(predicatedData.All(kvp => kvp.Value.AnalysisEntities.IsSubsetOf(coreAnalysisData[kvp.Key].AnalysisEntities))); 211Debug.Assert(kvp.Value.AnalysisEntities.Contains(kvp.Key)); 212foreach (var analysisEntity in kvp.Value.AnalysisEntities) 215Debug.Assert(map[analysisEntity] == kvp.Value); 227Debug.Assert(kvp.Value.AnalysisEntities.Contains(defaultCopyValyeEntity));
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisData.cs (1)
130AssertValidPointsToAnalysisKeyValuePair(kvp.Key, kvp.Value, isDisposable);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.cs (2)
270allResults[kvp.Key] = PropertySetAnalysis.MergeHazardousUsageEvaluationResult(existingValue, kvp.Value); 274allResults.Add(kvp.Key, kvp.Value);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataConfig.cs (2)
150ImmutableHashSet<SinkInfo> sinks = kvp.Value.SinkInfos.ToImmutable(); 154foreach (SinkKind sinkKind in kvp.Value.SinkKinds)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResult.cs (2)
133return kvp.Value; 137value = kvp.Value;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResultBuilder.cs (1)
65var blockAnalysisData = kvp.Value;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (2)
539AnalysisEntity analysisEntity = kvp.Value; 590AnalysisEntity analysisEntity = kvp.Value;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (1)
93_coreAnalysisData.Add(item.Key, item.Value);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\MapAbstractDomain.cs (4)
58var value = kvp.Value; 104value = ValueDomain.Merge(value, entry.Value); 117result.Add(entry.Key, entry.Value); 137result.Add(kvp.Key, intersect(kvp.Value, value2));
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\PredicatedAnalysisData.cs (20)
166coreAnalysisData[kvp.Key] = kvp.Value; 178if (kvp.Value.TruePredicatedData != null) 180RemoveEntryInPredicatedData(key, kvp.Value.TruePredicatedData); 183if (kvp.Value.FalsePredicatedData != null) 185RemoveEntryInPredicatedData(key, kvp.Value.FalsePredicatedData); 208clonedMap.Add(kvp.Key, new PerEntityPredicatedAnalysisData(kvp.Value)); 248var resultTruePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.TruePredicatedData, coreAnalysisDataForOtherBranch, coreDataAnalysisDomain); 249var resultFalsePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.FalsePredicatedData, coreAnalysisDataForOtherBranch, coreDataAnalysisDomain); 287resultTruePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.TruePredicatedData, coreAnalysisData2, coreDataAnalysisDomain); 288resultFalsePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.FalsePredicatedData, coreAnalysisData2, coreDataAnalysisDomain); 293resultTruePredicatedData = Merge(kvp.Value.TruePredicatedData, value2.TruePredicatedData, 295resultFalsePredicatedData = Merge(kvp.Value.FalsePredicatedData, value2.FalsePredicatedData, 309var resultTruePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.TruePredicatedData, coreAnalysisData1, coreDataAnalysisDomain); 310var resultFalsePredicatedData = MergeForPredicatedDataInOneBranch(kvp.Value.FalsePredicatedData, coreAnalysisData1, coreDataAnalysisDomain); 396!EqualsHelper(kvp.Value.TruePredicatedData, otherValue.TruePredicatedData) || 397!EqualsHelper(kvp.Value.FalsePredicatedData, otherValue.FalsePredicatedData)) 449if (kvp.Value.TruePredicatedData != null) 451assertValidAnalysisData(kvp.Value.TruePredicatedData); 454if (kvp.Value.FalsePredicatedData != null) 456assertValidAnalysisData(kvp.Value.FalsePredicatedData);
Microsoft.CodeAnalysis.Razor.Compiler (9)
CSharp\DefaultUtf8WriteLiteralFeature.cs (2)
278hash.Add(kvp.Value, StringComparer.Ordinal); 284hash.Add(kvp.Value);
Language\Components\ComponentGenericTypePass.cs (3)
104var mappings = bindings.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Node); 223foreach (var entryToRemove in bindings.Where(e => e.Value.CoveredByLambda).ToList()) 251var mappings = bindings.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Node);
Language\Components\TagHelperDescriptorExtensions.cs (1)
73binding.Attributes.FirstOrDefault(boundAttribute.PropertyName, static (kvp, propertyName) => kvp.Key == propertyName) is { Value: var bindingTypeName })
Mvc.Version1_X\ViewComponentTagHelperDescriptorFactory.cs (1)
246.Value
Mvc.Version2_X\ViewComponentTagHelperDescriptorFactory.cs (1)
261.Value
Mvc\ViewComponentTagHelperDescriptorFactory.cs (1)
264.Value
Microsoft.CodeAnalysis.ResxSourceGenerator (35)
src\b310f676f7308b7f\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
241foreach (var (symbol, write) in SymbolsWriteBuilder.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key))
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
44kvp.Value.Free();
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (1)
57this.Add(kv.Key, kv.Value);
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
747var replacementPrefix = kv.Value;
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
711builder.AddRange(kvp.Value); 833result.Add(entry.Key, createMembers(entry.Value)); 876var namedTypes = getOrCreateNamedTypes(entry.Value);
src\roslyn\src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
18value = keyValuePair.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
186&& EqualityComparer<TValue>.Default.Equals(value, pair.Value); 240result[item.Key] = item.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (2)
49readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 53readonly object? IDictionaryEnumerator.Value => Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
119=> Add(item.Key, item.Value); 127Add(pair.Key, pair.Value); 149&& EqualityComparer<TValue>.Default.Equals(value, item.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (1)
25public readonly TValue Current => _enumerator.Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (9)
210Add(pair.Key, pair.Value); 218Add(pair.Key, pair.Value); 271=> Add(keyValuePair.Key, keyValuePair.Value); 276if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 287if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234return new DictionaryEntry(_current.Key, _current.Value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1261return new DictionaryEntry(_current.Key, _current.Value); 1287return _current.Value;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
650dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
139wildcardNamesBuilder.ToImmutableDictionaryAndFree(x => x.Key, x => x.Value.ToImmutableDictionaryAndFree(), wildcardNamesBuilder.Comparer));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
81var added = instance.TryAdd(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
81instance.Add(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
80var severity = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
59this.Add(kv.Key, kv.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
48=> SymbolWritesMap.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key); 61return kvp.Value;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
25backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePair.Create(p.Value, p.Key))))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
253if (predicate(entry.Key, entry.Value, arg))
Microsoft.CodeAnalysis.Scripting (1)
ScriptBuilder.cs (1)
149_assemblyLoader.RegisterDependency(referencedAssembly.Value.Identity, path);
Microsoft.CodeAnalysis.VisualBasic (27)
Binding\Binder_Lambda.vb (1)
830BindLambdaForErrorRecoveryInferCommonType(commonReturnType, pair.Value.Key)
CommandLine\VisualBasicCommandLineParser.vb (1)
1836result(kvp.Key) = kvp.Value.ValueAsObject
Emit\SynthesizedPrivateImplementationDetailsSharedConstructor.vb (1)
81Dim payloadArrayType As ArrayTypeSymbol = DirectCast(payloadRoot.Value.Type.GetInternalSymbol(), ArrayTypeSymbol)
Lowering\LocalRewriter\LocalRewriter_XmlLiterals.vb (1)
303namespacesBuilder.Add(CreateCompilerGeneratedXmlNamespace(syntax, pair.Value))
Symbols\Attributes\AttributeData.vb (2)
132stringBuilder.Append(namedArgument.Value.ToVisualBasicString()) 389Dim fileName = DirectCast(namedArg.Value.ValueInternal, String)
Symbols\Metadata\PE\PENamespaceSymbol.vb (1)
205Dim ns = New PENestedNamespaceSymbol(child.Key, Me, child.Value)
Symbols\NamespaceOrTypeSymbol.vb (1)
202For Each member As Symbol In pair.Value
Symbols\NamespaceSymbol.vb (1)
497For Each member As Symbol In pair.Value
Symbols\ReducedExtensionMethodSymbol.vb (3)
237curryTypeArguments(fixed.Key.Ordinal) = fixed.Value 287Return pair.Value 313resultTypeArguments(pair.Key.Ordinal) = pair.Value
Symbols\Source\SourceAssemblySymbol.vb (2)
1431diagnostics.Add(ERRID.ERR_FriendAssemblyStrongNameRequired, oneKey.Value.Item1, oneKey.Value.Item2)
Symbols\Source\SourceFieldSymbol.vb (1)
402Dim node As DependencyInfo = pair.Value
Symbols\TypeSubstitution.vb (10)
140If p.Key.Equals(tp) Then Return p.Value 166result(p.Key.Ordinal) = p.Value.Type 167If Not p.Value.CustomModifiers.IsDefaultOrEmpty Then 197Return p.Value.CustomModifiers 220If Not p.Value.CustomModifiers.IsDefaultOrEmpty Then 244Dim value As TypeSymbol = pair.Value.Type 551builder.AppendFormat("{0}->{1}", _pairs(i).Key.ToString(), _pairs(i).Value.Type.ToString()) 768Dim newValue As TypeWithModifiers = oldPairs(i).Value.InternalSubstituteTypeParameters(additionalSubstitution) 774If Not newValue.Equals(oldPairs(i).Value) Then 905If Not pair.Key.Equals(pair.Value.Type.OriginalDefinition) Then
Syntax\VisualBasicSyntaxTree.ConditionalSymbolsMap.vb (2)
40Dim conditionalStack As Stack(Of Tuple(Of InternalSyntax.CConst, Integer)) = kvPair.Value 85Me.ProcessConditionalSymbolDefinition(kvPair.Key, kvPair.Value, 0)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Serialization\VisualBasicOptionsSerializationService.vb (1)
53writer.WriteScalarValue(kv.Value)
Microsoft.CodeAnalysis.Workspaces (80)
CodeCleanup\AbstractCodeCleanerService.cs (1)
595var tokenMap = map.ToDictionary(p => p.Key, p => p.Value);
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (2)
70currentSolution = await ApplyChangesAsync(currentSolution, group.SelectAsArray(kvp => (kvp.Key, kvp.Value)), cancellationToken).ConfigureAwait(false); 116var orderedDiagnostics = documentToDiagnostics.SelectMany(kvp => kvp.Value)
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (1)
48return result.Where(kvp => !kvp.Value.IsDefaultOrEmpty).ToImmutableDictionary();
CodeFixes\FixAllOccurrences\FixAllState.cs (1)
69var diagnosticSpan = diagnosticsToFix.First().Value.FirstOrDefault()?.Location.SourceSpan;
CodeRefactorings\FixAllOccurences\RefactorAllState.cs (1)
102return spansByDocument.Select(kvp => KeyValuePair.Create(kvp.Key, new Optional<ImmutableArray<TextSpan>>(kvp.Value)))
Diagnostics\DiagnosticAnalysisResultBuilder.cs (1)
190: map.ToImmutableDictionary(kv => kv.Key, kv => kv.Value.ToImmutableArray());
Diagnostics\HostDiagnosticAnalyzers.cs (2)
262var analyzers = language == null ? reference.Value.GetAnalyzersForAllLanguages() : reference.Value.GetAnalyzers(language);
Differencing\Match.cs (5)
43if (comparer.GetLabel(knownMatch.Key) != comparer.GetLabel(knownMatch.Value)) 45throw new ArgumentException(string.Format(WorkspacesResources.Matching_nodes_0_and_1_must_have_the_same_label, knownMatch.Key, knownMatch.Value), nameof(knownMatches)); 53if (!comparer.TreesEqual(knownMatch.Value, root2)) 55throw new ArgumentException(string.Format(WorkspacesResources.Node_0_must_be_contained_in_the_new_tree, knownMatch.Value), nameof(knownMatches)); 59TryAdd(knownMatch.Key, knownMatch.Value);
Differencing\Match.LongestCommonSubsequence.cs (1)
33result.Add(oldNodes[pair.Key], newNodes[pair.Value]);
Editing\SyntaxGenerator.cs (1)
1078.Concat(attribute.NamedArguments.Select(n => this.AttributeArgument(n.Key, this.TypedConstantExpression(n.Value))))
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (2)
83regularDocumentStates.States.Select(kvp => (kvp.Key, kvp.Value)).Concat( 84sourceGeneratorDocumentStates.States.Select(kvp => (kvp.Key, (DocumentState)kvp.Value)));
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (1)
254ProcessDocumentAsync(kvp.Key, kvp.Value, symbolToGlobalAliases, onReferenceFound, cancellationToken)).ConfigureAwait(false);
FindSymbols\SymbolFinder_Helpers.cs (2)
128Contract.ThrowIfFalse(equivalentTypesWithDifferingAssemblies.All(kvp => !SymbolEquivalenceComparer.Instance.Equals(kvp.Key.ContainingAssembly, kvp.Value.ContainingAssembly))); 132Contract.ThrowIfFalse(equivalentTypesWithDifferingAssemblies.All(kvp => kvp.Value.ContainingType == null));
FindSymbols\SymbolFinder.FindReferencesServerCallback.cs (1)
60_definitionMap[pair.Key] = pair.Value;
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (2)
123writer.WriteInt32(kvp.Value.Count); 125foreach (var v in kvp.Value)
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex_Create.cs (1)
32static kvp => kvp.Value.ToImmutable())));
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (1)
51filePathToNewDocumentsAndHashes.Count(static kvp => kvp.Value.Count > 1),
Log\AbstractLogAggregator.cs (1)
42=> _map.Select(static kvp => KeyValuePair.Create((TKey)kvp.Key, kvp.Value)).GetEnumerator();
Log\KeyValueLogMessage.cs (2)
190if (entry.Value is IEnumerable<object> items) 209Append(builder, entry.Value);
Options\LegacyWorkspaceOptionService.cs (1)
56Debug.Assert(internallyDefinedOptions.All(entry => OptionSet.IsInternalOptionValue(entry.Value)));
Serialization\AbstractOptionsSerializationService.cs (2)
58writer.WriteInt32((int)kv.Value); 202writer.WriteString(kv.Value);
Shared\Extensions\ILanguageMetadataExtensions.cs (2)
41return builder.Select(kvp => KeyValuePair.Create(kvp.Key, kvp.Value.ToImmutableAndFree())).ToImmutableDictionary(); 61return map.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.ToImmutableAndFree());
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
244return _singletonListeners.Where(kv => featureNames.Contains(kv.Key)).Select(kv => (IAsynchronousOperationWaiter)kv.Value);
Shared\Utilities\DocumentationComment.cs (1)
155_comment._exceptionTexts.Add(typeAndBuilderPair.Key, typeAndBuilderPair.Value.AsImmutable());
src\b310f676f7308b7f\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
241foreach (var (symbol, write) in SymbolsWriteBuilder.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key))
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
44kvp.Value.Free();
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (1)
57this.Add(kv.Key, kv.Value);
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
396return _resolvedToOriginalPathMap.Select(x => (x.Value, x.Key)).ToImmutableArray();
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
747var replacementPrefix = kv.Value;
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
711builder.AddRange(kvp.Value); 833result.Add(entry.Key, createMembers(entry.Value)); 876var namedTypes = getOrCreateNamedTypes(entry.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
186&& EqualityComparer<TValue>.Default.Equals(value, pair.Value); 240result[item.Key] = item.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (2)
49readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 53readonly object? IDictionaryEnumerator.Value => Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
119=> Add(item.Key, item.Value); 127Add(pair.Key, pair.Value); 149&& EqualityComparer<TValue>.Default.Equals(value, item.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (1)
25public readonly TValue Current => _enumerator.Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (9)
210Add(pair.Key, pair.Value); 218Add(pair.Key, pair.Value); 271=> Add(keyValuePair.Key, keyValuePair.Value); 276if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 287if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234return new DictionaryEntry(_current.Key, _current.Value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1261return new DictionaryEntry(_current.Key, _current.Value); 1287return _current.Value;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
650dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
48=> SymbolWritesMap.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key); 61return kvp.Value;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
25backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePair.Create(p.Value, p.Key))))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
239if (predicate(entry.Key, entry.Value, arg))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
236var importContainer = addImportsService.GetImportContainer(root, context, importToSyntax.First().Value, options); 247selector: kvp => kvp.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
44m[kv.Key.ToString()] = kv.Value.GetCount();
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
260var entry = _documentPathsToDocumentIds.Where(kv => kv.Value == documentId).FirstOrDefault();
Workspace\Solution\SolutionCompilationState.cs (2)
112Contract.ThrowIfTrue(_projectIdToTrackerMap.Any(kvp => kvp.Key != kvp.Value.ProjectState.Id)); 1767missingDocumentStates.SelectAsArray(kvp => (kvp.Key, kvp.Value.ToImmutableAndFree())),
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (3)
183oldGeneratedDocuments.States.All(kvp => kvp.Value.ParseOptions.Equals(this.ProjectState.ParseOptions))) 294if (documentState.Value.Attributes.DesignTimeOnly) 295treesToRemove.Add(await documentState.Value.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false));
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (2)
980ThrowExceptionIfFalse(documentInProjectState.Value.TryGetSyntaxTree(out var tree), "We should have a tree since we have a compilation that should contain it."); 989ThrowExceptionIfFalse(generatedDocument.Value.TryGetSyntaxTree(out var tree), "We should have a tree since we have a compilation that should contain it.");
Workspace\Workspace_Editor.cs (2)
208return _projectToOpenDocumentsMap.SelectManyAsArray(kvp => kvp.Value); 283return _bufferToAssociatedDocumentsMap.Where(kvp => kvp.Value.Contains(documentId)).Select(kvp => kvp.Key).FirstOrDefault();
Workspace\Workspace.cs (1)
396var relatedDocumentIdsAndStatesArray = relatedDocumentIdsAndStates.SelectAsArray(static kvp => (kvp.Key, kvp.Value));
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\BuildHostProcessManager.cs (2)
216var existingProcess = _processes.SingleOrNull(p => p.Value == sender); 219processToDispose = existingProcess.Value.Value;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Build\ProjectBuildManager.cs (2)
87allProperties[kvp.Key] = kvp.Value; 222mergedGlobalProperties[pair.Key] = pair.Value;
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (1)
100pairArray[i] = new DynamicProperty(results[i].Key, results[i].Value);
Microsoft.Data.Analysis (8)
DataFrame.cs (1)
635object value = columnAndValue.Value;
DataFrame.Join.cs (2)
235newOccurrences = newOccurrences.ToDictionary(kvp => retainedIndicesReverseMapping[kvp.Key], kvp => kvp.Value); 262var list2 = (IReadOnlyList<long>)newOccurrence.Value;
DataFrameColumn.cs (1)
486List<ValueTuple<int, int>> tuplesOfSortAndBufferIndex = minElement.Value;
DataFrameColumns\StringDataFrameColumn.cs (1)
391counts.Append(keyValuePair.Value.Count);
GroupBy.cs (2)
126ICollection<long> rows = pairs.Value; 503return _keyToRowIndicesMap.Select(kvp => new Grouping(kvp.Key, kvp.Value.Select(index => _dataFrame.Rows[index])));
PrimitiveDataFrameColumn.cs (1)
389counts.Append(keyValuePair.Value.Count);
Microsoft.Data.Analysis.Interactive (1)
TabularDataResourceExtensions.cs (1)
35return row.FirstOrDefault(kvp => kvp.Key == fieldName).Value;
Microsoft.Diagnostics.DataContractReader (9)
_generated\4\ContractDescriptorContext.DictionaryStringFieldDescriptor.g.cs (1)
62global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, FieldDescriptor);
_generated\5\ContractDescriptorContext.DictionaryStringGlobalDescriptor.g.cs (1)
62global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, GlobalDescriptor);
_generated\6\ContractDescriptorContext.DictionaryStringTypeDescriptor.g.cs (1)
62global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, TypeDescriptor);
_generated\7\ContractDescriptorContext.DictionaryStringJsonElement.g.cs (1)
62global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, JsonElement);
_generated\8\ContractDescriptorContext.DictionaryStringString.g.cs (1)
61writer.WriteString(entry.Key, entry.Value);
ContractDescriptorTarget.cs (4)
327if (subDescriptor.Value.Indirect) 329if (subDescriptor.Value.NumericValue.Value >= (ulong)descriptor.PointerData.Length) 330throw DescriptorMalformed($"Invalid pointer data index {subDescriptor.Value.NumericValue.Value}."); 332yield return (subDescriptor.Key, descriptor.PointerData[(int)subDescriptor.Value.NumericValue]);
Microsoft.Diagnostics.DataContractReader.Contracts (1)
Contracts\GCInfo\X86\GCInfo.cs (1)
872result.Add(new LiveSlot(IsRegister: false, RegisterNumber: 0, SpOffset: spOffset, SpBase: spRelBase, GcFlags: pushed.Value));
Microsoft.Diagnostics.DataContractReader.DataGenerator (5)
Parser.cs (5)
105if (kv.Key == name && kv.Value.Value is bool b) 130return ReadStringArray(kv.Value); 139if (kv.Key == name && kv.Value.Value is INamedTypeSymbol typeSymbol) 272bool usePropertyName = !fieldAttr.NamedArguments.Any(kv => kv.Key == "UsePropertyName" && kv.Value.Value is false); 309bool usePropertyName = !addrAttr.NamedArguments.Any(kv => kv.Key == "UsePropertyName" && kv.Value.Value is false);
Microsoft.Diagnostics.NETCore.Client (4)
DiagnosticsClient\EventPipeProvider.cs (4)
115string escapedValue = a.Value.Contains(';') || a.Value.Contains('=') ? $"\"{a.Value}\"" : a.Value;
Microsoft.DotNet.ApiCompatibility (5)
Comparing\NamedArgumentComparer.cs (2)
19x.Key.Equals(y.Key) && typedConstantEqualityComparer.Equals(x.Value, y.Value);
Mapping\AssemblyMapper.cs (1)
82mapper.AddForwardedTypes(kvp.Value, side, setIndex);
Rules\EnumsMustMatch.cs (2)
74if (lEntry.Value.ConstantValue is not object lval || rField.ConstantValue is not object rval || !lval.Equals(rval)) 80string.Format(Resources.EnumValuesMustMatch, left.Name, lEntry.Key, lEntry.Value.ConstantValue, rField.ConstantValue),
Microsoft.DotNet.ApiSymbolExtensions (1)
AttributeDataExtensions.cs (1)
36attributeData.NamedArguments.Select(namedArgument => namedArgument.Value)
Microsoft.DotNet.Arcade.Sdk (3)
src\InstallDotNetCore.cs (3)
85if (runtimeItems.SelectMany(r => r.Value).Select(r => r.Key).FirstOrDefault(f => !SemanticVersion.TryParse(f, out SemanticVersion version)) != null) 101foreach (var item in runtimeItem.Value) 103string architecture = GetArchitecture(item.Value);
Microsoft.DotNet.Build.Manifest (8)
ArtifactModel.cs (3)
109if (localAttr.Value == null) 116else if (localAttr.Value.Equals( 135hash *= (item.Key, item.Value).GetHashCode();
BuildModelFactory.cs (1)
209attributes[attribute.Key] = NormalizeAzureDevOpsUrl(attribute.Value);
PdbArtifactModel.cs (1)
23hash *= (item.Key, item.Value).GetHashCode();
VersionIdentifier.cs (1)
245replacementIterationResult = replacementIterationResult.Replace(sequence.Key, sequence.Value);
XElementParsingExtensions.cs (2)
34.Where(pair => pair.Value != null) 37.Select(pair => new XAttribute(pair.Key, pair.Value))
Microsoft.DotNet.Build.Tasks.Installers (2)
src\CreateWixBuildWixpack.cs (1)
356string kv = $"{kvp.Key}={kvp.Value}";
src\RpmBuilder.cs (1)
348entries.Add(new((RpmHeaderTag)Enum.Parse(typeof(RpmHeaderTag), script.Key), RpmHeaderEntryType.String, script.Value));
Microsoft.DotNet.Build.Tasks.Packaging (38)
ApplyMetaPackages.cs (1)
122updatedDependencies.AddRange(metaPackagesToAdd.SelectMany(pair => pair.Value.Select(tfm => CreateDependency(pair.Key, tfm))));
GeneratePackageReport.cs (2)
95var runtimeIds = framework.Value; 323foreach (PackageItem packageItem in packageSpecificItems.Value)
GetApplicableAssetsFromPackages.cs (1)
179foreach (PackageItem packageFile in packageFiles.Value)
GetLastStablePackage.cs (1)
125LastStablePackages = lastStablePackages.Select(p => CreateItem(originalItems[p.Key], p.Value)).ToArray();
GetLayoutFiles.cs (1)
63var target = targetInfo.Value;
HarvestPackage.cs (1)
165resolver.AddPackageItems(packageFolder.Key, GetPackageItems(packageFolder.Value));
NuGetPack.cs (1)
295foreach (var pathPair in pathHasMatches.Where(pathMatchPair => !pathMatchPair.Value))
PackageIndex.cs (17)
158var otherInfo = otherPackage.Value; 179ModulesToPackages[otherModuleToPackage.Key] = otherModuleToPackage.Value; 288inboxFrameworks = info.InboxOn.GetInboxVersions().Where(p => p.Value >= assemblyVersion).Select(p => p.Key); 410InboxOn.AddInboxVersion(inboxOnPair.Key, inboxOnPair.Value); 416Version otherPackageVersion = assemblyVersionInPackage.Value; 492public int Count { get { return inboxVersions.Sum(m => m.Value.Count); } } 519var existingAssemblyVersion = mapping.Value; 557foreach (var frameworkVersion in framework.Value.Keys) 570foreach (var frameworkInboxVersionPair in framework.Value) 573var assemblyVersion = frameworkInboxVersionPair.Value; 631if (compatibleMapping.Key == null || compatibleMapping.Value == null) 637if (compatibleMapping.Value == VersionUtility.MaxVersion) 644VersionUtility.IsCompatibleApiVersion(compatibleMapping.Value, assemblyVersion) : 645compatibleMapping.Value >= assemblyVersion; 729var assemblyVersion = frameworkPair.Value; 781packageToMetaPackage.Add(metaPackage.Key, metaPackage.Value); 788return packageToMetaPackage.GroupBy(p => p.Value, p => p.Key);
UpdatePackageIndex.cs (5)
193package.Value.StableVersions.Clear(); 194package.Value.StableVersions.AddRange(stablePackageVersions); 307.Where(pair => pair.Value == packageVersion && !assmVersions.Contains(pair.Key)) 315.SelectMany(p => p.Value.AssemblyVersionInPackageVersion) 316.Where(pair => pair.Value == packageVersion)
ValidateFrameworkPackage.cs (2)
49var testAsset = testAssetByName.Value; 71var missingInboxAssemblies = _index.Packages.Where(packageInfo => packageInfo.Value.InboxOn.IsAnyVersionInbox(fx) && !testAssetsByName.ContainsKey(packageInfo.Key));
ValidateHarvestVersionIsLatestForRelease.cs (3)
75foreach (PackageAsset compileAsset in packageTarget.Value.CompileAssets.NullAsEmpty()) 83foreach (PackageAsset runtimeAsset in packageTarget.Value.RuntimeAssets.NullAsEmpty()) 91foreach (PackageAsset nativeAsset in packageTarget.Value.NativeAssets.NullAsEmpty())
ValidatePackage.cs (3)
413.Where(pair => pair.Value == thisPackageVersion && !assemblyVersions.Contains(pair.Key)) 596SupportedVersion = inboxPair.Value, 624if (!Version.TryParse(supportedFramework.Value, out supportedVersion))
Microsoft.DotNet.Cli.Definitions (1)
Utilities\OptionExtensions.cs (1)
81return properties.Select(kv => $"{optionName}:{kv.Key}={kv.Value}");
Microsoft.DotNet.Cli.Telemetry (14)
_generated\16\TelemetryJsonContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
Implementation\AzureMonitorLogSerializer.cs (3)
85if (attribute.Value is not null && seenKeys.Add(BreezeSchema.OriginalFormatProperty)) 88BreezeSchema.Truncate(attribute.Value.ToString(), BreezeSchema.KvpMaxValueLength) ?? "null"; 93message = attribute.Value?.ToString();
Implementation\AzureMonitorTelemetrySerializer.cs (3)
178exceptionType = tag.Value?.ToString(); 181exceptionMessage = tag.Value?.ToString(); 184exceptionStack = tag.Value?.ToString();
Implementation\BreezeWriter.cs (3)
64if (tag.Value is null || key.Length > BreezeSchema.KvpMaxKeyLength || !seenKeys.Add(key)) 69var formatted = tag.Value is Array arrayValue 71: Convert.ToString(tag.Value, CultureInfo.InvariantCulture);
Implementation\TelemetryResourceContextFactory.cs (4)
38serviceName = attribute.Value?.ToString(); 41serviceNamespace = attribute.Value?.ToString(); 44roleInstance = attribute.Value?.ToString(); 47applicationVersion = attribute.Value?.ToString();
Microsoft.DotNet.Cli.Utils (9)
ForwardingAppImplementation.cs (1)
83processInfo.Environment[entry.Key] = entry.Value;
MSBuildArgs.cs (3)
247newRestoreProperties[kvp.Key] = kvp.Value; 297newProperties[kvp.Key] = kvp.Value; 380newdict[restoreKvp.Key] = restoreKvp.Value;
MSBuildForwardingAppWithoutLogging.cs (4)
150? $"--{label}:{property.Key}={Escape(property.Value)}" 151: $"--{label}:{property.Key}={property.Value}"; 243Environment.SetEnvironmentVariable(kvp.Key, kvp.Value); 266Environment.SetEnvironmentVariable(kvp.Key, kvp.Value);
TelemetryEventEntry.cs (1)
75var appliedProperties = Properties?.ToDictionary(p => p.Key, p => (string?)func(p.Value ?? string.Empty));
Microsoft.DotNet.HotReload.Watch (14)
Aspire\AspireServiceFactory.cs (2)
104=> _service.GetServerConnectionEnvironment().Select(kvp => (kvp.Key, kvp.Value)); 247LaunchEnvironmentVariables = projectLaunchInfo.Environment?.Select(e => (e.Key, e.Value))?.ToArray() ?? [],
HotReload\ManagedCodeWorkspace.cs (1)
52.SelectMany(p => p.Value)
HotReload\ProjectUpdatesBuilder.cs (1)
116.SelectMany(e => e.Value)
HotReload\RunningProjectsManager.cs (2)
353projectsToUpdate.Select(e => e.Value.First().Options.Representation).Concat( 372await TerminatePeripheralProcessesAsync([.. _runningProjects.SelectMany(entry => entry.Value)], cancellationToken);
Process\LaunchSettingsProfile.cs (3)
66string.Equals(kvp.Key, launchProfileName, StringComparison.Ordinal)).Value; 101entry.Value.CommandName != null && supportedCommandNames.Contains(entry.Value.CommandName, StringComparer.Ordinal)).Key;
Process\ProcessRunner.cs (1)
171process.StartInfo.Environment.Add(env.Key, env.Value);
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\StaticWebAssetsManifest.cs (3)
67var filePath = entry.Value; 92var path = entry.Value; 186var child = entry.Value;
Utilities\ImmutableDictionaryExtensions.cs (1)
42=> Task.WhenAll(dictionary.SelectMany(entry => entry.Value).Select(project => action(project, cancellationToken))).WaitAsync(cancellationToken);
Microsoft.DotNet.PackageTesting (1)
VerifyClosure.cs (1)
270Log.LogError(PrintCycle(suspectCycle.Value));
Microsoft.DotNet.ProjectTools (2)
_generated\3\LaunchProfileJsonSerializerContext.ImmutableDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
BuildService.cs (1)
101mergedGlobalProperties[pair.Key] = pair.Value;
Microsoft.DotNet.SharedFramework.Sdk (3)
src\arcade\src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
270Log.LogError(PrintCycle(suspectCycle.Value));
src\ValidateFileVersions.cs (2)
78.Where(p => (p.Value.FileVersion ?? ZeroVersion) == ZeroVersion) 79.Select(p => p.Value.File.ItemSpec)
Microsoft.DotNet.TemplateLocator (23)
_generated\0\WorkloadSetJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\1\WorkloadSetJsonSerializerContext.IDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\9\InstallStateJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (9)
408var manifestSpecifier = new ManifestSpecifier(kvp.Key, kvp.Value.Version, kvp.Value.FeatureBand); 418AddManifest(manifestSpecifier.Id.ToString(), manifestDirectory, manifestSpecifier.FeatureBand.ToString(), kvp.Value.Version.ToString()); 429var manifestSpecifier = new ManifestSpecifier(kvp.Key, kvp.Value.Version, kvp.Value.FeatureBand); 439AddManifest(manifestSpecifier.Id.ToString(), manifestDirectory, manifestSpecifier.FeatureBand.ToString(), kvp.Value.Version.ToString()); 470.Select(kvp => kvp.Value) 575var manifestSpecifier = new ManifestSpecifier(manifestEntry.Key, manifestEntry.Value.Version, manifestEntry.Value.FeatureBand);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (7)
151if (FXVersion.Compare(dependency.Value, resolvedDependency.ParsedVersion) > 0) 153throw new WorkloadManifestCompositionException(Strings.ManifestDependencyVersionTooLow, dependency.Key, resolvedDependency.Version, dependency.Value, manifest.Id, manifest.ManifestPath); 165if (workload.Value is WorkloadRedirect redirect) 171if (!_workloads.TryAdd(workload.Key, ((WorkloadDefinition)workload.Value, manifest))) 181if (!_packs.TryAdd(pack.Key, (pack.Value, manifest))) 642overlayResolver._manifests.TryAdd(manifest.Key, manifest.Value); 766return _manifests.Select(t => t.Value.info);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSet.cs (4)
36var parts = manifest.Value?.Split('/'); 90workloadSet.ManifestVersions.Add(kvp.Key, kvp.Value); 112var dictionary = ManifestVersions.ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.Version + "/" + kvp.Value.FeatureBand, StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.XliffTasks (1)
Model\JsonDocument.cs (1)
35=> _json.Select(kvp => new Node(_json, kvp.Key, kvp.Value)).OrderBy(entry => entry.Id);
Microsoft.Extensions.AI (14)
ChatCompletion\OpenTelemetryChatClient.cs (2)
384_ = activity.AddTag(prop.Key, prop.Value); 492_ = activity.AddTag(prop.Key, prop.Value);
ChatCompletion\OpenTelemetryImageGenerator.cs (1)
196_ = activity.AddTag(prop.Key, prop.Value);
ChatRouting\SemanticRoutingChatClient.cs (1)
135IReadOnlyList<string> utterances = profile.Value;
Common\OtelMessageSerializer.cs (1)
183Arguments = mstcc.Arguments as IReadOnlyDictionary<string, object?> ?? mstcc.Arguments?.ToDictionary(k => k.Key, v => v.Value),
Embeddings\OpenTelemetryEmbeddingGenerator.cs (2)
173_ = activity.AddTag(prop.Key, prop.Value); 242_ = activity.AddTag(prop.Key, prop.Value);
Files\OpenTelemetryHostedFileClient.cs (1)
407_ = activity.AddTag(prop.Key, prop.Value);
Realtime\OpenTelemetryRealtimeClientSession.cs (2)
603Arguments = mstcc.Arguments as IReadOnlyDictionary<string, object?> ?? mstcc.Arguments?.ToDictionary(k => k.Key, v => v.Value), 819_ = activity.AddTag(prop.Key, prop.Value);
SpeechToText\OpenTelemetrySpeechToTextClient.cs (2)
229_ = activity.AddTag(prop.Key, prop.Value); 314_ = activity.AddTag(prop.Key, prop.Value);
TextToSpeech\OpenTelemetryTextToSpeechClient.cs (2)
228_ = activity.AddTag(prop.Key, prop.Value); 309_ = activity.AddTag(prop.Key, prop.Value);
Microsoft.Extensions.AI.Abstractions (14)
AdditionalPropertiesDictionary{TValue}.cs (3)
48_dictionary.Add(item.Key, item.Value); 209_dictionary[item.Key] = item.Value; 256public AdditionalProperty[] Items => (from p in _properties select new AdditionalProperty(p.Key, p.Value)).ToArray();
Generated\361d1da7f942c932\JsonContext.AdditionalPropertiesDictionaryInt64.g.cs (1)
59writer.WriteNumber(entry.Key, entry.Value);
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (1)
120response.AdditionalProperties[entry.Key] = entry.Value;
TextToSpeech\TextToSpeechResponseUpdateExtensions.cs (1)
104response.AdditionalProperties[entry.Key] = entry.Value;
Tools\AITool.cs (1)
78_ = sb.Append(", ").Append(entry.Key).Append(" = ").Append(entry.Value);
UsageDetails.cs (3)
143kvp.Value + existingValue : 144kvp.Value; 206parts.Add($"{entry.Key} = {entry.Value}");
Utilities\AIJsonUtilities.cs (2)
180obj.Add(entry.Key, entry.Value); 181NormalizeJsonNode(entry.Value);
Utilities\AIJsonUtilities.Schema.Create.cs (1)
833jsonObject[entry.Key] = entry.Value;
Utilities\AIJsonUtilities.Schema.Transform.cs (1)
75properties[prop.Key] = TransformSchemaCore(prop.Value, transformOptions, path);
Microsoft.Extensions.AI.Abstractions.Tests (22)
AdditionalPropertiesDictionaryTests.cs (1)
128Assert.Equal($"value{count}", item.Value);
AssertExtensions.cs (1)
116AreJsonEquivalentValues(expectedEntry.Value, actualValue, options, propertyName: expectedEntry.Key);
Contents\FunctionCallContentTests.cs (9)
247""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value); 268""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value); 287""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value)); 323""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value)); 358Assert.True(kvp.Value is JsonElement { ValueKind: JsonValueKind.Object }); 363Assert.Null(kvp.Value); 368Assert.True(kvp.Value is JsonElement { ValueKind: JsonValueKind.Array }); 373Assert.True(kvp.Value is JsonElement { ValueKind: JsonValueKind.Number }); 378Assert.True(kvp.Value is JsonElement { ValueKind: JsonValueKind.True });
Generated\361d1da7f942c932\TestJsonSerializerContext.AdditionalPropertiesDictionaryInt64.g.cs (1)
57writer.WriteNumber(entry.Key, entry.Value);
Generated\361d1da7f942c932\TestJsonSerializerContext.DictionaryStringJsonDocument.g.cs (1)
58global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, JsonDocument);
Generated\361d1da7f942c932\TestJsonSerializerContext.DictionaryStringJsonNode.g.cs (1)
58global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, JsonNode);
Generated\361d1da7f942c932\TestJsonSerializerContext.DictionaryStringString.g.cs (1)
57writer.WriteString(entry.Key, entry.Value);
Generated\361d1da7f942c932\TestJsonSerializerContext.ReadOnlyDictionaryStringString.g.cs (1)
57writer.WriteString(entry.Key, entry.Value);
Generated\361d1da7f942c932\TestTypesContext.DictionaryStringInt32.g.cs (1)
59writer.WriteNumber(entry.Key, entry.Value);
Generated\361d1da7f942c932\TestTypesContext.DictionaryStringSimplePoco.g.cs (1)
60SimplePocoSerializeHandler(writer, entry.Value);
Generated\361d1da7f942c932\TestTypesContext.StructDictionaryStringInt32.g.cs (1)
53writer.WriteNumber(entry.Key, entry.Value);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.DerivedDictionary.g.cs (1)
59writer.WriteNumber(entry.Key, entry.Value);
parent\parent\Shared\JsonSchemaExporter\SchemaTestHelpers.cs (1)
38.SelectMany(d => d.Errors!.Select(error => $"Path:${d.InstanceLocation} {error.Key}:{error.Value}"));
parent\parent\Shared\JsonSchemaExporter\TestTypes.cs (1)
1172private readonly IReadOnlyDictionary<TKey, TValue> _dictionary = values.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
Microsoft.Extensions.AI.Evaluation (1)
EvaluationMetricExtensions.cs (1)
135metric.AddOrUpdateMetadata(item.Key, item.Value);
Microsoft.Extensions.AI.Evaluation.Console (1)
Telemetry\TelemetryHelper.cs (1)
178combinedProperties.Add(kvp.Key, kvp.Value);
Microsoft.Extensions.AI.Evaluation.NLP (5)
Common\BLEUAlgorithm.cs (3)
84maxCounts[ct.Key] = Math.Max(val, ct.Value); 88maxCounts[ct.Key] = ct.Value; 98clippedCounts[h.Key] = Math.Min(h.Value, v);
Common\MatchCounter.cs (2)
68intersection._counts[kvp.Key] = Math.Min(kvp.Value, otherCount); 75public string ToDebugString() => string.Join(",", _counts.Select(v => $"{v.Key}: {v.Value}"));
Microsoft.Extensions.AI.Evaluation.Reporting (4)
Generated\361d1da7f942c932\JsonContext.AdditionalPropertiesDictionaryInt64.g.cs (1)
59writer.WriteNumber(entry.Key, entry.Value);
Generated\361d1da7f942c932\JsonContext.IDictionaryStringEvaluationContext.g.cs (1)
60EvaluationContextSerializeHandler(writer, entry.Value);
Generated\361d1da7f942c932\JsonContext.IDictionaryStringEvaluationMetric.g.cs (1)
60global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, EvaluationMetric);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (4)
Generated\361d1da7f942c932\JsonContext.AdditionalPropertiesDictionaryInt64.g.cs (1)
59writer.WriteNumber(entry.Key, entry.Value);
Generated\361d1da7f942c932\JsonContext.IDictionaryStringEvaluationContext.g.cs (1)
60EvaluationContextSerializeHandler(writer, entry.Value);
Generated\361d1da7f942c932\JsonContext.IDictionaryStringEvaluationMetric.g.cs (1)
60global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, EvaluationMetric);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.IDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
Microsoft.Extensions.AI.Integration.Tests (4)
PromptBasedFunctionCallingChatClient.cs (1)
153if (kvp.Value is JsonElement jsonElement)
VerbatimHttpHandler.cs (1)
60newContent.Headers.TryAddWithoutValidation(header.Key, header.Value);
VerbatimMultiPartHttpHandler.cs (2)
235if (!actualFrequencies.ContainsKey(kvp.Key) || kvp.Value != actualFrequencies[kvp.Key]) 241Assert.Equal(kvp.Value, actualFrequencies[kvp.Key]);
Microsoft.Extensions.AI.OpenAI (6)
Generated\361d1da7f942c932\OpenAIJsonContext.DictionaryStringJsonElement.g.cs (1)
58global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, JsonElement);
OpenAIChatClient.cs (1)
462FunctionCallInfo fci = entry.Value;
OpenAIRealtimeClientSession.cs (3)
257metadata[kvp.Key] = BinaryData.FromString(kvp.Value?.ToString() ?? string.Empty); 563sdkHeaders[kvp.Key] = kvp.Value; 953dict[kvp.Key] = kvp.Value;
OpenAIResponsesChatClient.cs (1)
1064result.Tools.Add(ToNamespaceResponseTool(kvp.Key.Name, kvp.Key.Description, kvp.Value));
Microsoft.Extensions.AI.OpenAI.Tests (1)
parent\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
116AreJsonEquivalentValues(expectedEntry.Value, actualValue, options, propertyName: expectedEntry.Key);
Microsoft.Extensions.AI.Stabilization.Tests (1)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.AdditionalPropertiesDictionaryInt64.g.cs (1)
57writer.WriteNumber(entry.Key, entry.Value);
Microsoft.Extensions.AI.Tests (17)
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
1143args.Value); 1146Assert.Equal("Result 1", JsonSerializer.Deserialize<string>(result.Value!, AIJsonUtilities.DefaultOptions)); 1938Assert.Contains("arg1", argsTag.Value);
ChatCompletion\OpenTelemetryChatClientTests.cs (6)
208var tags = activity.Tags.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 469var inputMessages = activity.Tags.First(kvp => kvp.Key == "gen_ai.input.messages").Value; 524var outputMessages = activity.Tags.First(kvp => kvp.Key == "gen_ai.output.messages").Value; 617var inputMessages = activity.Tags.First(kvp => kvp.Key == "gen_ai.input.messages").Value; 723var outputMessages = activity.Tags.First(kvp => kvp.Key == "gen_ai.output.messages").Value; 858var inputMessages = activity.Tags.First(kvp => kvp.Key == "gen_ai.input.messages").Value;
Generated\361d1da7f942c932\TestJsonSerializerContext.AdditionalPropertiesDictionaryInt64.g.cs (1)
57writer.WriteNumber(entry.Key, entry.Value);
Generated\361d1da7f942c932\TestJsonSerializerContext.DictionaryStringJsonDocument.g.cs (1)
58global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, JsonDocument);
Generated\361d1da7f942c932\TestJsonSerializerContext.DictionaryStringJsonNode.g.cs (1)
58global::System.Text.Json.JsonSerializer.Serialize(writer, entry.Value, JsonNode);
Generated\361d1da7f942c932\TestJsonSerializerContext.DictionaryStringString.g.cs (1)
57writer.WriteString(entry.Key, entry.Value);
Image\OpenTelemetryImageGeneratorTests.cs (1)
117var tags = activity.Tags.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
parent\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
116AreJsonEquivalentValues(expectedEntry.Value, actualValue, options, propertyName: expectedEntry.Key);
Realtime\OpenTelemetryRealtimeClientTests.cs (1)
148var tags = activity.Tags.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (1)
128var tags = activity.Tags.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
Microsoft.Extensions.Caching.Hybrid.Tests (8)
StampedeTests.cs (1)
484Assert.True(pair.Value > 16);
TestEventListener.cs (7)
81case "Name" when pair.Value is string: 82name = (string)pair.Value; 84case "DisplayName" when pair.Value is string s: 89value = Convert.ToDouble(pair.Value); 93value = Convert.ToDouble(pair.Value); 168if (pair.Value.value != 0) 170Assert.Fail($"{pair.Key}: expected 0, actual {pair.Value.value}");
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
843yield return entry.Value; 847yield return entry.Value;
Microsoft.Extensions.Compliance.Redaction (1)
RedactorProvider.cs (1)
51if (r.GetType() == m.Value)
Microsoft.Extensions.Configuration (1)
MemoryConfigurationProvider.cs (1)
31Data.Add(pair.Key, pair.Value);
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationProvider.cs (1)
158switchMappingsCopy.Add(mapping.Key, mapping.Value);
Microsoft.Extensions.DataIngestion (2)
Writers\VectorStoreWriter.cs (2)
92record[metadata.Key] = metadata.Value; 147Type propertyType = metadata.Value.GetType();
Microsoft.Extensions.DataIngestion.Tests (1)
Writers\VectorStoreWriterTests.cs (1)
56Assert.Equal(kvp.Value, record[kvp.Key]);
Microsoft.Extensions.DependencyInjection (4)
ServiceLookup\CallSiteChain.cs (3)
52ordered.Sort((a, b) => a.Value.Order.CompareTo(b.Value.Order)); 57Type? implementationType = pair.Value.ImplementationType;
ServiceLookup\CallSiteFactory.cs (1)
370callSites[i] = callSitesByIndex[i].Value;
Microsoft.Extensions.Diagnostics (7)
Metrics\Configuration\MetricsConfigureOptions.cs (1)
99if (bool.TryParse(instrumentPair.Value, out var instrumentEnabled))
src\runtime\src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (4)
61if (pair.Key == pair1.Key && object.Equals(pair.Value, pair1.Value)) 101if (pair.Key == pair1.Key && object.Equals(pair.Value, pair1.Value))
Tracing\Configuration\TracingConfigureOptions.cs (1)
92if (bool.TryParse(activityPair.Value, out var enabled))
Tracing\DefaultActivitySourceFactory.cs (1)
166foreach (FactoryActivitySource source in entry.Value)
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
324builder.AppendLine(kvp.Value?.ToString());
Microsoft.Extensions.Diagnostics.HealthChecks.Common (7)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Logging.g.cs (3)
36var status = s.TagArray[1].Value; 37var entries = s.TagArray[0].Value ?? "(null)"; 77var status = s.TagArray[0].Value;
TelemetryHealthCheckPublisher.cs (4)
61if (entry.Value.Status != HealthStatus.Healthy) 63_metrics.UnhealthyHealthCheckCounter.RecordMetric(entry.Key, entry.Value.Status); 70.Append(entry.Value.Status.ToString()) 72.Append(entry.Value.Description)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (33)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Logging.g.cs (28)
59var publisher = s.TagArray[0].Value ?? "(null)"; 102var totalTimeSinceStart = s.TagArray[3].Value; 103var kernelTimeSinceStart = s.TagArray[2].Value; 104var userTimeSinceStart = s.TagArray[1].Value; 105var memoryUsageInBytes = s.TagArray[0].Value; 223var cpuUsageTicks = s.TagArray[4].Value; 224var oldCpuUsageTicks = s.TagArray[3].Value; 225var timeTickDelta = s.TagArray[2].Value; 226var cpuUnits = s.TagArray[1].Value; 227var cpuPercentage = s.TagArray[0].Value; 269var currentMemoryUsage = s.TagArray[2].Value; 270var limitMemory = s.TagArray[1].Value; 271var requestMemory = s.TagArray[0].Value; 316var cpuUsageKernelTicks = s.TagArray[5].Value; 317var cpuUsageUserTicks = s.TagArray[4].Value; 318var oldCpuUsageTicks = s.TagArray[3].Value; 319var timeTickDelta = s.TagArray[2].Value; 320var cpuUnits = s.TagArray[1].Value; 321var cpuPercentage = s.TagArray[0].Value; 364var cpuLimit = s.TagArray[3].Value; 365var cpuRequest = s.TagArray[2].Value; 366var memoryLimit = s.TagArray[1].Value; 367var memoryRequest = s.TagArray[0].Value; 408var counterName = s.TagArray[1].Value ?? "(null)"; 409var errorMessage = s.TagArray[0].Value ?? "(null)"; 451var processMemoryUsage = s.TagArray[2].Value; 452var totalMemory = s.TagArray[1].Value; 453var memoryPercentage = s.TagArray[0].Value;
Windows\Disk\WindowsDiskMetrics.cs (5)
141measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionWriteTag, new(DeviceKey, pair.Key) })); 150measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionReadTag, new(DeviceKey, pair.Key) })); 166measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionWriteTag, new(DeviceKey, pair.Key) })); 175measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionReadTag, new(DeviceKey, pair.Key) })); 190measurements.Add(new Measurement<double>(pair.Value, new TagList { new(DeviceKey, pair.Key) }));
Microsoft.Extensions.Diagnostics.Testing (8)
Logging\FakeLogger.cs (4)
149if (pair.Value != null) 173if (pair.Value is string s) 177else if (pair.Value is IEnumerable ve) 183str = Convert.ToString(pair.Value, CultureInfo.InvariantCulture);
Logging\FakeLoggerProvider.cs (1)
52entry.Value.ScopeProvider = _scopeProvider;
Logging\FakeLogRecord.cs (1)
83return kvp.Value;
Metrics\CollectedMeasurement.cs (2)
31d[tag.Key] = tag.Value; 68if (!object.Equals(kvp.Value, value))
Microsoft.Extensions.Diagnostics.Testing.Tests (4)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Logging.g.cs (1)
30var name = s.TagArray[0].Value ?? "(null)";
Logging\FakeLoggerTests.cs (3)
86var ss = logger.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 102ss = logger.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 136Assert.Equal(dt.ToString(CultureInfo.InvariantCulture), logger.LatestRecord.StructuredState![0].Value!);
Microsoft.Extensions.Features (1)
src\aspnetcore\src\Shared\Debugger\DictionaryItemDebugView.cs (1)
24Value = keyValue.Value;
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFilesWatcher.cs (1)
540PatternMatchingResult matchResult = wildCardEntry.Value.Matcher!.Match(path);
Microsoft.Extensions.FileSystemGlobbing (1)
InMemoryDirectoryInfo.cs (1)
130yield return new InMemoryDirectoryInfo(item.Key, item.Value, true, _comparisonType);
Microsoft.Extensions.Hosting.Testing (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Logging.g.cs (1)
35var timeToLive = s.TagArray[0].Value;
Microsoft.Extensions.Hosting.Testing.Tests (12)
FakeConfigurationSourceTests.cs (2)
23Assert.Equal("testValue", item.Value); 28Assert.Equal("anotherTestValue", item.Value);
HostingFakesExtensionsTests.cs (10)
147Assert.Equal("testValue", item.Value); 173Assert.Equal("testValue1", item.Value); 178Assert.Equal("testValue2", item.Value); 202Assert.Equal("testValue", item.Value); 207Assert.Equal("anotherTestValue", item.Value); 233Assert.Equal("testValue", item.Value); 259Assert.Equal("testValue1", item.Value); 264Assert.Equal("testValue2", item.Value); 288Assert.Equal("testValue", item.Value); 293Assert.Equal("anotherTestValue", item.Value);
Microsoft.Extensions.Http (2)
Logging\HttpHeadersLogValue.cs (2)
85: kvp.Value.ToString(); 124builder.AppendLine((string)kvp.Value);
Microsoft.Extensions.Http.Diagnostics (23)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Logging.g.cs (13)
32var method = s.TagArray[2].Value ?? "(null)"; 33var host = s.TagArray[1].Value ?? "(null)"; 34var path = s.TagArray[0].Value ?? "(null)"; 71var method = s.TagArray[2].Value ?? "(null)"; 72var host = s.TagArray[1].Value ?? "(null)"; 73var path = s.TagArray[0].Value ?? "(null)"; 110var requestState = s.TagArray[2].Value ?? "(null)"; 111var method = s.TagArray[1].Value ?? "(null)"; 112var host = s.TagArray[0].Value ?? "(null)"; 150var enricher = s.TagArray[3].Value ?? "(null)"; 151var method = s.TagArray[2].Value ?? "(null)"; 152var host = s.TagArray[1].Value ?? "(null)"; 153var path = s.TagArray[0].Value ?? "(null)";
Http\HttpDependencyMetadataResolver.cs (1)
186var finalArray = ProcessDependencyMetadataInternal(dep.Value);
Latency\Internal\HttpRequestLatencyListener.cs (2)
48if (eventSource.Value != null) 50EnableEventSource(eventSource.Value);
Logging\Internal\HttpHeadersReader.cs (1)
102var classification = kvp.Value;
Logging\Internal\HttpResponseBodyReader.cs (1)
123_ = newContent.Headers.TryAddWithoutValidation(header.Key, header.Value);
Logging\Internal\Log.cs (3)
164var httpMethod = request[startIndex].Value; 165var httpHost = request[startIndex + 1].Value; 166var httpPath = request[startIndex + 2].Value;
Logging\Internal\LoggerMessageStateExtensions.cs (2)
32state.TagArray[index++] = new(key, items[i].Value); 51state.TagArray[index++] = new(key, items[i].Value);
Microsoft.Extensions.Http.Diagnostics.Tests (37)
Logging\AcceptanceTests.cs (11)
127state!.Single(kvp => kvp.Key == enricher2!.KvpRequest.Key).Value.Should().Be(enricher2!.KvpRequest.Value!.ToString()); 326state!.Single(kvp => kvp.Key == HttpClientLoggingTagNames.Path).Value.Should().Be(redactedPath); 370.Subject.Value; 373.Which.Value.Should().Be(httpRequestMessage.RequestUri.Host); 376.Which.Value.Should().Be(httpRequestMessage.Method.ToString()); 379.Which.Value.Should().Be("200"); 382.Which.Value.Should().NotBeEmpty(); 393state.Should().ContainSingle(kvp => kvp.Key == "userId").Which.Value.Should().Be(expectedUserId); 394state.Should().ContainSingle(kvp => kvp.Key == "unitId").Which.Value.Should().Be(expectedUnitId); 438state!.Single(kvp => kvp.Key == HttpClientLoggingTagNames.Path).Value.Should().Be(redactedPath);
Logging\HttpClientLoggerTest.cs (5)
250logRecordState.Contains(TestExpectedRequestHeaderKey, expectedLogRecord.RequestHeaders[0].Value); 251logRecordState.Contains(TestExpectedResponseHeaderKey, expectedLogRecord.ResponseHeaders[0].Value); 252logRecordState.Contains(testSharedResponseHeaderKey, expectedLogRecord.ResponseHeaders[1].Value); 253logRecordState.Contains(testSharedRequestHeaderKey, expectedLogRecord.RequestHeaders[1].Value); 1040Assert.Equal("{http.request.method} {server.address}/{url.path}", pair.Value);
Logging\HttpRequestReaderTest.cs (16)
90httpRequestMessage.Headers.Add(header1.Key, header1.Value); 91httpRequestMessage.Headers.Add(header3.Key, header3.Value); 99httpResponseMessage.Headers.Add(header2.Key, header2.Value); 100httpResponseMessage.Headers.Add(header3.Key, header3.Value); 220httpRequestMessage.Headers.Add(header1.Key, header1.Value); 232httpResponseMessage.Headers.Add(header2.Key, header2.Value); 296httpRequestMessage.Headers.Add(header1.Key, header1.Value); 308httpResponseMessage.Headers.Add(header2.Key, header2.Value); 369httpRequestMessage.Headers.Add(header1.Key, header1.Value); 429httpRequestMessage.Headers.Add(header1.Key, header1.Value); 441httpResponseMessage.Headers.Add(header2.Key, header2.Value); 502httpRequestMessage.Headers.Add(header1.Key, header1.Value); 510httpResponseMessage.Headers.Add(header2.Key, header2.Value); 571httpRequestMessage.Headers.Add(header1.Key, header1.Value); 580httpResponseMessage.Headers.Add(header2.Key, header2.Value); 820tag => tag.Key == "url.query" && (tag.Value!).Contains("userId=REDACTED"));
Logging\Internal\LogRecordExtensions.cs (1)
19return logRecord.StructuredState.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
Logging\Internal\TestEnricher.cs (2)
38tagCollector.Add(KvpRequest.Key, KvpRequest.Value!); 43tagCollector.Add(KvpResponse.Key, KvpResponse.Value!);
Logging\LoggerMessageStateExtensionsTests.cs (2)
46Assert.Equal("v1", state.TagArray[0].Value); 49Assert.Equal("v2", state.TagArray[1].Value);
Microsoft.Extensions.Http.Resilience (1)
Internal\RequestMessageSnapshot.cs (1)
53_ = clone.Headers.TryAddWithoutValidation(header.Key, header.Value);
Microsoft.Extensions.Http.Resilience.Tests (4)
Helpers\OptionsUtilities.cs (1)
37var propertyValue1 = propertyDefinition1.Value;
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (1)
371Tags[tag.Key] = tag.Value;
Resilience\HttpResilienceMetricsEnricherTests.cs (1)
55tags[0].Value.Should().Be("500");
Routing\RoutingStrategyTest.cs (1)
168return new ConfigurationBuilder().AddInMemoryCollection(values.Select(pair => new KeyValuePair<string, string?>("section:" + pair.Key, pair.Value))).Build().GetSection("section");
Microsoft.Extensions.Identity.Core (1)
UserManager.cs (1)
1962if (await f.Value.CanGenerateTwoFactorTokenAsync(this, user).ConfigureAwait(false))
Microsoft.Extensions.Logging (7)
LoggerFactory.cs (2)
129Logger logger = registeredLogger.Value; 184Logger logger = existingLogger.Value;
LoggerFactoryScopeProvider.cs (5)
194sb.Append(_items[0].Value); 201sb.Append(_items[i].Value); 251_stringBuilder.Append(enumerator.Current.Value); 258_stringBuilder.Append(enumerator.Current.Value); 276public KeyValuePair<string, object?> Current => new KeyValuePair<string, object?>(_enumerator.Current.Key, _enumerator.Current.Value);
Microsoft.Extensions.Logging.Configuration (1)
LoggerFilterConfigureOptions.cs (1)
59if (TryGetSwitch(section.Value, out LogLevel level))
Microsoft.Extensions.Logging.Console (5)
ConsoleLoggerProvider.cs (3)
145logger.Value.Options = options; 146logger.Value.Formatter = logFormatter; 215logger.Value.ScopeProvider = _scopeProvider;
JsonConsoleFormatter.cs (2)
162switch (item.Value) 207writer.WriteString(key, ToInvariantString(item.Value));
Microsoft.Extensions.Logging.EventLog (1)
EventLogLogger.cs (1)
104sb.Append(pair.Key).Append(": ").AppendLine(pair.Value?.ToString());
Microsoft.Extensions.Logging.EventSource (2)
EventSourceLogger.cs (2)
265arguments[i] = new KeyValuePair<string, string?>(keyValuePair.Key, keyValuePair.Value?.ToString()); 286writer.WriteString(keyValue.Key, keyValue.Value);
Microsoft.Extensions.Logging.Generators (4)
LoggerMessageGenerator.Parser.cs (3)
193TypedConstant typedConstant = namedArgument.Value; 201TypedConstant value = namedArgument.Value; 1034TemplateMap = TemplateMap.Select(kvp => new KeyValuePairEquatable<string, string>(kvp.Key, kvp.Value)).ToImmutableEquatableArray(),
LoggerMessageGenerator.Roslyn4.0.cs (1)
209.Select(static kvp => kvp.Value)
Microsoft.Extensions.Logging.MSBuild (21)
MSBuildLogger.cs (21)
121if (originalFormat is null && kvp.Value is string format) 127message.subcategory = kvp.Value as string; 130message.code = kvp.Value as string; 133message.helpKeyword = kvp.Value as string; 136message.helpLink = kvp.Value as string; 139message.file = kvp.Value as string; 142if (kvp.Value is int lineNumber) 146if (kvp.Value is int columnNumber) 150if (kvp.Value is int endLineNumber) 154if (kvp.Value is int endColumnNumber) 183builder.Append($" {kvp.Key}={kvp.Value}"); 202if (kvp.Value is string format) 208message.subcategory = kvp.Value as string; 211message.code = kvp.Value as string; 214message.helpKeyword = kvp.Value as string; 217message.helpLink = kvp.Value as string; 220message.file = kvp.Value as string; 223if (kvp.Value is int lineNumber) 227if (kvp.Value is int columnNumber) 231if (kvp.Value is int endLineNumber) 235if (kvp.Value is int endColumnNumber)
Microsoft.Extensions.Options.SourceGeneration (14)
Emitter.cs (10)
642string linesToInsert = attributeData.Value is not null ? GenerateStronglyTypedCodeForLengthAttributes((HashSet<object>)attributeData.Value) : string.Empty; 647string linesToInsert = attributeData.Value is not null ? GenerateStronglyTypedCodeForLengthAttributes((HashSet<object>)attributeData.Value) : string.Empty; 652string linesToInsert = attributeData.Value is not null ? GenerateStronglyTypedCodeForLengthAttributes((HashSet<object>)attributeData.Value) : string.Empty; 655else if (attributeData.Key == _symbolHolder.CompareAttributeSymbol.Name && attributeData.Value is not null) 657string linesToInsert = GenerateStronglyTypedCodeForCompareAttribute((HashSet<object>)attributeData.Value); 662EmitRangeAttribute(_optionsSourceGenContext.ClassModifier, Emitter.StaticAttributeClassNamePrefix, attributeData.Key, _optionsSourceGenContext.Suffix, attributeData.Value is not null); 1216attrInstantiationStatementLines.Add($"{GetPaddingString(1)}{prop.Key} = {prop.Value}{(notLast ? "," : string.Empty)}");
Parser.cs (4)
644if (namedArgument.Value.Kind == TypedConstantKind.Array) 647validationAttr.Properties.Add(namedArgument.Key, GetArrayArgumentExpression(namedArgument.Value.Values, isParams)); 651validationAttr.Properties.Add(namedArgument.Key, GetArgumentExpression(namedArgument.Value.Type!, namedArgument.Value.Value));
Microsoft.Extensions.Resilience.Tests (1)
Resilience\ResilienceMetricsEnricherTests.cs (1)
26private IReadOnlyDictionary<string, object?> Tags => _tags.ToDictionary(v => v.Key, v => v.Value);
Microsoft.Extensions.ServiceDiscovery (5)
Http\HttpServiceEndpointResolver.cs (1)
115await resolver.Value.DisposeAsync().ConfigureAwait(false);
parent\parent\Shared\FxPolyfills\ConcurrentDictionary.cs (2)
37if (dictionary.TryRemove(pair.Key, out var existing) && !EqualityComparer<TValue>.Default.Equals(existing, pair.Value)) 39dictionary.TryAdd(pair.Key, pair.Value);
parent\parent\Shared\FxPolyfills\KeyValuePair.cs (1)
13value = pair.Value;
ServiceEndpointResolver.cs (1)
124await resolver.Value.DisposeAsync().ConfigureAwait(false);
Microsoft.Extensions.ServiceDiscovery.Abstractions (3)
parent\parent\Shared\FxPolyfills\ConcurrentDictionary.cs (2)
37if (dictionary.TryRemove(pair.Key, out var existing) && !EqualityComparer<TValue>.Default.Equals(existing, pair.Value)) 39dictionary.TryAdd(pair.Key, pair.Value);
parent\parent\Shared\FxPolyfills\KeyValuePair.cs (1)
13value = pair.Value;
Microsoft.Extensions.Telemetry (16)
Buffering\StringifyComprarer.cs (7)
18if (x.Value is null && y.Value is null) 23if (x.Value is null || y.Value is null) 28return x.Value.ToString() == y.Value.ToString(); 33return HashCode.Combine(obj.Key, obj.Value?.ToString());
Enrichment\ApplicationLogEnricher.cs (1)
29collector.Add(kvp.Key, kvp.Value);
Logging\ExtendedLoggerFactory.cs (2)
178ExtendedLogger logger = existingLogger.Value; 199ExtendedLogger logger = registeredLogger.Value;
Logging\Import\LoggerFactoryScopeProvider.cs (5)
206sb.Append(_items[0].Value); 213sb.Append(_items[i].Value); 264_stringBuilder.Append(enumerator.Current.Value); 271_stringBuilder.Append(enumerator.Current.Value); 290new KeyValuePair<string, object?>(_enumerator.Current.Key, _enumerator.Current.Value);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\LogBuffering\SerializedLogRecordFactory.cs (1)
33string value = attributes[i].Value?.ToString() ?? string.Empty;
Microsoft.Extensions.Telemetry.Abstractions (3)
Logging\LoggerMessageHelper.cs (2)
114if (typeof(TValue).IsValueType || kvp.Value is not null) 117_ = sb.Append(CultureInfo.InvariantCulture, $"\"{kvp.Value}\"");
Logging\LoggerMessageState.cs (1)
141_ = sb.Append(_tags[i].Value);
Microsoft.Extensions.Telemetry.Abstractions.Tests (15)
Logging\LoggerMessageStateTests.cs (15)
27Assert.Equal(Value, lms.TagArray[0].Value); 39Assert.Equal(Value, lms.TagArray[0].Value); 46Assert.Equal(Value, lms.TagArray[0].Value); 60Assert.Equal(Value, lms.TagArray[0].Value); 62Assert.Equal(Value, lms.TagArray[1].Value); 80Assert.Equal("V1", lms.TagArray[0].Value); 98Assert.Equal(Value, lms.TagArray[0].Value); 103Assert.Equal(Value, lms.TagArray[0].Value); 116Assert.Equal(Value, lms.TagArray[0].Value); 121Assert.Equal(Value, lms.TagArray[0].Value); 143Assert.Equal(Value, list[0].Value); 153Assert.Equal(Value, list[0].Value); 159Assert.Equal(Value, list[0].Value); 169Assert.Equal(current.Value, list[count].Value);
Microsoft.Extensions.Telemetry.PerformanceTests (11)
BenchLogger.cs (1)
64var o = item.Value;
ModernCodeGen.cs (10)
34var connectionId = s.TagArray[6].Value ?? "(null)"; 35var type = s.TagArray[5].Value ?? "(null)"; 36var streamId = s.TagArray[4].Value ?? "(null)"; 37var length = s.TagArray[3].Value ?? "(null)"; 38var flags = s.TagArray[2].Value ?? "(null)"; 39var other = s.TagArray[1].Value ?? "(null)"; 67var start = s.TagArray[4].Value; 68var end = s.TagArray[3].Value; 69var options = s.TagArray[2].Value; 70var guid = s.TagArray[1].Value;
Microsoft.Extensions.Telemetry.Tests (8)
Enrichment\Internals\TestLogEnrichmentTagCollector.cs (1)
18_tags.Add(kvp.Key, kvp.Value);
Enrichment\Internals\TestMetricEnrichmentTagCollector.cs (1)
18_tags.Add(kvp.Key, kvp.Value.ToString() ?? string.Empty);
Logging\ExtendedLoggerTests.cs (6)
856Assert.Equal("V4", property.Value); 924Assert.Equal("V4", property.Value); 1178enrichmentPropertyBag.Add(kvp.Key, kvp.Value!); 1201collector.Add(kvp.Key, kvp.Value); 1210a[i++] = new(kvp.Key, (string)kvp.Value!); 1215collector.Add(kvp.Key, kvp.Value);
Microsoft.Extensions.Validation (1)
ValidateContext.cs (1)
49=> _validationErrors?.ToDictionary(kvp => kvp.Key, kvp => (IReadOnlyList<ValidationError>)kvp.Value.AsReadOnly()).AsReadOnly();
Microsoft.Extensions.Validation.ValidationsGenerator (6)
Extensions\ISymbolExtensions.cs (4)
34if (string.Equals(arg.Key, "Name", StringComparison.Ordinal) && arg.Value.Kind == TypedConstantKind.Primitive) 36name = arg.Value.Value as string; 38else if (string.Equals(arg.Key, "ResourceType", StringComparison.Ordinal) && arg.Value.Kind == TypedConstantKind.Type) 40hasResourceType = arg.Value.Value is INamedTypeSymbol;
Extensions\ITypeSymbolExtensions.cs (1)
221if (namedArgument.Value.Value is int conditionValue)
src\aspnetcore\src\Shared\RoslynUtils\SymbolExtensions.cs (1)
287var routeParameterNameConstant = namedArgument.Value;
Microsoft.Gen.ComplianceReports (1)
Parser.cs (1)
268notes = namedArg.Value.Value?.ToString();
Microsoft.Gen.ContextualOptions (1)
Parser.cs (1)
18.Select(type => new OptionsContextType(type.Key, type.Value.ToImmutableArray(), GetContextProperties(type.Key)))
Microsoft.Gen.ContextualOptions.Unit.Tests (5)
SyntaxContextReceiverTests.cs (5)
36Assert.Equal(declaration.Key.Name, declaration.Value.Single().Identifier.Text); 74Assert.Equal(2, declaration.Value.Count); 75Assert.All(declaration.Value.Select(dec => dec.Identifier.Text), className => Assert.Equal("Class2", className)); 76Assert.NotEqual(declaration.Value[0], declaration.Value[1]);
Microsoft.Gen.Logging (3)
AttributeProcessors.cs (3)
66var v = a.Value.Value; 135var v = a.Value.Value; 173var v = a.Value.Value;
Microsoft.Gen.Logging.Generated.Tests (292)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Logging.g.cs (272)
36var user = s.TagArray[2].Value ?? "(null)"; 74var hostName = s.TagArray[0].Value ?? "(null)"; 114var hostName = s.TagArray[0].Value ?? "(null)"; 155var hostName = s.TagArray[0].Value ?? "(null)"; 196var hostName = s.TagArray[0].Value ?? "(null)"; 266var p1 = s.TagArray[0].Value ?? "(null)"; 302var p1 = s.TagArray[1].Value ?? "(null)"; 303var p2 = s.TagArray[0].Value; 367var p2 = s.TagArray[0].Value ?? "(null)"; 402var p2 = s.TagArray[0].Value; 437var p1 = s.TagArray[0].Value; 478var p1 = s.TagArray[6].Value; 479var p2 = s.TagArray[5].Value; 480var p3 = s.TagArray[4].Value; 481var p4 = s.TagArray[3].Value; 482var p5 = s.TagArray[2].Value; 483var p6 = s.TagArray[1].Value; 484var p7 = s.TagArray[0].Value; 525var p1 = s.TagArray[6].Value; 526var p2 = s.TagArray[5].Value; 527var p3 = s.TagArray[4].Value; 528var p4 = s.TagArray[3].Value; 529var p5 = s.TagArray[2].Value; 530var p6 = s.TagArray[1].Value; 531var p7 = s.TagArray[0].Value; 566var p1 = s.TagArray[0].Value; 604var requestId = s.TagArray[3].Value ?? "(null)"; 605var first = s.TagArray[2].Value ?? "(null)"; 606var second = s.TagArray[1].Value ?? "(null)"; 607var third = s.TagArray[0].Value ?? "(null)"; 642var requestId = s.TagArray[0].Value ?? "(null)"; 691var @event = s.TagArray[0].Value ?? "(null)"; 733var @myevent1 = s.RedactedTagArray[0].Value ?? "(null)"; 774var @myevent2 = s.TagArray[1].Value ?? "(null)"; 775var otherevent = s.TagArray[0].Value; 816var @myevent3 = s.TagArray[1].Value ?? "(null)"; 817var otherevent = s.TagArray[0].Value; 857var @event = s.TagArray[0].Value ?? "(null)"; 932var @class = s.TagArray[0].Value ?? "(null)"; 1007var @class = s.TagArray[0].Value ?? "(null)"; 1047var param = s.TagArray[0].Value ?? "(null)"; 1099var p0 = s.TagArray[0].Value ?? "(null)"; 1142var p1 = s.TagArray[0].Value ?? "(null)"; 1143var p0 = s.RedactedTagArray[0].Value ?? "(null)"; 1186var p1 = s.TagArray[0].Value ?? "(null)"; 1187var p0 = s.RedactedTagArray[0].Value ?? "(null)"; 1232var p0 = s.RedactedTagArray[3].Value ?? "(null)"; 1233var p1 = s.RedactedTagArray[2].Value ?? "(null)"; 1234var p2 = s.RedactedTagArray[1].Value ?? "(null)"; 1235var p3 = s.RedactedTagArray[0].Value ?? "(null)"; 1280var p0 = s.RedactedTagArray[3].Value ?? "(null)"; 1281var p1 = s.RedactedTagArray[2].Value ?? "(null)"; 1282var p2 = s.RedactedTagArray[1].Value ?? "(null)"; 1283var p3 = s.RedactedTagArray[0].Value; 1335var p0 = s.RedactedTagArray[10].Value ?? "(null)"; 1336var p1 = s.RedactedTagArray[9].Value ?? "(null)"; 1337var p2 = s.RedactedTagArray[8].Value ?? "(null)"; 1338var p3 = s.RedactedTagArray[7].Value ?? "(null)"; 1339var p4 = s.RedactedTagArray[6].Value ?? "(null)"; 1340var p5 = s.RedactedTagArray[5].Value ?? "(null)"; 1341var p6 = s.RedactedTagArray[4].Value ?? "(null)"; 1342var p7 = s.RedactedTagArray[3].Value ?? "(null)"; 1343var p8 = s.RedactedTagArray[2].Value ?? "(null)"; 1344var p9 = s.RedactedTagArray[1].Value ?? "(null)"; 1345var p10 = s.RedactedTagArray[0].Value ?? "(null)"; 1461var p0 = s.RedactedTagArray[0].Value; 1503var p0 = s.RedactedTagArray[0].Value ?? "(null)"; 1545var p0 = s.RedactedTagArray[0].Value; 1735var p0 = s.TagArray[0].Value; 1771var p0 = s.TagArray[1].Value; 1772var p1 = s.TagArray[0].Value; 1809var p0 = s.TagArray[2].Value; 1810var p1 = s.TagArray[1].Value; 1811var p2 = s.TagArray[0].Value; 1849var p0 = s.TagArray[3].Value; 1850var p1 = s.TagArray[2].Value; 1851var p2 = s.TagArray[1].Value; 1852var p3 = s.TagArray[0].Value; 1891var p0 = s.TagArray[4].Value; 1892var p1 = s.TagArray[3].Value; 1893var p2 = s.TagArray[2].Value; 1894var p3 = s.TagArray[1].Value; 1895var p4 = s.TagArray[0].Value; 1935var p0 = s.TagArray[5].Value; 1936var p1 = s.TagArray[4].Value; 1937var p2 = s.TagArray[3].Value; 1938var p3 = s.TagArray[2].Value; 1939var p4 = s.TagArray[1].Value; 1940var p5 = s.TagArray[0].Value; 1981var p0 = s.TagArray[6].Value; 1982var p1 = s.TagArray[5].Value; 1983var p2 = s.TagArray[4].Value; 1984var p3 = s.TagArray[3].Value; 1985var p4 = s.TagArray[2].Value; 1986var p5 = s.TagArray[1].Value; 1987var p6 = s.TagArray[0].Value; 2029var p0 = s.TagArray[7].Value; 2030var p1 = s.TagArray[6].Value; 2031var p2 = s.TagArray[5].Value; 2032var p3 = s.TagArray[4].Value; 2033var p4 = s.TagArray[3].Value; 2034var p5 = s.TagArray[2].Value; 2035var p6 = s.TagArray[1].Value; 2036var p7 = s.TagArray[0].Value; 2077var p0 = s.TagArray[1].Value; 2078var p1 = s.TagArray[0].Value; 2124var p0 = s.TagArray[0].Value; 2170var p0 = s.TagArray[0].Value; 2216var p0 = s.TagArray[0].Value; 2262var p0 = s.TagArray[0].Value; 2308var p0 = s.TagArray[0].Value; 2354var p0 = s.TagArray[0].Value; 2400var p0 = s.TagArray[0].Value; 2446var p0 = s.TagArray[0].Value ?? "(null)"; 2486var p0 = s.TagArray[0].Value ?? "(null)"; 2594var p0 = s.TagArray[0].Value ?? "(null)"; 2634var p0 = s.TagArray[0].Value ?? "(null)"; 2781var p1 = s.RedactedTagArray[0].Value ?? "(null)"; 2819var p1 = s.RedactedTagArray[1].Value ?? "(null)"; 2820var p2 = s.RedactedTagArray[0].Value ?? "(null)"; 2924var p0 = s.TagArray[0].Value ?? "(null)"; 2960var p0 = s.TagArray[1].Value; 2961var p1 = s.TagArray[0].Value ?? "(null)"; 2998var p0 = s.TagArray[2].Value; 2999var p1 = s.TagArray[1].Value ?? "(null)"; 3000var p2 = s.TagArray[0].Value; 3038var p0 = s.TagArray[3].Value; 3039var p1 = s.TagArray[2].Value ?? "(null)"; 3040var p2 = s.TagArray[1].Value; 3041var p3 = s.TagArray[0].Value; 3080var p0 = s.TagArray[4].Value; 3081var p1 = s.TagArray[3].Value ?? "(null)"; 3082var p2 = s.TagArray[2].Value; 3083var p3 = s.TagArray[1].Value; 3084var p4 = s.TagArray[0].Value; 3124var p0 = s.TagArray[5].Value; 3125var p1 = s.TagArray[4].Value ?? "(null)"; 3126var p2 = s.TagArray[3].Value; 3127var p3 = s.TagArray[2].Value; 3128var p4 = s.TagArray[1].Value; 3129var p5 = s.TagArray[0].Value; 3170var p0 = s.TagArray[6].Value; 3171var p1 = s.TagArray[5].Value ?? "(null)"; 3172var p2 = s.TagArray[4].Value; 3173var p3 = s.TagArray[3].Value; 3174var p4 = s.TagArray[2].Value; 3175var p5 = s.TagArray[1].Value; 3176var p6 = s.TagArray[0].Value; 3218var p0 = s.TagArray[7].Value; 3219var p1 = s.TagArray[6].Value ?? "(null)"; 3220var p2 = s.TagArray[5].Value; 3221var p3 = s.TagArray[4].Value; 3222var p4 = s.TagArray[3].Value; 3223var p5 = s.TagArray[2].Value; 3224var p6 = s.TagArray[1].Value; 3225var p7 = s.TagArray[0].Value; 3268var p0 = s.TagArray[8].Value; 3269var p1 = s.TagArray[7].Value ?? "(null)"; 3270var p2 = s.TagArray[6].Value; 3271var p3 = s.TagArray[5].Value; 3272var p4 = s.TagArray[4].Value; 3273var p5 = s.TagArray[3].Value; 3274var p6 = s.TagArray[2].Value; 3275var p7 = s.TagArray[1].Value; 3276var p8 = s.TagArray[0].Value; 3313var p1 = s.TagArray[2].Value ?? "(null)"; 3314var p2 = s.TagArray[1].Value ?? "(null)"; 3315var p3 = s.TagArray[0].Value ?? "(null)"; 3350var p1 = s.TagArray[0].Value ?? "(null)"; 3385var @class = s.TagArray[0].Value ?? "(null)"; 3420var p1 = s.TagArray[0].Value; 3455var p1 = s.TagArray[0].Value ?? "(null)"; 3638var ex2 = s.TagArray[0].Value ?? "(null)"; 3678var ex2 = s.TagArray[0].Value ?? "(null)"; 3718var arg1 = s.TagArray[0].Value ?? "(null)"; 3790var p1 = s.TagArray[0].Value; 3898var p0 = s.TagArray[0].Value ?? "(null)"; 3944var p0 = s.TagArray[0].Value ?? "(null)"; 3990var value = s.TagArray[0].Value; 4031var code = s.TagArray[0].Value; 4074var p1 = s.TagArray[1].Value ?? "(null)"; 4075var p2 = s.TagArray[0].Value; 4116var value = s.TagArray[0].Value; 4162var s = s_.TagArray[0].Value; 4208var p0 = s.TagArray[0].Value; 4584var level = s.TagArray[0].Value; 4624var logger = s.TagArray[0].Value; 4810var p0 = s.TagArray[0].Value ?? "(null)"; 4861var p0 = s.TagArray[0].Value ?? "(null)"; 4907var p0 = s.TagArray[0].Value ?? "(null)"; 4953var p0 = s.TagArray[0].Value ?? "(null)"; 4999var p0 = s.TagArray[0].Value ?? "(null)"; 5045var p0 = s.TagArray[0].Value ?? "(null)"; 5122var classToLog_StringProperty_1 = s.TagArray[31].Value ?? "(null)"; 5164var StringProperty = s.TagArray[2].Value ?? "(null)"; 5165var complexParam = s.TagArray[1].Value ?? "(null)"; 5795var p0 = s.TagArray[3].Value; 5838var p0 = s.TagArray[3].Value; 5938var stringProperty = s.RedactedTagArray[1].Value ?? "(null)"; 6062var userId = s.RedactedTagArray[1].Value ?? "(null)"; 6116var p0 = s.TagArray[8].Value ?? "(null)"; 6387var p1 = s.TagArray[2].Value ?? "(null)"; 6462var value1 = s.TagArray[1].Value ?? "(null)"; 6463var value2 = s.TagArray[0].Value ?? "(null)"; 6642var p0 = s.RedactedTagArray[2].Value ?? "(null)"; 6643var p1 = s.RedactedTagArray[1].Value ?? "(null)"; 6644var p2 = s.RedactedTagArray[0].Value ?? "(null)"; 6693var p0 = s.TagArray[0].Value ?? "(null)"; 6735var p0 = s.RedactedTagArray[0].Value ?? "(null)"; 6779var p0 = s.RedactedTagArray[2].Value ?? "(null)"; 6780var p1 = s.RedactedTagArray[1].Value ?? "(null)"; 6781var p2 = s.RedactedTagArray[0].Value ?? "(null)"; 6858var p0 = s.TagArray[3].Value ?? "(null)"; 6901var p0 = s.TagArray[1].Value ?? "(null)"; 6902var p1 = s.TagArray[0].Value ?? "(null)"; 6945var p0 = s.RedactedTagArray[1].Value ?? "(null)"; 7133var p0 = s.TagArray[0].Value ?? "(null)"; 7173var p0 = s.TagArray[0].Value ?? "(null)"; 7215var p0 = s.RedactedTagArray[0].Value ?? "(null)"; 7263var p0 = s.TagArray[8].Value ?? "(null)"; 7264var p1 = s.TagArray[7].Value ?? "(null)"; 7265var p2 = s.TagArray[6].Value ?? "(null)"; 7266var p3 = s.TagArray[5].Value ?? "(null)"; 7267var p4 = s.TagArray[4].Value ?? "(null)"; 7268var p5 = s.TagArray[3].Value ?? "(null)"; 7269var p6 = s.TagArray[2].Value ?? "(null)"; 7270var p7 = s.TagArray[1].Value ?? "(null)"; 7271var p8 = s.TagArray[0].Value ?? "(null)"; 7319var p0 = s.TagArray[8].Value ?? "(null)"; 7320var p1 = s.TagArray[7].Value ?? "(null)"; 7321var p2 = s.TagArray[6].Value ?? "(null)"; 7322var p3 = s.TagArray[5].Value ?? "(null)"; 7323var p4 = s.TagArray[4].Value ?? "(null)"; 7324var p5 = s.TagArray[3].Value ?? "(null)"; 7325var p6 = s.TagArray[2].Value ?? "(null)"; 7326var p7 = s.TagArray[1].Value ?? "(null)"; 7327var p8 = s.TagArray[0].Value ?? "(null)"; 7374var p0 = s.RedactedTagArray[0].Value ?? "(null)"; 7454var p0 = s.TagArray[0].Value ?? "(null)"; 7495var p0 = s.TagArray[1].Value ?? "(null)"; 7496var p1 = s.TagArray[0].Value ?? "(null)"; 7578var v = s.TagArray[0].Value; 7618var v = s.TagArray[0].Value ?? "(null)"; 7664var p0 = s.TagArray[0].Value ?? "(null)"; 7790var s = s_.TagArray[0].Value; 7839var p0 = s.TagArray[0].Value ?? "(null)"; 7990var data = s.RedactedTagArray[0].Value ?? "(null)"; 8066var p1 = s.TagArray[1].Value ?? "(null)"; 8067var p2 = s.TagArray[0].Value ?? "(null)"; 8107var helper = s.TagArray[0].Value ?? "(null)"; 8264var items = s.TagArray[0].Value ?? "(null)"; 8328var p1 = s.TagArray[0].Value ?? "(null)"; 8421var optional = s.TagArray[0].Value ?? "(null)"; 8462var p1 = s.TagArray[1].Value ?? "(null)"; 8463var p2 = s.TagArray[0].Value ?? "(null)"; 8686var p0 = s.TagArray[0].Value; 8734var param = s.TagArray[0].Value ?? "(null)"; 8850var stringParam = s.TagArray[0].Value ?? "(null)"; 9036var param = s.TagArray[0].Value ?? "(null)"; 9080var stringParam = s.TagArray[0].Value ?? "(null)"; 9121var a1 = s.TagArray[0].Value; 9156var a1 = s.TagArray[0].Value; 9197var a1 = s.TagArray[6].Value; 9198var a2 = s.TagArray[5].Value; 9199var a3 = s.TagArray[4].Value; 9200var a4 = s.TagArray[3].Value; 9201var a5 = s.TagArray[2].Value; 9202var a6 = s.TagArray[1].Value; 9203var a7 = s.TagArray[0].Value; 9239var a1 = s.TagArray[1].Value; 9240var a2 = s.TagArray[0].Value; 9315var p1 = s.TagArray[0].Value ?? "(null)";
LoggerMessageAttributeTests.cs (1)
163Assert.Contains(collector.LatestRecord.StructuredState, x => x.Key == key && x.Value == value);
LogMethodTests.cs (5)
49RequestId = field.Value; 434Assert.Equal("param", logRecord.StructuredState[0].Value); 1053Assert.Equal(kvp.Value, rol.GetValue(kvp.Key)); 1069Assert.Equal(kvp.Value, rol!.GetValue(kvp.Key)); 1081Assert.Equal(format, pair.Value);
LogPropertiesTests.cs (4)
45var ss = _logger.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 176var ss = collector.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 194ss = collector.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 604.ToDictionary(p => p.Key, p => p.Value);
SensitiveRecordTests.cs (5)
22Assert.All(logRecord.StructuredState, x => Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, x.Value)); 34Assert.All(logRecord.StructuredState, x => Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, x.Value)); 51Assert.All(logRecord.StructuredState, x => Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, x.Value)); 68Assert.All(logRecord.StructuredState, x => Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, x.Value)); 85Assert.All(logRecord.StructuredState, x => Assert.DoesNotContain(SensitiveRecordExtensions.Sensitive, x.Value));
TagProviderTests.cs (4)
169Assert.Equal(props.P0.ToString(CultureInfo.InvariantCulture), state[0].Value); 171Assert.Equal(props.P1, state[1].Value); 195Assert.Equal(props.P0.ToString(CultureInfo.InvariantCulture), state[0].Value); 197Assert.Equal(props.P1, state[1].Value);
Utils.cs (1)
101return kvp.Value;
Microsoft.Gen.MetadataExtractor (7)
Parser_2.cs (6)
293if (arg.Value.Kind == TypedConstantKind.Primitive && 296metricNameFromAttribute = (arg.Value.Value ?? string.Empty).ToString().Replace("\\\\", "\\"); 298else if (arg.Value.Kind == TypedConstantKind.Primitive && 301metricUnitFromAttribute = (arg.Value.Value ?? string.Empty).ToString(); 621if (namedArgument.Key == "Name" && namedArgument.Value.Value is { } nameValue) 625else if (namedArgument.Key == "Unit" && namedArgument.Value.Value is { } unitValue)
Parser.cs (1)
268notes = namedArg.Value.Value?.ToString();
Microsoft.Gen.Metrics (8)
Emitter.cs (1)
38GenTypeByNamespace(entry.Key, entry.Value, cancellationToken);
MetricFactoryEmitter.cs (1)
33GenMetricFactoryByNamespace(entry.Key, entry.Value, cancellationToken);
Parser.cs (6)
293if (arg.Value.Kind == TypedConstantKind.Primitive && 296metricNameFromAttribute = (arg.Value.Value ?? string.Empty).ToString().Replace("\\\\", "\\"); 298else if (arg.Value.Kind == TypedConstantKind.Primitive && 301metricUnitFromAttribute = (arg.Value.Value ?? string.Empty).ToString(); 621if (namedArgument.Key == "Name" && namedArgument.Value.Value is { } nameValue) 625else if (namedArgument.Key == "Unit" && namedArgument.Value.Value is { } unitValue)
Microsoft.Gen.Metrics.Generated.Tests (33)
MetricTests.cs (22)
71Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 154Assert.Equal(new (string, object?)[] { ("s1", "val_1"), ("s2", "val_2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 174var tags = measurements[0].Tags.Select(x => (x.Key, x.Value)); 177tags = measurements[1].Tags.Select(x => (x.Key, x.Value)); 198var tags = measurements[0].Tags.Select(x => (x.Key, x.Value)); 201tags = measurements[1].Tags.Select(x => (x.Key, x.Value)); 253Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 259Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 266Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val4") }, measurement.Tags.Select(x => (x.Key, x.Value))); 278Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 284Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 291Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val4") }, measurement.Tags.Select(x => (x.Key, x.Value))); 329Assert.Equal(new (string, object?)[] { ("Dim1", "val1"), ("Dim_2", "val2"), ("Dim_3", "val3") }, measurement.Tags.Select(x => (x.Key, x.Value))); 342Assert.Equal(new (string, object?)[] { ("Dim1", "val1"), ("Dim_2", "val2"), ("Dim_3", "val3") }, measurement.Tags.Select(x => (x.Key, x.Value))); 372measurement.Tags.Select(x => (x.Key, x.Value))); 421measurement.Tags.Select(x => (x.Key, x.Value))); 444measurement.Tags.Select(x => (x.Key, x.Value))); 467measurement.Tags.Select(x => (x.Key, x.Value))); 515measurement.Tags.Select(x => (x.Key, x.Value))); 564measurement.Tags.Select(x => (x.Key, x.Value))); 587measurement.Tags.Select(x => (x.Key, x.Value))); 609measurement.Tags.Select(x => (x.Key, x.Value)));
MetricTests.Ext.cs (8)
55Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 135Assert.Equal(new (string, object?)[] { ("s1", "val_1"), ("s2", "val_2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 184measurement.Tags.Select(x => (x.Key, x.Value))); 206measurement.Tags.Select(x => (x.Key, x.Value))); 228measurement.Tags.Select(x => (x.Key, x.Value))); 277measurement.Tags.Select(x => (x.Key, x.Value))); 299measurement.Tags.Select(x => (x.Key, x.Value))); 321measurement.Tags.Select(x => (x.Key, x.Value)));
MetricTests.Ext.Unit.cs (3)
57measurement.Tags.Select(x => (x.Key, x.Value))); 111measurement.Tags.Select(x => (x.Key, x.Value))); 141measurement.Tags.Select(x => (x.Key, x.Value)));
Microsoft.Gen.MetricsReports (6)
Parser.cs (6)
293if (arg.Value.Kind == TypedConstantKind.Primitive && 296metricNameFromAttribute = (arg.Value.Value ?? string.Empty).ToString().Replace("\\\\", "\\"); 298else if (arg.Value.Kind == TypedConstantKind.Primitive && 301metricUnitFromAttribute = (arg.Value.Value ?? string.Empty).ToString(); 621if (namedArgument.Key == "Name" && namedArgument.Value.Value is { } nameValue) 625else if (namedArgument.Key == "Unit" && namedArgument.Value.Value is { } unitValue)
Microsoft.Interop.ComInterfaceGenerator (2)
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
91equivalenceKeyBuilder.Append($";{option.Key}={option.Value}");
VirtualMethodPointerStubGenerator.cs (1)
370foreach (TypedConstant callConv in arg.Value.Values)
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\CustomMarshallerAttributeFixer.cs (1)
63HashSet<string> missingMembers = marshallerInfo.Value;
LibraryImportGenerator.cs (1)
113foreach (TypedConstant callConv in arg.Value.Values)
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
91equivalenceKeyBuilder.Append($";{option.Key}={option.Value}");
Microsoft.Interop.SourceGeneration (11)
ComInterfaceMarshallingInfoProvider.cs (2)
101builder[kvp.Key] = kvp.Value; 146if (namedArg.Key == "Options" && namedArg.Value.Value is int rawOptions && rawOptions != 0)
ManualTypeMarshallingHelper.cs (1)
42hash = HashCode.Combine(hash, mode.Key, mode.Value);
MarshalAsParser.cs (1)
244elementUnmanagedType = (UnmanagedType)namedArg.Value.Value!;
MarshallingAttributeInfo.cs (1)
153foreach (TypePositionInfo nestedElement in mode.Value.CollectionElementMarshallingInfo.ElementDependencies)
MarshalUsingAttributeParser.cs (3)
80constSize = (int)arg.Value.Value!; 84if (arg.Value.Value is null) 89elementName = (string)arg.Value.Value!;
SignatureContext.cs (1)
211depth = (int)named.Value.Value!;
ValueEqualityImmutableDictionary.cs (2)
25if (!other.TryGetValue(kvp.Key, out var value) || !kvp.Value.Equals(value)) 41_hash = HashCode.Combine(_hash, kvp.Key, kvp.Value);
Microsoft.Maui (7)
Debugger\DebuggerDisplayHelpers.cs (5)
50 if (HasValue(kvp.Value) || includeNullValues) 63 if (kvp.Value is null) 67 else if (kvp.Value is string s) 71 else if (kvp.Value is IEnumerable enumerable) 89 sb.Append(kvp.Value);
HotReload\HotReloadHelper.cs (2)
182 if (pair.Value.IsGenericType) 183 newType = pair.Value.GetGenericTypeDefinition().MakeGenericType(newHandler);
Microsoft.Maui.Controls (49)
BindableObject.cs (9)
138 var changed = !Equals(original.Value, newValue); 141 property.PropertyChanging?.Invoke(this, original.Value, newValue); 151 OnBindablePropertySet(property, original.Value, newValue, changed, changed); 189 Current = new LocalValueEntry(_propertiesEnumerator.Current.Key, _propertiesEnumerator.Current.Value.Values.GetValue(), _propertiesEnumerator.Current.Value.Attributes); 229 resultArray[i].Value = (T)pair.Value; 320 oldBinding = b_p.Value; 613 var original = specificityAndValue.Value; 707 var binding = kvp.Value;
DataTemplate.cs (2)
86 bindable.SetBinding(kvp.Key, kvp.Value.Clone()); 99 bindable.SetValue(kvp.Key, kvp.Value);
DragAndDrop\DataPackage.cs (2)
34 dataPackage.Properties.Add(property.Key, property.Value); 37 dataPackage.PropertiesInternal.Add(property.Key, property.Value);
Element\Element.cs (4)
768 if (dynR.Value.Item1 != value.Key) 771 changedResources.Add((dynR.Key, dynR.Value.Item2)); 776 OnResourceChanged(changedResource.Item1, value.Value, changedResource.Item2); 778 var bindableObject = value.Value as BindableObject;
ListProxy.cs (1)
102 if (Equals(kvp.Value, item))
OrderedDictionary.cs (4)
80 Add(kvp.Key, kvp.Value); 107 Add(item.Key, item.Value); 257 Insert(index, item.Key, item.Value); 266 _dict[value.Key] = value.Value;
PlatformBindingHelpers.cs (2)
203 wrapper.SetBinding(kvp.Key, kvp.Value); 205 wrapper.SetValue(kvp.Key, kvp.Value);
ResourcesExtensions.cs (3)
28 mergedClassStyles.AddRange(res.Value as List<Style>); 39 resources.Add(res.Key, res.Value); 43 mergedClassStyles.AddRange(res.Value as List<Style>);
Shell\ShellNavigationManager.cs (1)
331 returnValue[datum.Key] = datum.Value;
Shell\ShellNavigationQueryParameters.cs (3)
20 this.Add(item.Key, item.Value); 26 this.Add(item.Key, item.Value); 68 _internal.Add(item.Key, item.Value);
Shell\ShellRouteParameters.cs (8)
21 _shellNavigationQueryParameters[item.Key] = item.Value; 33 returnValue.Add(item.Key, item.Value); 52 this.Add(key, q.Value); 56 _shellNavigationQueryParameters[item.Key] = item.Value; 66 this.Add(item.Key, item.Value); 69 _shellNavigationQueryParameters[item.Key] = item.Value; 97 this[item.Key] = item.Value; 125 value = tuple.Value;
Style.cs (1)
143 ApplyCore(target.Key, newValue, (SetterSpecificity)target.Value);
StyleSheets\Style.cs (2)
73 if (string.Equals(decl.Value, "initial", StringComparison.OrdinalIgnoreCase)) 79 convertedValues[decl] = (value = Convert(styleable, decl.Value, property));
StyleSheets\StyleSheet.cs (1)
111 var style = kvp.Value;
TemplatedItemsList.cs (4)
430 int index = kvp.Value.GetGlobalIndexOfItem(item); 435 count += kvp.Value.GetDescendantCount(); 717 group.Value.CollectionChanged -= OnInnerCollectionChanged; 718 group.Value.Dispose();
VisualElement\VisualElement.cs (1)
1561 mergedClassStyles.AddRange(value.Value as List<Style>);
VisualStateManager.cs (1)
74 var groups = (VisualStateGroupList)vsgSpecificityValue.Value;
Microsoft.Maui.Controls.Build.Tasks (9)
BindablePropertyReferenceExtensions.cs (1)
68 value = kvp.Value;
ExpandMarkupsVisitor.cs (1)
75 if (kvp.Value != node)
NodeILExtensions.cs (1)
704 yield return Create(Ldstr, kvp.Value);
PerformanceProvider.cs (3)
66 double total = TimeSpan.FromTicks(kvp.Value.TotalTime).TotalMilliseconds; 67 double avg = total / kvp.Value.CallCount; 68 yield return string.Format("{0,-80} | {1,-10} | {2,-10}ms | {3,-8}ms", key, kvp.Value.CallCount, total, avg);
SetPropertiesVisitor.cs (3)
225 if (kvp.Value != node) 1889 parentIl.Append(kvp.Value.Item1.LoadAs(parentContext.Cache, module.ImportReference(parentContext.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Internals", "NameScope")), module)); 1900 templateContext.Scopes[kvp.Key] = new Tuple<VariableDefinition, IList<string>>(varDefScope, kvp.Value.Item2);
Microsoft.Maui.Controls.SourceGen (2)
CodeBehindGenerator.cs (1)
220 xmlnsDef.AssemblyName = attr.NamedArguments[0].Value.Value as string;
src\Controls\src\Xaml\XamlNode.cs (1)
217 clone.Properties.Add(kvp.Key, kvp.Value.Clone());
Microsoft.Maui.Controls.Xaml (6)
NodeExtensions.cs (1)
16 if (kvp.Value != node)
PruneIgnoredNodesVisitor.cs (2)
24 if (!((propertyKvp.Value as ValueNode)?.Value is string propertyValue)) 45 var propNs = (propertyKvp.Value as IElementNode)?.NamespaceURI ?? "";
XamlNode.cs (1)
217 clone.Properties.Add(kvp.Key, kvp.Value.Clone());
XamlParser.cs (2)
200 ? ((ValueNode)attributes.First(kvp => kvp.Key == XmlName.xTypeArguments).Value).Value as IList<XmlType> 294 XmlnsHelper.ParseXmlns(kvp.Value, out _, out _, out _, out var targetPlatform);
Microsoft.Maui.Essentials (2)
WebAuthenticator\WebAuthenticatorResult.shared.cs (2)
45 Properties[kvp.Key] = kvp.Value; 56 Properties[kvp.Key] = kvp.Value;
Microsoft.Maui.Graphics (2)
Text\TextAttributes.cs (2)
20 this[entry.Key] = entry.Value; 23 this[entry.Key] = entry.Value;
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (1)
src\Graphics\src\Graphics\Platforms\Windows\AsyncPump.cs (1)
116 workItem.Key(workItem.Value);
Microsoft.Maui.Resizetizer (2)
DetectInvalidResourceOutputFilenamesTask.cs (1)
58 builder.Append($"{pair.Value} ({pair.Key.ItemSpec})");
GenerateTizenManifest.cs (1)
179 splashscreenElement.SetAttributeValue("src", image.Value);
Microsoft.ML.AutoML (27)
SweepableEstimator\MultiModelPipeline.cs (1)
114var estimators = _estimators.ToDictionary(x => x.Key, x => x.Value);
SweepableEstimator\SweepableEstimatorPipeline.cs (2)
56if (kv.Value != null) 58searchSpace.Add(kv.Key, kv.Value);
SweepableEstimator\SweepablePipeline.cs (6)
33if (kv.Value != null) 35searchSpace.Add(kv.Key, kv.Value.SearchSpace); 52var kvPairs = _estimators.Select((e, i) => new KeyValuePair<string, Parameter>(i.ToString(), e.Value.Parameter)); 55if (kv.Value != null) 57parameter[kv.Key] = kv.Value; 174var estimators = _estimators.ToDictionary(x => x.Key, x => x.Value);
Sweepers\ISweeper.cs (2)
145return string.Join(" ", _parameterValues.Select(kvp => string.Format("{0}={1}", kvp.Value.Name, kvp.Value.ValueText)).ToArray());
TrainerExtensions\TrainerExtensionCatalog.cs (1)
50_trainerNamesToExtensionTypes.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
TrainerExtensions\TrainerExtensionUtil.cs (4)
126properties[property.Key] = property.Value; 196.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 204var paramVals = props.Select(p => new StringParameterValue(p.Key, p.Value.ToString())); 232parameters = allProps.Select(p => new StringParameterValue(p.Key, p.Value.ToString()));
TransformInference\TransformInference.cs (1)
49sb.Append($" {property.Key}={property.Value}");
Tuner\AutoZeroTuner.cs (7)
39var trainerEstimators = _sweepablePipeline.Estimators.Where(e => e.Value.EstimatorType.IsTrainer()).Select(e => e.Value.EstimatorType.ToString()).ToList(); 85if (_pipelineStrings.Any(kv => kv.Value.Contains("OneHotHashEncoding") || kv.Value.Contains("OneHotEncoding"))) 87pipelineSchemas = _pipelineStrings.Where(kv => kv.Value.Contains(config.CatalogTransformer)); 94pipelineSchemas = pipelineSchemas.Where(kv => kv.Value.Contains(config.Trainer)); 98var trainerEstimatorName = pipeline.Estimators.Where(kv => kv.Value.EstimatorType.IsTrainer()).First().Key;
Tuner\PipelineProposer.cs (3)
97schema = _eci.OrderBy(kv => kv.Value).First().Key; 152_k2 = _k1.ToDictionary(kv => kv.Key, kv => kv.Value); 188_eci[schema] = _eci.Select(kv => kv.Value).Max() * 2;
Microsoft.ML.AutoML.Tests (7)
SweepableExtensionTest.cs (3)
149.Append(context.Auto().MultiClassification().Estimators.Select(kv => kv.Value).ToArray()); 162.Append(context.Auto().MultiClassification().Estimators.Select(kv => kv.Value).ToArray()); 175.Append(context.Auto().MultiClassification().Estimators.Select(kv => kv.Value).ToArray());
TunerTests.cs (4)
44var tuner = kv.Value; 253var tuner = kv.Value; 308var tuner = kv.Value; 355var tuner = kv.Value;
Microsoft.ML.CodeGenerator (15)
CodeGenerator\CSharp\TrainerGeneratorBase.cs (14)
61if (kv.Value == null) 63Type type = kv.Value.GetType(); 67value = ((bool)kv.Value).ToString(CultureInfo.InvariantCulture).ToLowerInvariant(); 72value = ((float)kv.Value).ToString(CultureInfo.InvariantCulture) + "f"; 77value = ((int)kv.Value).ToString(CultureInfo.InvariantCulture); 82value = ((double)kv.Value).ToString(CultureInfo.InvariantCulture); 87value = ((long)kv.Value).ToString(CultureInfo.InvariantCulture); 92var val = kv.Value.ToString(); 103value = $"{type.ReflectedType.Name}.{type.Name}.{kv.Value.ToString()}"; 108value = kv.Value; 145if (kv.Value.GetType() == typeof(CustomProperty)) 146sb.Append(BuildComplexParameter(((CustomProperty)kv.Value).Name, ((CustomProperty)kv.Value).Properties, "=")); 148sb.Append(kv.Value.ToString());
Templates\Console\PredictProgram.cs (1)
48this.Write(this.ToStringHelper.ToStringWithCulture(kv.Value));
Microsoft.ML.Core (31)
CommandLine\CmdParser.cs (12)
1526string str = (string)values[i].Value; 1543settings = values.Select(x => (string)x.Value).ToArray(); 1573string name = (string)values[i++].Value; 1575if (i < values.Count && IsCurlyGroup((string)values[i].Value) && string.IsNullOrEmpty(values[i].Key)) 1576settings = new string[] { (string)values[i++].Value }; 1596var kvp = Activator.CreateInstance(ItemType, comList[i].Key, comList[i].Value); 1608string name = (string)values[i++].Value; 1610if (i < values.Count && IsCurlyGroup((string)values[i].Value)) 1611settings = new string[] { (string)values[i++].Value }; 1639var kvp = Activator.CreateInstance(ItemType, values[i].Key, values[i].Value); 1648res.SetValue(values[i].Value, i); 1700else if (Unique && val.Values.Any(x => x.Value.Equals(newValue)))
Data\Repository.cs (2)
362kvp.Value.CloseEx(); 394using (var src = kvp.Value)
Data\RoleMappedSchema.cs (9)
166Contracts.Assert(Utils.Size(kvp.Value) > 0); 167var cols = kvp.Value; 223if (string.IsNullOrEmpty(kvp.Value)) 225var info = schema.GetColumnOrNull(kvp.Value); 229throw Contracts.ExceptParam(nameof(schema), $"{kvp.Value} column '{kvp.Key.Value}' not found"); 266foreach (var info in roleAndList.Value) 278foreach (var info in roleAndList.Value) 316Contracts.Assert(Utils.Size(kvp.Value) > 0); 317var cols = kvp.Value.ToArray();
Utilities\LruCache.cs (1)
50value = node.Value.Value;
Utilities\ReservoirSampler.cs (2)
198_reservoir[ind] = tmp.Value; 199_counts[tmp.Value] = 1;
Utilities\Tree.cs (5)
121return item.Value != null && item.Value._parent == this && _children.Comparer.Equals(item.Key, item.Value.Key); 130Add(item.Key, item.Value); 188if (!TryGetValue(item.Key, out child) || item.Value != child)
Microsoft.ML.Core.Tests (17)
UnitTests\TestEntryPoints.cs (2)
2248var list = kvp.Value as IList<KeyValuePair<string, object>>; 2255writer.WriteLine("{0}: {1}", kvp.Key, kvp.Value);
UnitTests\TestVBuffer.cs (15)
96float sum = a.Items().Sum(iv => iv.Value); 97float l1 = a.Items().Sum(iv => Math.Abs(iv.Value)); 98float l2Squared = a.Items().Sum(iv => iv.Value * iv.Value); 101float infNorm = a.GetValues().Length == 0 ? 0 : a.Items().Max(iv => Math.Abs(iv.Value)); 475values[indices.Count] = func(iv.Key, iv.Value); 743Assert.Equal(value, iv.Value); 771Assert.Equal(value, iv.Value); 805Assert.Equal(value, iv.Value); 830var l1Dist = a.Items(all: true).Zip(b.Items(all: true), (av, bv) => Math.Abs(av.Value - bv.Value)).Sum(); 831var l2Dist2 = a.Items(all: true).Zip(b.Items(all: true), (av, bv) => MathUtils.Pow(av.Value - bv.Value, 2)).Sum(); 833var dot = a.Items(all: true).Zip(b.Items(all: true), (av, bv) => av.Value * bv.Value).Sum();
Microsoft.ML.CpuMath.UnitTests (1)
UnitTests.cs (1)
994options.StartInfo.Environment.Add(item.Key, item.Value);
Microsoft.ML.Data (138)
Commands\CrossValidationCommand.cs (1)
268data = kvp.Value.CreateComponent(env, data);
Commands\DataCommand.cs (4)
135SendTelemetryComponent(pipe, transform.Value); 148pipe.Send(TelemetryMessage.CreateMetric(pair.Key, pair.Value, null)); 158var data = mValue.First().Value; 199newAverageMetric.Add(pair.Key, pair.Value / metricValues.Length);
Commands\ShowSchemaCommand.cs (3)
175if (verbose || !kvp.Value.IsEmpty) 176itw.WriteLine("{0}:{1}", kvp.Key, kvp.Value); 292var val = item.Value;
Commands\TrainCommand.cs (4)
503var prefetch = data.Schema.GetColumnRoles().Select(kc => kc.Value.Index).ToArray(); 521ectx.CheckUserArg(!string.IsNullOrWhiteSpace(kindName.Value), nameof(TrainCommand.Arguments.CustomColumns), "Names for columns with custom kind must not be empty"); 523throw ectx.ExceptUserArg(nameof(TrainCommand.Arguments.CustomColumns), "Custom column with name '{0}' needs a kind. Use col[<Kind>]={0}", kindName.Value); 525return customColumnArg.Select(kindName => new ColumnRole(kindName.Key).Bind(kindName.Value));
Data\DataViewUtils.cs (1)
1405var v = x.Value;
Data\RowCursorUtils.cs (3)
440if (0 < kv.Value && kv.Value <= keyMax) 441editor.Values[kv.Key] = kv.Value - 1;
Data\SchemaDefinition.cs (2)
283builder.Add(kvp.Key, kvp.Value.AnnotationType, kvp.Value.GetGetterDelegate());
DataLoadSave\Binary\BinaryLoader.cs (3)
2166.Where(t => !t.Value.IsGenerated).OrderBy(t => t.Value.ColumnIndex); 2176var col = isLiveAndCol.Value;
DataLoadSave\LegacyCompositeDataLoader.cs (3)
141.Select(x => new KeyValuePair<string, string>(x.Key, GetTagData(x.Value))) 159(env, index, data) => transformArgs[index].Value.CreateComponent(env, data)); 256newlyCreated.Add(new TransformEx(tag, tagData[i].Value, cur));
DataLoadSave\TransformerChain.cs (7)
302roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value); 306roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value, 307roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Label.Value).First().Value); 310roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value); 313roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value); 316roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value); 319roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value);
DataView\DataViewConstructionUtils.cs (3)
815meta.Add(kvp.Value.Kind, kvp.Value.AnnotationType, kvp.Value.GetGetterDelegate());
DataView\InternalSchemaDefinition.cs (1)
77: metadataInfos.ToDictionary(entry => entry.Key, entry => entry.Value);
DataView\Transposer.cs (6)
553var heap = new Heap<KeyValuePair<int, int>>((p1, p2) => p1.Key > p2.Key || (p1.Key == p2.Key && p1.Value > p2.Value), _rbuff.Length); 622var rbuff = _rbuff[pair.Value]; 625int ii = rbuff.IsDense ? s : _rbuffIndices[pair.Value]++; 627indices[_counts[s]] = pair.Value + offset; 630heap.Add(new KeyValuePair<int, int>(rbuff.IsDense ? s + 1 : rbuffIndices[ii], pair.Value));
DataView\TypedCursor.cs (2)
440buf[pair.Key] = convert(pair.Value); 476buf[pair.Key] = pair.Value;
Deprecated\Instances\HeaderSchema.cs (4)
52nameList.Add(kvp.Value.AsMemory()); 107var items = map.Where(kvp => 0 <= kvp.Key && kvp.Key < count && kvp.Value != null); 127names[iv] = kvp.Value; 136names[kvp.Key] = kvp.Value;
Deprecated\Vector\VectorUtils.cs (8)
77var topHeap = new Heap<KeyValuePair<int, float>>((left, right) => right.Value < left.Value, top + 1); 78var bottomHeap = new Heap<KeyValuePair<int, float>>((left, right) => right.Value > left.Value, bottom + 1); 90if (bottomHeap.Count == bottom && value > bottomHeap.Top.Value) 103if (topHeap.Count == top && value < topHeap.Top.Value) 122aEditor.Values[count++] = pair.Value; 129aEditor.Values[count++] = pair.Value;
EntryPoints\EntryPointNode.cs (22)
359_vars.Add(kvp.Key, kvp.Value); 609inputParamBindingMap.Add(paramBinding, new SimpleVariableBinding(kvp.Value)); 625if (VariableBinding.IsBindingToken(pair.Value)) 633var varBinding = VariableBinding.Create(_host, pair.Value.Value<string>()); 641else if (pair.Value is JArray && 642((JArray)pair.Value).Any(tok => VariableBinding.IsBindingToken(tok))) 646if (!((JArray)pair.Value).All(tok => VariableBinding.IsBindingToken(tok))) 655foreach (var varName in (JArray)pair.Value) 672if (!_inputBuilder.TrySetValueJson(pair.Key, pair.Value)) 684if (!VariableBinding.IsBindingToken(pair.Value)) 688var varBinding = VariableBinding.Create(_host, pair.Value.Value<string>()); 708if (kvp.Value.VariableName == oldName) 720if (kvp.Value == oldName) 740if (!mapping.TryGetValue(kvp.Value.VariableName, out newName)) 743mapping.Add(kvp.Value.VariableName, newName); 745kvp.Value.Rename(newName); 751if (!mapping.TryGetValue(kvp.Value, out newName)) 754mapping.Add(kvp.Value, newName); 759_outputMap[kvp.Key] = kvp.Value; 789return _inputMap.Where(kv => !_inputBuilder.IsInputOptional(kv.Key.ParameterName)).Select(kv => kv.Value).Distinct() 802bool success = _inputBuilder.TrySetValue(pair.Key, BuildParameterValue(pair.Value)); 827v.SetValue(pair.Value);
EntryPoints\InputBuilder.cs (5)
505if (!inputBuilder.TrySetValueJson(pair.Key, pair.Value)) 506throw ectx.Except($"Unexpected value for component '{type}', field '{pair.Key}': '{pair.Value}'"); 566if (!inputBuilder.TrySetValueJson(pair.Key, pair.Value)) 567throw ectx.Except($"Unexpected value for component '{name}', field '{pair.Key}': '{pair.Value}'"); 595dict[pair.Key] = (T)GetFieldAssignableValue(ectx, typeof(T), ParseJsonValue(ectx, typeof(T), attributes, pair.Value, catalog));
Evaluators\AucAggregator.cs (4)
515.OrderByDescending(kvp => kvp.Value.Score); 529if (kvp.Value.Label > 0) 532truePosWeight += kvp.Value.Weight; 548falsePosWeight += kvp.Value.Weight;
Evaluators\ClusteringEvaluator.cs (1)
807else if (schema.Schema.TryGetColumnIndex(col.Value, out int labelIndex))
Evaluators\EvaluatorBase.cs (1)
441return _dict.Select(kvp => kvp.Value);
Evaluators\EvaluatorUtils.cs (14)
367string.Format("{0} {1}", colName, names.GetItemOrDefault(metric.Key)), metric.Value); 487var name = kvp.Value.ToString(); 516editor.Values[map[kvp.Key]] = kvp.Value; 540editor.Values[map[kvp.Key]] = kvp.Value; 587var name = kvp.Value.ToString().AsMemory(); 899ReconcileKeyValuesWithNoNames(env, views, keyCol.Key, keyCol.Value); 1039var tryNaming = string.Format(metricName, name.Value); 1041tryNaming = (string.Format("{0}{1}", metricName, name.Value)); 1203aggregated[iMetric].Sum += metric.Value; 1205aggregated[iMetric].SumSq += metric.Value * metric.Value; 1512confusionTable[row][labelIndexToConfIndexMap[index]] = val.Value; 1513precisionSums[labelIndexToConfIndexMap[index]] += val.Value; 1514recallSums[row] += val.Value;
Evaluators\MultiOutputRegressionEvaluator.cs (1)
758sb.AppendFormat(" {0,20:G20}", metric.Value);
Evaluators\QuantileRegressionEvaluator.cs (3)
103res[i.Key] = Math.Sqrt(i.Value / SumWeights); 117res[i.Key] = 1 - i.Value / (TotalLabelSquaredW - TotalLabelW * TotalLabelW / SumWeights); 409l1Editor.Values[s.Key] = Math.Abs(lab - s.Value);
Model\Pfa\BoundPfaContext.cs (1)
215vars[i] = new KeyValuePair<string, JToken>(names[i], vars[i].Value);
Model\Pfa\PfaContext.cs (1)
44vars[v.Key] = v.Value;
Scorers\RowToRowScorerBase.cs (1)
422ctx.SaveNonEmptyString(kvp.Value);
Transforms\ColumnBindingsBase.cs (2)
283var getter = Utils.MarshalInvoke(GetAnnotationGetterDelegate<int>, kvp.Value.RawType, inputBindings, i, kvp.Key); 284meta.Add(kvp.Key, kvp.Value, getter);
Transforms\ColumnConcatenatingTransformer.cs (7)
100column.Source = Source.Select(kvp => kvp.Value).ToArray(); 400.Select(c => new ColumnOptions(c.Name, c.Source.Select(kvp => (kvp.Value, kvp.Key != "" ? kvp.Key : null)))) 661if (kvp.Value.IsEmpty) 664sb.AppendMemory(kvp.Value); 891if (toSave.Value == null) 937int outVectorSize = (int)inputList.Sum(x => x.Value); 942node.AddAttribute("inputdimensions", inputList.Select(x => x.Value));
Transforms\ConversionsExtensionsCatalog.cs (5)
340var values = keyValuePairs.Select(pair => pair.Value); 372var values = keyValuePairs.Select(pair => pair.Value); 406var values = keyValuePairs.Select(pair => pair.Value); 444var values = keyValuePairs.Select(pair => pair.Value); 476var values = keyValuePairs.Select(pair => pair.Value);
Transforms\Hashing.cs (3)
1563return (x.Key == y.Key) && _tComparer.Equals(x.Value, y.Value); 1568return Hashing.CombineHash(obj.Key, _tComparer.GetHashCode(obj.Value));
Transforms\InvertHashUtils.cs (4)
86var subval = pair.Value; 249values[i++] = Textify(ref sb, ref temp, ref cbuffer, ref pairs, p.Value); 262values[p.Key] = Textify(ref sb, ref temp, ref cbuffer, ref pairs, p.Value); 422var text = pair.Value;
Transforms\KeyToVector.cs (2)
407if (!kvpSlot.Value.IsEmpty) 408sb.AppendMemory(kvpSlot.Value);
Transforms\OneToOneTransformerBase.cs (1)
114active[pair.Value] = true;
Transforms\ValueToKeyMappingTransformer.cs (1)
970jsonMap[kv.Value.ToString()] = kv.Key;
Transforms\ValueToKeyMappingTransformerImpl.cs (2)
1136T keyVal = pair.Value; 1220T keyVal = pair.Value;
Utilities\ColumnCursor.cs (1)
173dst[kvp.Key] = convert(kvp.Value);
Utilities\ModelFileUtils.cs (1)
248columnNamesList.Add(role.Value);
Microsoft.ML.Ensemble (6)
Selector\SubModelSelector\BaseBestPerformanceSelector.cs (2)
92xValue = kvp.Value; 105yValue = kvp.Value;
Selector\SubModelSelector\BaseSubModelSelector.cs (1)
42metric = kvp.Value;
Trainer\EnsembleDistributionModelParameters.cs (1)
241averagedWeights = Models.SelectMany(model => model.Metrics).Where(m => m.Key == metric.Key).Select(m => (Single)m.Value).ToArray();
Trainer\EnsembleModelParametersBase.cs (1)
120ctx.Writer.Write((Single)metric.Value);
Trainer\EnsembleTrainerBase.cs (1)
218ch.Info("{0}{1}", string.Join("", model.Metrics.Select(m => string.Format("| {0} |", m.Value))), model.Predictor.GetType().Name);
Microsoft.ML.EntryPoints (16)
JsonUtils\ExecuteGraphCommand.cs (4)
71var path = kvp.Value as JValue; 73throw _host.Except("Invalid value for input: {0}", kvp.Value); 89var path = kvp.Value as JValue; 91throw _host.Except("Invalid value for output: {0}", kvp.Value);
JsonUtils\JsonManifestUtils.cs (2)
276return new JArray(inputs.OrderBy(x => x.Key).Select(x => x.Value).ToArray()); 304return new JArray(outputs.OrderBy(x => x.Key).Select(x => x.Value).ToArray());
OneVersusAllMacro.cs (1)
86subGraphRunContext.RenameContextVariable(kvp.Key, kvp.Value);
PermutationFeatureImportance.cs (9)
91var featureColumnName = roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value; 92var labelColumnName = roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Label.Value).First().Value; 148var featureColumnName = roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value; 149var labelColumnName = roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Label.Value).First().Value; 207var featureColumnName = roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value; 208var labelColumnName = roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Label.Value).First().Value; 259var featureColumnName = roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value; 260var labelColumnName = roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Label.Value).First().Value; 261var groupIdColumnName = roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Group.Value).First().Value;
Microsoft.ML.Fairlearn (1)
Metrics\FairlearnMetricCatalog.cs (1)
96var groupMetric = res.Select(kv => (kv.Key, _context.BinaryClassification.EvaluateNonCalibrated(kv.Value)))
Microsoft.ML.FastTree (30)
Dataset\Dataset.cs (3)
341newAuxData[pair.Key] = pair.Value.GetSubset(pair.Value.IsQueryLevel ? queryIndices.Distinct().ToArray() : docIndices); 678DatasetSkeletonQueryDocData qddata = pair.Value;
Dataset\SparseIntArray.cs (1)
133int value = pair.Value;
FastTree.cs (18)
1683if (float.IsNaN(kv.Value)) 1875_instanceList[kvp.Key].Add(index, kvp.Value); 1996ch.Assert(kvp.Value > 0); 2007values.Add(kvp.Value + hotFeatureStarts[i]); 2441return _sparse.Count(kvp => kvp.Value > gtValue) + (0 > gtValue ? length - _sparse.Count : 0); 2474if (kvp.Value > gtValue) 2486if (kvp.Value > gtValue) 2538editor.Values[i] = _sparse[i].Value; 2577int binned = Algorithms.FindFirstGE(binUpperBounds, kvp.Value); 2591int binned = Algorithms.FindFirstGE(binUpperBounds, kvp.Value); 2677return s.Value; 3141Host.Assert(pair.Value is double); 3142writer.WriteLine("\t{0}\t{1}", pair.Key, (double)pair.Value); 3152var ordered = gainMap.OrderByDescending(pair => pair.Value); 3153double max = ordered.FirstOrDefault().Value; 3160yield return new KeyValuePair<string, double>(name, Math.Sqrt(pair.Value) * normFactor); 3171results.Add(new KeyValuePair<string, object>(pair.Key, pair.Value)); 3251bldr.AddFeature(pair.Key, (float)(Math.Sqrt(pair.Value) * normFactor));
GamModelParameters.cs (1)
189ctx.Writer.Write(kvp.Value);
Training\EnsembleCompression\LassoBasedEnsembleCompressor.cs (2)
102return Comparer<double>.Default.Compare(c1.Value, c2.Value);
TreeEnsemble\InternalTreeEnsemble.cs (3)
329var sortedByGain = gainMap.OrderByDescending(pair => pair.Value).AsEnumerable(); 330var maxValue = sortedByGain.First().Value; 337fmap.GetName(pair.Key), Math.Pow(pair.Value, power) / normalizingFactor));
Utils\BufferPoolManager.cs (2)
53List<Array> buffers = availableBuffers.FirstOrDefault(x => x.Value.Count > 0 && x.Key >= size && (x.Key - size) < (size * 0.2)).Value as List<Array>;
Microsoft.ML.GenAI.Core (5)
Extension\ModuleExtension.cs (5)
152var childrenDeviceMap = deviceMap.Where(x => x.Key.StartsWith($"{key}.")).ToDictionary(x => x.Key.Substring($"{key}.".Length), x => x.Value); 175var sizeToRemainOnEachDevice = 2 * layerSizeMap.Max(x => x.Value); 180var remainingLayerSizeMap = layerSizeMap.Where(x => !deviceMap.ContainsKey(x.Key)).ToDictionary(x => x.Key, x => x.Value); 182foreach (var (key, value) in remainingLayerSizeMap.OrderByDescending(x => x.Value)) 216.OrderByDescending(x => x.Value)
Microsoft.ML.GenAI.Phi.Tests (1)
Phi3Tests.cs (1)
107var sizeInMB = size.ToDictionary(x => x.Key, x => x.Value / 1024 / 1024);
Microsoft.ML.InternalCodeAnalyzer (1)
ContractsCheckNameofFixProvider.cs (1)
153var shortName = shortPair.Value.Value as string;
Microsoft.ML.KMeansClustering (2)
KMeansModelParameters.cs (1)
208writer.Write(pair.Value);
KMeansPlusPlusTrainer.cs (1)
1840Contracts.Check(centroid.Items().Select(x => x.Value).All(FloatUtils.IsFinite), "Model training failed: non-finite coordinates are generated");
Microsoft.ML.LightGbm (2)
LightGbmTrainerBase.cs (1)
501GbmOptions[pair.Key] = pair.Value;
WrappedLightGbmInterface.cs (1)
256res.Add(keyVal.Key + "=" + string.Format(CultureInfo.InvariantCulture, "{0}", keyVal.Value));
Microsoft.ML.OnnxConverter (1)
OnnxContextImpl.cs (1)
119string columnName = _columnNameMap.Single(kvp => kvp.Value == variableName).Key;
Microsoft.ML.OnnxTransformer (5)
OnnxTransform.cs (4)
321CustomShapeInfos = shapeDictionary?.Select(pair => new CustomShapeInfo(pair.Key, pair.Value)).ToArray(), 347CustomShapeInfos = shapeDictionary?.Select(pair => new CustomShapeInfo(pair.Key, pair.Value)).ToArray(), 377CustomShapeInfos = shapeDictionary?.Select(pair => new CustomShapeInfo(pair.Key, pair.Value)).ToArray(), 409CustomShapeInfos = shapeDictionary?.Select(pair => new CustomShapeInfo(pair.Key, pair.Value)).ToArray(),
OnnxUtils.cs (1)
306var meta = pair.Value;
Microsoft.ML.OnnxTransformerTest (2)
OnnxTransformTests.cs (2)
856output.Output.Add(pair.Key + 1, pair.Value); 870Assert.Equal(pair.Value, transformedDataPoints[i].Output[pair.Key + 1]);
Microsoft.ML.PCA (1)
PcaTrainer.cs (1)
569writer.Write(" {0}", value.Value);
Microsoft.ML.Predictor.Tests (4)
CmdLine\CmdLine.cs (2)
251var value = (ICommandLineComponentFactory)pair.Value; 284sb.Append(pair.Value);
CompareBaselines.cs (2)
88if (!kvp.Value) 111if (!kvp.Value)
Microsoft.ML.ResultProcessor (14)
ResultProcessor.cs (14)
173.GroupBy(kvp => kvp.Key, kvp => kvp.Value) 296settings.Add(entity.Key + ":" + entity.Value); 537GroupBy(kvp => kvp.Key, kvp => kvp.Value).ToDictionary(g => "/" + g.Key, g => string.Join(",", g)); 910if (thisFoldResults.Key < 0 || thisFoldResults.Value == null) 918foldResults[thisFoldResults.Key] = thisFoldResults.Value; 933foreach (var kvp1 in kvp.Value) 941metricDict[foldIdx] = kvp1.Value; 949AllValues = new List<float>(from kvp in metricValues.Value 951select kvp.Value).ToArray() 1077foreach (string src in StreamUtils.ExpandWildCards(taggedPattern.Value)) 1087ExperimentItemResult? result = ProcessOutputFile(env, fileWithTag.Value, cmd); 1156if (float.IsNaN(kvp.Value.MetricValue) && kvp.Value.AllValues != null) 1158+ string.Join(cmd.PerFoldResultSeparator, new List<string>(new List<float>(kvp.Value.AllValues).Select(d => "" + d))));
Microsoft.ML.Samples (1)
Dynamic\NgramExtraction.cs (1)
78Console.Write($"'{slots[item.Key]}' - {item.Value} ");
Microsoft.ML.SearchSpace (12)
Option\NestOption.cs (4)
32.SelectMany(kv => kv.Value.Default) 43.SelectMany(kv => kv.Value.Step) 55var dim = kv.Value.FeatureSpaceDim; 57param[kv.Key] = kv.Value.SampleFromFeatureSpace(feature);
Parameter.cs (2)
224parameter[param.Key] = param.Value; 327(_value as Dictionary<string, Parameter>).Add(item.Key, item.Value);
SearchSpace.cs (6)
39_options = options.ToDictionary(kv => kv.Key, kv => kv.Value); 45_options = options.ToDictionary(kv => kv.Key, kv => kv.Value); 60.SelectMany(kv => kv.Value.Default) 100.SelectMany(kv => kv.Value.Step) 176return fieldOptions.Concat(propertyOptions).ToDictionary(kv => kv.Key, kv => kv.Value); 187nestOption[kv.Key] = kv.Value;
Microsoft.ML.StandardTrainers (19)
FactorizationMachine\FieldAwareFactorizationMachineUtils.cs (7)
40featureValueBuffer[count] = pair.Value; 41featureNorm += pair.Value * pair.Value; 42annihilation += pair.Value - pair.Value; 94if (schema.Schema.TryGetColumnIndex(kvp.Value, out int index)) 153return InputRoleMappedSchema.GetColumnRoles().Select(kvp => new KeyValuePair<RoleMappedSchema.ColumnRole, string>(kvp.Key, kvp.Value.Name));
Standard\LinearModelParameters.cs (1)
88return _pred.Weight.Items(all: true).Select(iv => iv.Value).GetEnumerator();
Standard\LinearPredictorUtils.cs (6)
200Contracts.Assert(weightValue.Value is float); 201b.AppendLine().AppendFormat("{0}\t{1}", weightValue.Key, (float)weightValue.Value); 211.Where(weight => Math.Abs(weight.Value) >= Epsilon) 212.OrderByDescending(kv => Math.Abs(kv.Value)); 219list.Add(new KeyValuePair<string, Single>(name.IsEmpty ? $"f{index}" : name.ToString(), weight.Value)); 237results.Add(new KeyValuePair<string, object>(kvp.Key, kvp.Value));
Standard\LogisticRegression\MulticlassLogisticRegression.cs (5)
850var orderedWeights = Weights[classNumber].Items().OrderByDescending(kv => Math.Abs(kv.Value)); 853var value = weight.Value; 878Host.Assert(namedValues.Value is float); 879writer.WriteLine("\t{0}\t{1}", namedValues.Key, (float)namedValues.Value); 1054yield return weight.Value;
Microsoft.ML.Sweeper (21)
Algorithms\NelderMead.cs (19)
157var nextPoint = GetNewPoint(_centroid, _worst.Value, _args.DeltaReflection); 161nextPoint = GetNewPoint(_centroid, _worst.Value, _args.DeltaInsideContraction); 186UpdateSimplex(_lastReflectionResult.Key, _lastReflectionResult.Value); 193nextPoint = GetNewPoint(_centroid, _worst.Value, _args.DeltaExpansion); 197nextPoint = GetNewPoint(_centroid, _worst.Value, _args.DeltaInsideContraction); 206nextPoint = GetNewPoint(_centroid, _worst.Value, _args.DeltaOutsideContraction); 212nextPoint = GetNewPoint(_centroid, _worst.Value, _args.DeltaInsideContraction); 236UpdateSimplex(expansionResult, _pendingSweeps[0].Value); 240UpdateSimplex(_lastReflectionResult.Key, _lastReflectionResult.Value); 249UpdateSimplex(outerContractionResult, _pendingSweeps[0].Value); 268UpdateSimplex(innerContractionResult, _pendingSweeps[0].Value); 324var x = simplexVertices[i].Value; 327var y = simplexVertices[j].Value; 353newSimplexVertices.Add(result.Key, result.Value); 354newSimplexVertices.Add(_best.Key, _best.Value); 370result.Add(new KeyValuePair<IRunResult, float[]>(run, sweep.Value)); 386VectorUtils.AddMult(_simplexVertices.ElementAt(i).Value, centroid, scale); 405var newPoint = GetNewPoint(_secondWorst.Value, sortedVertices[i].Value, -_args.GammaShrink);
ISweeper.cs (2)
174return string.Join(" ", _parameterValues.Select(kvp => string.Format("{0}={1}", kvp.Value.Name, kvp.Value.ValueText)).ToArray());
Microsoft.ML.Sweeper.Tests (1)
TestSweeper.cs (1)
292sweeper.Update(run.Key, run.Value);
Microsoft.ML.TestFramework (1)
DataPipe\TestDataPipeBase.cs (1)
341VerifyCustArgs(env, kvp.Value);
Microsoft.ML.Tests (56)
ImagesTests.cs (2)
1028using (var image = (MLImage)rowView.First().Values.Last().Value) 1189var resizedImage = (MLImage)rowView.First().Values.Last().Value;
TextLoaderTests.cs (8)
759Assert.Equal(entry.Value, previewIris.RowView[0].Values[index++].Value); 762Assert.Equal("Iris-setosa", previewIris.RowView[0].Values[index].Value.ToString()); 775var featureValue = (VBuffer<float>)previewIrisStartEnd.RowView[0].Values[0].Value; 796featureValue = (VBuffer<float>)previewIrisColumnIndices.RowView[0].Values[0].Value; 857Assert.Equal(entry.Value, previewIris.RowView[0].Values[index++].Value); 860Assert.Equal("Iris-setosa", previewIris.RowView[0].Values[index].Value.ToString());
TrainerEstimators\CalibratorEstimators.cs (3)
138Assert.InRange((float)probability.Value, 0, 1); 276Assert.True((float)oldCalibratedData.RowView[i].Values[5].Value == (float)newCalibratedData.RowView[i].Values[5].Value);
Transformers\CategoricalHashTests.cs (12)
146Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "0:A", "1:B" }); 152Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" }); 159Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "1:2", "0:5", "1:4", "1:6", "0:3", "0:1" }); 165Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "-1", "1" }); 172System.Diagnostics.Trace.WriteLine(slots.Items().Select(x => x.Value.ToString()).Distinct()); 173var temp = slots.Items().Select(x => x.Value.ToString()).Distinct(); 174Assert.Equal(slots.Items().Select(x => x.Value.ToString()).Distinct(), new string[14] { "[0].", "[0].0:A", "[0].0:E", "[0].0:D", "[0].1:A", "[0].1:E", "[0].1:D", "[1].", "[1].0:A", "[1].0:E", "[1].0:D", "[1].1:A", "[1].1:E", "[1].1:D" }); 177Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[4] { "0", "65535", "65536", "131071" }); 184Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "E", "D" }); 187Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[2] { "0", "65535" }); 194Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "0:A", "1:B" }); 200Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" });
Transformers\CategoricalTests.cs (14)
224Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "A", "B" }); 230Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" }); 237Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "3", "5" }); 243Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "6", "1" }); 250Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[12] { "[0].1", "[0].2", "[0].3", "[0].4", "[0].5", "[0].6", "[1].1", "[1].2", "[1].3", "[1].4", "[1].5", "[1].6" }); 253Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[4] { "0", "5", "6", "11" }); 260Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "1", "-1" }); 263Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[2] { "0", "1" }); 270Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "A", "D", "E" }); 276Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "D", "E" }); 282Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" }); 288Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "Bit1", "Bit0" }); 295Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" }); 301Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "Bit2", "Bit1", "Bit0" });
Transformers\ConvertTests.cs (2)
356Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "1", "2" }); 362Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "A", "B" });
Transformers\HashTests.cs (3)
89Assert.Equal(keys.Items().Select(x => x.Value.ToString()), new string[2] { "2.5", "3.5" }); 94Assert.Equal(keys.Items().Select(x => x.Value.ToString()), new string[2] { "2.5", "3.5" }); 99Assert.Equal(keys.Items().Select(x => x.Value.ToString()), new string[2] { "0:3.5", "1:2.5" });
Transformers\KeyToBinaryVectorEstimatorTest.cs (2)
120Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" }); 126Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "Bit1", "Bit0" });
Transformers\KeyToVectorEstimatorTests.cs (10)
139Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "A", "B" }); 145Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" }); 148Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[2] { 0, 0 }); 155Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[4] { "[0].3", "[0].5", "[1].3", "[1].5" }); 158Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[4] { 0, 1, 2, 3 }); 165Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "6", "1" }); 172Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[4] { 0, 5, 6, 11 }); 183Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "A", "D", "E" }); 189Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "D", "E" }); 192Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[2] { 0, 1 });
Microsoft.ML.TimeSeries (12)
RootCauseAnalyzer.cs (10)
81if (object.Equals(aggSymbol, entry.Value)) 130return new Dictionary<string, object>(keyList.Select(dim => new KeyValuePair<string, object>(dim, dimension[dim])).ToDictionary(kvp => kvp.Key, kvp => kvp.Value)); 490if (dimension.Key.AnomalyDis.Count == 1 || (isLeavesLevel ? dimension.Value >= meanGain : dimension.Value <= meanGain)) 501if (best.AnomalyDis.Count != 1 && !isRatioNan && (isLeavesLevel ? valueRatioMap[best].CompareTo(dimension.Value) <= 0 : valueRatioMap[best].CompareTo(dimension.Value) >= 0)) 515if (!isRatioNan && (isLeavesLevel ? valueRatioMap[best].CompareTo(dimension.Value) <= 0 : valueRatioMap[best].CompareTo(dimension.Value) >= 0)) 537if (valueRatioMap[best].CompareTo(dimension.Value) == 0) 830if (!object.Equals(pair.Value, y[pair.Key]))
RootCauseLocalizationType.cs (2)
158if (!object.Equals(other.Dimension[item.Key], item.Value)) 231if (!object.Equals(other.Dimension[item.Key], item.Value))
Microsoft.ML.TimeSeries.Tests (5)
TimeSeriesDirectApi.cs (5)
977Assert.Equal(expectedDim[pair.Key], pair.Value); 1006Assert.Equal(expectedDim[pair.Key], pair.Value); 1022Assert.Equal(expectedDim[pair.Key], pair.Value); 1056Assert.Equal(expectedDim[pair.Key], pair.Value); 1206Assert.Equal(expectedDim[pair.Key], pair.Value);
Microsoft.ML.Tokenizers (34)
Model\BertTokenizer.cs (2)
778if (!vocab.TryGetValue(new StringSpanOrdinalKey(kvp.Key), out int id) || id != kvp.Value) 780throw new ArgumentException($"The special token '{kvp.Key}' is not in the vocabulary or assigned id value {id} different than the value {kvp.Value} in the special tokens.");
Model\BPETokenizer.cs (5)
156vocab.Add(new StringSpanOrdinalKey(kvp.Key), kvp.Value); 349VocabReverse.Add(kvp.Value, kvp.Key.Data!); 355_specialTokens = specialTokens.ToDictionary(kvp => new StringSpanOrdinalKey(kvp.Key), kvp => (kvp.Value, kvp.Key)); 356_specialTokensReverse = specialTokens.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 766public IReadOnlyDictionary<string, int> Vocabulary => _vocabOriginal ??= new ReadOnlyDictionary<string, int>(_vocab.ToDictionary(kvp => kvp.Key.Data!, kvp => kvp.Value));
Model\CodeGenTokenizer.cs (6)
128_vocabReverse = _vocab.ToDictionary(kvp => kvp.Value.Id, kvp => kvp.Value.Token); 137_specialTokens = specialTokens.ToDictionary(kvp => new StringSpanOrdinalKey(kvp.Key), kvp => (kvp.Value, kvp.Key)); 138_specialTokensReverse = specialTokens.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 269var vocab = new ReadOnlyDictionary<string, int>(_vocab.ToDictionary(kvp => kvp.Value.Token, kvp => kvp.Value.Id));
Model\EnglishRobertaTokenizer.cs (1)
242vocab.Add(item.Key.ToString(), item.Value);
Model\SentencePieceBaseModel.cs (4)
46InternalSpecialTokens.Add(new StringSpanOrdinalKey(item.Key), item.Value); 47SpecialTokensReverse.Add(item.Value, item.Key); 93InternalSpecialTokens.Add(new StringSpanOrdinalKey(item.Key), item.Value); 94SpecialTokensReverse.Add(item.Value, item.Key);
Model\SentencePieceBpeModel.cs (1)
54vocab.Add(item.Key.ToString(), item.Value.Id);
Model\SentencePieceTokenizer.cs (1)
724mergedSpecialTokens[kvp.Key] = kvp.Value;
Model\TiktokenTokenizer.cs (6)
143_decoder![specialToken.Value] = Encoding.UTF8.GetBytes(specialToken.Key); 144_cache!.Add(specialToken.Key, new[] { (Id: specialToken.Value, TokenIndex0: 0, TokenLength: specialToken.Key.Length) }); 991internal IReadOnlyDictionary<string, int> Vocabulary => _vocabOriginal ??= _vocab.ToDictionary(kvp => kvp.Key.Data!, kvp => kvp.Value.Id); 1309tiktokenConfiguration.SpecialTokens.Add(extraSpecialToken.Key, extraSpecialToken.Value); 1469tiktokenConfiguration.SpecialTokens.Add(extraSpecialToken.Key, extraSpecialToken.Value); 1509tiktokenConfiguration.SpecialTokens.Add(extraSpecialToken.Key, extraSpecialToken.Value);
Model\WordPieceTokenizer.cs (1)
45SpecialTokensReverse = options.SpecialTokens is not null ? options.SpecialTokens.GroupBy(kvp => kvp.Value).ToDictionary(g => g.Key, g => g.First().Key) : null;
Utils\ByteToUnicodeEncoding.cs (1)
36UnicodeToByte = ByteToUnicode.ToDictionary(kv => kv.Value, kv => kv.Key);
Utils\DoubleArrayTrie.cs (1)
760dawgBuilder.Insert(bytes, encodingLength, pair.Value);
Utils\LruCache.cs (2)
55value = cached.Value.Value; 82value = cached.Value.Value;
Utils\TokenizerExtensions.cs (3)
42dictionary[pair.Value] = pair.Key; 56dictionary[pair.Value] = pair.Key; 76writer.WriteNumber(pair.Value, pair.Key);
Microsoft.ML.Tokenizers.Tests (11)
BpeTests.cs (2)
316var reverseVocabulary = bpe.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 814private static IReadOnlyDictionary<int, string> _vocabReverse = _deepSeekR1Tokenizer.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
CodeGenTests.cs (2)
498var reverseVocab = codeGenTokenizer.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 499var reverseSpecialTokens = codeGenTokenizer.SpecialTokens?.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
DoubleArrayTrieTest.cs (1)
66Assert.Equal(i, kvp.Value); // Validate the sort order
EnglishRobertaTests.cs (1)
287var reverseVocab = robertaModel.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
LlamaTests.cs (2)
253var reverseVocabulary = bpe.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 666Assert.Equal(new[] { tokenizer.BeginningOfSentenceId, kvp.Value }, encodedTokens.Select(et => et.Id).ToArray());
src\Microsoft.ML.Tokenizers\Utils\ByteToUnicodeEncoding.cs (1)
36UnicodeToByte = ByteToUnicode.ToDictionary(kv => kv.Value, kv => kv.Key);
src\Microsoft.ML.Tokenizers\Utils\DoubleArrayTrie.cs (1)
760dawgBuilder.Insert(bytes, encodingLength, pair.Value);
TiktokenTests.cs (1)
137Assert.Equal(kvp.Value, value);
Microsoft.ML.TorchSharp (5)
AutoFormerV2\ObjectDetectionMetrics.cs (2)
120int gt = groundTruthBoxes.Where(k => k.Value != 0).Count(); 138int gt = groundTruthBoxes.Where(k => k.Value != 0).Count();
Utils\DefaultDictionary.cs (1)
57_dictionary.Add(item.Key, item.Value);
Utils\TorchUtils.cs (2)
23if (kvp.Value is torch.Tensor tensor) 26else if (kvp.Value is Dictionary<dynamic, dynamic> subDictionary)
Microsoft.ML.Transforms (29)
CountFeatureSelection.cs (1)
436var val = kvp.Value;
Dracula\CMCountTable.cs (3)
139ctx.Writer.Write(kvp.Value); 254_tables[iLabel][iDepth].Add(kvp.Key, kvp.Value); 273tables[iLabel][iDepth].Add(kvp.Key, (float)kvp.Value);
Dracula\CountTableTransformer.cs (1)
660var slotName = pair.Value.ToString();
Dracula\DictCountTable.cs (4)
110Contracts.Assert(pair.Value >= 0); 111ctx.Writer.Write(pair.Value); 191_tables[i][kvp.Key] = kvp.Value; 216dest[pair.Key] = (float)pair.Value;
Expression\LambdaParser.cs (3)
246if (!kvp.Value.IsContextKeyWord) 247_mapTidStr[kvp.Value.Kind] = kvp.Key.Value.ToString(); 250_mapTidStr[kvp.Value] = kvp.Key.Value.ToString();
KeyToVectorMapping.cs (2)
317if (!kvpSlot.Value.IsEmpty) 318sb.AppendMemory(kvpSlot.Value);
MissingValueIndicatorTransform.cs (2)
219if (kvp.Value.IsEmpty) 222sb.AppendMemory(kvp.Value);
PermutationFeatureImportance.cs (1)
80if (k.Value == 0)
SvmLight\SvmLightSaver.cs (2)
162foreach (var pair in features.Items().Where(p => p.Value != 0)) 164writer.Write(" {0}:{1}", _zero ? pair.Key : (pair.Key + 1), pair.Value);
Text\LdaTransform.cs (4)
347itemScores.Add(new ModelParameters.ItemScore(p.Key, p.Value)); 365wordScores.Add(new ModelParameters.WordItemScore(p.Key, slotName.ToString(), p.Value)); 405ctx.Writer.Write(p.Value); 532float value = retTopics[i].Value;
Text\NgramTransform.cs (1)
292if (pair.Value >= 1)
Text\SentimentAnalyzingTransform.cs (3)
134return new ColumnCopyingTransformer(env, hiddenNames.Select(x => (Name: x.Key, Source: x.Value)).ToArray()).Transform(input); 142input = new ColumnCopyingTransformer(env, hiddenNames.Select(x => (outputColumnName: x.Key, inputColumnName: x.Value)).ToArray()).Transform(input); 143return ColumnSelectingTransformer.CreateDrop(env, input, hiddenNames.Select(pair => pair.Value).ToArray());
Text\StopWordsRemovingTransformer.cs (1)
513active[pair.Value] = true;
Text\TextFeaturizingEstimator.cs (1)
607srcTaggedCols.Select(kvp => (kvp.Value, kvp.Key)))), ref view);
Microsoft.NET.Build.Containers (5)
ImageConfig.cs (4)
252&& property.Value is JsonObject propertyValue 270if (property.Key is { } propertyName && property.Value is JsonValue propertyValue) 318envVarJson.Add($"{envVar.Key}={envVar.Value}"); 328container.Add(label.Key, label.Value);
src\sdk\src\Common\VSHostObject.cs (1)
116taskItem.SetMetadata(kvp.Key, kvp.Value);
Microsoft.NET.Build.Extensions.Tasks (3)
src\sdk\src\Tasks\Common\ConflictResolution\PackageOverrideResolver.cs (3)
72if (existingOverrideVersion < newOverride.Value) 74existingPackageOverride.OverriddenPackages[newOverride.Key] = newOverride.Value; 79existingPackageOverride.OverriddenPackages[newOverride.Key] = newOverride.Value;
Microsoft.NET.Build.Tasks (49)
_generated\10\WorkloadSetJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\11\WorkloadSetJsonSerializerContext.IDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\19\InstallStateJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
DependencyContextBuilder.cs (3)
609runtimePack.Value.Where(asset => asset.AssetType == AssetType.Runtime) 613runtimePack.Value.Where(asset => asset.AssetType == AssetType.Native) 619version: runtimePack.Value.First().PackageVersion,
FrameworkPackages\FrameworkPackages.cs (1)
101var candidateFrameworks = FrameworkPackagesByFramework.Where(pair => pair.Value.ContainsKey(frameworkKey)).Select(pair => pair.Key);
GenerateRuntimeConfigurationFiles.cs (2)
301runtimeOptions.RawOptions.Add(runtimeOption.Key, runtimeOption.Value); 483json[rawOption.Key] = rawOption.Value?.DeepClone();
GetAssemblyAttributes.cs (2)
50.Where(kv => !string.IsNullOrEmpty(kv.Value)) 54item.SetMetadata("_Parameter1", kv.Value);
GetPackagesToPrune.cs (7)
223AddPackagesToPrune(packagesToPrune, packagesForFrameworkReference.Select(kvp => (kvp.Key, kvp.Value)), log); 234if (key.TargetFrameworkIdentifier.Equals(".NETCoreApp", StringComparison.OrdinalIgnoreCase) && !p.Value.IsPrerelease) 241var maxPatch = new NuGetVersion(p.Value.Major, p.Value.Minor, 32767); 246version = p.Value.ToString(); 260.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 285?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
LockFileLookup.cs (3)
91x.Value == y.Value; 102hashCode ^= obj.Value?.GetHashCode() ?? 0;
NugetContentAssetPreprocessor.cs (1)
71streamWriter.Write(pair.Value);
ParseTargetManifests.cs (1)
57item.SetMetadata(MetadataKeys.RuntimeStoreManifestNames, storeEntry.Value.ToString());
ProjectContext.cs (1)
295LockFileTargetLibrary dependency = entry.Value;
ResolveAppHosts.cs (1)
226item.SetMetadata(MetadataKeys.Version, packageInformation.Value);
ResolvePackageDependencies.cs (1)
396item.SetMetadata(property.Key, property.Value);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (9)
408var manifestSpecifier = new ManifestSpecifier(kvp.Key, kvp.Value.Version, kvp.Value.FeatureBand); 418AddManifest(manifestSpecifier.Id.ToString(), manifestDirectory, manifestSpecifier.FeatureBand.ToString(), kvp.Value.Version.ToString()); 429var manifestSpecifier = new ManifestSpecifier(kvp.Key, kvp.Value.Version, kvp.Value.FeatureBand); 439AddManifest(manifestSpecifier.Id.ToString(), manifestDirectory, manifestSpecifier.FeatureBand.ToString(), kvp.Value.Version.ToString()); 470.Select(kvp => kvp.Value) 575var manifestSpecifier = new ManifestSpecifier(manifestEntry.Key, manifestEntry.Value.Version, manifestEntry.Value.FeatureBand);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (7)
151if (FXVersion.Compare(dependency.Value, resolvedDependency.ParsedVersion) > 0) 153throw new WorkloadManifestCompositionException(Strings.ManifestDependencyVersionTooLow, dependency.Key, resolvedDependency.Version, dependency.Value, manifest.Id, manifest.ManifestPath); 165if (workload.Value is WorkloadRedirect redirect) 171if (!_workloads.TryAdd(workload.Key, ((WorkloadDefinition)workload.Value, manifest))) 181if (!_packs.TryAdd(pack.Key, (pack.Value, manifest))) 642overlayResolver._manifests.TryAdd(manifest.Key, manifest.Value); 766return _manifests.Select(t => t.Value.info);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSet.cs (4)
36var parts = manifest.Value?.Split('/'); 90workloadSet.ManifestVersions.Add(kvp.Key, kvp.Value); 112var dictionary = ManifestVersions.ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.Version + "/" + kvp.Value.FeatureBand, StringComparer.OrdinalIgnoreCase);
src\sdk\src\Tasks\Common\ConflictResolution\PackageOverrideResolver.cs (3)
72if (existingOverrideVersion < newOverride.Value) 74existingPackageOverride.OverriddenPackages[newOverride.Key] = newOverride.Value; 79existingPackageOverride.OverriddenPackages[newOverride.Key] = newOverride.Value;
Microsoft.NET.HostModel (18)
ComHost\ComHost.cs (4)
51throw new InvalidTypeLibraryIdException(typeLibrary.Value, typeLibrary.Key); 56byte[] tlbFileBytes = File.ReadAllBytes(typeLibrary.Value); 58throw new InvalidTypeLibraryException(typeLibrary.Value); 64throw new TypeLibraryDoesNotExistException(typeLibrary.Value, ex);
ComHost\RegFreeComManifest.cs (3)
84byte[] tlbFileBytes = File.ReadAllBytes(typeLibrary.Value); 88throw new InvalidTypeLibraryException(typeLibrary.Value); 99throw new TypeLibraryDoesNotExistException(typeLibrary.Value, ex);
src\runtime\src\coreclr\tools\Common\Compiler\Win32Resources\ResourceData.cs (11)
138return _resTypeHeadID.SelectMany(typeIdPair => SelectResType(typeIdPair.Key, typeIdPair.Value)) 139.Concat(_resTypeHeadName.SelectMany(typeNamePair => SelectResType(typeNamePair.Key, typeNamePair.Value))); 143return resType.NameHeadID.SelectMany(nameIdPair => SelectResName(type, nameIdPair.Key, nameIdPair.Value)) 145SelectResName(type, nameNamePair.Key, nameNamePair.Value))); 150return resType.Languages.Select((lang) => (name, type, lang.Key, lang.Value.DataEntry)); 206resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable))); 210resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key))); 220resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable))); 224resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key))); 234resLanguages.Add(new Tuple<ResLanguage, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key))); 242foreach (ObjectDataBuilder.Reservation reservation in name.Value)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (4)
src\sdk\src\StaticWebAssetsSdk\Tasks\Data\StaticWebAsset.cs (4)
279if (!string.Equals(group.Value, requirement.Value, StringComparison.Ordinal)) 2012result[kvp.Key] = kvp.Value; 2051destinationItem.SetMetadata(kvp.Key, kvp.Value ?? ""); 2075$"Label: {PathLabel}, Route: {Path}, Tokens: {string.Join(", ", Tokens.Select(t => $"{t.Key}={t.Value}"))}";
Microsoft.NET.Sdk.Publish.Tasks (4)
MsDeploy\CommonUtility.cs (2)
1715return x.Value - y.Value;
src\sdk\src\Common\VSHostObject.cs (1)
116taskItem.SetMetadata(kvp.Key, kvp.Value);
Tasks\GenerateEnvTransform.cs (1)
78new XAttribute("value", envVariable.Value),
Microsoft.NET.Sdk.StaticWebAssets.Tasks (29)
_generated\22\StaticWebAssetsJsonSerializerContext.DictionaryStringStaticWebAssetNode.g.cs (1)
60StaticWebAssetNodeSerializeHandler(writer, entry.Value);
_generated\23\StaticWebAssetsJsonSerializerContext.DictionaryStringStaticWebAsset.g.cs (1)
60StaticWebAssetSerializeHandler(writer, entry.Value);
_generated\36\DefineStaticWebAssetsSerializerContext.DictionaryStringCopyCandidate.g.cs (1)
62CopyCandidateSerializeHandler(writer, entry.Value);
_generated\37\DefineStaticWebAssetsSerializerContext.DictionaryStringStaticWebAsset.g.cs (1)
62StaticWebAssetSerializeHandler(writer, entry.Value);
_generated\46\ImportMapSerializerContext.DictionaryStringDictionaryStringString.g.cs (1)
60DictionaryStringStringSerializeHandler(writer, entry.Value);
_generated\47\ImportMapSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
ComputeReferenceStaticWebAssetItems.cs (1)
63var (selected, all) = kvp.Value;
ComputeStaticWebAssetsForCurrentProject.cs (1)
38var (selected, all) = kvp.Value;
Data\StaticWebAsset.cs (4)
279if (!string.Equals(group.Value, requirement.Value, StringComparison.Ordinal)) 2012result[kvp.Key] = kvp.Value; 2051destinationItem.SetMetadata(kvp.Key, kvp.Value ?? ""); 2075$"Label: {PathLabel}, Route: {Path}, Tokens: {string.Join(", ", Tokens.Select(t => $"{t.Key}={t.Value}"))}";
Data\StaticWebAssetEndpoint.cs (2)
542result[kvp.Key] = kvp.Value; 567destinationItem.SetMetadata(kvp.Key, kvp.Value ?? "");
DefineStaticWebAssetEndpoints.cs (1)
217properties[i++] = new StaticWebAssetEndpointProperty { Name = value.Key, Value = value.Value };
DefineStaticWebAssets.Cache.cs (3)
228_assets.Add(cachedAsset.Value.ToTaskItem()); 232_copyCandidates.Add(cachedCopyCandidate.Value.ToTaskItem()); 243var candidate = kvp.Value;
DefineStaticWebAssets.cs (1)
128var candidate = kvp.Value;
GenerateStaticWebAssetsDevelopmentManifest.cs (1)
310ContentRoots = contentRootIndex.OrderBy(kvp => kvp.Value).Select(kvp => kvp.Key).ToArray(),
GenerateStaticWebAssetsManifest.cs (1)
67if (!StaticWebAsset.ValidateAssetGroup(group.Key, group.Value, out var reason, groupSet))
JSModules\ApplyJsModules.cs (2)
65var jsModuleFiles = kvp.Value; 78var jsModuleFiles = kvp.Value;
MergeStaticWebAssets.cs (1)
39var group = kvp.Value;
ReadPackageAssetsManifest.cs (1)
75var asset = new StaticWebAsset(entry.Value);
ScopedCss\ApplyCssScopes.cs (2)
68var scopeFiles = kvp.Value; 81var scopeFiles = kvp.Value;
UpdatePackageStaticWebAssets.cs (1)
111var group = kvp.Value;
UpdateStaticWebAssetEndpoints.cs (1)
64var endpointGroup = kvp.Value;
Microsoft.NET.Sdk.WorkloadManifestReader (23)
_generated\0\WorkloadSetJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\1\WorkloadSetJsonSerializerContext.IDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\9\InstallStateJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
SdkDirectoryWorkloadManifestProvider.cs (9)
408var manifestSpecifier = new ManifestSpecifier(kvp.Key, kvp.Value.Version, kvp.Value.FeatureBand); 418AddManifest(manifestSpecifier.Id.ToString(), manifestDirectory, manifestSpecifier.FeatureBand.ToString(), kvp.Value.Version.ToString()); 429var manifestSpecifier = new ManifestSpecifier(kvp.Key, kvp.Value.Version, kvp.Value.FeatureBand); 439AddManifest(manifestSpecifier.Id.ToString(), manifestDirectory, manifestSpecifier.FeatureBand.ToString(), kvp.Value.Version.ToString()); 470.Select(kvp => kvp.Value) 575var manifestSpecifier = new ManifestSpecifier(manifestEntry.Key, manifestEntry.Value.Version, manifestEntry.Value.FeatureBand);
WorkloadResolver.cs (7)
151if (FXVersion.Compare(dependency.Value, resolvedDependency.ParsedVersion) > 0) 153throw new WorkloadManifestCompositionException(Strings.ManifestDependencyVersionTooLow, dependency.Key, resolvedDependency.Version, dependency.Value, manifest.Id, manifest.ManifestPath); 165if (workload.Value is WorkloadRedirect redirect) 171if (!_workloads.TryAdd(workload.Key, ((WorkloadDefinition)workload.Value, manifest))) 181if (!_packs.TryAdd(pack.Key, (pack.Value, manifest))) 642overlayResolver._manifests.TryAdd(manifest.Key, manifest.Value); 766return _manifests.Select(t => t.Value.info);
WorkloadSet.cs (4)
36var parts = manifest.Value?.Split('/'); 90workloadSet.ManifestVersions.Add(kvp.Key, kvp.Value); 112var dictionary = ManifestVersions.ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.Version + "/" + kvp.Value.FeatureBand, StringComparer.OrdinalIgnoreCase);
Microsoft.NET.StringTools (6)
WeakStringCache.Concurrent.cs (1)
149if (!entry.Value.IsUsed && _weakHandlesByHashCode.TryRemove(entry.Key, out StringWeakHandle? removedHandle))
WeakStringCache.cs (2)
113entry.Value.Free(); 134if (entry.Value.IsUsed)
WeakStringCacheInterner.cs (3)
151.OrderByDescending(kv => kv.Value * kv.Key.Length) 152.Where(kv => kv.Value > 1) 154.Select(kv => string.Format(CultureInfo.InvariantCulture, "({1} instances x each {2} chars)\n{0}", kv.Key, kv.Value, kv.Key.Length));
Microsoft.TemplateEngine.Abstractions (1)
Parameters\ParameterSetData.cs (1)
40: this(templateInfo, inputParameters?.ToDictionary(p => p.Key, p => (object?)p.Value))
Microsoft.TemplateEngine.Cli (42)
Alias\AliasModel.cs (1)
17CommandAliases = new Dictionary<string, IReadOnlyList<string>>(commandAliases.ToDictionary(x => x.Key, x => x.Value), StringComparer.OrdinalIgnoreCase);
Alias\AliasRegistry.cs (6)
154foreach (string item in kvp.Value) 185element = prop.Value; 197if (property.Value == null) 201else if (property.Value.GetValueKind() == JsonValueKind.String) 203result[property.Key] = new List<string>() { property.Value.GetValue<string>() }; 205else if (property.Value is JsonArray arr)
ChoiceTemplateParameter.cs (2)
31_choices = parameter.Choices.ToDictionary(kvp => kvp.Key, kvp => kvp.Value, StringComparer.OrdinalIgnoreCase); 37_choices = choiceTemplateParameter.Choices.ToDictionary(kvp => kvp.Key, kvp => kvp.Value, StringComparer.OrdinalIgnoreCase);
CliTemplateParameter.cs (2)
478if (!string.IsNullOrWhiteSpace(choiceInfo.Value.Description)) 480displayValue.AppendLine(choiceInfo.Value.Description.Replace("\r\n", " ").Replace("\n", " "));
Commands\create\CombinedChoiceTemplateParameter.cs (2)
23_combinedParameters[choice.Key] = choice.Value; 45_combinedParameters[choice.Key] = choice.Value;
Commands\create\InvalidTemplateOptionResult.cs (3)
140validChoices[choice.Key] = choice.Value; 161if (!string.IsNullOrWhiteSpace(choiceInfo.Value.Description)) 163text.Indent().Append("- " + choiceInfo.Value.Description);
Commands\create\TemplateCommandArgs.cs (2)
45if (parseResult.GetResult(opt.Value.Option) is { } result) 75return _templateOptions.Select(o => (o.Key, GetValue(o.Key, o.Value)))
Commands\create\TemplateResult.cs (3)
56if (parseResult.HasErrorFor(option.Value.Option, out var parseError)) 58result._parametersInfo.Add(InvalidTemplateOptionResult.FromParseError(option.Value, parseResult, parseError)); 62if (TemplateOptionResult.FromParseResult(option.Value, parseResult) is TemplateOptionResult { } res)
Commands\InvalidTemplateParametersException.cs (1)
28foreach (var message in error.Value)
HostSpecificTemplateData.cs (12)
41if (symbolInfo.Value is not JsonObject symbol) 50if (symbolProperty.Value is null) 56var kind = symbolProperty.Value.GetValueKind(); 59JsonValueKind.String => symbolProperty.Value.GetValue<string>(), 62_ => symbolProperty.Value.ToJsonString() 110if (paramInfo.Value.TryGetValue(IsHiddenKey, out string? hiddenStringValue) 129if (paramInfo.Value.TryGetValue(AlwaysShowKey, out string? alwaysShowValue) 149if (paramInfo.Value.TryGetValue(LongNameKey, out string? longNameOverride)) 167if (paramInfo.Value.TryGetValue(ShortNameKey, out string? shortNameOverride)) 201return kvp.Value; 227foreach (var prop in symbol.Value) 229writer.WriteString(prop.Key, prop.Value);
JExtensions.cs (1)
278return kvp.Value;
PostActionProcessors\ChmodPostActionProcessor.cs (2)
25JsonArray valueArray = JsonNode.Parse(entry.Value)!.AsArray(); 35values = new[] { entry.Value };
TabularOutput\TabularOutput.cs (1)
241int maxRowWidth = columnWidthLookup.Sum(column => column.Value) + totalPaddingWidth;
TemplatePackageCoordinator.cs (1)
374IReadOnlyList<UninstallResult> uninstallResults = await providerSourcesToUninstall.Key.UninstallAsync(providerSourcesToUninstall.Value, cancellationToken).ConfigureAwait(false);
TemplatePackageDisplay.cs (1)
251Reporter.Output.WriteLine($"{detail.Key}: {GetFormattedValue(detail.Value)}".Indent(level: 3));
TemplateResolution\TemplateGroupMatchInfo.cs (1)
274validChoices[choice.Key] = choice.Value;
TemplateSearch\CliHostSearchCacheData.cs (1)
40cliData[data.Key] = new HostSpecificTemplateData(data.Value as JsonObject);
Microsoft.TemplateEngine.Core (6)
Expressions\ScopeBuilder.cs (1)
57symbolValues.Add(variable.Value);
Util\EncodingConfig.cs (1)
64_values[Variables.AddToken(keyBytes)] = () => item.Value;
Util\Orchestrator.cs (3)
95IReadOnlyList<IOperationProvider> operations = runSpec.Value.GetOperations(spec.Operations); 96EngineConfig config = new EngineConfig(logger, EngineConfig.DefaultWhitespaces, EngineConfig.DefaultLineEndings, spec.RootVariableCollection, runSpec.Value.VariableFormatString); 255IProcessor runner = (fileGlobProcessors.FirstOrDefault(x => x.Key.IsMatch(sourceRel)).Value ?? fallback)
VariableCollection.cs (1)
109if (item.Value is null)
Microsoft.TemplateEngine.Edge (56)
_generated\11\SettingsStoreJsonSerializerContext.DictionaryStringHashSetGuid.g.cs (1)
60HashSetGuidSerializeHandler(writer, entry.Value);
_generated\12\SettingsStoreJsonSerializerContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\2\GlobalSettingsJsonSerializerContext.IReadOnlyDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\31\TemplateCacheJsonSerializerContext.DictionaryStringDateTime.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\32\TemplateCacheJsonSerializerContext.IReadOnlyDictionaryStringIBaselineInfo.g.cs (1)
60IBaselineInfoSerializeHandler(writer, entry.Value);
_generated\33\TemplateCacheJsonSerializerContext.IReadOnlyDictionaryStringParameterChoice.g.cs (1)
60ParameterChoiceSerializeHandler(writer, entry.Value);
_generated\34\TemplateCacheJsonSerializerContext.IReadOnlyDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
Installers\NuGet\NuGetManagedTemplatePackage.cs (1)
70Details = details?.ToDictionary(kvp => kvp.Key, kvp => kvp.Value) ?? throw new ArgumentNullException(nameof(details));
Settings\ComponentManager.cs (2)
47_componentIdsByType[interfaceType] = bucket.Value; 55_componentIdToAssemblyQualifiedTypeName[componentId] = entry.Value;
Settings\Scanner.cs (1)
166IReadOnlyList<Type> typeList = asm.Value.GetTypes();
Settings\SettingsStore.cs (3)
27if (entry.Value?.GetValueKind() == JsonValueKind.String) 29ComponentGuidToAssemblyQualifiedName[entry.Key] = entry.Value.GetValue<string>(); 55if (entry.Value is JsonArray values)
Settings\TemplateCache.cs (5)
58(IScanTemplateInfo Template, ITemplatePackage TemplatePackage, ILocalizationLocator? Localization, IMountPoint MountPoint) chosenTemplate = duplicatedIdentities.Value.Last(); 99if (entry.Value != null) 101mountPointInfo.Add(entry.Key, entry.Value.GetValue<DateTime>()); 178var lastTemplate = identityToTemplates.Value.Last(); 179var managedTemplates = identityToTemplates.Value.Where(templateInto => templateInto.TemplatePackage is IManagedTemplatePackage).ToArray();
Settings\TemplateInfo.cs (4)
173tags[tag.Key] = new CacheTag(null, null, new Dictionary<string, ParameterChoice> { { tag.Value, new ParameterChoice(null, null) } }, tag.Value); 270templateChoice.Value.DisplayName, 271templateChoice.Value.Description);
Settings\TemplateInfoReader.cs (5)
61var defaultOverrides = item.Value?.ToStringDictionary(propertyName: nameof(IBaselineInfo.DefaultOverrides)); 67IBaselineInfo baseline = new BaselineInfo(defaultOverrides, item.Value.ToString(nameof(IBaselineInfo.Description))); 99tags.Add(item.Key, item.Value?.GetValue<string>() ?? string.Empty); 174cdPair.Value.ToString(nameof(ParameterChoice.DisplayName)), 175cdPair.Value.ToString(nameof(ParameterChoice.Description))));
Settings\TemplatePackageManager.cs (1)
106sources.AddRange(await source.Value.ConfigureAwait(false));
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (12)
300if (property.Value == null || property.Value.GetValueKind() != JsonValueKind.String) 305result[property.Key] = property.Value.GetValue<string>(); 321if (property.Value != null) 323result[property.Key] = property.Value; 340if (property.Value != null) 342result[property.Key] = property.Value.ToJsonString(); 528return kvp.Value; 623if (property.Value is JsonObject sourceObj 630else if (property.Value is JsonArray sourceArr 643target[property.Key] = property.Value != null 644? JsonNode.Parse(property.Value.ToJsonString())
Template\InputDataSet.cs (1)
44: this(templateInfo, inputParameters.ToDictionary(p => p.Key, p => (object?)p.Value))
Template\InputDataSetExtensions.cs (2)
25new InputParameterData(p.Key, p.Value, DataSource.User, InputDataStateUtil.GetInputDataState(p.Value)))
Template\ParameterSetBuilder.cs (6)
21_resolvedValues = parameters.ToDictionary(p => p.Value, p => new EvalData(p.Value)); 76.Where(p => p.Value.Value != null) 77.ToDictionary(k => k.Key, k => k.Value.Value); 150_resolvedValues.Select(p => p.Value.ToParameterData()).ToList()); 202variables.ToDictionary(p => p.Key, p => p.Value.Value!);
Template\TemplateCreator.cs (3)
289.Where(p => p.Value.InputDataState != InputDataState.Unset && 290!(p.Value is EvaluatedInputParameterData 294.Select(p => p.Value))
TemplateConstraintManager.cs (2)
47constraintsToInitialize = _templateConstrains.Where(kvp => uniqueConstraints.Contains(kvp.Key)).Select(kvp => (kvp.Key, kvp.Value)); 51constraintsToInitialize = _templateConstrains.Select(kvp => (kvp.Key, kvp.Value));
ValidationUtils.cs (1)
23ILocalizationLocator localizationInfo = locator.Value;
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (43)
ConfigModel\ExtendedFileSource.cs (2)
66Rename = jObject.Get<JsonObject>(nameof(Rename))?.ToStringDictionary().ToDictionary(x => x.Key, x => x.Value) ?? RenameDefaults, 80Rename = entry.Get<JsonObject>(nameof(Rename))?.ToStringDictionary().ToDictionary(x => x.Key, x => x.Value) ?? RenameDefaults,
ConfigModel\ParameterSymbol.cs (1)
185choice.Value.Localize(locChoiceModel);
ConfigModel\PostActionModel.cs (1)
123args.Add(argInfo.Key, argInfo.Value?.ToString() ?? string.Empty);
ConfigModel\TemplateConfigModel.cs (8)
106symbols[tagInfo.Key] = ParameterSymbol.FromDeprecatedConfigTag(tagInfo.Key, tagInfo.Value); 111if (prop.Value is not JsonObject obj) 171JsonNode globData = globConfigKeyValue.Value; 182if (prop.Value is not JsonObject obj) 373_forms[kvp.Key] = kvp.Value; 532formMap[builtInForm.Key] = builtInForm.Value.Create(); 546if (form.Value is JsonObject o) 560if (property.Value is not JsonObject obj)
FileRenameGenerator.cs (1)
105IOperationProvider replacementOperation = new Replacement(replacement.Key.TokenConfig(), replacement.Value, null, true);
LocalizationModelDeserializer.cs (2)
32.Select(p => p.Value?.GetValueKind() == JsonValueKind.String ? (p.Key, p.Value.GetValue<string>()) : throw new Exception(LocalizableStrings.Authoring_InvalidJsonElementInLocalizationFile))
ParameterBasedVariableCollection.cs (1)
44string format = source.Value;
PostAction.cs (2)
88? renameGenerator.ApplyRenameToString(arg.Value) 89: arg.Value;
RunnableProjectConfig.cs (4)
250internal void Localize() => ConfigurationModel.Localize(Localizations.Single().Value.Model); 414string replacementKey = map.Value + (isUpperCase ? GuidMacroConfig.UpperCaseDenominator : GuidMacroConfig.LowerCaseDenominator) + format; 543Dictionary<string, string> fileRenamesFromSource = source.Rename.ToDictionary(x => x.Key, x => x.Value); 562fileRenamesFromSource[property.Key] = property.Value;
RunnableProjectConfig.ITemplate.cs (2)
94tags[tag.Key] = new CacheTag(null, null, new Dictionary<string, ParameterChoice> { { tag.Value, new ParameterChoice(null, null) } }, tag.Value);
RunnableProjectGenerator.cs (2)
510tags[tag.Key] = new CacheTag(null, null, new Dictionary<string, ParameterChoice> { { tag.Value, new ParameterChoice(null, null) } }, tag.Value);
ScannedTemplateInfo.cs (2)
33IReadOnlyDictionary<string, ILocalizationLocator> IScanTemplateInfo.Localizations => _localizations.ToDictionary(l => l.Key.Name, l => (ILocalizationLocator)l.Value); 35public IReadOnlyDictionary<string, string> HostConfigFiles => _hostConfigFiles.ToDictionary(f => f.Key, f => f.Value.FullPath);
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (12)
300if (property.Value == null || property.Value.GetValueKind() != JsonValueKind.String) 305result[property.Key] = property.Value.GetValue<string>(); 321if (property.Value != null) 323result[property.Key] = property.Value; 340if (property.Value != null) 342result[property.Key] = property.Value.ToJsonString(); 528return kvp.Value; 623if (property.Value is JsonObject sourceObj 630else if (property.Value is JsonArray sourceArr 643target[property.Key] = property.Value != null 644? JsonNode.Parse(property.Value.ToJsonString())
Validation\MandatoryLocalizationValidationFactory.cs (3)
32LocalizationModel locModel = localization.Value.Model; 69localization.Value.AddValidationEntry(new ValidationEntry(IValidationEntry.SeverityLevel.Error, "LOC001", string.Format(LocalizableStrings.Authoring_InvalidManualInstructionLocalizationIndex, excessInstructionLocalizationIds, postAction.Id))); 77localization.Value.AddValidationEntry(new ValidationEntry(IValidationEntry.SeverityLevel.Error, "LOC002", string.Format(LocalizableStrings.Authoring_InvalidPostActionLocalizationIndex, excessPostActionLocalizationIds)));
Microsoft.TemplateEngine.Utils (35)
DictionaryExtensions.cs (2)
40cloneDict.Add(entry.Key, entry.Value); 65dict[pair.Key] = pair.Value;
DirectedGraph.cs (6)
49inDegreeLookup[depPair.Key] = depPair.Value?.Count ?? 0; 52Queue<T> noDependenciesQueue = new(inDegreeLookup.Where(kp => kp.Value == 0).Select(kp => kp.Key)); 111.ToDictionary(p => p.Key, p => new HashSet<T>(p.Value.Where(dependentVertices.Contains))); 152foreach (T dependency in keyValuePair.Value!) 164.ToDictionary(kp => kp.Key, kp => kp.Value == null ? new() : new HashSet<T>(kp.Value));
InMemoryFileSystem.cs (13)
204yield return entry.Value.FullPath; 237yield return current.Current.Value.FullPath; 241current = current.Current.Value.Directories.GetEnumerator(); 281yield return entry.Value.FullPath; 314foreach (KeyValuePair<string, FileSystemFile> entry in current.Current.Value.Files) 318yield return entry.Value.FullPath; 323current = current.Current.Value.Directories.GetEnumerator(); 364yield return entry.Value.FullPath; 374yield return entry.Value.FullPath; 406yield return current.Current.Value.FullPath; 409foreach (KeyValuePair<string, FileSystemFile> entry in current.Current.Value.Files) 413yield return entry.Value.FullPath; 418current = current.Current.Value.Directories.GetEnumerator();
ListExtensions.cs (1)
39allGrouped.Add(new Grouping<TKey?, TElement>(entry.Key.Val, entry.Value));
ParameterSetDataExtensions.cs (1)
21new ParameterData(p.Key, p.Value, DataSource.User))
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (12)
300if (property.Value == null || property.Value.GetValueKind() != JsonValueKind.String) 305result[property.Key] = property.Value.GetValue<string>(); 321if (property.Value != null) 323result[property.Key] = property.Value; 340if (property.Value != null) 342result[property.Key] = property.Value.ToJsonString(); 528return kvp.Value; 623if (property.Value is JsonObject sourceObj 630else if (property.Value is JsonArray sourceArr 643target[property.Key] = property.Value != null 644? JsonNode.Parse(property.Value.ToJsonString())
Microsoft.TemplateSearch.Common (43)
Providers\NuGetMetadataSearchProvider.cs (2)
243_ = message.AppendLine($" {header.Key}: {string.Join(", ", header.Value)}"); 247_ = message.AppendLine($" {header.Key}: {string.Join(", ", header.Value)}");
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (12)
300if (property.Value == null || property.Value.GetValueKind() != JsonValueKind.String) 305result[property.Key] = property.Value.GetValue<string>(); 321if (property.Value != null) 323result[property.Key] = property.Value; 340if (property.Value != null) 342result[property.Key] = property.Value.ToJsonString(); 528return kvp.Value; 623if (property.Value is JsonObject sourceObj 630else if (property.Value is JsonArray sourceArr 643target[property.Key] = property.Value != null 644? JsonNode.Parse(property.Value.ToJsonString())
TemplateDiscoveryMetadata\BlobStorageTemplateInfo.cs (13)
186Description = item.Value.ToString(nameof(IBaselineInfo.Description)), 187DefaultOverrides = item.Value?.ToStringDictionary(propertyName: nameof(IBaselineInfo.DefaultOverrides)) ?? new Dictionary<string, string>() 230tags.Add(item.Key, item.Value?.ToString() ?? string.Empty); 241if (item.Value is JsonValue jv && jv.GetValueKind() == JsonValueKind.String) 243tags[item.Key] = item.Value.ToString(); 248{ item.Value.ToString(), string.Empty } 250defaultValue: item.Value.ToString(), 253else if (item.Value is JsonObject tagObj) 262choicesAndDescriptions[cdPair.Key] = new ParameterChoice(null, cdPair.Value?.ToString() ?? string.Empty); 263legacyChoices[cdPair.Key] = cdPair.Value?.ToString() ?? string.Empty; 287if (item.Value is not JsonObject paramObj) 372cdPair.Value.ToString(nameof(ParameterChoice.DisplayName)), 373cdPair.Value.ToString(nameof(ParameterChoice.Description))));
TemplateDiscoveryMetadata\LegacySearchCacheReader.cs (8)
22foreach (var template in package.Value.TemplateIdentificationEntry) 50packageData.Add(new TemplatePackageSearchData(new PackInfo(package.Key, package.Value.Version, package.Value.TotalDownloads, package.Value.Owners, package.Value.Reserved), templateData)); 160if (packEntry.Value != null) 163JsonObject entryValue = (JsonObject)packEntry.Value; 239workingAdditionalData[dataReadInfo.Key] = dataReadInfo.Value(dataObject);
TemplateSearchCache\TemplatePackageSearchData.Json.cs (1)
138JsonSerializer.Serialize(writer, item.Value, options);
TemplateSearchCache\TemplateSearchCache.Json.cs (1)
90additionalData[dataReadInfo.Key] = dataReadInfo.Value(dataObject);
TemplateSearchCache\TemplateSearchData.Json.cs (6)
118writer.WriteStringValue(tag.Value); 158if (!string.IsNullOrWhiteSpace(choice.Value.Description)) 161writer.WriteStringValue(choice.Value.Description); 163if (!string.IsNullOrWhiteSpace(choice.Value.DisplayName)) 166writer.WriteStringValue(choice.Value.DisplayName); 199JsonSerializer.Serialize(writer, item.Value, options);
Microsoft.TestPlatform.CommunicationUtilities (19)
_generated\63\TestPlatformJsonContext.DictionaryStringHashSetString.g.cs (1)
60HashSetStringSerializeHandler(writer, entry.Value);
_generated\64\TestPlatformJsonContext.DictionaryStringIEnumerableString.g.cs (1)
60IEnumerableStringSerializeHandler(writer, entry.Value);
_generated\66\TestPlatformJsonContext.DictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\73\TestPlatformJsonContext.IDictionaryStringString.g.cs (1)
59writer.WriteString(entry.Key, entry.Value);
_generated\82\TestPlatformJsonContext.KeyValuePairTestPropertyObject.g.cs (1)
80Getter = static obj => ((global::System.Collections.Generic.KeyValuePair<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestProperty, object>)obj).Value,
Json\Jsonite\Jsonite.cs (1)
1090Write(keyValue.Value);
Serialization\DiscoveryCriteriaFactory.cs (1)
32criteria.AdapterSourceMap.Add(adapterSources.Key, adapterSources.Value);
Serialization\ObjectConverter.cs (2)
125if (kvp.Value is null) 133TestObjectBaseConverter.WritePropertyValue(writer, kvp.Value, options);
Serialization\TestCaseConverterV2.cs (2)
96if (property.Value is null) 104TestObjectBaseConverter.WritePropertyValue(writer, property.Value, options);
Serialization\TestObjectBaseConverter.cs (3)
111if (property.Value is null) 117WritePropertyValue(writer, property.Value, options); 170writer.WriteString("Value", kvp.Value);
Serialization\TestObjectConverter.cs (2)
80if (kvp.Value is null) 88TestObjectBaseConverter.WritePropertyValue(writer, kvp.Value, options);
Serialization\TestResultConverterV2.cs (2)
141if (property.Value is null) 149TestObjectBaseConverter.WritePropertyValue(writer, property.Value, options);
Serialization\TestRunStatisticsConverter.cs (1)
58writer.WriteNumber(kvp.Key.ToString(), kvp.Value);
Microsoft.TestPlatform.CrossPlatEngine (22)
AttachmentsProcessing\DataCollectorAttachmentsProcessorsFactory.cs (2)
143finalDatacollectorsAttachmentsProcessors.Add(new DataCollectorAttachmentProcessor(attachementProcessor.Value.Item1, attachementProcessor.Value.Item2));
Client\Parallel\DiscoveryDataAggregator.cs (2)
145var newValue = Convert.ToDouble(metric.Value, CultureInfo.InvariantCulture); 170.Where(source => source.Value == discoveryStatus)
Client\Parallel\ParallelProxyDiscoveryManager.cs (1)
69.ToDictionary(pair => pair.Key, pair => pair.Value);
Client\Parallel\ParallelProxyExecutionManager.cs (1)
88.ToDictionary(pair => pair.Key, pair => pair.Value);
Client\Parallel\ParallelRunDataAggregator.cs (2)
89testOutcomeMap[kvp.Key] = currentCount + kvp.Value; 199var newValue = Convert.ToDouble(metric.Value, CultureInfo.InvariantCulture);
Client\ProxyExecutionManagerWithDataCollection.cs (3)
169testProcessStartInfo.EnvironmentVariables[envVariable.Key] = envVariable.Value; 173testProcessStartInfo.EnvironmentVariables.Add(envVariable.Key, envVariable.Value); 192testProcessStartInfo.EnvironmentVariables[kvp.Key] = kvp.Value;
Client\ProxyOperationManagerWithDataCollection.cs (1)
96testProcessStartInfo.EnvironmentVariables[kvp.Key] = kvp.Value;
DataCollection\InProcDataCollectionExtensionManager.cs (1)
303testResult.SetPropertyValue(testProperty, keyValuePair.Value);
DataCollection\ProxyDataCollectionManager.cs (1)
163_requestData.MetricsCollection.Add(metric.Key, metric.Value);
Discovery\DiscovererEnumerator.cs (1)
105LoadTestsFromAnExtension(kvp.Key, kvp.Value, settings, testCaseFilter, logger);
Discovery\DiscoveryManager.cs (2)
115var verifiedSources = GetValidSources(kvp.Value, _sessionMessageLogger, discoveryCriteria.Package); 118verifiedExtensionSourceMap.Add(kvp.Key, kvp.Value);
EventHandlers\PathConverter.cs (2)
153var updatedPaths = UpdatePaths(adapter.Value, updateDirection); 163testRunCriteriaWithSources.AdapterSourceMap[adapter.Key] = UpdatePaths(adapter.Value, updateDirection)!);
Execution\RunTestsWithSources.cs (3)
143var verifiedSources = DiscoveryManager.GetValidSources(kvp.Value, logger, _package); 146verifiedExtensionSourceMap.Add(kvp.Key, kvp.Value); 160kvp.Value,
Microsoft.TestPlatform.Filter.Source (1)
FastFilter.cs (1)
85var filterValues = kvp.Value;
Microsoft.TestPlatform.PlatformAbstractions (3)
common\System\ProcessHelper.cs (3)
106if (kvp.Value is null) 111process.StartInfo.AddEnvironmentVariable(kvp.Key, kvp.Value); 120process.StartInfo.AddEnvironmentVariable(kvp.Key, kvp.Value);
Microsoft.TestPlatform.TestHostRuntimeProvider (3)
Hosting\DefaultTestHostManager.cs (1)
480var extensionsString = string.Join("\n", conflictingExtensions.Select(kv => $" {kv.Key} : {kv.Value}"));
Hosting\DotnetTestHostManager.cs (2)
773value = environmentVariable.Value; 947.Select(kvp => $"{kvp.Key}={kvp.Value}")
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (1)
VsTestConsoleProcessManager.cs (1)
160info.EnvironmentVariables[envVariable.Key] = envVariable.Value?.ToString();
Microsoft.VisualStudio.TestPlatform.Client (4)
Discovery\DiscoveryRequest.cs (2)
296RequestData.MetricsCollection.Add(metric.Key, metric.Value); 424discoveryCompletePayload.Metrics[kvp.Key] = kvp.Value;
Execution\TestRunRequest.cs (2)
449_requestData.MetricsCollection.Add(metric.Key, metric.Value); 600testRunCompletePayload.TestRunCompleteArgs.Metrics[kvp.Key] = kvp.Value;
Microsoft.VisualStudio.TestPlatform.Common (29)
DataCollection\DataCollectionEnvironmentVariable.cs (1)
66return _variable.Value;
DataCollection\DataCollectionManager.cs (5)
711if (string.Equals(namevaluepair.Value, alreadyRequestedVariable.Value, StringComparison.Ordinal)) 723namevaluepair.Value, 739_dataCollectionTelemetryManager.RecordEnvironmentVariableConflict(dataCollectionWrapper, namevaluepair.Key, namevaluepair.Value, alreadyRequestedVariable.Value); 744EqtTrace.Verbose("DataCollectionManager.AddCollectionEnvironmentVariables: Adding Environment variable '{0}' value '{1}'", namevaluepair.Key, namevaluepair.Value); 750_dataCollectionTelemetryManager.RecordEnvironmentVariableAddition(dataCollectionWrapper, namevaluepair.Key, namevaluepair.Value);
ExtensionFramework\TestExecutorExtensionManager.cs (1)
108mergedTestExtensions.Add(kvp.Value);
ExtensionFramework\Utilities\TestExtensions.cs (12)
126var result = first!.Where(kvp => kvp.Value != null && kvp.Value.Count > 0) 127.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 132if (kvp.Value == null || kvp.Value.Count == 0) 141result.Add(kvp.Key, kvp.Value); 148result[kvp.Key] = MergeSets(result[kvp.Key], kvp.Value); 206existingExtensions.Add(extension.Key, extension.Value); 429if (extension.Value is not TestPluginInformation { AssemblyQualifiedName: not null } testPluginInformation) 440extensions.Add(extension.Key, extension.Value); 501if (kvp.Value?.Count > 0) 504foreach (var extension in kvp.Value)
SettingsProvider\SettingsProviderExtensionManager.cs (1)
148EqtTrace.Verbose("SettingsProviderExtensionManager: Loading settings provider {0}", settingsProvider.Value.Value);
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FastFilter.cs (1)
85var filterValues = kvp.Value;
Utilities\SimpleJSON.cs (8)
124public JSONNode Current { get { return _enumerator.Current.Value; } } 433return aKeyValue.Value; 873return aIndex < 0 || aIndex >= _dict.Count ? null : _dict.ElementAt(aIndex).Value; 918return item.Value; 925var item = _dict.Where(k => k.Value == aNode).First(); 945node.Add(n.Key, n.Value.Clone()); 965yield return n.Value; 989k.Value.WriteToStringBuilder(aSB, aIndent + aIndentInc, aIndentInc, aMode);
Microsoft.VisualStudio.TestPlatform.ObjectModel (30)
Nuget.Frameworks\FrameworkNameProvider.cs (20)
292if (pair.Value.Count <= profileFrameworks.Count) 316foreach (var permutation in GetEquivalentPermutations(pair.Value)) 699_shortNameRewrites.Add(mapping.Key, mapping.Value); 713_fullNameRewrites.Add(mapping.Key, mapping.Value); 742if (!_subSetFrameworks.TryGetValue(mapping.Value, out HashSet<string>? subSets)) 745_subSetFrameworks.Add(mapping.Value, subSets); 765var profile2 = profileMapping.Mapping.Value; 803remaining.Push(pair.Value); 854_identifierSynonyms.Add(pair.Key, pair.Value); 866var shortName = pair.Value; 869if (!_identifierSynonyms.ContainsKey(pair.Value)) 871_identifierSynonyms.Add(pair.Value, pair.Key); 887_profilesToShortName.Add(profileMapping.Mapping.Value, profileMapping.Mapping.Key); 888_profileShortToLong.Add(profileMapping.Mapping.Key, profileMapping.Mapping.Value); 906foreach (var fw in pair.Value) 927foreach (var fw in pair.Value) 947entries.Add(mapping.Value); 1100foreach (var mapping in _compatibilityMappings.SelectMany(p => p.Value)) 1117foreach (var range in pair.Value) 1126.SelectMany(p => p.Value.Select(subset => new { Superset = p.Key, Subset = subset }))
Nuget.Frameworks\FrameworkReducer.cs (3)
364pair.Value.Contains(nearestProfileFramework)) 400if (pair.Value.Contains(nearestForSub, NuGetFrameworkFullComparer.Instance)) 416reduced = scores.GroupBy(pair => pair.Value).OrderByDescending(g => g.Key).First().Select(e => e.Key);
Nuget.Frameworks\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
TestObject.cs (3)
59SetPropertyValue(property.Key, property.Value, CultureInfo.InvariantCulture); 76var lazyValues = _store.Where(kvp => kvp.Value is ILazyPropertyValue).ToArray(); 80var lazyValue = (ILazyPropertyValue?)kvp.Value;
TestProperty\TestProperty.cs (2)
328propertyTypePair.Value.Add(owner); 351propertyTypePair.Value.Add(owner);
Trait.cs (1)
27: this(data.Key, data.Value)
Mono.Cecil (8)
Mono.Cecil.Metadata\Buffers.cs (1)
371 var index = entry.Value;
Mono.Cecil\WindowsRuntimeProjections.cs (7)
437 type.Interfaces.Add (redirectedInterfacePair.Value); 440 redirectedInterfacePair.Value.CustomAttributes.Add (customAttribute); 447 @override.DeclaringType = redirectedInterfacePair.Value.InterfaceType; 488 if (TypeReferenceEqualityComparer.AreEqual (@override.DeclaringType, redirectedInterfacePair.Value.InterfaceType)) { 494 foreach (var customAttribute in redirectedInterfacePair.Value.CustomAttributes) 497 redirectedInterfacePair.Value.CustomAttributes.Clear (); 498 type.Interfaces.Remove (redirectedInterfacePair.Value);
MSBuild (33)
OutOfProcTaskAppDomainWrapperBase.cs (2)
387paramInfo.SetValue(wrappedTask, param.Value?.WrappedParameter, null); 396[param.Key, param.Value.ToString(), taskName]);
OutOfProcTaskHostNode.cs (14)
553targetOutputsPerProject[i].Add(output.Key, output.Value); 973if (kvp.Value.PendingCallbackRequests.TryRemove(callbackPacket.RequestId, out TaskCompletionSource<INodePacket> tcsFromContext)) 1295var ctxWrapper = kvp.Value.TaskWrapper; 1357kvp.Value.ExecutingThread?.Join(); 1445foreach (var reqKvp in contextKvp.Value.PendingCallbackRequests) 1447if (contextKvp.Value.PendingCallbackRequests.TryRemove(reqKvp.Key, out TaskCompletionSource<INodePacket> ctxTcs)) 1664string oldValue = variable.Value.Key; 1665string newValue = variable.Value.Value; 1731string oldValue = variable.Value.Value; 1732string newValue = variable.Value.Key; 1785string oldValue = variable.Value; 1802string newValue = variable.Value;
src\msbuild\src\Shared\LogMessagePacketBase.cs (1)
299_buildEvent = nodeBuildEvent.Value.Value;
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (5)
452$"Handshake failed. Received {result.Value} from host for {component.Key} but expected {component.Value}. Probably the host is a different MSBuild build."); 573if (handshakePart == component.Value) 586isAllowedMismatch = IsAllowedBitnessMismatch(component.Value, handshakePart); 598isAllowedMismatch = _versionHandshakeGroup.Contains(component.Key) && component.Value == Handshake.NetTaskHostHandshakeVersion; 608$"Handshake failed. Received {handshakePart} from host for {component.Key} but expected {component.Value}. Probably the host is a different MSBuild build.");
src\msbuild\src\Shared\TaskHostBuildResponse.cs (2)
70dict[entry.Key] = (ITaskItem[]?)entry.Value?.WrappedParameter ?? []; 101dict[entry.Key] = new TaskParameter(entry.Value);
src\msbuild\src\Shared\TaskHostConfiguration.cs (1)
237_taskParameters[parameter.Key] = new TaskParameter(parameter.Value);
src\msbuild\src\Shared\TaskHostTaskComplete.cs (1)
129_taskOutputParameters[parameter.Key] = new TaskParameter(parameter.Value);
src\msbuild\src\Shared\TaskParameter.cs (4)
820destinationItem.SetMetadata(entry.Key, entry.Value); 848clonedMetadata.Add(metadatum.Key, EscapingUtilities.UnescapeAll(metadatum.Value)); 946var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 955SetMetadata(kvp.Key, kvp.Value);
src\msbuild\src\Shared\TypeLoader.cs (1)
552return desiredTypeInAssembly.Value;
XMake.cs (2)
1940entryValue.Equals(propertyKvp.Value))) 1941.Value;
NuGet.Build.Tasks (5)
GetGlobalPropertyValueTask.cs (1)
38var dictionaryWithOrdinal = globalProperties.ToDictionary(i => i.Key, i => i.Value, StringComparer.OrdinalIgnoreCase);
StaticGraphRestoreTaskBase.cs (4)
252yield return string.Join(";", options.Select(i => $"{i.Key}={i.Value}")); 271yield return string.Join(";", globalProperties.Select(i => $"{i.Key}={i.Value}")); 329newGlobalProperties[item.Key] = item.Value; 388writer.Write(option.Value);
NuGet.Build.Tasks.Console (4)
MSBuildStaticGraphRestore.cs (4)
757var msBuildProjectInstance = projectInnerNode.Value; 761projectFilePath: projectInnerNode.Value.FullPath, 993PackageSpec packageSpec = getPackageSpec(project.Value); 1391projectFinalizeDelegate(kvp.Value);
NuGet.Build.Tasks.Pack (6)
PackTaskLogic.cs (6)
397foreach (var key in frameworkToAliases.Where(e => e.Value.Count <= 1).Select(e => e.Key).ToList()) 427t.Key, t.Value.Select( 478e.Value.Select(fr => new FrameworkReference(fr))))); 878var unsuppressedAliases = duplicates.Value 887string.Join(", ", duplicates.Value) + " => " + duplicates.Key, 900PackCommandRunner.AddDependencyGroups(pair.Value, pair.Key, packageBuilder);
NuGet.CommandLine.XPlat (7)
Commands\ConfigCommands\ConfigRunners.cs (1)
250setting += $" {attribute.Key}=\"{attribute.Value}\"";
Commands\Package\Update\PackageUpdateCommandRunner.cs (2)
729var package = new PackageWithVersionRange { Id = kvp.Key, VersionRange = kvp.Value.version }; 730result.Add((package, kvp.Value.tfms));
Commands\PackageReferenceCommands\ListPackage\ListPackageCommandRunner.cs (1)
439packageMetadata => packageMetadataById[packageMetadata.Key] = packageMetadata.Value,
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
Utility\MSBuildAPIUtility.cs (2)
950var referenceItems = matchingTargetOutputReference.Value.Items; 951var versionItems = matchingTargetOutputVersion.Value.Items;
NuGet.Commands (72)
CommandRunners\PackCommandRunner.cs (1)
521factory.GetProjectProperties()[property.Key] = property.Value;
PackCommand\Logging\PackageSpecificWarningProperties.cs (1)
43foreach ((NuGetLogCode nuGetLogCode, NuGetFramework nuGetFramework) propertyPair in packageNoWarnProperty.Value)
RestoreCommand\CompatibilityChecker.cs (2)
217new PackageIdentity(compile.Value.Name, compile.Value.Version),
RestoreCommand\ContentFiles\ContentFileUtils.cs (1)
60var languageGroups = codeLanguagePair.Value;
RestoreCommand\DependencyGraphResolver.cs (10)
266if (profile.Value.RestoreContexts.Any()) 269compatProfile = profile.Value; 271else if (!allRuntimes.Supports.TryGetValue(profile.Value.Name, out compatProfile)) 281_logger.LogDebug($" {profile.Value.Name} -> +{frameworkRuntimePair}"); 658Conflicting = versionConflict.Value, 708ResolvedDependencyGraphItem resolvedDependencyGraphItem = resolvedDependencyGraphItemEntry.Value; 900LibraryDependencyIndex libraryDependencyIndex = _indexingTable.Index(item.Value); 902pinnedPackageVersions[libraryDependencyIndex] = item.Value.VersionRange; 1095(LibraryRangeIndex[] evicteePath, LibraryDependencyIndex evicteeDepIndex, LibraryDependencyTarget evicteeTypeConstraint) = evictee.Value; 1125if (chosenItem.Value.Path.Contains(evictedLibraryRangeIndex))
RestoreCommand\Diagnostics\UnresolvedMessages.cs (6)
117if (sourceInfo.All(static kvp => kvp.Value.Length == 0)) 141var allVersions = sourceInfo.SelectMany(static e => e.Value); 233var bestMatch = GetBestMatch(sourceInfo.Value, range); 239sourceInfo.Value.Length, 246sourceInfo.Value.Length, 273return sources.OrderByDescending(e => e.Value.Length)
RestoreCommand\LockFileBuilder.cs (2)
365lockFile.Libraries.Add(pair.Value); 401lockFileTarget.Libraries.Add(pair.Value);
RestoreCommand\Logging\TransitiveNoWarnUtils.cs (14)
407merged.Add(id, pair.Value); 412merged[id] = MergeCodes(codes, pair.Value); 446var libraryCollection = codePair.Value; 451var frameworks = libraryPair.Value; 463var libraryCollection = codePair.Value; 468var frameworks = libraryPair.Value; 548var libraryCollection = codePair.Value; 553var frameworks = libraryPair.Value; 596var libraryCollection = codePair.Value; 601var frameworks = libraryPair.Value; 787HashSet<NuGetLogCode> intersect = Intersect(pair.Value, otherCodes); 835if (pair.Value == null || pair.Value.Count == 0) 850if (codes == null || !pair.Value.IsSubsetOf(codes))
RestoreCommand\RequestFactory\RestoreArgs.cs (1)
182return sourceObjects.Select(entry => CachingSourceProvider.CreateRepository(entry.Value)).ToList();
RestoreCommand\RestoreCommand.cs (13)
1187if (prunedPackage.Value.Count != project.TargetFrameworks.Count) 1192if (!prunedPackage.Value.Contains(framework.TargetAlias)) 1215prunedPackage.Value.Select(e => aliasToTargetGraphName[e]).ToArray())); 1387if (centralPackageVersion.Value.VersionRange.IsFloating) 1391packageVersionItemsWithFloatingVersion.Add(centralPackageVersion.Value); 2134if (profile.Value.RestoreContexts.Any()) 2137compatProfile = profile.Value; 2139else if (!runtimes.Supports.TryGetValue(profile.Value.Name, out compatProfile)) 2150_logger.LogDebug($" {profile.Value.Name} -> +{pair}"); 2298if (profile.Value.RestoreContexts.Any()) 2301compatProfile = profile.Value; 2303else if (!runtimes.Supports.TryGetValue(profile.Value.Name, out compatProfile)) 2314_logger.LogDebug($" {profile.Value.Name} -> +{pair}");
RestoreCommand\RestoreSummary.cs (3)
172if (installed.Any(i => i.Value > 0)) 176foreach (var pair in installed.Where(i => i.Value > 0)) 181pair.Value,
RestoreCommand\RestoreTargetGraph.cs (1)
196conflicts.Select(p => new ResolverConflict(p.Key, p.Value)),
RestoreCommand\Utility\AuditUtility.cs (1)
280List<string> affectedGraphs = kvp2.Value;
RestoreCommand\Utility\BuildAssetsUtils.cs (7)
600var pkg = sortedPackage.Value; 635if (pkg.Value.Exists()) 646var tuple = ValueTuple.Create(item1: pkg.Key, item2: e, item3: GetPathWithMacros(pkg.Value.GetAbsolutePath(e), repositoryRoot, request.EnvironmentVariableReader)); 697if (pkg.Value.Exists()) 701var absolutePath = pkg.Value.GetAbsolutePath(lockFileItem); 720if (pkg.Value.Exists()) 724var path = pkg.Value.GetAbsolutePath(e);
RestoreCommand\Utility\LockFileUtils.cs (2)
1001emptyItem.Properties.Add(pair.Key, pair.Value); 1053var groupedItems = primaryGroup.Value;
RestoreCommand\Utility\MSBuildRestoreUtility.cs (2)
666ProjectReferences = frameworkPair.Value, 841AddPackageToPrune(id, versionString, frameworkInfo.Value);
RestoreCommand\Utility\PackageSpecFactory.cs (4)
227var msBuildProjectInstance = projectInnerNode.Value; 284if (item.Value.IsPropertyTrue("RestorePackagePruningDefault")) 296if (targetFramework.Value.IsPropertyTrue("RestoreEnableAnalyzerAssets")) 334string? auditMode = item.Value.GetProperty("NuGetAuditMode");
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
NuGet.Common (1)
KeyedLock.cs (1)
224kvp.Value.Semaphore.Dispose();
NuGet.Configuration (44)
PackageSource\PackageSourceProvider.cs (4)
995if (existingDisabledSourcesLookup != null && existingDisabledSourcesLookup.TryGetValue(sourceItem.Value.Key, out var existingDisabledSourceItem)) 1001if (existingsourceCredentialsLookup != null && existingsourceCredentialsLookup.TryGetValue(sourceItem.Value.Key, out var existingSourceCredentialItem)) 1007Settings.Remove(ConfigurationConstants.PackageSources, sourceItem.Value); 1069Settings.Remove(ConfigurationConstants.AuditSources, sourceItem.Value);
PackageSourceMapping\SearchTree.cs (1)
25foreach (string namespaceId in patternsPerSource.Value)
Settings\Items\AddItem.cs (2)
28).ToDictionary(a => a.Key, a => a.Value)); 64AddAttribute(attribute.Key, attribute.Value);
Settings\Items\AuthorItem.cs (1)
56element.SetAttributeValue(attr.Key, attr.Value);
Settings\Items\CredentialsItem.cs (2)
209newSetting.AddAttribute(attr.Key, attr.Value); 234element.SetAttributeValue(attr.Key, attr.Value);
Settings\Items\FileClientCertItem.cs (1)
150element.SetAttributeValue(attr.Key, attr.Value);
Settings\Items\OwnersItem.cs (1)
80element.SetAttributeValue(attr.Key, attr.Value);
Settings\Items\PackageSourceMappingSourceItem.cs (2)
141element.SetAttributeValue(attr.Key, attr.Value); 180var itemToAdd = newPackagePatternItem.Value;
Settings\Items\RepositoryItem.cs (1)
125element.SetAttributeValue(attr.Key, attr.Value);
Settings\Items\StoreClientCertItem.cs (1)
226element.SetAttributeValue(attr.Key, attr.Value);
Settings\Items\TrustedSignerItem.cs (1)
143var certToAdd = newCert.Value;
Settings\Items\UnknownItem.cs (6)
15public IReadOnlyList<SettingBase> Children => _mutableChildren.Select(c => c.Value).ToList(); 158element.SetAttributeValue(attr.Key, attr.Value); 209Add(newChild.Value); 222AddOrUpdateAttribute(attribute.Key, attribute.Value); 247child.Value.SetOrigin(origin); 257child.Value.RemoveFromSettings();
Settings\NuGetConfiguration.cs (4)
153if (sectionsContainer.TryGetValue(section.Value.ElementName, out var settingsSection)) 155settingsSection.Merge(section.Value); 159sectionsContainer.Add(section.Key, new VirtualSettingSection(section.Value)); 166return new NuGetConfiguration(Attributes, Sections.Select(s => (SettingSection)s.Value.Clone()));
Settings\SettingElement.cs (6)
83if (IsAttributeValid(attribute.Key, attribute.Value)) 85MutableAttributes.Add(attribute.Key, attribute.Value); 89throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.Error_InvalidAttribute, attribute.Key, attribute.Value)); 124element.SetAttributeValue(attr.Key, attr.Value); 275if (attribute != null && !attributeValues.Value.Contains(attribute.Value.Trim())) 289if (attribute != null && attributeValues.Value.Contains(attribute.Value.Trim()))
Settings\SettingFactory.cs (5)
128x.ElementName + string.Join("", x.Attributes.Select(a => a.Value)), 129y.ElementName + string.Join("", y.Attributes.Select(a => a.Value))); 145x.ElementName + string.Join("", x.Attributes.Select(a => a.Value)), 146y.ElementName + string.Join("", y.Attributes.Select(a => a.Value))); 156return StringComparer.OrdinalIgnoreCase.GetHashCode(obj.ElementName + string.Join("", obj.Attributes.Select(a => a.Value)));
Settings\SettingItem.cs (4)
65var otherAttributes = setting.Attributes.ToDictionary(a => a.Key, a => a.Value); 80if (!string.Equals(value, attribute.Value, StringComparison.Ordinal)) 97xElement.SetAttributeValue(attribute.Key, attribute.Value); 101AddOrUpdateAttribute(attribute.Key, attribute.Value);
Settings\SettingsGroup.cs (1)
66element.SetAttributeValue(attr.Key, attr.Value);
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
NuGet.Credentials (3)
CredentialService.cs (3)
178if (entry.Value.Status == CredentialStatus.Success 179&& entry.Value.Credentials != null 182credentials = entry.Value.Credentials;
NuGet.DependencyResolver.Core (2)
GraphModel\GraphOperations.cs (1)
92DowngradedTo = p.Value
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
NuGet.Frameworks (24)
FrameworkNameProvider.cs (20)
299if (pair.Value.Count <= profileFrameworks.Count) 323foreach (var permutation in GetEquivalentPermutations(pair.Value)) 711_shortNameRewrites.Add(mapping.Key, mapping.Value); 725_fullNameRewrites.Add(mapping.Key, mapping.Value); 754if (!_subSetFrameworks.TryGetValue(mapping.Value, out HashSet<string>? subSets)) 757_subSetFrameworks.Add(mapping.Value, subSets); 777var profile2 = profileMapping.Mapping.Value; 815remaining.Push(pair.Value); 866_identifierSynonyms.Add(pair.Key, pair.Value); 878var shortName = pair.Value; 881if (!_identifierSynonyms.ContainsKey(pair.Value)) 883_identifierSynonyms.Add(pair.Value, pair.Key); 899_profilesToShortName.Add(profileMapping.Mapping.Value, profileMapping.Mapping.Key); 900_profileShortToLong.Add(profileMapping.Mapping.Key, profileMapping.Mapping.Value); 918foreach (var fw in pair.Value) 939foreach (var fw in pair.Value) 959entries.Add(mapping.Value); 1112foreach (var mapping in _compatibilityMappings.SelectMany(p => p.Value)) 1129foreach (var range in pair.Value) 1138.SelectMany(p => p.Value.Select(subset => new { Superset = p.Key, Subset = subset }))
FrameworkReducer.cs (3)
364pair.Value.Contains(nearestProfileFramework)) 400if (pair.Value.Contains(nearestForSub, NuGetFrameworkFullComparer.Instance)) 416reduced = scores.GroupBy(pair => pair.Value).OrderByDescending(g => g.Key).First().Select(e => e.Key);
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
NuGet.LibraryModel (1)
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
NuGet.PackageManagement (6)
IDE\PackageRestoreManager.cs (2)
262Debug.Assert(p.Value != null); 263return new PackageRestoreData(p.Key, p.Value, isMissing: true);
NuGetPackageManager.cs (1)
2079var exists = await pair.Value;
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
Utility\PackagesConfigLockFileUtility.cs (2)
129bool allContentHashesMatch = comparisonResult.MatchedDependencies.All(pair => pair.Key.ContentHash == pair.Value.ContentHash); 137foreach (var difference in comparisonResult.MatchedDependencies.Where(kvp => kvp.Key.ContentHash != kvp.Value.ContentHash))
NuGet.Packaging (37)
ContentModel\ContentItemCollection.cs (6)
167if (criteriaProperty.Value == null) 189if (!propertyDefinition.IsCriteriaSatisfied(criteriaProperty.Value, itemProperty)) 207if (criteriaProperty.Value == null) 216groupComparison = propertyDefinition.Compare(criteriaProperty.Value, bestGroupValue, itemGroupValue); 386hashCode ^= property.Value.GetHashCode(); 466if (!Equals(xProperty.Value, yValue))
ContentModel\ContentQueryDefinition.cs (1)
109Defaults = defaults.ToDictionary(p => p.Key, p => p.Value);
ContentModel\Infrastructure\Parser.cs (2)
21_defaults = pattern.Defaults.ToDictionary(p => p.Key, p => p.Value); 100item.Add(pair.Key, pair.Value);
Core\NuspecCoreReaderBase.cs (1)
170metadataValues.Add(pair.Key, pair.Value);
Rules\ReferencesInNuspecMatchRefAssetsRule.cs (2)
67missingReferences.Add(new MissingReference("ref", item.Key, item.Value.ToArray())); 116var refs = item.Value.ToArray();
RuntimeModel\JsonRuntimeFormat.cs (10)
112.Select(pair => pair.Value); 128.Select(pair => pair.Value); 171foreach (var property in EachProperty(json.Value)) 182switch (property.Value.Type) 185foreach (var value in (JArray)property.Value) 191yield return new FrameworkRuntimePair(framework, property.Value.ToString()); 202foreach (var property in EachProperty(json.Value)) 206var imports = (JArray)property.Value; 227EachProperty(json.Value).Select(ReadRuntimePackageDependency)); 232return new RuntimePackageDependency(json.Key, VersionRange.Parse(json.Value.Value<string>()!));
RuntimeModel\RuntimeDependencySet.cs (2)
75return $"{Id} -> {string.Join(",", Dependencies.Select(d => d.Value.Id + " " + d.Value.VersionRange.ToString()))}";
RuntimeModel\RuntimeGraph.cs (8)
102clone[pair.Key] = cloneFunc(pair.Value); 129runtimes[pair.Key] = pair.Value; 139runtimes[pair.Key] = RuntimeDescription.Merge(leftRuntime, pair.Value); 143runtimes[pair.Key] = pair.Value; 152supports[compatProfile.Key] = compatProfile.Value; 158if (compatProfile.Value.RestoreContexts.Count > 0) 160supports[compatProfile.Key] = compatProfile.Value; 263Runtimes.SelectMany(e => e.Value.RuntimeDependencySets.Select(f => f.Key)),
Signing\Content\KeyPairFileReader.cs (1)
60entries.Add(property.Key, property.Value);
Signing\Content\SignatureContent.cs (1)
122hash = property.Value;
Signing\TrustedSigners\TrustedSignersProvider.cs (1)
132return certificateLookup.Select(e => e.Value.ToAllowListEntry()).ToList();
Signing\Verification\SignatureTrustAndValidityVerificationProvider.cs (1)
266var signingCertificateFingerprint = signature.GetSigningCertificateFingerprint(allowUntrustedRoot.Value);
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
NuGet.ProjectModel (11)
DependencyGraphSpec.cs (1)
398var project = pair.Value;
JsonUtility.cs (1)
117items.Add(readItem(child.Key, child.Value));
LockFile\LockFileFormat.cs (3)
524if (bool.TrueString.Equals(property.Value, StringComparison.OrdinalIgnoreCase)) 528else if (bool.FalseString.Equals(property.Value, StringComparison.OrdinalIgnoreCase)) 534writer.WriteValue(property.Value);
PackageSpecOperations.cs (1)
182result.Add(kvp.Key, kvp.Value);
PackageSpecReferenceDependencyProvider.cs (2)
382LibraryRange = new LibraryRange(item.Value.Name, item.Value.VersionRange, LibraryDependencyTarget.Package),
PackageSpecWriter.cs (2)
614writer.WriteNameValue(name: dependency.Key, value: dependency.Value.VersionRange.OriginalString ?? dependency.Value.VersionRange.ToNormalizedString());
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
NuGet.Protocol (21)
Converters\FingerprintsConverter.cs (1)
25dict[fingerprint.Key] = fingerprint.Value?.ToString() ?? string.Empty;
Converters\FingerprintsStjConverter.cs (1)
39writer.WriteString(kvp.Key, kvp.Value);
DependencyInfo\Trim.cs (1)
52IList<PackageInfo> packagesToRemove = registrationInfo.Packages.Where(p => !allowedVersion.Value.Satisfies(p.Version)).ToList();
HttpSource\HttpRequestMessageExtensions.cs (3)
37clone.Headers.TryAddWithoutValidation(header.Key, header.Value); 44clonedOptions.Add(option.Key, option.Value); 66Headers.TryAddWithoutValidation(header.Key, header.Value);
HttpSource\HttpRetryHandler.cs (2)
136requestMessage.Headers.TryAddWithoutValidation(header.Key, header.Value); 190newContent.Headers.TryAddWithoutValidation(header.Key, header.Value);
LegacyFeed\MetadataResourceV2Feed.cs (1)
50var versions = await pair.Value;
LegacyFeed\V2FeedPackageInfo.cs (1)
314return results.Select(pair => new PackageDependencyGroup(pair.Key, pair.Value)).ToList();
LocalRepositories\LocalMetadataResource.cs (1)
54var versions = await pair.Value;
Plugins\MessageDispatcher.cs (2)
125entry.Value.Dispose(); 130entry.Value.Dispose();
Plugins\PluginFactory.cs (1)
78var lazyTask = entry.Value;
Plugins\PluginPackageReader.cs (2)
962if (pair.Value.Value.Status == TaskStatus.RanToCompletion) 964var fileStream = pair.Value.Value.Result;
Plugins\RequestHandlers\MonitorNuGetProcessExitRequestHandler.cs (2)
48entry.Value.EnableRaisingEvents = false; 49entry.Value.Dispose();
Resources\MetadataResource.cs (1)
61return result.Value;
Resources\ServiceIndexResourceV3.cs (1)
75return _index.SelectMany(e => e.Value).ToList();
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
NuGet.Resolver (2)
PackageResolver.cs (1)
293dependencyByPackageId.Add(item.Key, VersionRange.Combine(item.Value));
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
NuGet.Versioning (1)
src\nuget-client\build\Shared\HashCodeCombiner.cs (1)
176int valHash = pair.Value.GetHashCode();
PresentationBuildTasks (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
134if (pair.Value == oldNamespace)
PresentationCore (21)
MS\Internal\FontCache\FamilyCollection.cs (3)
435if (string.Equals(localizedFamilyName.Value, familyName, StringComparison.OrdinalIgnoreCase)) 461if (faceName.Equals(name.Value, StringComparison.OrdinalIgnoreCase)) 483faces.TryAdd(name.Value, font);
MS\Internal\FontFace\PhysicalFontFamily.cs (1)
50convertedDictionary.Add(language, pair.Value);
System\Windows\Media\CharacterMetricsDictionary.cs (11)
87item.Value, 107return item.Value != null && item.Value.Equals(GetValue(item.Key)); 158return item.Value != null && RemoveValue(item.Key, item.Value); 189typedArray[index++] = new SC.DictionaryEntry(item.Key, item.Value); 205array.SetValue(new SC.DictionaryEntry(item.Key, item.Value), index++); 476result[i++] = pair.Value; 558return new SC.DictionaryEntry(entry.Key, entry.Value); 584return new SC.DictionaryEntry(entry.Key, entry.Value); 600return GetCurrentEntry().Value;
System\Windows\Media\CultureSpecificStringDictionary.cs (5)
82Add(item.Key, item.Value); 158typedArray[index++] = new SC.DictionaryEntry(item.Key, item.Value); 174array.SetValue(new SC.DictionaryEntry(item.Key, item.Value), index++); 403return new SC.DictionaryEntry(entry.Key, entry.Value); 419return GetCurrentEntry().Value;
System\Windows\Media\GlyphTypeface.cs (1)
390adjustedLanguageFaceNames[XmlLanguage.GetLanguage(pair.Key.IetfLanguageTag)] = pair.Value;
PresentationFramework (50)
MS\Internal\Annotations\Storage\StoreAnnotationsMap.cs (5)
172annotations.Add(annotKV.Key, annotKV.Value.Annotation); 202if (annotKV.Value.Dirty) 204annotations.Add(annotKV.Value.Annotation); 218if (annotKV.Value.Dirty) 220annotKV.Value.Dirty = false;
MS\Internal\Data\AccessorTable.cs (1)
112int age = _generation - entry.Value.Generation;
MS\Internal\Data\CollectionViewGroupInternal.cs (2)
542if (item.Value.Target == subgroup) 588if (!item.Value.IsAlive)
MS\Internal\Globalization\BamlTreeMap.cs (1)
492if (pair.Value.FormattingTag == formattingTag)
MS\Internal\Globalization\BamlTreeUpdater.cs (3)
48if (!ApplyChangeToBamlTree(item.Key, item.Value, updateMap)) 62ApplyChangeToBamlTree(entry.Key, entry.Value, updateMap); 72BamlLocalizableResource resource = item.Value;
MS\Internal\Helper.cs (3)
760return itemValues[i].Value; 891value = itemValues[i].Value; 1035ClearItemValueStorageRecursive((WeakDictionary<object, List<KeyValuePair<int, object>>>)itemValue.Value, dpIndices);
MS\Internal\Ink\ClipboardProcessor.cs (2)
82if ( pair.Value.CanPaste(dataObject) ) 188ClipboardData data = pair.Value;
MS\Internal\WeakDictionary.cs (2)
267this.Add(item.Key, item.Value); 282if (object.Equals(_hashTable[item.Key], item.Value))
System\Windows\Annotations\LocatorPart.cs (3)
113if (k_v.Value != otherValue) 142newPart.NameValuePairs.Add(k_v.Key, k_v.Value); 405res += $"@{AnnotationXmlConstants.Attributes.ItemName}=\"{k_v.Key}\" and @{AnnotationXmlConstants.Attributes.ItemValue}=\"{k_v.Value}\"]";
System\Windows\Annotations\LocatorPartList.cs (1)
172writer.WriteAttributeString(AnnotationXmlConstants.Attributes.ItemValue, pair.Value);
System\Windows\Annotations\Storage\XmlStreamStore.cs (4)
794if (item.Value != null) 796foreach (Uri name in item.Value) 848if (item.Value != null) 850foreach (Uri name in item.Value)
System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (3)
584return pair.Value; 669WeakReference weakRef = dictionaryEntry.Value as WeakReference; 693WeakReference weakRef = keyValuePair.Value as WeakReference;
System\Windows\Controls\DataGrid.cs (1)
6783kvp.Value.TrackValue();
System\Windows\Controls\Grid.cs (4)
2867if (x.Value < y.Value) 2871else if (x.Value > y.Value)
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (1)
509if (kvp.Key.Item == null || !kvp.Value.TryGetTarget(out dict))
System\Windows\Documents\DocumentSequence.cs (1)
895GetPageAsyncRequest asyncRequest = ienum.Current.Value;
System\Windows\Documents\FixedDocument.cs (1)
1219GetPageAsyncRequest asyncRequest = ienum.Current.Value;
System\Windows\Documents\WinRTSpellerInterop.cs (1)
520foreach (string filePath in items.Value)
System\Windows\Markup\Baml2006\Baml2006ReaderFrame.cs (1)
70if (pair.Value == xamlNs)
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (3)
310DictionaryEntry entry = new(pair.Key, pair.Value); 390BamlLocalizableResource resourceCopy = pair.Value == null ? null : new BamlLocalizableResource(pair.Value);
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1429yield return new Mapping(mapping.Key, mapping.Value);
System\Windows\Markup\XamlTypeMapper.cs (1)
313newDict.Add(kvp.Key, kvp.Value);
System\Windows\Shell\WindowChromeWorker.cs (1)
344return handlePair.Value(message, wParam, lParam, out handled);
System\Windows\SystemResources.cs (2)
207ResourceDictionaryInfo info = dictionary.Value.ThemedDictionaryInfo; 238ResourceDictionaryInfo info = dictionary.Value.GenericDictionaryInfo;
System\Windows\VisualStateManager.cs (2)
392Timeline toAnimation = GenerateToAnimation(root, pair.Value, easingFunction, true); 409Timeline fromAnimation = GenerateFromAnimation(root, pair.Value, easingFunction);
ReachFramework (3)
MS\Internal\Printing\MostFrequentlyUsedCache.cs (2)
65if(pair.Value.UseCount < minUseCount) 67minUseCount = pair.Value.UseCount;
PrintConfig\PrintSchemaShim.cs (1)
1161if (object.Equals(pair.Value, value))
RepoTasks (1)
BatchHelixWorkItems.cs (1)
97var orderedItems = group.Value.OrderBy(item => item.ItemSpec, StringComparer.OrdinalIgnoreCase).ToList();
Roslyn.Diagnostics.Analyzers (37)
src\b310f676f7308b7f\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
241foreach (var (symbol, write) in SymbolsWriteBuilder.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key))
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
44kvp.Value.Free();
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (1)
57this.Add(kv.Key, kv.Value);
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
747var replacementPrefix = kv.Value;
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
711builder.AddRange(kvp.Value); 833result.Add(entry.Key, createMembers(entry.Value)); 876var namedTypes = getOrCreateNamedTypes(entry.Value);
src\roslyn\src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
18value = keyValuePair.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
186&& EqualityComparer<TValue>.Default.Equals(value, pair.Value); 240result[item.Key] = item.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (2)
49readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 53readonly object? IDictionaryEnumerator.Value => Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (3)
119=> Add(item.Key, item.Value); 127Add(pair.Key, pair.Value); 149&& EqualityComparer<TValue>.Default.Equals(value, item.Value);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (1)
25public readonly TValue Current => _enumerator.Current.Value;
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (9)
210Add(pair.Key, pair.Value); 218Add(pair.Key, pair.Value); 271=> Add(keyValuePair.Key, keyValuePair.Value); 276if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 287if (!RoslynUnsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234return new DictionaryEntry(_current.Key, _current.Value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1261return new DictionaryEntry(_current.Key, _current.Value); 1287return _current.Value;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
650dictionary.Add(pair.Key, pair.Value.ToImmutableAndFree());
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
139wildcardNamesBuilder.ToImmutableDictionaryAndFree(x => x.Key, x => x.Value.ToImmutableDictionaryAndFree(), wildcardNamesBuilder.Comparer));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
81var added = instance.TryAdd(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
81instance.Add(kvp.Key, kvp.Value);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
80var severity = kvp.Value;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
59this.Add(kv.Key, kv.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
48=> SymbolWritesMap.SelectAsArray(kvp => !kvp.Value, kvp => kvp.Key); 61return kvp.Value;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
25backwardMap: ImmutableDictionary.CreateRange(valueComparer, pairs.Select(static p => KeyValuePair.Create(p.Value, p.Key))))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
253if (predicate(entry.Key, entry.Value, arg))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
236var importContainer = addImportsService.GetImportContainer(root, context, importToSyntax.First().Value, options); 247selector: kvp => kvp.Value);
Roslyn.Diagnostics.CSharp.Analyzers (6)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
23return dictionary.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.AsImmutable());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (3)
75return (default(SyntaxTriviaList), GetLeadingTriviaAtBeginningOfTree(pair.Key, pair.Value, cancellationToken)); 78if (pair.Value is TriviaDataWithList csharpTriviaData) 89var text = pair.Value.GetTextChanges(GetTextSpan(pair.Key)).Single().NewText ?? "";
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
94GenerateAttributeSyntax(argument.Value)));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
299var result = MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, memberAccess, IdentifierName(constant.Value));
rzc (1)
ConcurrentLruCache.cs (1)
51UnsafeAdd(kvp.Key, kvp.Value);
ScenarioTests.Common.Tests (1)
ScenarioTestTypes.cs (1)
231workItem.Key(workItem.Value);
sdk-tasks (10)
_generated\1\SdkTasksJsonSerializerContext.DictionaryStringMetadataEntry.g.cs (1)
60MetadataEntrySerializeHandler(writer, entry.Value);
CalculateTemplateVersions.cs (3)
68string majorMinorWithoutDots = g.Value.MajorMinorVersion.Replace(".", ""); 72componentItem.SetMetadata("TemplatesMajorMinorVersion", g.Value.MajorMinorVersion); 75componentItem.SetMetadata("MSIVersion", GenerateMsiVersionFromFullVersion.GenerateMsiVersion(CombinedBuildNumberAndRevision, g.Value.MajorMinorPatchVersion));
PublishMutationUtilities.cs (3)
22var targetObj = target.Value!.AsObject(); 29var targetLibraryValue = targetLibrary.Value; 40var libraryValue = library.Value;
RemoveAssetFromDepsPackages.cs (3)
39foreach (var pv in target.Value!.AsObject()) 41var section = pv.Value![sectionName]; 47pv.Value.AsObject().Remove(sectionName);
SelectTests (8)
Program.cs (7)
824.OrderByDescending(g => g.Value.Count) 830if (orderedGroups.Count > 0 && tests.Count >= 10 && orderedGroups[0].Value.Count >= 5) 834$"⚠️ {top.Value.Count} of the {tests.Count} selected test projects come from a single change — {CauseGroupDescriptor(top.Key)}."); 846var direct = members.Where(m => m.Value.Kind is CauseKind.Convention or CauseKind.PathRule).Select(m => m.Key).OrderBy(p => p, StringComparer.Ordinal).ToList(); 847var graph = members.Where(m => m.Value.Kind is CauseKind.Layer1Graph).OrderBy(m => m.Key, StringComparer.Ordinal).ToList(); 848var other = members.Where(m => m.Value.Kind is not (CauseKind.Convention or CauseKind.PathRule or CauseKind.Layer1Graph)).Select(m => m.Key).OrderBy(p => p, StringComparer.Ordinal).ToList(); 903if (member.Value is { Kind: CauseKind.Layer1Graph, Path: { Count: > 0 } path })
TestSelector.cs (1)
331causes.ToDictionary(kv => kv.Key, kv => (IReadOnlyList<Cause>)kv.Value, StringComparer.Ordinal);
Shared (1)
LogBuffering\SerializedLogRecordFactory.cs (1)
33string value = attributes[i].Value?.ToString() ?? string.Empty;
Shared.Tests (6)
Generated\361d1da7f942c932\TestTypesContext.DictionaryStringInt32.g.cs (1)
59writer.WriteNumber(entry.Key, entry.Value);
Generated\361d1da7f942c932\TestTypesContext.DictionaryStringSimplePoco.g.cs (1)
60SimplePocoSerializeHandler(writer, entry.Value);
Generated\361d1da7f942c932\TestTypesContext.StructDictionaryStringInt32.g.cs (1)
53writer.WriteNumber(entry.Key, entry.Value);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.DerivedDictionary.g.cs (1)
59writer.WriteNumber(entry.Key, entry.Value);
JsonSchemaExporter\SchemaTestHelpers.cs (1)
38.SelectMany(d => d.Errors!.Select(error => $"Path:${d.InstanceLocation} {error.Key}:{error.Value}"));
JsonSchemaExporter\TestTypes.cs (1)
1172private readonly IReadOnlyDictionary<TKey, TValue> _dictionary = values.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
Stress.TelemetryService (1)
TelemetryStresser.cs (1)
176point.Attributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } });
System.Collections (39)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
23Value = keyValue.Value;
System\Collections\Generic\OrderedDictionary.cs (19)
297SetAt(index, tpair.Key, tpair.Value); 347set => SetAt(index, value.Key, value.Value); 515Add(pair.Key, pair.Value); 522Add(pair.Key, pair.Value); 1178if (EqualityComparer<TValue>.Default.Equals(item.Value, _entries[index].Value)) 1188void IList<KeyValuePair<TKey, TValue>>.Insert(int index, KeyValuePair<TKey, TValue> item) => Insert(index, item.Key, item.Value); 1191void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => Add(item.Key, item.Value); 1200EqualityComparer<TValue>.Default.Equals(value, item.Value); 1223if (TryGetValue(item.Key, out TValue? value, out int index) && EqualityComparer<TValue>.Default.Equals(value, item.Value)) 1334Add(pair.Key, pair.Value); 1342EqualityComparer<TValue>.Default.Equals(v, pair.Value); 1363Insert(index, pair.Key, pair.Value); 1414new DictionaryEntry(Current.Key, Current.Value) : 1418readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value); 1424readonly object? IDictionaryEnumerator.Value => Current.Value; 1718get => _dictionary.GetAt(index).Value; 1723TValue IReadOnlyList<TValue>.this[int index] => _dictionary.GetAt(index).Value; 1728get => _dictionary.GetAt(index).Value; 1888public TValue Current => _enumerator.Current.Value;
System\Collections\Generic\SortedDictionary.cs (16)
72if (keyValuePair.Value == null) 74return node.Item.Value == null; 78return EqualityComparer<TValue>.Default.Equals(node.Item.Value, keyValuePair.Value); 90if (EqualityComparer<TValue>.Default.Equals(node.Item.Value, keyValuePair.Value)) 118return node.Item.Value; 215if (node.Item.Value == null) 228if (valueComparer.Equals(node.Item.Value, value)) 267value = node.Item.Value; 466return new DictionaryEntry(Current.Key, Current.Value); 495return Current.Value; 508return new DictionaryEntry(Current.Key, Current.Value); 706_dictionary._set.InOrderTreeWalk(delegate (TreeSet<KeyValuePair<TKey, TValue>>.Node node) { array[index++] = node.Item.Value; return true; }); 739_dictionary._set.InOrderTreeWalk(delegate (TreeSet<KeyValuePair<TKey, TValue>>.Node node) { objects[index++] = node.Item.Value; return true; }); 811return _dictEnum.Current.Value;
System\Collections\Generic\SortedList.cs (3)
191Add(keyValuePair.Key, keyValuePair.Value); 197if (index >= 0 && EqualityComparer<TValue>.Default.Equals(values[index], keyValuePair.Value)) 207if (index >= 0 && EqualityComparer<TValue>.Default.Equals(values[index], keyValuePair.Value))
System.Collections.Concurrent (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
23Value = keyValue.Value;
System\Collections\Concurrent\OrderablePartitioner.cs (1)
251return _source.Current.Value;
System.Collections.Immutable (49)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
23Value = keyValue.Value;
System\Collections\Frozen\FrozenDictionary.cs (6)
57d[pair.Key] = pair.Value; 141newDictionary[pair.Key] = pair.Value; 429pairs[index++] = new KeyValuePair<TKey, TValue>(item.Key, item.Value); 436dictEntryArray[index++] = new DictionaryEntry(item.Key, item.Value); 450objects[index++] = new KeyValuePair<TKey, TValue>(item.Key, item.Value); 604EqualityComparer<TValue>.Default.Equals(value, item.Value);
System\Collections\Frozen\Int32\Int32FrozenDictionary.cs (1)
44_values[destIndex] = entries[srcIndex].Value;
System\Collections\Frozen\Integer\DenseIntegralFrozenDictionary.cs (3)
87values[index] = entry.Value; 102values[i] = entry.Value; 105optionalValues[int.CreateTruncating((TKeyUnderlying)(object)entry.Key) - min] = new(entry.Value, hasValue: true);
System\Collections\Frozen\KeysAndValuesFrozenDictionary.cs (1)
42_values[destIndex] = entries[srcIndex].Value;
System\Collections\Immutable\DictionaryEnumerator.cs (2)
21get { return new DictionaryEntry(_inner.Current.Key, _inner.Current.Value); } 31get { return _inner.Current.Value; }
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (4)
182yield return item.Value; 337array.SetValue(new DictionaryEntry(item.Key, item.Value), arrayIndex++); 544if (this.ValueComparer.Equals(value, item.Value)) 597this.Add(item.Key, item.Value);
System\Collections\Immutable\ImmutableDictionary_2.Comparers.cs (2)
105&& this.ValueComparer.Equals(x.FirstValue.Value, y.FirstValue.Value);
System\Collections\Immutable\ImmutableDictionary_2.cs (9)
30private static readonly Action<KeyValuePair<int, HashBucket>> s_FreezeBucketAction = (kv) => kv.Value.Freeze(); 174foreach (KeyValuePair<TKey, TValue> item in bucket.Value) 191foreach (KeyValuePair<TKey, TValue> item in bucket.Value) 193yield return item.Value; 485if (this.ValueComparer.Equals(value, item.Value)) 764array.SetValue(new DictionaryEntry(item.Key, item.Value), arrayIndex++); 896&& origin.ValueComparer.Equals(value, keyValuePair.Value); 969ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Add(pair.Key, pair.Value, origin.KeyOnlyComparer, origin.ValueComparer, collisionBehavior, out result); 993ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Add(pair.Key, pair.Value, origin.KeyOnlyComparer, origin.ValueComparer, collisionBehavior, out result);
System\Collections\Immutable\ImmutableDictionary_2.Enumerator.cs (1)
89_bucketEnumerator = new HashBucket.Enumerator(_mapEnumerator.Current.Value);
System\Collections\Immutable\ImmutableDictionary_2.HashBucket.cs (4)
160if (!valueComparer.Equals(_firstValue.Value, value)) 192if (!valueComparer.Equals(existingEntry.Value, value)) 270value = _firstValue.Value; 282value = _additionalElements.ItemRef(index).Value;
System\Collections\Immutable\ImmutableHashSet_1.cs (1)
32private static readonly Action<KeyValuePair<int, HashBucket>> s_FreezeBucketAction = (kv) => kv.Value.Freeze();
System\Collections\Immutable\ImmutableHashSet_1.Enumerator.cs (1)
89_bucketEnumerator = new HashBucket.Enumerator(_mapEnumerator.Current.Value);
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (2)
297newRoot = newRoot.Add(item.Key, item.Value, value, _valueComparer, out mutated); 471this.Add(item.Key, item.Value);
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (5)
795? result.SetItem(item.Key, item.Value, _keyComparer, _valueComparer, out replacedExistingValue, out mutated) 796: result.Add(item.Key, item.Value, _keyComparer, _valueComparer, out mutated); 856dictionary[item.Key] = item.Value; 863if (!_valueComparer.Equals(value, item.Value)) 870dictionary.Add(item.Key, item.Value);
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (5)
144get { return Linq.Enumerable.Select(this, p => p.Value); } 222array.SetValue(new DictionaryEntry(item.Key, item.Value), arrayIndex++); 396if (valueComparer.Equals(value, item.Value)) 425return valueComparer.Equals(matchingNode._value, pair.Value); 605return new Node(item.Key, item.Value, left, right, true);
System\Collections\Immutable\SortedInt32KeyNode.cs (1)
134yield return pair.Value;
System.Collections.NonGeneric (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
23Value = keyValue.Value;
System.CommandLine (3)
Parsing\ParseOperation.cs (1)
386if (kvp is { Key: Option { Action: { Terminating: false } action }, Value: OptionResult { Implicit: true } } &&
Parsing\SymbolResultTree.cs (2)
52if (ReferenceEquals(parent, pair.Value.Parent)) 54yield return pair.Value;
System.ComponentModel.Annotations (6)
System\ComponentModel\DataAnnotations\Validator.cs (6)
728property.Value, property.Key, attributes, 786var validationResult = reqAttr.GetValidationResult(property.Value, property.Key); 789errors.Add(new ValidationError(reqAttr, property.Value, validationResult!)); 1084errors.AddRange(GetValidationErrors(property.Value, property.Key, attributes, breakOnFirstError)); 1095var validationResult = reqAttr.GetValidationResult(property.Value, property.Key); 1098errors.Add(new ValidationError(reqAttr, property.Value, validationResult!));
System.ComponentModel.Composition (7)
Microsoft\Internal\Requires.cs (1)
86if (keyValue.Key is null || keyValue.Value is null)
System\ComponentModel\Composition\ConstraintServices.cs (1)
78body = Expression.AndAlso(body, CreateMetadataOfTypeExpression(parameter, requiredMetadataItem.Key, requiredMetadataItem.Value));
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (2)
249_values![index].Key, _values[index].Value); 271value = (T)_values[index].Value!;
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (3)
226if ((metadataItem.Key == null) || (metadataItem.Value == null)) 322Type metadataValueType = metadataItem.Value; 376sb.Append("\n\t\t").Append(metadataItem.Key).Append("\t(").Append(metadataItem.Value).Append(')');
System.ComponentModel.TypeConverter (11)
System\ComponentModel\CollectibleKeyConcurrentHashtable.cs (1)
118if (_collectibleEnumerator.Current.Value is TValue value)
System\ComponentModel\ComponentResourceManager.cs (6)
164if (prop != null && !prop.IsReadOnly && (kvp.Value == null || prop.PropertyType.IsInstanceOfType(kvp.Value))) 166prop.SetValue(value, kvp.Value); 189if (prop != null && prop.CanWrite && (kvp.Value == null || prop.PropertyType.IsInstanceOfType(kvp.Value))) 191prop.SetValue(value, kvp.Value, null);
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
863if (kvp.Key.Module == module && kvp.Value!.IsPopulated)
System\ComponentModel\TypeDescriptor.cs (3)
2341TypeDescriptionNode? node = (TypeDescriptionNode?)kvp.Value; 2421TypeDescriptionNode? node = (TypeDescriptionNode?)kvp.Value; 2479TypeDescriptionNode? node = (TypeDescriptionNode?)kvp.Value;
System.Composition.Hosting (1)
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (1)
49var descriptors = result.Value.GetResults().Select(cb => cb.GetDescriptor()).ToArray();
System.Composition.Runtime (8)
System\Composition\Hosting\Core\CompositionContract.cs (8)
113_metadataConstraints.Select(kv => $"{kv.Key} = {Formatters.Format(kv.Value)}"))); 188if (firstItem.Value == null) 198if (firstItem.Value is IEnumerable firstEnumerable && !(firstEnumerable is string)) 204else if (!firstItem.Value.Equals(secondValue)) 220if (kv.Value != null) 222if (kv.Value is string sval) 228if (kv.Value is IEnumerable enumerableValue) 236result ^= kv.Value.GetHashCode();
System.Composition.TypedParts (1)
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
91Expression.Constant(d.Value.Target.GetDescriptor().Activator),
System.Configuration.ConfigurationManager (1)
System\Configuration\BaseConfigurationRecord.cs (1)
438List<SectionInput> inputsPerConfigKey = keyValuePair.Value;
System.Data.Common (22)
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (1)
491string value1 = entry.Value;
System\Data\Common\DbConnectionStringBuilder.cs (1)
326if (!connectionStringBuilder.CurrentValues.TryGetValue(entry.Key, out value) || !entry.Value.Equals(value))
System\Data\Common\DbProviderFactories.cs (1)
97newRow[AssemblyQualifiedNameColumnName] = kvp.Value.FactoryTypeAssemblyQualifiedName;
System\Data\Common\ObjectStorage.cs (18)
614tmp.Add(entry.Key, entry.Value); 627key.Value.ElementName = attribute.ElementName; 628key.Value.Namespace = attribute.Namespace; 629key.Value.DataType = attribute.DataType; 630key.Value.IsNullable = attribute.IsNullable; 650(((x.Value == null) && (y.Value == null)) || // XmlRootAttribute both null 651((x.Value != null) && (y.Value != null) && // XmlRootAttribute both with value 652(x.Value.ElementName == y.Value.ElementName) && // all attribute elements are equal 653(x.Value.Namespace == y.Value.Namespace) && 654(x.Value.DataType == y.Value.DataType) && 655(x.Value.IsNullable == y.Value.IsNullable)))); 660return unchecked(obj.Key.GetHashCode() + obj.Value.ElementName.GetHashCode());
System\Data\DataView.cs (1)
1563entry.Value.RemoveRef();
System.Data.Odbc (11)
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (1)
491string value1 = entry.Value;
src\runtime\src\libraries\Common\src\System\Data\ProviderBase\DbConnectionFactory.cs (7)
49DbConnectionPoolGroup poolGroup = entry.Value; 224newConnectionPoolGroups.Add(entry.Key, entry.Value); 307if (null != entry.Value) 309Debug.Assert(!entry.Value.IsDisabled, "Disabled pool entry discovered"); 314if (entry.Value.Prune()) 316QueuePoolGroupForRelease(entry.Value); 320newConnectionPoolGroups.Add(entry.Key, entry.Value);
src\runtime\src\libraries\Common\src\System\Data\ProviderBase\DbConnectionPoolGroup.cs (3)
120DbConnectionPool pool = entry.Value; 241DbConnectionPool pool = entry.Value; 261newPoolCollection.TryAdd(entry.Key, entry.Value);
System.Data.OleDb (13)
OleDbConnectionStringBuilder.cs (3)
437OleDbPropertyInfo info = entry.Value; 455OleDbPropertyInfo info = entry.Value; 486OleDbPropertyInfo info = entry.Value;
System\Data\ProviderBase\DbConnectionFactory.cs (7)
55entry.Value?.Clear(); 386newConnectionPoolGroups.Add(entry.Key, entry.Value); 493if (null != entry.Value) 495Debug.Assert(!entry.Value.IsDisabled, "Disabled pool entry discovered"); 500if (entry.Value.Prune()) 503QueuePoolGroupForRelease(entry.Value); 507newConnectionPoolGroups.Add(entry.Key, entry.Value);
System\Data\ProviderBase\DbConnectionPoolGroup.cs (3)
144DbConnectionPool pool = entry.Value; 275DbConnectionPool pool = entry.Value; 303newPoolCollection.TryAdd(entry.Key, entry.Value);
System.Diagnostics.DiagnosticSource (39)
src\runtime\src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (4)
61if (pair.Key == pair1.Key && object.Equals(pair.Value, pair1.Value)) 101if (pair.Key == pair1.Key && object.Equals(pair.Value, pair1.Value))
System\Diagnostics\Activity.cs (11)
444return keyValue.Value; 1661public BaggageLinkedList(KeyValuePair<string, string?> firstValue, bool set = false) => _first = ((set && firstValue.Value == null) ? null : new DiagNode<KeyValuePair<string, string?>>(firstValue)); 1678if (value.Value == null) 1745public TagsLinkedList(KeyValuePair<string, object?> firstValue, bool set = false) => _last = _first = ((set && firstValue.Value == null) ? null : new DiagNode<KeyValuePair<string, object?>>(firstValue)); 1815return current.Value.Value; 1862if (value.Value == null) 1906if (current.Value.Value is string || current.Value.Value == null) 1908yield return new KeyValuePair<string, string?>(current.Value.Key, (string?)current.Value.Value); 1927_stringBuilder.Append(_first.Value.Value); 1935_stringBuilder.Append(current.Value.Value);
System\Diagnostics\ActivityLink.netcoreapp.cs (1)
25hashCode.Add(kvp.Value);
System\Diagnostics\ActivityTagsCollection.cs (4)
45this[kvp.Key] = kvp.Value; 63return index < 0 ? null : _list[index].Value; 117list.Add(kvp.Value); 245value = _list[index].Value;
System\Diagnostics\DiagLinkedList.cs (2)
178vsb.Append(kvp.Value?.ToString() ?? "null"); 203vsb.Append(kvp.Value?.ToString() ?? "null");
System\Diagnostics\DistributedContextPropagator.cs (1)
140baggageList.Append(WebUtility.UrlEncode(item.Key)).Append('=').Append(WebUtility.UrlEncode(item.Value)).Append(CommaWithSpace);
System\Diagnostics\DsesFilterAndTransform.cs (2)
478if (keyValue.Value != null) 531var outputArgs = this.Morph(evnt.Value);
System\Diagnostics\Helpers.cs (2)
33sb.Append(tag.Key).Append('=').Append(tag.Value); 48sb.Append(labels[i].Key).Append('=').Append(labels[i].Value);
System\Diagnostics\Metrics\AggregationManager.cs (2)
512kv.Value.Collect(kv.Key, (LabeledAggregationStatistics labeledAggStats) => 514_collectMeasurement(kv.Key, labeledAggStats, kv.Value);
System\Diagnostics\Metrics\AggregatorStore.cs (3)
460indexedValues[i] = labels[instr.SourceIndex].Value; 495foreach (KeyValuePair<TObjectSequence, TAggregator> kvValue in kvName.Value) 507IAggregationStatistics stats = kvValue.Value.Collect();
System\Diagnostics\Metrics\MeterListener.cs (1)
289measurementsCompleted?.Invoke(kvp.Key, kvp.Value);
System\Diagnostics\Metrics\TagList.netcore.cs (4)
282if (item.Value is not null) 286if (item.Key == tags[i].Key && item.Value.Equals(tags[i].Value)) 296if (item.Key == tags[i].Key && tags[i].Value is null)
System\Diagnostics\W3CPropagator.cs (2)
256if (!string.IsNullOrEmpty(item.Value)) 258EncodeBaggageValue(item.Value, ref encodedBaggage);
System.Diagnostics.EventLog (1)
System\Diagnostics\Reader\ProviderMetadataCachedInformation.cs (1)
114TimeSpan timeDifference = timeNow.Subtract(kvp.Value.TheTime);
System.Diagnostics.PerformanceCounter (1)
System\Diagnostics\PerformanceData\CounterSet.cs (1)
237CounterInfo->CounterType = (uint)CounterDef.Value;
System.Diagnostics.Process (8)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.ForkAndExecProcess.cs (4)
162if (pair.Value is not null) 165dataByteLength = checked(dataByteLength + Encoding.UTF8.GetByteCount(pair.Key) + 1 + Encoding.UTF8.GetByteCount(pair.Value) + 1); 185if (pair.Value is not null) 191int valueBytes = Encoding.UTF8.GetBytes(pair.Value, data.Slice(dataOffset + keyBytes + 1));
System\Collections\Specialized\DictionaryWrapper.cs (2)
50public void Add(KeyValuePair<string, string?> item) => Add(item.Key, item.Value); 58return _contents.ContainsKey(item.Key) && _contents[item.Key] == item.Value;
System\Collections\Specialized\StringDictionaryWrapper.cs (1)
57yield return new DictionaryEntry(keyValuePair.Key, keyValuePair.Value);
System\Diagnostics\ProcessWaitState.Unix.cs (1)
660ProcessWaitState pws = kv.Value;
System.DirectoryServices.AccountManagement (25)
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_LoadStore.cs (17)
1329if (!kvp.Value.Filter && null != kvp.Value.Value && kvp.Value.Value.Length != 0) 1334GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "ExtensionCacheToLdapConverter - Value Type " + kvp.Value.Value.GetType().ToString()); 1336if ((kvp.Value.Value.Length == 1 && kvp.Value.Value[0] is ICollection) || (kvp.Value.Value.Length > 1)) 1338if (kvp.Value.Value.Length > 1 && (kvp.Value.Value[0] is ICollection)) 1346if (kvp.Value.Value.Length == 1 && kvp.Value.Value[0] is ICollection && !(kvp.Value.Value[0] is byte[])) 1348valueCollection = (ICollection)kvp.Value.Value[0]; 1352valueCollection = (ICollection)kvp.Value.Value; 1386GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "ExtensionCacheToLdapConverter - Adding " + kvp.Value.Value.ToString()); 1389if (p.unpersisted && (null == kvp.Value.Value[0])) 1392de.Properties[kvp.Key].Value = kvp.Value.Value[0];
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (8)
980Type type = kvp.Value.Type ?? kvp.Value.Value.GetType(); 983GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "ExtensionCacheConverter match type " + kvp.Value.MatchType.ToString()); 985if (kvp.Value.Value is ICollection) 989ICollection collection = (ICollection)kvp.Value.Value; 993query.Append(ExtensionTypeConverter(kvp.Key, o.GetType(), o, kvp.Value.MatchType)); 998query.Append(ExtensionTypeConverter(kvp.Key, type, kvp.Value.Value, kvp.Value.MatchType));
System.Formats.Tar (19)
System\Formats\Tar\TarHeader.cs (2)
150_ea.Add(kvp.Key, kvp.Value); 161if (extendedAttribute.Value.Contains('\n'))
System\Formats\Tar\TarHeader.Read.cs (16)
105_ea.Add(extendedAttribute.Key, extendedAttribute.Value); 110values.Name = extendedAttribute.Value; 113values.LinkName = extendedAttribute.Value; 116values.MTime = extendedAttribute.Value; 119values.Mode = extendedAttribute.Value; 122values.Size = extendedAttribute.Value; 125values.GnuSparseName = extendedAttribute.Value; 128values.GnuSparseRealSize = extendedAttribute.Value; 131values.GnuSparseMajor = extendedAttribute.Value; 134values.GnuSparseMinor = extendedAttribute.Value; 137values.Uid = extendedAttribute.Value; 140values.Gid = extendedAttribute.Value; 143values.UName = extendedAttribute.Value; 146values.GName = extendedAttribute.Value; 149values.DevMajor = extendedAttribute.Value; 152values.DevMinor = extendedAttribute.Value;
System\Formats\Tar\TarHelpers.Unix.cs (1)
114File.SetUnixFileMode(dir.Key, dir.Value & ~umask);
System.IO.Packaging (6)
System\IO\Packaging\Package.cs (1)
1216_partList.Add(keyValue.Key, keyValue.Value);
System\IO\Packaging\PartBasedPackageProperties.cs (4)
773Debug.Assert(entry.Value != null); 780if (entry.Value is Nullable<DateTime>) 797_xmlWriter.WriteString(XmlConvert.ToString(((Nullable<DateTime>)entry.Value).Value.ToUniversalTime(), "yyyy-MM-ddTHH:mm:ss.fffffffZ")); 802_xmlWriter.WriteString(entry.Value.ToString());
System\IO\Packaging\XmlCompatibilityReader.cs (1)
117if (pair.Value == oldNamespace)
System.Linq.AsyncEnumerable (1)
System\Linq\ToDictionaryAsync.cs (1)
40d.Add(element.Key, element.Value);
System.Linq.Expressions (10)
System\Dynamic\ExpandoObject.cs (3)
675TryAddMember(item.Key, item.Value); 710return object.Equals(value, item.Value); 730return TryDeleteValue(null, -1, item.Key, ignoreCase: false, deleteValue: item.Value);
System\Linq\Expressions\Compiler\BoundConstants.cs (2)
131if (ShouldCache(reference.Value)) 148if (ShouldCache(reference.Value))
System\Linq\Expressions\Compiler\CompilerScope.cs (1)
369if (ShouldCache(refCount.Key, refCount.Value))
System\Linq\Expressions\Interpreter\InstructionList.cs (1)
129cookie = cookieEnumerator.Current.Value;
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
339kvp.Value.ValidateFinish();
System\Linq\Expressions\Interpreter\Utilities.cs (2)
190value = _keysAndValues[i].Value; 324_dict[_keysAndValues[i].Key] = _keysAndValues[i].Value;
System.Linq.Parallel (11)
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (1)
315Pair<TInputOutput, TLeftKey> currentPair = _outputEnumerator.Current.Value;
System\Linq\Parallel\QueryOperators\Binary\GroupJoinQueryOperator.cs (1)
330lookup[i].Value._grouping.DoneAdding();
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (1)
386Pair<TInputOutput, ConcatKey<TLeftKey, TRightKey>> current = _outputEnumerator.Current.Value;
System\Linq\Parallel\QueryOperators\PartitionerQueryOperator.cs (1)
221currentElement = current.Value;
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (1)
263currentKey = currentPair.Value;
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (6)
484GroupKeyData value = mutables._hashLookup[mutables._hashLookupIndex].Value; 590hashLookup[j].Value._grouping.DoneAdding(); 666hashLookup[j].Value._grouping.DoneAdding(); 689Debug.Assert(keyValues.Value != null); 711Debug.Assert(_keyValues.Value != null); 712return _keyValues.Value.GetEnumerator();
System.Net.Http (20)
System\Net\Http\DiagnosticsHandler.cs (1)
122activity.SetTag(methodTag.Key, methodTag.Value);
System\Net\Http\FormUrlEncodedContent.cs (1)
42Encode(ref builder, pair.Value);
System\Net\Http\Headers\HttpHeaders.cs (1)
1477Value = entry.Value
System\Net\Http\Headers\HttpHeadersNonValidated.cs (1)
115yield return header.Value;
System\Net\Http\Metrics\MetricsHandler.cs (2)
123yield return new Measurement<long>(entry.Value, entry.Key.ToTagList()); 271string method = (string)DiagnosticsHelper.GetMethodTag(request.Method, out _).Value!;
System\Net\Http\MultipartContent.cs (2)
325foreach (string value in headerPair.Value) 369foreach (string value in headerPair.Value)
System\Net\Http\SocketsHttpHandler\FailedProxyCache.cs (1)
126if (curTicks >= kvp.Value)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (5)
979kvp.Value.OnWindowUpdate(delta); 1119Debug.Assert(streamId == kvp.Value.StreamId); 1123streamsToAbort.Add(kvp.Value); 1917Debug.Assert(streamId == kvp.Value.StreamId); 1919streamsToAbort.Add(kvp.Value);
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (2)
442if (request.Value.StreamId >= firstRejectedStreamId) 444streamsToGoAway.Add(request.Value);
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (3)
499pool.Value.Dispose(); 526if (entry.Value.CleanCacheAndDisposeIfUnused()) 556anyLiveConnections |= pool.Value.HeartBeat();
System\Net\Http\SocketsHttpHandler\Metrics\SocketsHttpHandlerMetrics.cs (1)
128yield return new Measurement<long>(entry.Value, entry.Key.ToTagList());
System.Net.Http.WinHttpHandler (1)
System\Net\Http\WinHttpHandler.cs (1)
1753if (IsStale(kvPair.Value.LastUsedTime))
System.Net.Mail (5)
System\Net\Mime\MediaTypeMap.cs (5)
739s_mediaTypeToExtension.ContainsKey(entry.Value), 740$"Missing '{entry.Value}' in {nameof(s_mediaTypeToExtension)}"); 750s_extensionToMediaType.ContainsKey(entry.Value), 751$"Missing '{entry.Value}' in {nameof(s_extensionToMediaType)}"); 753longestExtensionLength = Math.Max(longestExtensionLength, entry.Value.Length);
System.Net.NameResolution (4)
System\Net\Dns.cs (4)
766KeyValuePair<string, AddressFamily> t => GetHostAddressesCore(t.Key, t.Value, activity), 768KeyValuePair<IPAddress, AddressFamily> t => GetHostAddressesCore(t.Key, t.Value, activity), 777KeyValuePair<string, AddressFamily> t => GetHostEntryCore(t.Key, t.Value, activity), 779KeyValuePair<IPAddress, AddressFamily> t => GetHostEntryCore(t.Key, t.Value, activity),
System.Net.NetworkInformation (2)
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (2)
282ExecutionContext? ec = subscriber.Value; 324ExecutionContext? ec = subscriber.Value;
System.Net.Requests (3)
System\Net\HttpWebResponse.cs (2)
205_webHeaderCollection[header.Key] = GetHeaderValueAsString(header.Value); 212_webHeaderCollection[header.Key] = GetHeaderValueAsString(header.Value);
System\Net\ServicePoint\ServicePointManager.cs (1)
135if (!entry.Value.TryGetTarget(out _))
System.Net.Security (2)
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (1)
205mechListWriter.WriteObjectIdentifier(packageAndOid.Value);
System\Net\Security\SslSessionsCache.cs (1)
223SafeCredentialReference? cached = toRemoveAttempt[i].Value;
System.Net.WebSockets.Client (2)
System\Net\WebSockets\HttpResponseHeadersReadOnlyCollection.cs (2)
36yield return header.Value; 49yield return new KeyValuePair<string, IEnumerable<string>>(header.Key, header.Value);
System.Private.CoreLib (54)
src\runtime\src\libraries\System.Private.CoreLib\src\System\AppContext.AnyOS.cs (2)
49ev.LogAppContextSwitch(kvp.Key, kvp.Value ? 1 : 0); 75if (kvp.Value is string s &&
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (6)
343if (!TryAddInternal(_tables, pair.Key, null, pair.Value, updateIfExists: false, acquireLock: false, out _)) 428return TryRemoveInternal(item.Key, out _, matchValue: true, item.Value); 1602void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => ((IDictionary<TKey, TValue>)this).Add(keyValuePair.Key, keyValuePair.Value); 1615EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value); 2296public DictionaryEntry Entry => new DictionaryEntry(_enumerator.Current.Key, _enumerator.Current.Value); 2300public object? Value => _enumerator.Current.Value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
23Value = keyValue.Value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (10)
171Add(pair.Key, pair.Value); 179Add(pair.Key, pair.Value); 255Add(keyValuePair.Key, keyValuePair.Value); 260if (!Unsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 271if (!Unsafe.IsNullRef(ref value) && EqualityComparer<TValue>.Default.Equals(value, keyValuePair.Value)) 1234Add(array[i].Key, array[i].Value); 1934return new DictionaryEntry(_current.Key, _current.Value); 1937return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value); 1961return new DictionaryEntry(_current.Key, _current.Value); 1987return _current.Value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\KeyValuePair.cs (2)
47return KeyValuePair.PairToString(Key, Value); 54value = Value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (4)
189dictEntryArray[index++] = new DictionaryEntry(item.Key, item.Value); 199objects[index++] = new KeyValuePair<TKey, TValue>(item.Key, item.Value); 227get => new DictionaryEntry(_enumerator.Current.Key, _enumerator.Current.Value); 232public object? Value => _enumerator.Current.Value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\DiagnosticCounter.cs (3)
135return current.Key + ":" + current.Value; 140StringBuilder sb = new StringBuilder().Append(current.Key).Append(':').Append(current.Value); 144sb.Append(',').Append(current.Key).Append(':').Append(current.Value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
2350if (entry.Value)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\ManifestBuilder.cs (4)
187channelMask[item.Key] = item.Value.Keywords; 371sortedChannels.Sort((p1, p2) => -Comparer<ulong>.Default.Compare(p1.Value.Keywords, p2.Value.Keywords)); 376ChannelInfo channelInfo = kvpair.Value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\NameInfo.cs (1)
60return this.Compare(key.Key, key.Value & Statics.EventTagsMask);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Environment.Variables.Unix.cs (1)
70results.Add(keyValuePair.Key, keyValuePair.Value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceSet.cs (1)
223caseTable.Add(s, item.Value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (2)
290alcSnapshot[pos++] = item.Value; 523if (alcAlive.Value.TryGetTarget(out AssemblyLoadContext? alc))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
164result[j++] = pair.Value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (14)
173value = _item0.Value; 225value = _item0.Value; 230value = _item1.Value; 287value = _item0.Value; 292value = _item1.Value; 297value = _item2.Value; 358value = _item0.Value; 363value = _item1.Value; 368value = _item2.Value; 373value = _item3.Value; 458many[pair.Key] = pair.Value; 470value = pair.Value; 496map[pair.Key] = pair.Value; 532map[pair.Key] = pair.Value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SynchronizationContext.cs (1)
25=> ThreadPool.QueueUserWorkItem(static s => s.Key(s.Value), new KeyValuePair<SendOrPostCallback, object?>(d, state), preferLocal: false);
System.Private.DataContractSerialization (7)
System\Runtime\Serialization\CollectionDataContract.cs (1)
1643return new KeyValue<K, V>(current.Key, current.Value);
System\Runtime\Serialization\DataContractSet.cs (2)
45InternalAdd(pair.Key, pair.Value); 52ProcessedContracts.Add(pair.Key, pair.Value);
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
287CollectionDataContract? collectionDataContract = knownDataContract.Value as CollectionDataContract;
System\Runtime\Serialization\Json\JsonXmlDataContract.cs (1)
81knownTypesList.Add(pair.Value.UnderlyingType);
System\Runtime\Serialization\SchemaExporter.cs (1)
49DataContract dataContract = pair.Value;
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (1)
958xmlAttributes.Add(AddNamespaceDeclaration(prefixNsPair.Key, prefixNsPair.Value));
System.Private.Reflection.Execution (4)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.MappingTables.cs (4)
503if (perModuleLookup.Value.TryGetOffsetsRange(canonOriginalLdFtnResult, out startIndex, out endIndex)) 507uint parserOffset = perModuleLookup.Value.Data[curIndex].Offset; 527if (perModuleLookup.Value.TryGetOffsetsRange(methodStartAddress, out startIndex, out endIndex)) 531uint parserOffset = perModuleLookup.Value.Data[curIndex].Offset;
System.Private.TypeLoader (2)
Internal\Reflection\Execution\AssemblyBinderImplementation.cs (2)
65QScopeDefinition scopeDefinitionGroup = group.Value; 86QScopeDefinition scopeDefinitionGroup = group.Value;
System.Private.Xml (26)
System\Xml\Dom\DocumentSchemaValidator.cs (1)
462defaultNS = _nameTable.Add(pair.Value);
System\Xml\Dom\XmlDocument.cs (2)
664SchemaAttDef attdef = attrDefs.Value; 1670SchemaAttDef attdef = attrDefs.Value;
System\Xml\Dom\XmlLoader.cs (2)
657SchemaElementDecl elementDecl = elementDecls.Value; 662SchemaAttDef attdef = attDefs.Value;
System\Xml\Schema\ContentValidator.cs (8)
151match.Add(wildcard.Value); 205if (name.Value == symbol) 215if (wildcard.Value == symbol) 2199if (!context.AllElementsSet![element.Value] && (!isRequiredOnly || _isRequired[element.Value])) 2214if (!context.AllElementsSet![element.Value] && (!isRequiredOnly || _isRequired[element.Value])) 2216AddParticleToExpected((_particles[element.Value] as XmlSchemaParticle)!, schemaSet, expectedParticles);
System\Xml\Schema\SchemaInfo.cs (2)
309_elementDecls.Add(entry.Key, entry.Value); 316_elementDeclsByType.Add(entry.Key, entry.Value);
System\Xml\Schema\XmlSchemaValidator.cs (1)
2144defaultNS = _nameTable.Add(pair.Value);
System\Xml\Serialization\CodeGenerator.cs (3)
1614(Type, string) key = (item.Value.LocalType, item.Key); 1620freeLocalQueue.Enqueue(item.Value); 1625freeLocalQueue.Enqueue(item.Value);
System\Xml\Serialization\Types.cs (2)
1215if (ShouldBeReplaced(pair.Value, structMapping.TypeDesc!.Type!, out replacedInfo)) 1227memberInfos[pair.Key] = pair.Value;
System\Xml\Serialization\XmlSerializerNamespaces.cs (1)
125if (!string.IsNullOrEmpty(nsPair.Key) && nsPair.Value.Namespace == ns)
System\Xml\XPath\XPathNavigator.cs (1)
1888mngr.AddNamespace(pair.Key, pair.Value);
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (2)
216foreach (Stylesheet import in pair.Value.Imports!) 281parentModeFlags[modeFlag.Key] = modeFlags | modeFlag.Value;
System\Xml\Xsl\Xslt\XsltInput.cs (1)
138string nsAtomizedValue = _atoms.NameTable.Add(prefixNamespacePair.Value);
System.Reflection.Emit (6)
System\Reflection\Emit\ModuleBuilderImpl.cs (6)
436PopulateSequencePointsBlob(spBlobBuilder, enumerator.Current.Value, ref previousNonHiddenStartLine, ref previousNonHiddenStartColumn); 460PopulateSequencePointsBlob(spBlobBuilder, pair.Value, ref previousNonHiddenStartLine, ref previousNonHiddenStartColumn); 467PopulateSequencePointsBlob(spBlobBuilder, pair.Value, ref previousNonHiddenStartLine, ref previousNonHiddenStartColumn); 616pair.Value.WriteInt32(MetadataTokens.GetToken(GetMemberHandle(member))); 621pair.Value.WriteInt32(MetadataTokens.GetToken(GetMethodReference(pair2.Key, pair2.Value)));
System.Reflection.Metadata (12)
System\Reflection\Metadata\Ecma335\BlobDictionary.cs (1)
48return entry.Value;
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (5)
560stringVirtualIndexToHeapOffsetMap[entry.Value.GetWriterVirtualIndex()] = position - (Encoding.UTF8.GetByteCount(entry.Key) + 1); 564stringVirtualIndexToHeapOffsetMap[entry.Value.GetWriterVirtualIndex()] = position; 627int heapOffset = entry.Value.Value.GetHeapOffset(); 628var blob = entry.Value.Key;
System\Reflection\Metadata\Internal\NamespaceCache.cs (4)
146namespaceTable.Add(group.Key, group.Value.Freeze()); 173NamespaceDataBuilder data = group.Value; 195table[tuple.Key] = tuple.Value; 307LinkChildToParentNamespace(namespaces, namespaceData.Value, ref virtualNamespaces);
System\Reflection\Metadata\Internal\VirtualHeap.cs (1)
62blobPair.Value.Handle.Free();
System\Reflection\Metadata\MetadataReader.cs (1)
1471nestedTypesMap.Add(group.Key, group.Value.ToImmutable());
System.Resources.Extensions (3)
src\runtime\src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
309_resourceList.Add(entry.Key, entry.Value); 322object? value = item.Value;
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (1)
368HashSet<SerializationRecordId> dependencies = pair.Value;
System.Resources.Writer (2)
src\runtime\src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
309_resourceList.Add(entry.Key, entry.Value); 322object? value = item.Value;
System.Runtime.Serialization.Schema (6)
System\Runtime\Serialization\Schema\CodeExporter.cs (5)
53DataContract dataContract = pair.Value; 75string clrNamespace = pair.Value ?? string.Empty; 213DataContract dataContract = pair.Value; 991if (classDataContract.XmlName != pair.Key && !classDataContract.KnownDataContracts.ContainsKey(pair.Key) && !pair.Value.IsBuiltInDataContract) 992classDataContract.KnownDataContracts.Add(pair.Key, pair.Value);
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (1)
304DataContract dataContract = pair.Value;
System.Security.Claims (1)
System\Security\Claims\Claim.cs (1)
497writer.Write(kvp.Value);
System.Security.Cryptography.Cose (3)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (3)
139public void Add(KeyValuePair<CoseHeaderLabel, CoseHeaderValue> item) => Add(item.Key, item.Value); 361CoseHeaderValue value = kvp.Value; 402CoseHeaderValue value = kvp.Value;
System.ServiceModel.Http (1)
System\ServiceModel\Channels\HttpResponseMessageExtensionMethods.cs (1)
72webHeaders[header.Key] = String.Join(",", header.Value);
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\ConnectionPool.cs (1)
94if (poolEntry.Value.CloseIfEmpty())
System.ServiceModel.Primitives (13)
System\ServiceModel\Channels\AddressHeaderCollection.cs (1)
155if (count != pair.Value)
System\ServiceModel\Channels\DeliveryStrategy.cs (1)
130using (ItemType item = items.Current.Value)
System\ServiceModel\Channels\MessageBuffer.cs (1)
108IDisposable disposable = _properties[i].Value as IDisposable;
System\ServiceModel\Channels\MessageProperties.cs (7)
483this[property.Key] = property.Value; 874if (pair.Value == null) 879UpdateProperty(pair.Key, pair.Value, true); 889if (pair.Value == null) 904return value.Equals(pair.Value); 971if (pair.Value == null) 986if (!value.Equals(pair.Value))
System\ServiceModel\Channels\ReliableMessagingHelpers.cs (1)
509AbortState(pair.Value, true);
System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (2)
357multipleHeaderValues[headerDescription.Index].Value.Add(item); 391parameters[i] = multipleHeaderValues[i].Value.ToArray(multipleHeaderValues[i].Key);
System.ServiceModel.Primitives.Tests (1)
ServiceModel\MessageContractTest.4.4.0.cs (1)
163properties[property.Key] = property.Value.ToString();
System.Speech (17)
Internal\SrgsCompiler\BackEnd.cs (2)
838Rule ruleCur = kvFirstArc.Value; 856ruleCur = kvFirstArc.Value;
Internal\Synthesis\TextWriterEngine.cs (2)
299if (kp.Value != null) 301_writer.WriteAttributeString(kp.Key, kp.Value);
Internal\Synthesis\VoiceSynthesis.cs (1)
1608kv.Value?.TtsEngine.ReleaseInterface();
Result\RecognizedPhrase.cs (10)
479InsertSemanticValueToDictionary(semanticValue, kv.Key, kv.Value, semanticTag, ref dupItems); 1067AppendAttributes(alternateNode, kv.Value); 1077if (_dupItems != null && _dupItems.Contains(kv.Value)) 1086if (kv.Value.Count > 0) 1088if (kv.Value.Value != null) 1090XmlText valueText = document.CreateTextNode(kv.Value.Value.ToString()); 1093AppendPropertiesSML(document, propertyNode, kv.Value, nfo); 1095else if (kv.Value.Value != null) 1097XmlText valueText = document.CreateTextNode(kv.Value.Value.ToString()); 1116propertyNode.SetAttribute(kv.Key, kv.Value.Value?.ToString());
Result\SemanticValue.cs (2)
98return (_dictionary.ContainsKey(item.Key) && _dictionary.ContainsValue(item.Value)); 252keys[i++] = kv.Value;
System.Text.Json (27)
System\Text\Json\Nodes\JsonObject.cs (10)
43dictionary.Add(node.Key, node.Value); 44node.Value?.AssignParent(this); 80private protected override JsonNode? GetItem(int index) => GetAt(index).Value; 101jObject.Add(item.Key, item.Value?.DeepCloneCore()); 203if (entry.Value is null) 209entry.Value.WriteTo(writer, options); 237if (!otherDict.TryGetValue(item.Key, out JsonNode? jsonNode) || !DeepEquals(item.Value, jsonNode)) 302JsonNode? replacedValue = dict.GetAt(index).Value; 327if (ReferenceEquals(item.Value, value)) 361properties[i].Value = item.Value;
System\Text\Json\Nodes\JsonObject.IDictionary.cs (1)
86public void Add(KeyValuePair<string, JsonNode?> property) => Add(property.Key, property.Value);
System\Text\Json\Nodes\JsonObject.IList.cs (5)
31DetachParent(existing.Value); 45DetachParent(existing.Value); 82DetachParent(existing.Value); 89set => SetAt(index, value.Key, value.Value); 96void IList<KeyValuePair<string, JsonNode?>>.Insert(int index, KeyValuePair<string, JsonNode?> item) => Insert(index, item.Key, item.Value);
System\Text\Json\Schema\JsonSchema.cs (1)
186properties.Add(property.Key, property.Value.ToJsonNode(options));
System\Text\Json\Serialization\Converters\Collection\DictionaryDefaultConverter.cs (1)
61TValue element = enumerator.Current.Value;
System\Text\Json\Serialization\Converters\Collection\DictionaryOfTKeyTValueConverter.cs (2)
69_valueConverter.Write(writer, enumerator.Current.Value, options); 90TValue element = enumerator.Current.Value;
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (2)
486string referenceId = ReadAsStringMetadataValue(property.Value); 504string referenceId = ReadAsStringMetadataValue(property.Value);
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (2)
157newDict[kvp.Key] = kvp.Value; 177newDict[kvp.Key] = kvp.Value;
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.Cache.cs (1)
69if (Stopwatch.GetElapsedTime(Volatile.Read(ref kvp.Value.LastUsedTimestamp), nowTimestamp) >= _slidingExpiration)
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (1)
639MethodInfo method = entry.Value;
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (1)
248.Invoke(null, new object[] { entry.Value })!;
System.Text.Json.SourceGeneration (45)
JsonSourceGenerator.Emitter.cs (2)
1250List<GenericAccessorEntry> entries = kvp.Value; 2323writer.WriteLine($$"""private static readonly {{JsonEncodedTextTypeRef}} {{name_varName_pair.Value}} = {{JsonEncodedTextTypeRef}}.Encode({{FormatStringLiteral(name_varName_pair.Key)}});""");
JsonSourceGenerator.Parser.cs (43)
449allowOutOfOrderMetadataProperties = (bool)namedArg.Value.Value!; 453allowTrailingCommas = (bool)namedArg.Value.Value!; 458foreach (TypedConstant element in namedArg.Value.Values) 471defaultBufferSize = (int)namedArg.Value.Value!; 475defaultIgnoreCondition = (JsonIgnoreCondition)namedArg.Value.Value!; 479dictionaryKeyPolicy = (JsonKnownNamingPolicy)namedArg.Value.Value!; 483respectNullableAnnotations = (bool)namedArg.Value.Value!; 487respectRequiredConstructorParameters = (bool)namedArg.Value.Value!; 491ignoreReadOnlyFields = (bool)namedArg.Value.Value!; 495ignoreReadOnlyProperties = (bool)namedArg.Value.Value!; 499includeFields = (bool)namedArg.Value.Value!; 503maxDepth = (int)namedArg.Value.Value!; 507newLine = (string)namedArg.Value.Value!; 511numberHandling = (JsonNumberHandling)namedArg.Value.Value!; 515preferredObjectCreationHandling = (JsonObjectCreationHandling)namedArg.Value.Value!; 519propertyNameCaseInsensitive = (bool)namedArg.Value.Value!; 523propertyNamingPolicy = (JsonKnownNamingPolicy)namedArg.Value.Value!; 527readCommentHandling = (JsonCommentHandling)namedArg.Value.Value!; 531referenceHandler = (JsonKnownReferenceHandler)namedArg.Value.Value!; 535unknownTypeHandling = (JsonUnknownTypeHandling)namedArg.Value.Value!; 539unmappedMemberHandling = (JsonUnmappedMemberHandling)namedArg.Value.Value!; 543useStringEnumConverter = (bool)namedArg.Value.Value!; 547writeIndented = (bool)namedArg.Value.Value!; 551indentCharacter = (char)namedArg.Value.Value!; 555indentSize = (int)namedArg.Value.Value!; 559generationMode = (JsonSourceGenerationMode)namedArg.Value.Value!; 563allowDuplicateProperties = (bool)namedArg.Value.Value!; 567inferClosedTypePolymorphism = (bool)namedArg.Value.Value!; 572foreach (TypedConstant element in namedArg.Value.Values) 644typeInfoPropertyName = (string)namedArg.Value.Value!; 647generationMode = (JsonSourceGenerationMode)namedArg.Value.Value!; 1049namedArgs[0].Value.Type?.ToDisplayString() == JsonIgnoreConditionFullName) 1051typeIgnoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!; 1095ignoreUnrecognizedTypeDiscriminators = (bool)namedArg.Value.Value!; 1098inferClosedTypePolymorphismOverride = (bool)namedArg.Value.Value!; 1101typeDiscriminatorPropertyName = (string?)namedArg.Value.Value; 1104if (namedArg.Value.Value is ITypeSymbol classifierType) 1110unknownDerivedTypeHandling = (JsonUnknownDerivedTypeHandling)namedArg.Value.Value!; 1122namedArg.Value.Value is ITypeSymbol classifierType) 1814if (kvp.Value.Count > 1) 1820$"case types {string.Join(", ", kvp.Value.ConvertAll(n => $"'{n}'"))} all serialize as JSON value type '{kvp.Key}'"); 2658namedArgs[0].Value.Type?.ToDisplayString() == JsonIgnoreConditionFullName) 2660ignoreCondition = (JsonIgnoreCondition)namedArgs[0].Value.Value!;
System.Text.RegularExpressions (11)
System\Text\RegularExpressions\RegexCharClass.cs (5)
1869temp.RemoveAll(kvp => kvp.Value.Length != 1); 1870temp.Sort((kvp1, kvp2) => ((short)kvp1.Value[0]).CompareTo((short)kvp2.Value[0])); 1992bool equalsGroup = group.SequenceEqual(kvp.Value.AsSpan()); 1993if (equalsGroup || invertedGroup.SequenceEqual(kvp.Value.AsSpan()))
System\Text\RegularExpressions\RegexCompiler.cs (1)
2013BeqFar(branchLabels[kvp.Value]);
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (2)
765if (pair.Value.Count == childCount) 767results.Add(new RegexFindOptimizations.FixedDistanceSet(null, pair.Value.Set.ToStringClass(), pair.Key + distance));
System\Text\RegularExpressions\RegexWriter.cs (1)
118strings[stringEntry.Value] = stringEntry.Key;
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Dgml.cs (2)
59string label = DescribeLabel(transition.Value.Rule, _builder); 70foreach (int nfaTarget in transition.Value.NfaTargets)
System.Text.RegularExpressions.Generator (10)
RegexGenerator.cs (2)
213requiredHelpers.Add(helper.Key, helper.Value); 301foreach (string value in helper.Value)
RegexGenerator.Emitter.cs (1)
1701foreach (string line in localFunctions.Value)
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (5)
1869temp.RemoveAll(kvp => kvp.Value.Length != 1); 1870temp.Sort((kvp1, kvp2) => ((short)kvp1.Value[0]).CompareTo((short)kvp2.Value[0])); 1992bool equalsGroup = group.SequenceEqual(kvp.Value.AsSpan()); 1993if (equalsGroup || invertedGroup.SequenceEqual(kvp.Value.AsSpan()))
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (2)
765if (pair.Value.Count == childCount) 767results.Add(new RegexFindOptimizations.FixedDistanceSet(null, pair.Value.Set.ToStringClass(), pair.Key + distance));
System.Threading.Channels (11)
System\Threading\Channels\AsyncOperation.cs (1)
399t.Key(t.Value);
System\Threading\Channels\BoundedChannel.cs (2)
665switch (state.Value) 684Debug.Fail($"Unexpected operation: {state.Value}");
System\Threading\Channels\RendezvousChannel.cs (2)
459switch (state.Value) 478Debug.Fail($"Unexpected operation: {state.Value}");
System\Threading\Channels\SingleConsumerUnboundedChannel.cs (2)
373switch (state.Value) 390Debug.Fail($"Unexpected operation: {state.Value}");
System\Threading\Channels\UnboundedChannel.cs (2)
322switch (state.Value) 333Debug.Fail($"Unexpected operation: {state.Value}");
System\Threading\Channels\UnboundedPriorityChannel.cs (2)
318switch (state.Value) 329Debug.Fail($"Unexpected operation: {state.Value}");
System.Threading.RateLimiting (4)
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (4)
148limiter.Value.Value.Limiter.Dispose(); 183await limiter.Value.Value.Limiter.DisposeAsync().ConfigureAwait(false); 246if (!rateLimiter.Value.IsValueCreated) 250LimiterEntry limiterEntry = rateLimiter.Value.Value;
System.Threading.Tasks.Dataflow (33)
Blocks\BatchBlock.cs (15)
790if (sourceAndMessage.Key.ReserveMessage(sourceAndMessage.Value, _owningBatch)) 792var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 808if (sourceAndMessage.Key.ReserveMessage(sourceAndMessage.Value, _owningBatch)) 810var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 907var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 923var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 996T? consumedValue = sourceAndMessage.Key.ConsumeMessage(sourceAndMessage.Value.Key, _owningBatch, out consumed); 1006var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!); 1018_messages.Enqueue(sourceAndMessage.Value.Value); 1048T? consumedValue = sourceAndMessage.Key.ConsumeMessage(sourceAndMessage.Value.Key, _owningBatch, out consumed); 1051var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!); 1068if (sourceAndMessage.Key != null) _messages.Enqueue(sourceAndMessage.Value.Value); 1094KeyValuePair<DataflowMessageHeader, T> message = sourceAndMessage.Value;
Blocks\BroadcastBlock.cs (1)
350T? consumedValue = sourceAndMessage.Key.ConsumeMessage(sourceAndMessage.Value, this, out consumed);
Blocks\BufferBlock.cs (1)
353T? consumedValue = sourceAndMessage.Key.ConsumeMessage(sourceAndMessage.Value, this, out consumed);
Blocks\JoinBlock.cs (5)
525T value = _nonGreedy.ConsumedMessage.Value; 620if (next.Key.ReserveMessage(next.Value, this)) 645T? consumedValue = _nonGreedy.ReservedMessage.Key.ConsumeMessage(_nonGreedy.ReservedMessage.Value, this, out consumed); 706T? consumedValue = next.Key.ConsumeMessage(next.Value, this, out consumed); 759try { _nonGreedy.ReservedMessage.Key.ReleaseReservation(_nonGreedy.ReservedMessage.Value, this); }
Blocks\TransformBlock.cs (3)
216else _reorderingBuffer.AddItem(messageWithId.Value, outputItem!, itemIsValid); 248_reorderingBuffer?.IgnoreItem(messageWithId.Value); 323else _reorderingBuffer.AddItem(messageWithId.Value, outputItem!, itemIsValid: gotOutputItem);
Blocks\TransformManyBlock.cs (1)
316StoreOutputItemsReordered(messageWithId.Value, outputItems);
Blocks\TransformManyBlock.netstandard21.cs (1)
95await StoreOutputItemsReorderedAsync(messageWithId.Value, outputItems).ConfigureAwait(false);
Internal\Common.cs (2)
520if (sourceAndMessage.Key.ReserveMessage(sourceAndMessage.Value, target)) 522sourceAndMessage.Key.ReleaseReservation(sourceAndMessage.Value, target);
Internal\QueuedMap.cs (2)
100_storage[_tailIndex] = new KeyValuePair<int, T>(newIndex, _storage[_tailIndex].Value); 123item = _storage[_headIndex].Value;
Internal\ReorderingBuffer.cs (1)
171if (nextOutputItemWithValidity.Key) _outputAction(_owningSource, nextOutputItemWithValidity.Value);
Internal\TargetCore.cs (1)
671TInput? consumedValue = element.Key.ConsumeMessage(element.Value, _owningTarget, out consumed);
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\Parallel.cs (1)
2644TSource value = kvp.Value;
System.Windows.Forms (11)
misc\CollectionHelper.cs (2)
40dictionaryTarget[index++] = new DictionaryEntry(kvp.Key, kvp.Value); 57objects[index++] = new DictionaryEntry(kvp.Key, kvp.Value);
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (2)
196if (entry.Value is Com2Properties { NeedsRefreshed: true }) 307if (entry.Value == properties)
System\Windows\Forms\Components\ErrorProvider\ErrorProvider.cs (1)
500SetError(entry.Key, entry.Value);
System\Windows\Forms\Controls\ComboBox\ComboBox.ACNativeWindow.cs (1)
110if (acNativeWindowByHandle.Value is null)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
168if (keyValuePair.Value == fakeAccessibleObject)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (2)
268var gridEntries = entry.Value; 271categoryGridEntries.Add(new CategoryGridEntry(OwnerGrid, this, entry.Key, entry.Value));
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (1)
86object o = item.Value;
System\Windows\Forms\DataBinding\BindingContext.cs (1)
323if (de.Value.Target is null)
System.Windows.Forms.Design (9)
System\ComponentModel\Design\ComponentDesigner.cs (1)
681InheritedPropertyDescriptor inheritedPropDesc = de.Value;
System\ComponentModel\Design\DesignerHost.Site.cs (1)
55object o = de.Value;
System\ComponentModel\Design\MenuCommandService.cs (1)
158List<MenuCommand> commands = group.Value;
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (1)
190prop?.SetValue(comp, stateEntry.Value);
System\ComponentModel\Design\Serialization\ComponentCache.cs (1)
93List<string>? localNames = kvp.Value.LocalNames;
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (2)
293metaData.TryAdd(item.Key, item.Value); 486resxWriter.AddMetadata(de.Key, de.Value);
System\Resources\Tools\StronglyTypedResourceBuilder.cs (2)
876typeof(void) == entry.Value.Type) 918ResourceData value = entry.Value;
System.Windows.Input.Manipulations (16)
System\Windows\Input\Manipulations\ManipulationSequence.cs (16)
860VectorF oldVectorFromOrigin = pair.Value.VectorFromManipulationOrigin; 861VectorF newVectorFromOrigin = new PointF(pair.Value.CurrentManipulatorSnapshot.X, pair.Value.CurrentManipulatorSnapshot.Y) - averagePoint; 862VectorF oldVectorFromPivot = pair.Value.VectorFromPivotPoint; 864? new VectorF(pair.Value.CurrentManipulatorSnapshot.X - settings.Pivot.X, pair.Value.CurrentManipulatorSnapshot.Y - settings.Pivot.Y) 912pair.Value.VectorFromManipulationOrigin = newVectorFromOrigin; 913pair.Value.VectorFromPivotPoint = newVectorFromPivot; 1016x += pair.Value.CurrentManipulatorSnapshot.X; 1017y += pair.Value.CurrentManipulatorSnapshot.Y; 1035pair.Value.VectorFromManipulationOrigin = new PointF( 1036pair.Value.CurrentManipulatorSnapshot.X, 1037pair.Value.CurrentManipulatorSnapshot.Y) - referenceOrigin; 1038pair.Value.VectorFromPivotPoint = IsPinned(settings) 1039? new VectorF(pair.Value.CurrentManipulatorSnapshot.X - settings.Pivot.X, pair.Value.CurrentManipulatorSnapshot.Y - settings.Pivot.Y)
System.Xaml (24)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
134if (pair.Value == oldNamespace)
System\Xaml\Context\XamlCommonFrame.cs (2)
61Namespaces.Add(ns.Key, ns.Value); 82_namespaceDeclarations.Add(new NamespaceDeclaration(kvp.Value, kvp.Key));
System\Xaml\Context\XamlParserContext.cs (1)
116yield return new NamespaceDeclaration(kvp.Value, kvp.Key);
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
213xmlnsDictionary[ns.Key] = ns.Value;
System\Xaml\MS\Impl\XmlNsInfo.cs (1)
231List<string> nsList = (List<string>)clrToXmlNs.Value;
System\Xaml\NameScope.cs (3)
133if (item.Value != this[item.Key]) 148if (item.Value is null) 153Add(item.Key, item.Value);
System\Xaml\Runtime\ClrObjectRuntime.cs (1)
764yield return new DictionaryEntry(enumerator.Current.Key, enumerator.Current.Value);
System\Xaml\Schema\TypeReflector.cs (5)
674setter = candidates[0].Value; 1016PickAttachablePropertyAccessors(getterList, nameAndSetterList.Value, out getter, out setter); 1037member = schemaContext.GetAttachableProperty(name, nameAndGetterList.Value[0], null); 1053MethodInfo adder = PickAttachableEventAdder(nameAndAdderList.Value); 1192if (pair.Value is null)
System\Xaml\Schema\XamlTypeInvoker.cs (1)
193return pair.Value;
System\Xaml\XamlObjectReader.cs (4)
1893var propertyInfo = MemberMarkupInfo.ForAttachedProperty(value, attachedProperty, ap.Value, context); 2554new NamespaceDeclaration(pair.Key, pair.Value))); 2572return string.Compare(y.Value, x.Value, false, TypeConverterHelper.InvariantEnglishUS);
System\Xaml\XamlSchemaContext.cs (3)
116if (ns.Value.IsResolved && !ns.Value.IsClrNamespace) 236string preferredPrefix = nsToPrefix.Value;
System\Xaml\XamlXmlWriter.cs (1)
537output.WriteAttributeString("xmlns", pair.Key, null, pair.Value);
TypeScriptApiCompat (2)
AtsSurfaceParser.cs (2)
115static pair => new AtsDtoType(pair.Value.TypeId, pair.Value.Properties),
UnitTests.Common (1)
TestTypes.cs (1)
308workItem.Key(workItem.Value);
vbc (3)
src\roslyn\src\Compilers\Shared\BuildProtocol.cs (1)
379WriteLengthPrefixedString(writer, pair.Value);
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
484envBlock.Append(kvp.Value); 647startInfo.EnvironmentVariables[kvp.Key] = kvp.Value;
VBCSCompiler (3)
src\roslyn\src\Compilers\Shared\BuildProtocol.cs (1)
379WriteLengthPrefixedString(writer, pair.Value);
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
484envBlock.Append(kvp.Value); 647startInfo.EnvironmentVariables[kvp.Key] = kvp.Value;
vstest.console (7)
Internal\ConsoleLogger.cs (1)
713var leafTestResultsPerSource = LeafTestResults?.Select(p => p.Value)?.GroupBy(r => r.TestCase.Source);
Processors\EnableBlameArgumentProcessor.cs (3)
220.ToDictionary(p => p.Key, p => p.Value, StringComparer.OrdinalIgnoreCase) 236.ToDictionary(p => p.Key, p => p.Value, StringComparer.OrdinalIgnoreCase) 350attribute.Value = entry.Value;
Processors\Utilities\LoggerUtilities.cs (1)
64node.InnerText = entry.Value;
Publisher\TextFileTelemetryPublisher.cs (1)
70var telemetryData = string.Join(";", metrics.Select(x => x.Key + "=" + x.Value));
TestPlatformHelpers\TestRequestManager.cs (1)
501ciData.Value);
vstest.console.arm64 (7)
src\vstest\src\vstest.console\Internal\ConsoleLogger.cs (1)
713var leafTestResultsPerSource = LeafTestResults?.Select(p => p.Value)?.GroupBy(r => r.TestCase.Source);
src\vstest\src\vstest.console\Processors\EnableBlameArgumentProcessor.cs (3)
220.ToDictionary(p => p.Key, p => p.Value, StringComparer.OrdinalIgnoreCase) 236.ToDictionary(p => p.Key, p => p.Value, StringComparer.OrdinalIgnoreCase) 350attribute.Value = entry.Value;
src\vstest\src\vstest.console\Processors\Utilities\LoggerUtilities.cs (1)
64node.InnerText = entry.Value;
src\vstest\src\vstest.console\Publisher\TextFileTelemetryPublisher.cs (1)
70var telemetryData = string.Join(";", metrics.Select(x => x.Key + "=" + x.Value));
src\vstest\src\vstest.console\TestPlatformHelpers\TestRequestManager.cs (1)
501ciData.Value);
WindowsFormsIntegration (1)
System\Windows\Integration\PropertyMap.cs (1)
279Add(entry.Key, entry.Value);