5309 instantiations of KeyValuePair
Analyzer.Utilities.UnitTests (1)
FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisTests.cs (1)
1321new[] { new KeyValuePair<string, string>("flow-analysis", "true") }));
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
345projectDiagnosticTasks.Add(new KeyValuePair<ProjectId, Task<AnalysisResult>>(project.Id, resultTask));
Aspire.Azure.AI.Inference.Tests (7)
AspireAzureAIInferenceExtensionTests.cs (6)
24new KeyValuePair<string, string?>("ConnectionStrings:inference", ConnectionString) 49new KeyValuePair<string, string?>("ConnectionStrings:inference", "Endpoint=https://endpoint;Key=myAccount;DeploymentId=unused") 75new KeyValuePair<string, string?>("ConnectionStrings:inference1", ConnectionString), 76new KeyValuePair<string, string?>("ConnectionStrings:inference2", ConnectionString + "2") 96new KeyValuePair<string, string?>("ConnectionStrings:inference", ConnectionString) 120new KeyValuePair<string, string?>("ConnectionStrings:inference", ConnectionString)
ConformanceTests.cs (1)
45new(CreateConfigKey("Aspire:Azure:AI:Inference", key, "Endpoint"), Endpoint)
Aspire.Azure.AI.OpenAI.Tests (37)
AspireAzureAIOpenAIExtensionsTests.cs (9)
31new KeyValuePair<string, string?>("ConnectionStrings:openai", ConnectionString) 62new KeyValuePair<string, string?>("ConnectionStrings:openai", ConnectionString) 117new KeyValuePair<string, string?>("ConnectionStrings:openai", connectionString) 133new KeyValuePair<string, string?>("ConnectionStrings:openai1", ConnectionString), 134new KeyValuePair<string, string?>("ConnectionStrings:openai2", ConnectionString + "2"), 135new KeyValuePair<string, string?>("ConnectionStrings:openai3", ConnectionString + "3") 166new KeyValuePair<string, string?>("ConnectionStrings:openai", ConnectionString), 167new KeyValuePair<string, string?>($"Aspire:Azure:AI:OpenAI{key}:ClientOptions:UserAgentApplicationId", applicationId), 169new KeyValuePair<string, string?>($"Aspire:Azure:AI:OpenAI{key}:ClientOptions:NetworkTimeout", "00:00:02")
AspireAzureOpenAIClientBuilderChatClientExtensionsTests.cs (9)
21new("Aspire:Azure:AI:OpenAI:Endpoint", "https://aspireopenaitests.openai.azure.com/"), 22new("Aspire:Azure:AI:OpenAI:Deployment", "testdeployment1") 52new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake;{connectionStringKey}=testdeployment1") 80new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake") 108new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake;Deployment=testdeployment1;Model=something") 139new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake") 172new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake"), 173new("Aspire:Azure:AI:OpenAI:DisableTracing", disableOpenTelemetry.ToString()), 200new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake")
AspireAzureOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (9)
21new("Aspire:Azure:AI:OpenAI:Endpoint", "https://aspireopenaitests.openai.azure.com/"), 22new("Aspire:Azure:AI:OpenAI:Deployment", "testdeployment1") 52new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake;{connectionStringKey}=testdeployment1") 80new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake") 108new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake;Deployment=testdeployment1;Model=something") 139new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake") 172new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake"), 173new("Aspire:Azure:AI:OpenAI:DisableTracing", disableOpenTelemetry.ToString()), 200new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake")
AspireConfigurableOpenAIExtensionsTests.cs (9)
23new KeyValuePair<string, string?>("ConnectionStrings:openai", "IsAzure=false") 46new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=https://aspireopenaitests.fake.com/;Key=fake;IsAzure=true") 73new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=https://aspireopenaitests.fake.com/;Key=fake;IsAzure=false") 100new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=https://aspireopenaitests.azure.com/;Key=fake") 128new KeyValuePair<string, string?>("ConnectionStrings:openai", $"Endpoint={domain};Key=fake") 146new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=https://aspireopenaitests.azure.com/;Key=fake;IsAzure=false") 173new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=;Key=fake;IsAzure=false") 200new KeyValuePair<string, string?>("ConnectionStrings:openai", "Key=fake;IsAzure=false") 227new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=https://aspireopenaitests.azure.com/;Deployment=mymodel")
ConformanceTests.cs (1)
61new(CreateConfigKey("Aspire:Azure:AI:OpenAI", key, "Endpoint"), Endpoint)
Aspire.Azure.Data.Tables.Tests (10)
AspireTablesExtensionsTests.cs (8)
23new KeyValuePair<string, string?>("ConnectionStrings:tables", ConnectionString) 50new KeyValuePair<string, string?>("ConnectionStrings:tables", "AccountName=unused;AccountKey=myAccountKey") 79new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Azure:Data:Tables", key, "ServiceUri"), "unused"), 80new KeyValuePair<string, string?>("ConnectionStrings:tables", ConnectionString) 108new KeyValuePair<string, string?>("ConnectionStrings:tables", ConformanceTests.ServiceUri) 133new KeyValuePair<string, string?>("ConnectionStrings:tables1", ConnectionString), 134new KeyValuePair<string, string?>("ConnectionStrings:tables2", "AccountName=account2;AccountKey=fake"), 135new KeyValuePair<string, string?>("ConnectionStrings:tables3", "AccountName=account3;AccountKey=fake")
ConformanceTests.cs (2)
72new(CreateConfigKey("Aspire:Azure:Data:Tables", key, "ServiceUri"), ServiceUri), 73new(CreateConfigKey("Aspire:Azure:Data:Tables", key, "ClientOptions:Retry:MaxRetries"), "0")
Aspire.Azure.Messaging.EventHubs (1)
src\Shared\StableConnectionStringBuilder.cs (1)
163yield return new KeyValuePair<string, string>(seg.Key.Trim(), seg.Value ?? string.Empty);
Aspire.Azure.Messaging.EventHubs.Tests (60)
AspireEventHubsExtensionsTests.cs (57)
84new KeyValuePair<string, string?>( 88new KeyValuePair<string, string?>( 92new KeyValuePair<string, string?>( 95new KeyValuePair<string, string?>("ConnectionStrings:eh", EhConnectionString), 131new KeyValuePair<string, string?>( 135new KeyValuePair<string, string?>( 139new KeyValuePair<string, string?>( 143new KeyValuePair<string, string?>( 146new KeyValuePair<string, string?>( 150new KeyValuePair<string, string?>( 200new KeyValuePair<string, string?>( 204new KeyValuePair<string, string?>( 208new KeyValuePair<string, string?>( 212new KeyValuePair<string, string?>( 215new KeyValuePair<string, string?>("ConnectionStrings:eh", EhConnectionString) 262new KeyValuePair<string, string?>( 266new KeyValuePair<string, string?>( 270new KeyValuePair<string, string?>( 274new KeyValuePair<string, string?>( 277new KeyValuePair<string, string?>( 281new KeyValuePair<string, string?>("ConnectionStrings:eh", EhConnectionString), 328new KeyValuePair<string, string?>( 332new KeyValuePair<string, string?>( 336new KeyValuePair<string, string?>( 339new KeyValuePair<string, string?>("ConnectionStrings:eh", EhConnectionString) 374new KeyValuePair<string, string?>( 378new KeyValuePair<string, string?>( 382new KeyValuePair<string, string?>( 387new KeyValuePair<string, string?>("ConnectionStrings:eh", EhConnectionString) 423new KeyValuePair<string, string?>( 427new KeyValuePair<string, string?>( 431new KeyValuePair<string, string?>( 435new KeyValuePair<string, string?>( 441new KeyValuePair<string, string?>("ConnectionStrings:eh", EhConnectionString), 505new KeyValuePair<string, string?>( 509new KeyValuePair<string, string?>( 513new KeyValuePair<string, string?>( 517new KeyValuePair<string, string?>( 522new KeyValuePair<string, string?>("ConnectionStrings:eh", EhConnectionString), 548new KeyValuePair<string, string?>("ConnectionStrings:eh1", EhConnectionString), 549new KeyValuePair<string, string?>($"Aspire:Azure:Messaging:EventHubs:{s_clientTypes[clientIndex].Name}:BlobContainerName", "checkpoints"), 550new KeyValuePair<string, string?>($"Aspire:Azure:Messaging:EventHubs:{s_clientTypes[clientIndex].Name}:PartitionId", "foo"), 552new KeyValuePair<string, string?>("ConnectionStrings:eh2", EhConnectionString.Replace("aspireeventhubstests", "aspireeventhubstests2")), 553new KeyValuePair<string, string?>($"Aspire:Azure:Messaging:EventHubs:{s_clientTypes[clientIndex].Name}:eh2:BlobContainerName", "checkpoints"), 554new KeyValuePair<string, string?>($"Aspire:Azure:Messaging:EventHubs:{s_clientTypes[clientIndex].Name}:eh2:PartitionId", "foo"), 556new KeyValuePair<string, string?>("ConnectionStrings:eh3", EhConnectionString.Replace("aspireeventhubstests", "aspireeventhubstests3")), 557new KeyValuePair<string, string?>($"Aspire:Azure:Messaging:EventHubs:{s_clientTypes[clientIndex].Name}:eh3:BlobContainerName", "checkpoints"), 558new KeyValuePair<string, string?>($"Aspire:Azure:Messaging:EventHubs:{s_clientTypes[clientIndex].Name}:eh3:PartitionId", "foo"), 595new KeyValuePair<string, string?>("ConnectionStrings:eh1", "Endpoint=sb://127.0.0.1:53589;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;"), 596new KeyValuePair<string, string?>("Aspire:Azure:Messaging:EventHubs:EventProcessorClient:EventHubName", "MyHub"), 643new KeyValuePair<string, string?>("ConnectionStrings:eh1", testInfo.TestConnectionString), 644new KeyValuePair<string, string?>("Aspire:Azure:Messaging:EventHubs:EventHubProducerClient:EventHubName", "NotInConnectionInfo"), 645new KeyValuePair<string, string?>("Aspire:Azure:Messaging:EventHubs:EventHubConsumerClient:EventHubName", "NotInConnectionInfo"), 646new KeyValuePair<string, string?>("Aspire:Azure:Messaging:EventHubs:EventProcessorClient:EventHubName", "NotInConnectionInfo"), 647new KeyValuePair<string, string?>("Aspire:Azure:Messaging:EventHubs:PartitionReceiver:EventHubName", "NotInConnectionInfo"), 648new KeyValuePair<string, string?>("Aspire:Azure:Messaging:EventHubs:PartitionReceiver:PartitionId", "foo"), 649new KeyValuePair<string, string?>("Aspire:Azure:Messaging:EventHubs:EventHubBufferedProducerClient:EventHubName", "NotInConnectionInfo"),
ConformanceTests.PartitionReceiver.cs (2)
25new($"Aspire:Azure:Messaging:EventHubs:{typeof(PartitionReceiver).Name}:ConnectionString", AspireEventHubsExtensionsTests.EhConnectionString), 26new($"Aspire:Azure:Messaging:EventHubs:{typeof(PartitionReceiver).Name}:PartitionId", "2")
ConformanceTestsBase.cs (1)
61new($"Aspire:Azure:Messaging:EventHubs:{typeof(TService).Name}:ConnectionString", AspireEventHubsExtensionsTests.EhConnectionString)
Aspire.Azure.Messaging.ServiceBus (1)
src\Shared\StableConnectionStringBuilder.cs (1)
163yield return new KeyValuePair<string, string>(seg.Key.Trim(), seg.Value ?? string.Empty);
Aspire.Azure.Messaging.ServiceBus.Tests (18)
AspireServiceBusExtensionsTests.cs (12)
23new KeyValuePair<string, string?>("ConnectionStrings:sb", ConnectionString) 50new KeyValuePair<string, string?>("ConnectionStrings:sb", "Endpoint=sb://unused.servicebus.windows.net/;SharedAccessKeyName=fake;SharedAccessKey=fake") 79new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Azure:Messaging:ServiceBus", key, "ConnectionString"), "unused"), 80new KeyValuePair<string, string?>("ConnectionStrings:sb", ConnectionString) 108new KeyValuePair<string, string?>("ConnectionStrings:sb", ConformanceTests.FullyQualifiedNamespace) 133new KeyValuePair<string, string?>("ConnectionStrings:sb1", ConnectionString), 134new KeyValuePair<string, string?>("ConnectionStrings:sb2", "Endpoint=sb://aspireservicebustests2.servicebus.windows.net/;SharedAccessKeyName=fake;SharedAccessKey=fake"), 135new KeyValuePair<string, string?>("ConnectionStrings:sb3", "Endpoint=sb://aspireservicebustests3.servicebus.windows.net/;SharedAccessKeyName=fake;SharedAccessKey=fake") 164new KeyValuePair<string, string?>("Aspire:Azure:Messaging:ServiceBus:ClientOptions:Identifier", "top-level-identifier"), 165new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Azure:Messaging:ServiceBus", "sb", "ConnectionString"), ConnectionString), 166new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Azure:Messaging:ServiceBus", "sb", "ClientOptions:Identifier"), "local-identifier"), 201new KeyValuePair<string, string?>("ConnectionStrings:sb", connectionString)
ConformanceTests.cs (2)
66? new(CreateConfigKey("Aspire:Azure:Messaging:ServiceBus", key, nameof(AzureMessagingServiceBusSettings.FullyQualifiedNamespace)), FullyQualifiedNamespace) 67: new(CreateConfigKey("Aspire:Azure:Messaging:ServiceBus", key, nameof(AzureMessagingServiceBusSettings.ConnectionString)), ConnectionString);
ConformanceTests_Queue.cs (2)
25new(CreateConfigKey("Aspire:Azure:Messaging:ServiceBus", key, nameof(AzureMessagingServiceBusSettings.HealthCheckQueueName)), HealthCheckQueueName), 26new(CreateConfigKey("Aspire:Azure:Messaging:ServiceBus", key, "ClientOptions:RetryOptions:MaxRetries"), "0")
ConformanceTests_Topic.cs (2)
26new(CreateConfigKey("Aspire:Azure:Messaging:ServiceBus", key, nameof(AzureMessagingServiceBusSettings.HealthCheckTopicName)), HealthCheckTopicName), 27new(CreateConfigKey("Aspire:Azure:Messaging:ServiceBus", key, "ClientOptions:RetryOptions:MaxRetries"), "0")
Aspire.Azure.Messaging.WebPubSub (1)
src\Shared\StableConnectionStringBuilder.cs (1)
163yield return new KeyValuePair<string, string>(seg.Key.Trim(), seg.Value ?? string.Empty);
Aspire.Azure.Messaging.WebPubSub.Tests (14)
AspireWebPubSubExtensionsTests.cs (12)
24new KeyValuePair<string, string?>("ConnectionStrings:wps", ConnectionString) 52new KeyValuePair<string, string?>("ConnectionStrings:wps", UnusedConnectionString) 89new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Azure:Messaging:WebPubSub", key, "ConnectionString"), "unused"), 90new KeyValuePair<string, string?>("ConnectionStrings:wps", ConnectionString) 119new KeyValuePair<string, string?>("ConnectionStrings:wps", ConformanceTests.Endpoint) 145new KeyValuePair<string, string?>("ConnectionStrings:wps", ConnectionString) 160new KeyValuePair<string, string?>("ConnectionStrings:wps", ConnectionString) 171new KeyValuePair<string, string?>("ConnectionStrings:wps", ConnectionString) 187new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Azure:Messaging:WebPubSub:wps", "hub1", "ConnectionString"), ConnectionString), 188new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Azure:Messaging:WebPubSub:wps", "hub2", "ConnectionString"), ConnectionString), 212new KeyValuePair<string, string?>("ConnectionStrings:wps", connectionStringWithHub) 242new KeyValuePair<string, string?>("ConnectionStrings:wps", connectionStringWithHub)
ConformanceTests.cs (2)
61? new(CreateConfigKey("Aspire:Azure:Messaging:WebPubSub", key is not null ? $"{key}:{key}" : null, nameof(AzureMessagingWebPubSubSettings.Endpoint)), Endpoint) 62: new(CreateConfigKey("Aspire:Azure:Messaging:WebPubSub", key is not null ? $"{key}:{key}" : null, nameof(AzureMessagingWebPubSubSettings.ConnectionString)), ConnectionString);
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (27)
AspireAzureEFPostgreSqlExtensionsTests.cs (16)
34new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 50new KeyValuePair<string, string?>("ConnectionStrings:npgsql", "unused") 71new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:ConnectionString", "unused"), 72new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 91new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString), 92new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:Retry", "true") 133new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString), 134new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableRetry", "true") 174new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 179new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:CommandTimeout", "123") 208new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 213new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:CommandTimeout", "400") 245new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString), 246new KeyValuePair<string, string?>("ConnectionStrings:npgsql2", connectionString2), 270new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 293new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString)
ConformanceTests.cs (1)
90new("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:ConnectionString", ConnectionString)
ConformanceTests_TypeSpecificConfig.cs (1)
19new($"Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:{typeof(TestDbContext).Name}:ConnectionString", ConnectionString)
EnrichNpgsqlTests.cs (5)
61new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:Retry", "true") 154new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableRetry", "true") 201new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableRetry", "false") 356new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableTracing", "false"), 357new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:TestDbContext:DisableTracing", "true")
TokenCredentialTests.cs (4)
36new KeyValuePair<string, string?>("ConnectionStrings:npgsql", connectionString) 67new KeyValuePair<string, string?>("ConnectionStrings:npgsql", connectionString) 99new KeyValuePair<string, string?>("ConnectionStrings:npgsql", connectionString) 131new KeyValuePair<string, string?>("ConnectionStrings:npgsql", connectionString)
Aspire.Azure.Npgsql.Tests (13)
AspireAzurePostgreSqlNpgsqlExtensionsTests.cs (12)
27new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 55new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 84new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionStringWithUsernameAndPassword) 124new KeyValuePair<string, string?>("ConnectionStrings:npgsql", "unused") 156new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 199new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 241new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Npgsql", key, "ConnectionString"), "unused"), 242new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionStringWithUsername) 271new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 299new KeyValuePair<string, string?>("ConnectionStrings:npgsql1", "Host=localhost1;Database=test_aspire_npgsql"), 300new KeyValuePair<string, string?>("ConnectionStrings:npgsql2", "Host=localhost2;Database=test_aspire_npgsql"), 301new KeyValuePair<string, string?>("ConnectionStrings:npgsql3", "Host=localhost3;Database=test_aspire_npgsql"),
ConformanceTests.cs (1)
67new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Npgsql", key, "ConnectionString"), ConnectionString)
Aspire.Azure.Search.Documents.Tests (5)
AspireAzureSearchExtensionsTests.cs (4)
24new KeyValuePair<string, string?>("ConnectionStrings:search", ConnectionString) 77new KeyValuePair<string, string?>("ConnectionStrings:search1", ConnectionString), 78new KeyValuePair<string, string?>("ConnectionStrings:search2", "Endpoint=https://aspireazuresearchtests2.search.windows.net/;Key=fake"), 79new KeyValuePair<string, string?>("ConnectionStrings:search3", "Endpoint=https://aspireazuresearchtests3.search.windows.net/;Key=fake")
ConformanceTests.cs (1)
60new(CreateConfigKey("Aspire:Azure:Search:Documents", key, "Endpoint"), Endpoint)
Aspire.Azure.Security.KeyVault.Tests (17)
AspireKeyVaultExtensionsTests.cs (11)
28new KeyValuePair<string, string?>("ConnectionStrings:secrets", "https://unused.vault.azure.net/") 57new KeyValuePair<string, string?>("Aspire:Azure:Security:KeyVault:{key}:VaultUri", "unused"), 58new KeyValuePair<string, string?>("ConnectionStrings:secrets", ConformanceConstants.VaultUri) 83new KeyValuePair<string, string?>("ConnectionStrings:secrets", ConformanceConstants.VaultUri) 182new KeyValuePair<string, string?>("ConnectionStrings:secrets1", ConformanceConstants.VaultUri), 183new KeyValuePair<string, string?>("ConnectionStrings:secrets2", "https://aspiretests2.vault.azure.net/"), 184new KeyValuePair<string, string?>("ConnectionStrings:secrets3", "https://aspiretests3.vault.azure.net/") 215new KeyValuePair<string, string?>($"ConnectionStrings:{connectionName}", ConformanceConstants.VaultUri) 250new KeyValuePair<string, string?>($"ConnectionStrings:{secretClientName}", secretClientUri), 251new KeyValuePair<string, string?>($"ConnectionStrings:{keyClientName}", keyClientUri), 252new KeyValuePair<string, string?>($"ConnectionStrings:{certClientName}", certClientUri)
CertificateClientConformanceTests.cs (2)
65new(CreateConfigKey("Aspire:Azure:Security:KeyVault", key, "VaultUri"), VaultUri), 66new(CreateConfigKey("Aspire:Azure:Security:KeyVault", key, "ClientOptions:Retry:MaxRetries"), "0")
KeyClientConformanceTests.cs (2)
67new(CreateConfigKey("Aspire:Azure:Security:KeyVault", key, "VaultUri"), VaultUri), 68new(CreateConfigKey("Aspire:Azure:Security:KeyVault", key, "ClientOptions:Retry:MaxRetries"), "0")
SecretClientConformanceTests.cs (2)
66new(CreateConfigKey("Aspire:Azure:Security:KeyVault", key, "VaultUri"), VaultUri), 67new(CreateConfigKey("Aspire:Azure:Security:KeyVault", key, "ClientOptions:Retry:MaxRetries"), "0")
Aspire.Azure.Storage.Blobs.Tests (10)
AspireBlobStorageExtensionsTests.cs (8)
23new KeyValuePair<string, string?>("ConnectionStrings:blob", ConnectionString) 50new KeyValuePair<string, string?>("ConnectionStrings:blob", "AccountName=unused;AccountKey=fake") 79new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Azure:Storage:Blobs", key, "ServiceUri"), "unused"), 80new KeyValuePair<string, string?>("ConnectionStrings:blob", ConnectionString) 108new KeyValuePair<string, string?>("ConnectionStrings:blob", ConformanceTests.ServiceUri) 133new KeyValuePair<string, string?>("ConnectionStrings:blob1", ConformanceTests.ServiceUri), 134new KeyValuePair<string, string?>("ConnectionStrings:blob2", "https://aspirestoragetests2.blob.core.windows.net/"), 135new KeyValuePair<string, string?>("ConnectionStrings:blob3", "https://aspirestoragetests3.blob.core.windows.net/")
ConformanceTests.cs (2)
76new(CreateConfigKey("Aspire:Azure:Storage:Blobs", key, "ServiceUri"), ServiceUri), 77new(CreateConfigKey("Aspire:Azure:Storage:Blobs", key, "ClientOptions:Retry:MaxRetries"), "0")
Aspire.Azure.Storage.Queues.Tests (10)
AspireQueueStorageExtensionsTests.cs (8)
23new KeyValuePair<string, string?>("ConnectionStrings:queue", ConnectionString) 50new KeyValuePair<string, string?>("ConnectionStrings:queue", "AccountName=unused;AccountKey=fake") 79new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Azure:Storage:Queues", key, "ServiceUri"), "unused"), 80new KeyValuePair<string, string?>("ConnectionStrings:queue", ConnectionString) 108new KeyValuePair<string, string?>("ConnectionStrings:queue", ConformanceTests.ServiceUri) 133new KeyValuePair<string, string?>("ConnectionStrings:queue1", ConformanceTests.ServiceUri), 134new KeyValuePair<string, string?>("ConnectionStrings:queue2", "https://aspirestoragetests2.queue.core.windows.net"), 135new KeyValuePair<string, string?>("ConnectionStrings:queue3", "https://aspirestoragetests3.queue.core.windows.net")
ConformanceTests.cs (2)
75new(CreateConfigKey("Aspire:Azure:Storage:Queues", key, "ServiceUri"), ServiceUri), 76new(CreateConfigKey("Aspire:Azure:Storage:Queues", key, "ClientOptions:Retry:MaxRetries"), "0")
Aspire.Cli.Tests (9)
Commands\PublishCommandPromptingIntegrationTests.cs (9)
125new("us-west-2", "US West (Oregon)"), 126new("us-east-1", "US East (N. Virginia)"), 127new("eu-central-1", "Europe (Frankfurt)") 272new("dev", "Development"), 273new("staging", "Staging"), 274new("prod", "Production") 349new("dev", "Development"), 350new("staging", "Staging"), 351new("prod", "Production")
Aspire.Components.Common.TestUtilities (4)
ConformanceTests.cs (4)
396new KeyValuePair<string, string?>($"{ConfigurationSectionName}:DisableTracing", "false"), 397new KeyValuePair<string, string?>($"{ConfigurationSectionName}:{key}:DisableTracing", "true"), 418new KeyValuePair<string, string?>($"{ConfigurationSectionName}:DisableHealthChecks", "false"), 419new KeyValuePair<string, string?>($"{ConfigurationSectionName}:{key}:DisableHealthChecks", "true"),
Aspire.Confluent.Kafka (11)
MetricsService.cs (1)
50tags.Add(new KeyValuePair<string, object?> (Tags.Type, statistics.Type));
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\InstrumentedConsumer.cs (5)
283new KeyValuePair<string, object?>( 286new KeyValuePair<string, object?>( 289new KeyValuePair<string, object?>( 297new KeyValuePair<string, object?>( 305new KeyValuePair<string, object?>(
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\InstrumentedProducer.cs (5)
281new KeyValuePair<string, object?>( 284new KeyValuePair<string, object?>( 287new KeyValuePair<string, object?>( 295new KeyValuePair<string, object?>( 303new KeyValuePair<string, object?>(
Aspire.Confluent.Kafka.Tests (32)
Aspire8MetricsTests.cs (4)
27new KeyValuePair<string, string?>("ConnectionStrings:messaging", CommonHelpers.TestingEndpoint), 28new KeyValuePair<string, string?>(ProducerConformanceTests.CreateConfigKey("Aspire:Confluent:Kafka:Consumer", key, "Config:GroupId"), "unused") 142new KeyValuePair<string, string?>("ConnectionStrings:messaging", CommonHelpers.TestingEndpoint), 143new KeyValuePair<string, string?>(ProducerConformanceTests.CreateConfigKey("Aspire:Confluent:Kafka:Consumer", key, "Config:GroupId"), "unused")
ConsumerConfigurationTests.cs (9)
24new KeyValuePair<string, string?>("ConnectionStrings:messaging", CommonHelpers.TestingEndpoint), 25new KeyValuePair<string, string?>(ConsumerConformanceTests.CreateConfigKey("Aspire:Confluent:Kafka:Consumer", key, "Config:GroupId"), "unused") 56new KeyValuePair<string, string?>("ConnectionStrings:messaging", "unused"), 57new KeyValuePair<string, string?>(ConsumerConformanceTests.CreateConfigKey("Aspire:Confluent:Kafka:Consumer", key, "Config:GroupId"), "unused") 89new KeyValuePair<string, string?>(ConsumerConformanceTests.CreateConfigKey("Aspire:Confluent:Kafka:Consumer", key, "ConnectionString"), "unused"), 90new KeyValuePair<string, string?>("ConnectionStrings:messaging", CommonHelpers.TestingEndpoint), 91new KeyValuePair<string, string?>(ConsumerConformanceTests.CreateConfigKey("Aspire:Confluent:Kafka:Consumer", key, "Config:GroupId"), "unused") 133new KeyValuePair<string, string?>("ConnectionStrings:messaging", CommonHelpers.TestingEndpoint), 134new KeyValuePair<string, string?>(ConsumerConformanceTests.CreateConfigKey("Aspire:Confluent:Kafka:Consumer", key, "Config:GroupId"), "unused")
ConsumerConformanceTests.cs (8)
28new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Confluent:Kafka:Consumer", key, "ConnectionString"), 30new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Confluent:Kafka:Consumer", key, "Config:GroupId"), 93new KeyValuePair<string, string?>("ConnectionStrings:messaging1", "localhost:9091"), 94new KeyValuePair<string, string?>("Aspire:Confluent:Kafka:Consumer:Config:GroupId", "messaging1"), 96new KeyValuePair<string, string?>("ConnectionStrings:messaging2", "localhost:9092"), 97new KeyValuePair<string, string?>("Aspire:Confluent:Kafka:Consumer:messaging2:Config:GroupId", "messaging2"), 99new KeyValuePair<string, string?>("ConnectionStrings:messaging3", "localhost:9093"), 100new KeyValuePair<string, string?>("Aspire:Confluent:Kafka:Consumer:messaging3:Config:GroupId", "messaging3"),
OtelMetricsTests.cs (1)
36new KeyValuePair<string, string?>("ConnectionStrings:messaging", _containerFixture?.Container?.GetBootstrapAddress()),
OtelTracesTests.cs (1)
38new KeyValuePair<string, string?>("ConnectionStrings:messaging", _containerFixture?.Container?.GetBootstrapAddress()),
ProducerConfigurationTests.cs (5)
22new KeyValuePair<string, string?>("ConnectionStrings:messaging", CommonHelpers.TestingEndpoint) 51new KeyValuePair<string, string?>("ConnectionStrings:messaging", "unused") 83new KeyValuePair<string, string?>(ProducerConformanceTests.CreateConfigKey("Aspire:Confluent:Kafka:Producer", key, "ConnectionString"), "unused"), 84new KeyValuePair<string, string?>("ConnectionStrings:messaging", CommonHelpers.TestingEndpoint) 123new KeyValuePair<string, string?>("ConnectionStrings:messaging", CommonHelpers.TestingEndpoint)
ProducerConformanceTests.cs (4)
29new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Confluent:Kafka:Producer", key, "ConnectionString"), 89new KeyValuePair<string, string?>("ConnectionStrings:messaging1", "localhost:9091"), 90new KeyValuePair<string, string?>("ConnectionStrings:messaging2", "localhost:9092"), 91new KeyValuePair<string, string?>("ConnectionStrings:messaging3", "localhost:9093"),
Aspire.Dashboard (4)
Otlp\Model\OtlpHelpers.cs (4)
233values[existingIndex] = new KeyValuePair<string, string>(attribute.Key, value); 240values.Add(new KeyValuePair<string, string>(attribute.Key, value)); 310copiedAttributes[existingIndex] = new KeyValuePair<string, string>(attribute.Key, value); 317copiedAttributes[index + copyCount] = new KeyValuePair<string, string>(attribute.Key, value);
Aspire.Dashboard.Components.Tests (15)
Controls\ResourceDetailsTests.cs (4)
38builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)])); 122builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)])); 206builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)])); 290builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)]));
Pages\ResourcesTests.cs (8)
151new("Type1", true), 152new("Type2", true), 153new("Type3", true), 155new("Running", true), 156new("Stopping", true), 158new("", true), 159new("Healthy", true), 160new("Unhealthy", true),
tests\Shared\Logging\LogValuesAssert.cs (1)
21Contains(new[] { new KeyValuePair<string, object>(key, value) }, actualValues);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
189attributes ??= [new KeyValuePair<string, string>("{OriginalFormat}", "Test {Log}"), new KeyValuePair<string, string>("Log", "Value!")];
Aspire.Dashboard.Tests (17)
Model\SpanWaterfallViewModelTests.cs (1)
92new KeyValuePair<string, string>("peer.service", "peer-service")
TelemetryRepositoryTests\LogTests.cs (2)
623new KeyValuePair<string, string>("{OriginalFormat}", "Test {Log}") 629attributes.Add(new KeyValuePair<string, string>($"Key{i}", value));
TelemetryRepositoryTests\MetricsTests.cs (4)
115metricAttributes.Add(new KeyValuePair<string, string>($"Metric_Key{i}", value)); 116meterAttributes.Add(new KeyValuePair<string, string>($"Meter_Key{i}", value)); 226new KeyValuePair<string, string>("Meter_Key0", GetValue(5)) 232metricAttributes.Add(new KeyValuePair<string, string>($"Metric_Key{i}", value));
TelemetryRepositoryTests\OtlpHelpersTests.cs (5)
283new KeyValuePair<string, string>("parentkey1", "parentvalue1") 319new KeyValuePair<string, string>("parentkey1", "parentvalue1") 360new KeyValuePair<string, string>("parentkey1", "parentvalue1"), 361new KeyValuePair<string, string>("parentkey2", "parentvalue2"), 362new KeyValuePair<string, string>("parentkey3", "parentvalue3")
TelemetryRepositoryTests\OtlpSpanTests.cs (1)
26statusCode: OtlpSpanStatusCode.Ok, statusMessage: "Status message!", attributes: [new KeyValuePair<string, string>(KnownTraceFields.StatusMessageField, "value")]);
TelemetryRepositoryTests\TraceTests.cs (1)
772attributes.Add(new KeyValuePair<string, string>($"Key{i}", value));
tests\Shared\Logging\LogValuesAssert.cs (1)
21Contains(new[] { new KeyValuePair<string, object>(key, value) }, actualValues);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
189attributes ??= [new KeyValuePair<string, string>("{OriginalFormat}", "Test {Log}"), new KeyValuePair<string, string>("Log", "Value!")];
Aspire.Hosting.Azure.CosmosDB (1)
src\Shared\StableConnectionStringBuilder.cs (1)
163yield return new KeyValuePair<string, string>(seg.Key.Trim(), seg.Value ?? string.Empty);
Aspire.Hosting.Testing.Tests (1)
tests\Shared\Logging\LogValuesAssert.cs (1)
21Contains(new[] { new KeyValuePair<string, object>(key, value) }, actualValues);
Aspire.Hosting.Tests (8)
Dashboard\DashboardLifecycleHookTests.cs (3)
113configurationBuilder.AddInMemoryCollection([new KeyValuePair<string, string?>("DEBUG_SESSION_PORT", debugSessionPort)]); 118configurationBuilder.AddInMemoryCollection([new KeyValuePair<string, string?>("DEBUG_SESSION_TOKEN", debugSessionToken)]); 123configurationBuilder.AddInMemoryCollection([new KeyValuePair<string, string?>("DEBUG_SESSION_SERVER_CERTIFICATE", debugSessionCert)]);
src\Shared\StableConnectionStringBuilder.cs (1)
163yield return new KeyValuePair<string, string>(seg.Key.Trim(), seg.Value ?? string.Empty);
StableConnectionStringBuilderTests.cs (3)
212new KeyValuePair<string, string>("A", "1"), 213new KeyValuePair<string, string>("B", "2"), 214new KeyValuePair<string, string>("C", "3"),
tests\Shared\Logging\LogValuesAssert.cs (1)
21Contains(new[] { new KeyValuePair<string, object>(key, value) }, actualValues);
Aspire.Microsoft.Azure.Cosmos (1)
src\Shared\StableConnectionStringBuilder.cs (1)
163yield return new KeyValuePair<string, string>(seg.Key.Trim(), seg.Value ?? string.Empty);
Aspire.Microsoft.Azure.Cosmos.Tests (23)
AspireMicrosoftAzureCosmosExtensionsTests.cs (19)
414new KeyValuePair<string, string?>("ConnectionStrings:cosmos", connectionString), 415new KeyValuePair<string, string?>("ConnectionStrings:container1", $"{connectionString}Container={containerName};") 449new KeyValuePair<string, string?>("ConnectionStrings:cosmos", connectionString), 450new KeyValuePair<string, string?>("ConnectionStrings:container1", $"{connectionString}Container={container1Name};"), 451new KeyValuePair<string, string?>("ConnectionStrings:container2", $"{connectionString}Container={container2Name};") 481new KeyValuePair<string, string?>("ConnectionStrings:cosmos", connectionString), 482new KeyValuePair<string, string?>("ConnectionStrings:container1", connectionString) 503new KeyValuePair<string, string?>("ConnectionStrings:cosmos", connectionString) 530new KeyValuePair<string, string?>("ConnectionStrings:cosmos", connectionString), 531new KeyValuePair<string, string?>("ConnectionStrings:container1", $"{connectionString}Container={containerName};") 560new KeyValuePair<string, string?>("ConnectionStrings:cosmos", connectionString), 561new KeyValuePair<string, string?>("ConnectionStrings:container1", $"{connectionString}Container={container1Name};"), 562new KeyValuePair<string, string?>("ConnectionStrings:container2", $"{connectionString}Container={container2Name};") 600new KeyValuePair<string, string?>("ConnectionStrings:cosmos1", connectionString1), 601new KeyValuePair<string, string?>("ConnectionStrings:users", $"{connectionString1}Container={container1Name};"), 602new KeyValuePair<string, string?>("ConnectionStrings:orders", $"{connectionString1}Container={container2Name};"), 605new KeyValuePair<string, string?>("ConnectionStrings:cosmos2", connectionString2), 606new KeyValuePair<string, string?>("ConnectionStrings:products", $"{connectionString2}Container={container3Name};") 635new KeyValuePair<string, string?>($"ConnectionStrings:{key ?? "cosmos"}", connectionString)
ConformanceTests.cs (4)
24new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Microsoft:Azure:Cosmos", key, "ConnectionString"), 81new KeyValuePair<string, string?>("ConnectionStrings:cosmosdb1", "AccountEndpoint=https://example1.documents.azure.com:443/;AccountKey=fake;"), 82new KeyValuePair<string, string?>("ConnectionStrings:cosmosdb2", "AccountEndpoint=https://example2.documents.azure.com:443/;AccountKey=fake;"), 83new KeyValuePair<string, string?>("ConnectionStrings:cosmosdb3", "AccountEndpoint=https://example3.documents.azure.com:443/;AccountKey=fake;"),
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Implementation\SqlActivitySourceHelper.cs (1)
27new KeyValuePair<string, object>(SemanticConventions.AttributeDbSystem, MicrosoftSqlServerDatabaseSystemName),
Aspire.Microsoft.Data.SqlClient.Tests (8)
AspireSqlServerSqlClientExtensionsTests.cs (7)
23new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString) 50new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", "unused") 82new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Microsoft:Data:SqlClient", key, "ConnectionString"), "unused"), 83new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString) 110new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection1", "Data Source=fake1;Database=master"), 111new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection2", "Data Source=fake2;Database=master"), 112new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection3", "Data Source=fake3;Database=master"),
ConformanceTests.cs (1)
63new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Microsoft:Data:SqlClient", key, "ConnectionString"),
Aspire.Microsoft.EntityFrameworkCore.Cosmos (1)
src\Shared\StableConnectionStringBuilder.cs (1)
163yield return new KeyValuePair<string, string>(seg.Key.Trim(), seg.Value ?? string.Empty);
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (14)
AspireAzureEfCoreCosmosDBExtensionsTests.cs (11)
23new KeyValuePair<string, string?>("ConnectionStrings:cosmosConnection", ConnectionString), 24new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:Cosmos:Region", "westus"), 59new KeyValuePair<string, string?>("ConnectionStrings:cosmosConnection", ConnectionString), 64new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:Cosmos:RequestTimeout", "00:10:08"), 93new KeyValuePair<string, string?>("ConnectionStrings:cosmosConnection", ConnectionString), 98new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:Cosmos:RequestTimeout", "400"), 136new KeyValuePair<string, string?>("ConnectionStrings:cosmos", ConnectionString), 137new KeyValuePair<string, string?>("ConnectionStrings:cosmos2", connectionString2), 161new KeyValuePair<string, string?>("ConnectionStrings:cosmos", ConnectionString) 184new KeyValuePair<string, string?>("ConnectionStrings:cosmos", ConnectionString) 408new KeyValuePair<string, string?>("ConnectionStrings:cosmos", connectionString)
ConformanceTests.cs (1)
32new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:Cosmos:ConnectionString",
EnrichCosmosDbTests.cs (2)
143new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:Cosmos:DisableTracing", "false"), 144new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:Cosmos:TestDbContext:DisableTracing", "true")
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Implementation\SqlActivitySourceHelper.cs (1)
27new KeyValuePair<string, object>(SemanticConventions.AttributeDbSystem, MicrosoftSqlServerDatabaseSystemName),
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (22)
AspireSqlServerEFCoreSqlClientExtensionsTests.cs (17)
25new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString) 41new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", "unused") 60new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:SqlServer:ConnectionString", "unused"), 61new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString) 80new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString), 81new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:SqlServer:DisableRetry", "false"), 82new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:SqlServer:CommandTimeout", "608") 125new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString), 126new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:SqlServer:DisableRetry", "true"), 165new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString) 170new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:SqlServer:CommandTimeout", "608") 199new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString) 204new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:SqlServer:CommandTimeout", "400") 237new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString), 238new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection2", connectionString2), 262new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString) 285new KeyValuePair<string, string?>("ConnectionStrings:sqlconnection", ConnectionString)
ConformanceTests.cs (1)
76new ("Aspire:Microsoft:EntityFrameworkCore:SqlServer:ConnectionString", ConnectionString)
ConformanceTests_TypeSpecificConfig.cs (1)
20new($"Aspire:Microsoft:EntityFrameworkCore:SqlServer:{typeof(TestDbContext).Name}:ConnectionString", ConnectionString)
EnrichSqlServerTests.cs (3)
59new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:SqlServer:DisableRetry", "false") 149new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:SqlServer:DisableRetry", "true") 192new KeyValuePair<string, string?>("Aspire:Microsoft:EntityFrameworkCore:SqlServer:DisableRetry", "false")
Aspire.Milvus.Client.Tests (10)
AspireMilvusExtensionTests.cs (5)
36new KeyValuePair<string, string?>($"ConnectionStrings:{DefaultKeyName}", ConnectionString) 89new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Milvus:Client", key, "Endpoint"), "unused"), 90new KeyValuePair<string, string?>($"ConnectionStrings:{DefaultKeyName}", ConnectionString) 120new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Milvus:Client", key, "Endpoint"), "unused"), 121new KeyValuePair<string, string?>($"ConnectionStrings:{DefaultKeyName}", ConnectionString)
ConformanceTests.cs (5)
55new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Milvus:Client", key, "Endpoint"), GetConnectionStringKeyValue(ConnectionString, "Endpoint")), 56new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Milvus:Client", key, "Key"), GetConnectionStringKeyValue(ConnectionString, "Key")) 109new KeyValuePair<string, string?>("ConnectionStrings:milvus1", "Endpoint=http://localhost1:19530;Key=pass"), 110new KeyValuePair<string, string?>("ConnectionStrings:milvus2", "Endpoint=http://localhost2:19531;Key=pass"), 111new KeyValuePair<string, string?>("ConnectionStrings:milvus3", "Endpoint=http://localhost3:19532;Key=pass"),
Aspire.MongoDB.Driver.Tests (5)
AspireMongoDBDriverExtensionsTests.cs (4)
208new KeyValuePair<string, string?>("ConnectionStrings:mongodb1", "mongodb://localhost:27011/mydatabase1"), 209new KeyValuePair<string, string?>("ConnectionStrings:mongodb2", "mongodb://localhost:27012/mydatabase2"), 210new KeyValuePair<string, string?>("ConnectionStrings:mongodb3", "mongodb://localhost:27013/mydatabase3"), 237new KeyValuePair<string, string?>($"ConnectionStrings:{DefaultConnectionName}", connectionString)
ConformanceTests.cs (1)
67new KeyValuePair<string, string?>(
Aspire.MongoDB.Driver.v3.Tests (5)
tests\Aspire.MongoDB.Driver.Tests\AspireMongoDBDriverExtensionsTests.cs (4)
208new KeyValuePair<string, string?>("ConnectionStrings:mongodb1", "mongodb://localhost:27011/mydatabase1"), 209new KeyValuePair<string, string?>("ConnectionStrings:mongodb2", "mongodb://localhost:27012/mydatabase2"), 210new KeyValuePair<string, string?>("ConnectionStrings:mongodb3", "mongodb://localhost:27013/mydatabase3"), 237new KeyValuePair<string, string?>($"ConnectionStrings:{DefaultConnectionName}", connectionString)
tests\Aspire.MongoDB.Driver.Tests\ConformanceTests.cs (1)
67new KeyValuePair<string, string?>(
Aspire.MySqlConnector.Tests (8)
AspireMySqlConnectorExtensionsTests.cs (7)
31new KeyValuePair<string, string?>("ConnectionStrings:mysql", ConnectionString) 58new KeyValuePair<string, string?>("ConnectionStrings:mysql", "unused") 90new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:MySqlConnector", key, "ConnectionString"), "unused"), 91new KeyValuePair<string, string?>("ConnectionStrings:mysql", ConnectionString) 118new KeyValuePair<string, string?>("ConnectionStrings:mysql1", "Server=localhost1;Database=test_aspire_mysql"), 119new KeyValuePair<string, string?>("ConnectionStrings:mysql2", "Server=localhost2;Database=test_aspire_mysql"), 120new KeyValuePair<string, string?>("ConnectionStrings:mysql3", "Server=localhost3;Database=test_aspire_mysql"),
ConformanceTests.cs (1)
69new KeyValuePair<string, string?>(CreateConfigKey("Aspire:MySqlConnector", key, "ConnectionString"), ConnectionString)
Aspire.NATS.Net.Tests (11)
AspireNatsClientExtensionsTests.cs (9)
39new KeyValuePair<string, string?>("ConnectionStrings:nats", _connectionString) 66new KeyValuePair<string, string?>("ConnectionStrings:nats", "nats://nats:password@aspire-host:4222") 95new KeyValuePair<string, string?>("ConnectionStrings:nats", "unused") 128new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Nats:Client", key, "ConnectionString"), "unused"), 129new KeyValuePair<string, string?>("ConnectionStrings:nats", _connectionString) 241new KeyValuePair<string, string?>("ConnectionStrings:nats1", "nats://aspire-host1:4222"), 242new KeyValuePair<string, string?>("ConnectionStrings:nats2", "nats://aspire-host2:4222"), 243new KeyValuePair<string, string?>("ConnectionStrings:nats3", "nats://aspire-host3:4222"), 270new KeyValuePair<string, string?>($"ConnectionStrings:{DefaultConnectionName}", connectionString)
ConformanceTests.cs (1)
54new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Nats:Net", key, "ConnectionString"), _connectionString)
NatsClientPublicApiTests.cs (1)
178new KeyValuePair<string, string?>("ConnectionStrings:Nats", "nats")
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (23)
AspireEFPostgreSqlExtensionsTests.cs (16)
34new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 50new KeyValuePair<string, string?>("ConnectionStrings:npgsql", "unused") 71new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:ConnectionString", "unused"), 72new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 91new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString), 92new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:Retry", "true") 133new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString), 134new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableRetry", "true") 174new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 179new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:CommandTimeout", "123") 208new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 213new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:CommandTimeout", "400") 245new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString), 246new KeyValuePair<string, string?>("ConnectionStrings:npgsql2", connectionString2), 270new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 293new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString)
ConformanceTests.cs (1)
93new("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:ConnectionString", ConnectionString)
ConformanceTests_TypeSpecificConfig.cs (1)
19new($"Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:{typeof(TestDbContext).Name}:ConnectionString", ConnectionString)
EnrichNpgsqlTests.cs (5)
63new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:Retry", "true") 156new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableRetry", "true") 200new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableRetry", "false") 355new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableTracing", "false"), 356new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:TestDbContext:DisableTracing", "true")
Aspire.Npgsql.Tests (9)
AspirePostgreSqlNpgsqlExtensionsTests.cs (8)
23new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 50new KeyValuePair<string, string?>("ConnectionStrings:npgsql", "unused") 82new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Npgsql", key, "ConnectionString"), "unused"), 83new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 112new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString) 140new KeyValuePair<string, string?>("ConnectionStrings:npgsql1", "Host=localhost1;Database=test_aspire_npgsql"), 141new KeyValuePair<string, string?>("ConnectionStrings:npgsql2", "Host=localhost2;Database=test_aspire_npgsql"), 142new KeyValuePair<string, string?>("ConnectionStrings:npgsql3", "Host=localhost3;Database=test_aspire_npgsql"),
ConformanceTests.cs (1)
71new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Npgsql", key, "ConnectionString"), ConnectionString)
Aspire.OpenAI.Tests (37)
AspireOpenAIClientBuilderChatClientExtensionsTests.cs (12)
23new ("Aspire:OpenAI:Endpoint", "https://aspireopenaitests.openai.azure.com/"), 24new ("Aspire:OpenAI:Deployment", "testdeployment1"), 25new ("Aspire:OpenAI:Key", "fake"), 55new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake;{connectionStringKey}=testdeployment1") 83new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake") 111new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake;Deployment=testdeployment1;Model=something") 142new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake") 175new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake"), 176new("Aspire:OpenAI:DisableTracing", disableOpenTelemetry.ToString()), 203new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake") 233new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake"), 234new("Aspire:OpenAI:DisableTracing", disableOpenTelemetry.ToString()),
AspireOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (12)
23new("Aspire:OpenAI:Endpoint", "https://aspireopenaitests.openai.azure.com/"), 24new("Aspire:OpenAI:Deployment", "testdeployment1"), 25new("Aspire:OpenAI:Key", "fake"), 55new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake;{connectionStringKey}=testdeployment1") 83new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake") 111new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake;Deployment=testdeployment1;Model=something") 142new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake") 175new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake"), 176new("Aspire:OpenAI:DisableTracing", disableOpenTelemetry.ToString()), 203new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake") 233new("ConnectionStrings:openai", $"Endpoint=https://aspireopenaitests.openai.azure.com/;Key=fake"), 234new("Aspire:OpenAI:DisableTracing", disableOpenTelemetry.ToString()),
AspireOpenAIExtensionsTests.cs (12)
24new KeyValuePair<string, string?>("ConnectionStrings:openai", ConnectionString) 78new KeyValuePair<string, string?>("ConnectionStrings:openai", connectionString) 96new KeyValuePair<string, string?>("ConnectionStrings:openai", connectionString) 116new KeyValuePair<string, string?>("ConnectionStrings:openai1", ConnectionString), 117new KeyValuePair<string, string?>("ConnectionStrings:openai2", ConnectionString + "2"), 118new KeyValuePair<string, string?>("ConnectionStrings:openai3", ConnectionString + "3") 141new KeyValuePair<string, string?>("ConnectionStrings:openai", ConnectionString), 142new KeyValuePair<string, string?>("Aspire:OpenAI:DisableTracing", "true") 163new KeyValuePair<string, string?>("ConnectionStrings:openai", ConnectionString), 164new KeyValuePair<string, string?>("Aspire:OpenAI:ClientOptions:ProjectId", "myproject") 186new KeyValuePair<string, string?>("Aspire:OpenAI:ClientOptions:ProjectId", "myproject"), 187new KeyValuePair<string, string?>("Aspire:OpenAI:openai:ClientOptions:ProjectId", "myproject2")
ConformanceTests.cs (1)
52new KeyValuePair<string, string?>(CreateConfigKey("Aspire:OpenAI", key, "Key"), "fake")
Aspire.Oracle.EntityFrameworkCore.Tests (26)
AspireOracleEFCoreDatabaseExtensionsTests.cs (19)
26new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString) 42new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", "unused") 61new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:ConnectionString", "unused"), 62new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString) 81new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString), 82new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:DisableRetry", "false"), 83new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:CommandTimeout", "608") 126new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString), 127new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:DisableRetry", "true"), 166new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString), 171new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:CommandTimeout", "608") 200new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString), 205new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:CommandTimeout", "400") 238new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString), 239new KeyValuePair<string, string?>("ConnectionStrings:orclconnection2", connectionString2), 263new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString) 286new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString) 308new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString) 324new KeyValuePair<string, string?>("ConnectionStrings:orclconnection", ConnectionString)
ConformanceTests.cs (1)
71new ("Aspire:Oracle:EntityFrameworkCore:ConnectionString", ConnectionString)
ConformanceTests_TypeSpecificConfig.cs (1)
19new($"Aspire:Oracle:EntityFrameworkCore:{typeof(TestDbContext).Name}:ConnectionString", ConnectionString)
EnrichOracleDatabaseTests.cs (5)
59new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:DisableRetry", "false") 149new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:DisableRetry", "true") 192new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:DisableRetry", "false") 340new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:DisableTracing", "false"), 341new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:TestDbContext:DisableTracing", "true")
Aspire.Playground.Tests (8)
Infrastructure\DistributedApplicationExtensions.cs (2)
219using var emptyDbContextContent = new FormUrlEncodedContent([new("context", "")]); 250using var content = new FormUrlEncodedContent([new("context", dbContextType.AssemblyQualifiedName)]);
tests\Aspire.TestUtilities\QuarantinedTestAttribute.cs (1)
53=> [new KeyValuePair<string, string>("quarantined", "true")];
tests\Aspire.TestUtilities\RequiresDockerAttribute.cs (1)
35return [new KeyValuePair<string, string>(XunitConstants.Category, "failing")];
tests\Aspire.TestUtilities\RequiresPlaywrightAttribute.cs (1)
29return [new KeyValuePair<string, string>(XunitConstants.Category, "failing")];
tests\Aspire.TestUtilities\RequiresSSLCertificateAttribute.cs (1)
20return [new KeyValuePair<string, string>(XunitConstants.Category, "failing")];
tests\Aspire.TestUtilities\RequiresToolsAttribute.cs (1)
27return [new KeyValuePair<string, string>(XunitConstants.Category, "failing")];
tests\Shared\Logging\LogValuesAssert.cs (1)
21Contains(new[] { new KeyValuePair<string, object>(key, value) }, actualValues);
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (30)
AspireEFMySqlExtensionsTests.cs (21)
37new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:ServerVersion", s_serverVersionString), 38new KeyValuePair<string, string?>("ConnectionStrings:mysql", ConnectionString) 56new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:ServerVersion", s_serverVersionString), 57new KeyValuePair<string, string?>("ConnectionStrings:mysql", "unused") 77new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:ServerVersion", s_serverVersionString), 78new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:ConnectionString", "unused"), 79new KeyValuePair<string, string?>("ConnectionStrings:mysql", ConnectionString) 99new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:ServerVersion", s_serverVersionString), 100new KeyValuePair<string, string?>("ConnectionStrings:mysql", ConnectionString), 101new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:DisableRetry", "false") 142new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:ServerVersion", s_serverVersionString), 143new KeyValuePair<string, string?>("ConnectionStrings:mysql", ConnectionString), 144new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:DisableRetry", "true") 184new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:ServerVersion", "8.2.0-mysql"), 185new KeyValuePair<string, string?>("ConnectionStrings:mysql", ConnectionString), 190new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:CommandTimeout", "123"), 219new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:ServerVersion", "8.2.0-mysql"), 220new KeyValuePair<string, string?>("ConnectionStrings:mysql", ConnectionString), 225new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:CommandTimeout", "400"), 257new KeyValuePair<string, string?>("ConnectionStrings:mysql", ConnectionString) 280new KeyValuePair<string, string?>("ConnectionStrings:mysql", ConnectionString)
ConformanceTests.cs (2)
86new("Aspire:Pomelo:EntityFrameworkCore:MySql:ConnectionString", ConnectionString), 87new("Aspire:Pomelo:EntityFrameworkCore:MySql:ServerVersion", ServerVersion)
ConformanceTests_TypeSpecificConfig.cs (2)
19new($"Aspire:Pomelo:EntityFrameworkCore:MySql:{typeof(TestDbContext).Name}:ConnectionString", ConnectionString), 20new($"Aspire:Pomelo:EntityFrameworkCore:MySql:{typeof(TestDbContext).Name}:ServerVersion", ServerVersion)
EnrichMySqlTests.cs (5)
73new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:DisableRetry", "false") 163new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:DisableRetry", "true") 206new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:DisableRetry", "false") 354new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:DisableTracing", "false"), 355new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:TestDbContext:DisableTracing", "true")
Aspire.Qdrant.Client.Tests (6)
AspireQdrantClientExtensionsTest.cs (4)
92new KeyValuePair<string, string?>("ConnectionStrings:qdrant1", "Endpoint=http://localhost1:6331;Key=pass"), 93new KeyValuePair<string, string?>("ConnectionStrings:qdrant2", "Endpoint=http://localhost2:6332;Key=pass"), 94new KeyValuePair<string, string?>("ConnectionStrings:qdrant3", "Endpoint=http://localhost3:6333;Key=pass"), 117new KeyValuePair<string, string?>($"ConnectionStrings:{DefaultConnectionName}", connectionString)
ConformanceTests.cs (2)
58new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Qdrant:Client", key, "Endpoint"), GetConnectionStringKeyValue(_connectionString,"Endpoint")), 59new KeyValuePair<string, string?>(CreateConfigKey("Aspire:Qdrant:Client", key, "Key"), GetConnectionStringKeyValue(_connectionString,"Key")),
Aspire.RabbitMQ.Client (4)
src\Components\Aspire.RabbitMQ.Client\RabbitMQEventSourceLogForwarder.cs (4)
1150 => new("exception.type", exData["Type"]), 1161 => new("exception.message", exData["Message"]), 1172 => new("exception.stacktrace", exData["StackTrace"]), 1183 => new("exception.innerexception", exData["InnerException"]),
Aspire.RabbitMQ.Client.Tests (9)
AspireRabbitMQExtensionsTests.cs (7)
33new KeyValuePair<string, string?>("ConnectionStrings:messaging", _containerFixture.GetConnectionString()) 61new KeyValuePair<string, string?>("ConnectionStrings:messaging", "unused") 92new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:RabbitMQ:Client", key, "ConnectionString"), "unused"), 93new KeyValuePair<string, string?>("ConnectionStrings:messaging", _containerFixture.GetConnectionString()) 171new KeyValuePair<string, string?>("ConnectionStrings:messaging1", _containerFixture.GetConnectionString()), 172new KeyValuePair<string, string?>("ConnectionStrings:messaging2", container2.GetConnectionString()), 173new KeyValuePair<string, string?>("ConnectionStrings:messaging3", container3.GetConnectionString())
AspireRabbitMQLoggingTests.cs (1)
44new KeyValuePair<string, string?>("ConnectionStrings:messaging", rabbitMqContainer.GetConnectionString())
ConformanceTests.cs (1)
78new(CreateConfigKey("Aspire:RabbitMQ:Client", key, "ConnectionString"), connectionString)
Aspire.RabbitMQ.Client.v7.Tests (9)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQExtensionsTests.cs (7)
33new KeyValuePair<string, string?>("ConnectionStrings:messaging", _containerFixture.GetConnectionString()) 61new KeyValuePair<string, string?>("ConnectionStrings:messaging", "unused") 92new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:RabbitMQ:Client", key, "ConnectionString"), "unused"), 93new KeyValuePair<string, string?>("ConnectionStrings:messaging", _containerFixture.GetConnectionString()) 171new KeyValuePair<string, string?>("ConnectionStrings:messaging1", _containerFixture.GetConnectionString()), 172new KeyValuePair<string, string?>("ConnectionStrings:messaging2", container2.GetConnectionString()), 173new KeyValuePair<string, string?>("ConnectionStrings:messaging3", container3.GetConnectionString())
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (1)
44new KeyValuePair<string, string?>("ConnectionStrings:messaging", rabbitMqContainer.GetConnectionString())
tests\Aspire.RabbitMQ.Client.Tests\ConformanceTests.cs (1)
78new(CreateConfigKey("Aspire:RabbitMQ:Client", key, "ConnectionString"), connectionString)
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (1)
27new KeyValuePair<string, object?>(SemanticConventions.AttributeDbSystem, "redis"),
Aspire.StackExchange.Redis.Tests (16)
AspireRedisExtensionsTests.cs (15)
63new KeyValuePair<string, string?>("ConnectionStrings:myredis", ConnectionString) 91new KeyValuePair<string, string?>("ConnectionStrings:redis", "unused") 124new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:StackExchange:Redis", key, "ConnectionString"), "unused"), 125new KeyValuePair<string, string?>("ConnectionStrings:redis", ConnectionString) 163new KeyValuePair<string, string?>("ConnectionStrings:redis", TestingEndpoint) 168new KeyValuePair<string, string?>("ConnectionStrings:redis", TestingEndpoint), 169new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:StackExchange:Redis", useKeyed ? "redis" : null, "ConfigurationOptions:AbortOnConnectFail"), "true") 174new KeyValuePair<string, string?>("ConnectionStrings:redis", $"{TestingEndpoint},abortConnect={(abortConnect ? "true" : "false")}") 309new KeyValuePair<string, string?>("ConnectionStrings:redis1", ConnectionString), 310new KeyValuePair<string, string?>("ConnectionStrings:redis2", container2.GetConnectionString()), 311new KeyValuePair<string, string?>("ConnectionStrings:redis3", container3.GetConnectionString()) 346new KeyValuePair<string, string?>("ConnectionStrings:redis1", container1.GetConnectionString()), 347new KeyValuePair<string, string?>("ConnectionStrings:redis2", container2.GetConnectionString()), 348new KeyValuePair<string, string?>("ConnectionStrings:redis3", container3.GetConnectionString()) 388new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:StackExchange:Redis", key, "ConnectionString"), ConnectionString)
ConformanceTests.cs (1)
73new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:StackExchange:Redis", key, "ConnectionString"), connectionString)
Aspire.TestUtilities (5)
QuarantinedTestAttribute.cs (1)
53=> [new KeyValuePair<string, string>("quarantined", "true")];
RequiresDockerAttribute.cs (1)
35return [new KeyValuePair<string, string>(XunitConstants.Category, "failing")];
RequiresPlaywrightAttribute.cs (1)
29return [new KeyValuePair<string, string>(XunitConstants.Category, "failing")];
RequiresSSLCertificateAttribute.cs (1)
20return [new KeyValuePair<string, string>(XunitConstants.Category, "failing")];
RequiresToolsAttribute.cs (1)
27return [new KeyValuePair<string, string>(XunitConstants.Category, "failing")];
Diagnostics.EFCore.FunctionalTests (5)
DatabaseErrorPageMiddlewareTest.cs (1)
297new KeyValuePair<string, string>("context", expectedContextType)
MigrationsEndPointMiddlewareTest.cs (4)
122new KeyValuePair<string, string>("context", typeof(BloggingContextWithMigrations).AssemblyQualifiedName) 190new KeyValuePair<string, string>("context", typeName) 219new KeyValuePair<string, string>("context", typeof(BloggingContext).AssemblyQualifiedName) 258new KeyValuePair<string, string>("context", typeof(BloggingContextWithSnapshotThatThrows).AssemblyQualifiedName)
dotnet-svcutil-lib (17)
CommandProcessorOptions.cs (1)
654this.NamespaceMappings.Add(new KeyValuePair<string, string>("*", clrNamespace));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (1)
60return new KeyValuePair<K, T>(_kvpKey, _kvpValue);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (10)
734array[index++] = new KeyValuePair<string, object>(ViaKey, _via); 737array[index++] = new KeyValuePair<string, object>(AllowOutputBatchingKey, _allowOutputBatching); 740array[index++] = new KeyValuePair<string, object>(SecurityKey, _security.CreateCopy()); 743array[index++] = new KeyValuePair<string, object>(EncoderKey, _encoder); 756array[index++] = new KeyValuePair<string, object>(propertyName, CreateCopyOfPropertyValue(_properties[i].Value)); 804pairs.Add(new KeyValuePair<string, object>(ViaKey, _via)); 807pairs.Add(new KeyValuePair<string, object>(AllowOutputBatchingKey, _allowOutputBatching)); 810pairs.Add(new KeyValuePair<string, object>(SecurityKey, _security)); 813pairs.Add(new KeyValuePair<string, object>(EncoderKey, _encoder)); 826pairs.Add(new KeyValuePair<string, object>(propertyName, _properties[i].Value));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ImportedPolicyConversionContext.cs (2)
261digits[i] = new KeyValuePair<K, IEnumerator<V>>(kvp.Key, kvp.Value.GetEnumerator()); 285digits[currentDigit] = new KeyValuePair<K, IEnumerator<V>>(digits[currentDigit].Key, newDigit);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (1)
285multipleHeaderValues[headerDescription.Index] = new KeyValuePair<System.Type, System.Collections.ArrayList>(headerDescription.TypedHeader ? TypedHeaderManager.GetMessageHeaderType(headerDescription.Type) : headerDescription.Type, new ArrayList());
Shared\Options\OptionValueParser.cs (1)
217var value = new KeyValuePair<string, string>(parts[0].Trim(), parts[1].Trim());
Shared\Options\WCFCSUpdateOptions.cs (1)
173var value = new KeyValuePair<string, string>(valueKey.Trim(), valueVal.Trim());
dotnet-svcutil-lib.Tests (5)
E2ETests.cs (1)
358wcfcsoptions.NamespaceMappings.Add(new KeyValuePair<string, string>("*", $"{testCaseName}_NS"));
GlobalToolTests.cs (1)
193options.NamespaceMappings.Add(new System.Collections.Generic.KeyValuePair<string, string>("*", ns));
ProjectUtils.cs (1)
187updateOptions.NamespaceMappings.Add(new KeyValuePair<string, string>("*", referenceNamespace));
TestInit.cs (2)
488diffLines = new KeyValuePair<string, string>($"Line count file1: {fileLines1.Count}", $"Line count file2: {fileLines2.Count}"); 500diffLines = new KeyValuePair<string, string>(fileLines1[i], fileLines2[i]);
GenerateDocumentationAndConfigFiles (12)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
http2cat (52)
src\Shared\Http2cat\Http2Utilities.cs (52)
38new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 39new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 40new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 41new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 42new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 43new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 44new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 45new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 46new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 51new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 52new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 53new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 54new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 55new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 56new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 57new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 58new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 59new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 64new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 65new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 66new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 67new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 72new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 73new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 74new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 75new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 76new KeyValuePair<string, string>("expect", "100-continue"), 81new KeyValuePair<string, string>("trailer-one", "1"), 82new KeyValuePair<string, string>("trailer-two", "2"), 87new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 88new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 89new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 90new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 91new KeyValuePair<string, string>("a", FourKHeaderValue), 92new KeyValuePair<string, string>("b", FourKHeaderValue), 93new KeyValuePair<string, string>("c", FourKHeaderValue), 94new KeyValuePair<string, string>("d", FourKHeaderValue) 99new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 100new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 101new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 102new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 103new KeyValuePair<string, string>("a", FourKHeaderValue), 104new KeyValuePair<string, string>("b", FourKHeaderValue), 105new KeyValuePair<string, string>("c", FourKHeaderValue), 106new KeyValuePair<string, string>("d", FourKHeaderValue), 107new KeyValuePair<string, string>("e", FourKHeaderValue), 108new KeyValuePair<string, string>("f", FourKHeaderValue), 109new KeyValuePair<string, string>("g", FourKHeaderValue), 114new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 115new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + expectedBytes), 116new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 117new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
IIS.FunctionalTests (91)
Http2TrailersResetTests.cs (13)
490var kvp = new KeyValuePair<string, string>(InternalHeaderNames.Path, path); 499var kvp = new KeyValuePair<string, string>(InternalHeaderNames.Path, path); 525new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 526new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 527new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 528new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 529new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 530new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 531new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 532new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 537new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 538new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 539new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (26)
73new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 74new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Http2_MethodsRequestWithoutData_Success"), 75new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 76new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 110new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 111new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 112new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 113new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 153new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 154new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Http2_RequestWithDataAndContentLength_Success"), 155new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 156new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 157new KeyValuePair<string, string>(HeaderNames.ContentLength, "11"), 223new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 224new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Http2_RequestWithDataAndNoContentLength_Success"), 225new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 226new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 384var kvp = new KeyValuePair<string, string>(InternalHeaderNames.Path, path); 401new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 402new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 403new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 404new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 405new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 406new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 407new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 408new KeyValuePair<string, string>("upgrade-insecure-requests", "1"),
src\Shared\Http2cat\Http2Utilities.cs (52)
38new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 39new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 40new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 41new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 42new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 43new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 44new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 45new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 46new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 51new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 52new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 53new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 54new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 55new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 56new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 57new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 58new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 59new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 64new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 65new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 66new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 67new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 72new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 73new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 74new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 75new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 76new KeyValuePair<string, string>("expect", "100-continue"), 81new KeyValuePair<string, string>("trailer-one", "1"), 82new KeyValuePair<string, string>("trailer-two", "2"), 87new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 88new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 89new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 90new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 91new KeyValuePair<string, string>("a", FourKHeaderValue), 92new KeyValuePair<string, string>("b", FourKHeaderValue), 93new KeyValuePair<string, string>("c", FourKHeaderValue), 94new KeyValuePair<string, string>("d", FourKHeaderValue) 99new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 100new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 101new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 102new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 103new KeyValuePair<string, string>("a", FourKHeaderValue), 104new KeyValuePair<string, string>("b", FourKHeaderValue), 105new KeyValuePair<string, string>("c", FourKHeaderValue), 106new KeyValuePair<string, string>("d", FourKHeaderValue), 107new KeyValuePair<string, string>("e", FourKHeaderValue), 108new KeyValuePair<string, string>("f", FourKHeaderValue), 109new KeyValuePair<string, string>("g", FourKHeaderValue), 114new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 115new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + expectedBytes), 116new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 117new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
IIS.LongTests (52)
src\Shared\Http2cat\Http2Utilities.cs (52)
38new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 39new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 40new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 41new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 42new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 43new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 44new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 45new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 46new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 51new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 52new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 53new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 54new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 55new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 56new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 57new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 58new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 59new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 64new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 65new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 66new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 67new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 72new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 73new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 74new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 75new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 76new KeyValuePair<string, string>("expect", "100-continue"), 81new KeyValuePair<string, string>("trailer-one", "1"), 82new KeyValuePair<string, string>("trailer-two", "2"), 87new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 88new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 89new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 90new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 91new KeyValuePair<string, string>("a", FourKHeaderValue), 92new KeyValuePair<string, string>("b", FourKHeaderValue), 93new KeyValuePair<string, string>("c", FourKHeaderValue), 94new KeyValuePair<string, string>("d", FourKHeaderValue) 99new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 100new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 101new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 102new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 103new KeyValuePair<string, string>("a", FourKHeaderValue), 104new KeyValuePair<string, string>("b", FourKHeaderValue), 105new KeyValuePair<string, string>("c", FourKHeaderValue), 106new KeyValuePair<string, string>("d", FourKHeaderValue), 107new KeyValuePair<string, string>("e", FourKHeaderValue), 108new KeyValuePair<string, string>("f", FourKHeaderValue), 109new KeyValuePair<string, string>("g", FourKHeaderValue), 114new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 115new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + expectedBytes), 116new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 117new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
IIS.NewHandler.FunctionalTests (52)
src\Shared\Http2cat\Http2Utilities.cs (52)
38new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 39new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 40new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 41new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 42new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 43new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 44new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 45new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 46new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 51new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 52new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 53new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 54new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 55new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 56new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 57new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 58new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 59new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 64new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 65new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 66new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 67new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 72new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 73new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 74new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 75new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 76new KeyValuePair<string, string>("expect", "100-continue"), 81new KeyValuePair<string, string>("trailer-one", "1"), 82new KeyValuePair<string, string>("trailer-two", "2"), 87new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 88new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 89new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 90new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 91new KeyValuePair<string, string>("a", FourKHeaderValue), 92new KeyValuePair<string, string>("b", FourKHeaderValue), 93new KeyValuePair<string, string>("c", FourKHeaderValue), 94new KeyValuePair<string, string>("d", FourKHeaderValue) 99new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 100new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 101new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 102new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 103new KeyValuePair<string, string>("a", FourKHeaderValue), 104new KeyValuePair<string, string>("b", FourKHeaderValue), 105new KeyValuePair<string, string>("c", FourKHeaderValue), 106new KeyValuePair<string, string>("d", FourKHeaderValue), 107new KeyValuePair<string, string>("e", FourKHeaderValue), 108new KeyValuePair<string, string>("f", FourKHeaderValue), 109new KeyValuePair<string, string>("g", FourKHeaderValue), 114new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 115new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + expectedBytes), 116new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 117new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
IIS.NewShim.FunctionalTests (52)
src\Shared\Http2cat\Http2Utilities.cs (52)
38new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 39new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 40new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 41new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 42new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 43new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 44new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 45new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 46new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 51new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 52new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 53new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 54new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 55new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 56new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 57new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 58new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 59new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 64new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 65new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 66new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 67new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 72new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 73new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 74new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 75new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 76new KeyValuePair<string, string>("expect", "100-continue"), 81new KeyValuePair<string, string>("trailer-one", "1"), 82new KeyValuePair<string, string>("trailer-two", "2"), 87new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 88new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 89new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 90new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 91new KeyValuePair<string, string>("a", FourKHeaderValue), 92new KeyValuePair<string, string>("b", FourKHeaderValue), 93new KeyValuePair<string, string>("c", FourKHeaderValue), 94new KeyValuePair<string, string>("d", FourKHeaderValue) 99new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 100new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 101new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 102new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 103new KeyValuePair<string, string>("a", FourKHeaderValue), 104new KeyValuePair<string, string>("b", FourKHeaderValue), 105new KeyValuePair<string, string>("c", FourKHeaderValue), 106new KeyValuePair<string, string>("d", FourKHeaderValue), 107new KeyValuePair<string, string>("e", FourKHeaderValue), 108new KeyValuePair<string, string>("f", FourKHeaderValue), 109new KeyValuePair<string, string>("g", FourKHeaderValue), 114new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 115new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + expectedBytes), 116new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 117new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
IISExpress.FunctionalTests (78)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (26)
73new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 74new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Http2_MethodsRequestWithoutData_Success"), 75new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 76new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 110new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 111new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 112new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 113new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 153new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 154new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Http2_RequestWithDataAndContentLength_Success"), 155new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 156new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 157new KeyValuePair<string, string>(HeaderNames.ContentLength, "11"), 223new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 224new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Http2_RequestWithDataAndNoContentLength_Success"), 225new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 226new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 384var kvp = new KeyValuePair<string, string>(InternalHeaderNames.Path, path); 401new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 402new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 403new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 404new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 405new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 406new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 407new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 408new KeyValuePair<string, string>("upgrade-insecure-requests", "1"),
src\Shared\Http2cat\Http2Utilities.cs (52)
38new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 39new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 40new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 41new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 42new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 43new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 44new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 45new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 46new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 51new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 52new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 53new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 54new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 55new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 56new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 57new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 58new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 59new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 64new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 65new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 66new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 67new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 72new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 73new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 74new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 75new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 76new KeyValuePair<string, string>("expect", "100-continue"), 81new KeyValuePair<string, string>("trailer-one", "1"), 82new KeyValuePair<string, string>("trailer-two", "2"), 87new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 88new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 89new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 90new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 91new KeyValuePair<string, string>("a", FourKHeaderValue), 92new KeyValuePair<string, string>("b", FourKHeaderValue), 93new KeyValuePair<string, string>("c", FourKHeaderValue), 94new KeyValuePair<string, string>("d", FourKHeaderValue) 99new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 100new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 101new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 102new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 103new KeyValuePair<string, string>("a", FourKHeaderValue), 104new KeyValuePair<string, string>("b", FourKHeaderValue), 105new KeyValuePair<string, string>("c", FourKHeaderValue), 106new KeyValuePair<string, string>("d", FourKHeaderValue), 107new KeyValuePair<string, string>("e", FourKHeaderValue), 108new KeyValuePair<string, string>("f", FourKHeaderValue), 109new KeyValuePair<string, string>("g", FourKHeaderValue), 114new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 115new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + expectedBytes), 116new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 117new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
InMemory.FunctionalTests (1110)
Http2\Http2ConnectionTests.cs (129)
171new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 172new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"), 173new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 174new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 175new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json") 223new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 224new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"), 225new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 226new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 227new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json") 233new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 234new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"), 235new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 236new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80") 317new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 318new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"), 319new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 320new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 321new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json") 2818new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2819new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2820new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2821new KeyValuePair<string, string>(":unknown", "0"), 2835new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2836new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2837new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2838new KeyValuePair<string, string>(InternalHeaderNames.Status, "200"), 2927new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2928new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2929new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2930new KeyValuePair<string, string>("a", _4kHeaderValue), 2931new KeyValuePair<string, string>("b", _4kHeaderValue), 2932new KeyValuePair<string, string>("c", _4kHeaderValue), 2933new KeyValuePair<string, string>("d", _4kHeaderValue), 2934new KeyValuePair<string, string>("e", _4kHeaderValue), 2935new KeyValuePair<string, string>("f", _4kHeaderValue), 2936new KeyValuePair<string, string>("g", _4kHeaderValue), 2937new KeyValuePair<string, string>("h", _4kHeaderValue), 2938new KeyValuePair<string, string>("i", _4kHeaderValue), 2939new KeyValuePair<string, string>("j", _4kHeaderValue), 2940new KeyValuePair<string, string>("k", _4kHeaderValue), 2941new KeyValuePair<string, string>("l", _4kHeaderValue), 2942new KeyValuePair<string, string>("m", _4kHeaderValue), 2943new KeyValuePair<string, string>("n", _4kHeaderValue), 2944new KeyValuePair<string, string>("o", _4kHeaderValue), 2945new KeyValuePair<string, string>("p", _4kHeaderValue), 2961new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2962new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2963new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2967headers.Add(new KeyValuePair<string, string>(i.ToString(CultureInfo.InvariantCulture), i.ToString(CultureInfo.InvariantCulture))); 2981new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2982new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2983new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2984new KeyValuePair<string, string>("Custom", "val\0ue"), 2998new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2999new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3000new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3001new KeyValuePair<string, string>("Cus\0tom", "value"), 3013new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3014new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3015new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3016new KeyValuePair<string, string>("connection", "keep-alive") 3030new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3031new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3032new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3033new KeyValuePair<string, string>("te", "trailers, deflate") 3047new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3048new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3049new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3050new KeyValuePair<string, string>("te", "trailers") 3072new KeyValuePair<string, string>(InternalHeaderNames.Method, new string('A', 8192 / 2)), 3073new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + new string('A', 8192 / 2)), 3074new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http") 3092new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3093new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3094new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3095new KeyValuePair<string, string>(HeaderNames.Cookie, "a=0"), 3096new KeyValuePair<string, string>(HeaderNames.Cookie, "b=1"), 3097new KeyValuePair<string, string>(HeaderNames.Cookie, "c=2"), 3533new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 3534new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3535new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3559new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 3560new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3561new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3585new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 3586new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3587new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3610new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 3611new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3612new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5363new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 5364new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5365new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5416new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 5417new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5418new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5462new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 5463new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5464new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5534new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 5535new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5536new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5616new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 5617new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5618new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5669new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 5670new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5671new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5710new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 5711new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5712new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5787new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 5788new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5789new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 6064new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 6065new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 6066new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 6067new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 6072var headers = requestHeaders.Concat(new[] { new KeyValuePair<string, string>(headerField.Key, headerField.Value) }); 6087new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 6088new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 6089new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 6107var methodHeader = new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"); 6122new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 6123new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 6124new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 6125new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 6126new KeyValuePair<string, string>("content-length", "0")
Http2\Http2StreamTests.cs (360)
30new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 31new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 32new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 33new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 34new KeyValuePair<string, string>("TestHeader", headerValue), 49new KeyValuePair<string, string>(InternalHeaderNames.Method, ""), 50new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 51new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 52new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 68new KeyValuePair<string, string>(InternalHeaderNames.Method, "Hello,World"), 69new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 70new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 71new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 93new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 94new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 95new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 96new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 144new KeyValuePair<string, string>(InternalHeaderNames.Method, "HEAD"), 145new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 146new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 147new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 177new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 178new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 179new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 180new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 181new KeyValuePair<string, string>(HeaderNames.ContentLength, "11"), 229new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 230new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 231new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 232new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 275var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT") }; 301new KeyValuePair<string, string>(InternalHeaderNames.Method, "OPTIONS"), 302new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 303new KeyValuePair<string, string>(InternalHeaderNames.Path, "*") 332new KeyValuePair<string, string>(InternalHeaderNames.Method, "OPTIONS"), 333new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 334new KeyValuePair<string, string>(InternalHeaderNames.Path, "/") 369new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 370new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 371new KeyValuePair<string, string>(InternalHeaderNames.Path, "/a/path?a&que%35ry") 414new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 415new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 416new KeyValuePair<string, string>(InternalHeaderNames.Path, input) 443var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 444new KeyValuePair<string, string>(headerName, value) }; 459var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 460new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 461new KeyValuePair<string, string>(InternalHeaderNames.Scheme, scheme) }; // Not the expected "http" 486new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 487new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 488new KeyValuePair<string, string>(InternalHeaderNames.Scheme, scheme) 518new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 519new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 520new KeyValuePair<string, string>(InternalHeaderNames.Scheme, scheme) 535new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 536new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 537new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 563new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 564new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 565new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 566new KeyValuePair<string, string>(InternalHeaderNames.Authority, ""), 592new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 593new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 594new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 595new KeyValuePair<string, string>("Host", "abc"), 622new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 623new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 624new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 625new KeyValuePair<string, string>(InternalHeaderNames.Authority, ""), 626new KeyValuePair<string, string>("Host", "abc"), 653new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 654new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 655new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 656new KeyValuePair<string, string>(InternalHeaderNames.Authority, "def"), 657new KeyValuePair<string, string>("Host", "abc"), 684new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 685new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 686new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 687new KeyValuePair<string, string>(InternalHeaderNames.Authority, "def"), 688new KeyValuePair<string, string>("Host", "a=bc"), 715new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 716new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 717new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 718new KeyValuePair<string, string>(InternalHeaderNames.Authority, "local=host:80"), 735new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 736new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 737new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 738new KeyValuePair<string, string>(InternalHeaderNames.Authority, "d=ef"), 739new KeyValuePair<string, string>("Host", "abc"), 756new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 757new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 758new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 759new KeyValuePair<string, string>("Host", "host1"), 760new KeyValuePair<string, string>("Host", "host2"), 780new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET" + new string('a', 1024 * 3)), 781new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Hello/How/Are/You/" + new string('a', 1024 * 3)), 782new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 783new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost" + new string('a', 1024 * 3) + ":80"), 800new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 801new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 802new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 803new KeyValuePair<string, string>("a", _4kHeaderValue), 804new KeyValuePair<string, string>("b", _4kHeaderValue), 805new KeyValuePair<string, string>("c", _4kHeaderValue), 806new KeyValuePair<string, string>("d", _4kHeaderValue), 807new KeyValuePair<string, string>("e", _4kHeaderValue), 808new KeyValuePair<string, string>("f", _4kHeaderValue), 809new KeyValuePair<string, string>("g", _4kHeaderValue), 810new KeyValuePair<string, string>("h", _4kHeaderValue), 837new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 838new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 839new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 844headers.Add(new KeyValuePair<string, string>(text, text)); 870new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 871new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 872new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 873new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 916new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 917new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 918new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 919new KeyValuePair<string, string>("a", _4kHeaderValue), 920new KeyValuePair<string, string>("b", _4kHeaderValue), 921new KeyValuePair<string, string>("c", _4kHeaderValue), 922new KeyValuePair<string, string>("d", _4kHeaderValue), 923new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 948new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 949new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 950new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 951new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 991new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 992new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 993new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 994new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1035new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1036new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1037new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1038new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1087new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1088new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1089new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1090new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1116new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1117new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1118new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1119new KeyValuePair<string, string>("a", _4kHeaderValue), 1120new KeyValuePair<string, string>("b", _4kHeaderValue), 1121new KeyValuePair<string, string>("c", _4kHeaderValue), 1122new KeyValuePair<string, string>("d", _4kHeaderValue), 1123new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1141new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1142new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1143new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1144new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1176new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1177new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1178new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1179new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1211new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1212new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1213new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1214new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1247new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1248new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1249new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1250new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1297new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1298new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1299new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1300new KeyValuePair<string, string>("a", _4kHeaderValue), 1301new KeyValuePair<string, string>("b", _4kHeaderValue), 1302new KeyValuePair<string, string>("c", _4kHeaderValue), 1303new KeyValuePair<string, string>("d", _4kHeaderValue), 1304new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1329new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1330new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1331new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1367new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1368new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1369new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1406new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1407new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1408new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1440new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1441new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1442new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1474new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1475new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1476new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1512new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1513new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1514new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1549new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1550new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1551new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1586new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1587new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1588new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1634new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1635new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1636new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1672new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1673new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1674new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1709new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1710new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1711new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1752new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1753new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1754new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1787new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1788new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1789new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1820new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1821new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1822new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1859new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1860new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1861new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1862new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1900new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1901new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1902new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1903new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 1946new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1947new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1948new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1986new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1987new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1988new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2038new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 2039new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2040new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2046new KeyValuePair<string, string>(HeaderNames.ContentLength, "18"), 2098new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 2099new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2100new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2106new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 2977new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2978new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2979new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3043new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3044new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3045new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3095new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3096new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3097new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3128new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3129new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3130new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3789new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3790new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3791new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3824new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3825new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3826new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3870new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3871new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3872new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3916new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3917new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3918new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3962new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3963new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3964new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4014new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4015new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4016new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4067new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4068new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4069new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4113new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4114new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4115new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4163new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4164new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4165new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4208new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4209new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4210new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4250new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4251new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4252new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4290new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4291new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4292new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4325new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4326new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4327new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4367new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4368new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4369new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4431new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4432new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4433new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4482new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4483new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4484new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4528new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4529new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4530new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4568new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4569new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4570new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4632new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4633new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4634new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4664new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4665new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4666new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4698new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4699new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4700new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4735new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4736new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4737new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4788new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4789new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4790new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4854new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4855new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4856new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4909new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4910new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4911new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 4975new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 4976new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 4977new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5031new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 5032new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5033new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5097new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 5098new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5099new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5145new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 5146new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5147new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5224new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 5225new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5226new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5298new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 5299new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5300new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5368new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 5369new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5370new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5440new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 5441new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5442new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5525new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 5526new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5527new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5614new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 5615new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5616new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5701new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 5702new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5703new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 5909new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 5910new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 5911new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
Http2\Http2TestBase.cs (43)
40new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 41new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 42new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 43new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 44new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 45new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 46new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 47new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 48new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 53new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 54new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 55new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 56new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 61new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 62new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 63new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 64new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 65new KeyValuePair<string, string>(HeaderNames.Expect, "100-continue"), 70new KeyValuePair<string, string>("trailer-one", "1"), 71new KeyValuePair<string, string>("trailer-two", "2"), 76new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 77new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 78new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 79new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 80new KeyValuePair<string, string>("a", _4kHeaderValue), 81new KeyValuePair<string, string>("b", _4kHeaderValue), 82new KeyValuePair<string, string>("c", _4kHeaderValue), 83new KeyValuePair<string, string>("d", _4kHeaderValue) 88new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 89new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 90new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 91new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 92new KeyValuePair<string, string>("a", _4kHeaderValue), 93new KeyValuePair<string, string>("b", _4kHeaderValue), 94new KeyValuePair<string, string>("c", _4kHeaderValue), 95new KeyValuePair<string, string>("d", _4kHeaderValue), 96new KeyValuePair<string, string>("e", _4kHeaderValue), 97new KeyValuePair<string, string>("f", _4kHeaderValue), 98new KeyValuePair<string, string>("g", _4kHeaderValue), 103new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 104new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + expectedBytes), 105new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 106new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
Http2\Http2TimeoutTests.cs (3)
252new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 253new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 254new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
Http2\Http2WebSocketTests.cs (84)
50new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 51new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "websocket"), 52new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 53new KeyValuePair<string, string>(InternalHeaderNames.Path, "/chat"), 54new KeyValuePair<string, string>(InternalHeaderNames.Authority, "server.example.com"), 55new KeyValuePair<string, string>(HeaderNames.WebSocketSubProtocols, "chat, superchat"), 56new KeyValuePair<string, string>(HeaderNames.SecWebSocketExtensions, "permessage-deflate"), 57new KeyValuePair<string, string>(HeaderNames.SecWebSocketVersion, "13"), 58new KeyValuePair<string, string>(HeaderNames.Origin, "http://www.example.com"), 116new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 117new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "websocket"), 118new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 119new KeyValuePair<string, string>(InternalHeaderNames.Path, "/chat"), 120new KeyValuePair<string, string>(InternalHeaderNames.Authority, "server.example.com"), 121new KeyValuePair<string, string>(HeaderNames.WebSocketSubProtocols, "chat, superchat"), 122new KeyValuePair<string, string>(HeaderNames.SecWebSocketExtensions, "permessage-deflate"), 123new KeyValuePair<string, string>(HeaderNames.SecWebSocketVersion, "13"), 124new KeyValuePair<string, string>(HeaderNames.Origin, "http://www.example.com"), 207new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 208new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "websocket"), 209new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 210new KeyValuePair<string, string>(InternalHeaderNames.Path, "/chat"), 211new KeyValuePair<string, string>(InternalHeaderNames.Authority, "server.example.com"), 212new KeyValuePair<string, string>(HeaderNames.WebSocketSubProtocols, "chat, superchat"), 213new KeyValuePair<string, string>(HeaderNames.SecWebSocketExtensions, "permessage-deflate"), 214new KeyValuePair<string, string>(HeaderNames.SecWebSocketVersion, "13"), 215new KeyValuePair<string, string>(HeaderNames.Origin, "http://www.example.com"), 291new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 292new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "WebSocket"), 293new KeyValuePair<string, string>(headerName, value) 309new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 310new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 311new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 312new KeyValuePair<string, string>(InternalHeaderNames.Authority, "example.com"), 313new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "WebSocket") 340new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 341new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "websocket"), 342new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 343new KeyValuePair<string, string>(InternalHeaderNames.Path, "/chat"), 344new KeyValuePair<string, string>(InternalHeaderNames.Authority, "server.example.com"), 345new KeyValuePair<string, string>(HeaderNames.WebSocketSubProtocols, "chat, superchat"), 346new KeyValuePair<string, string>(HeaderNames.SecWebSocketExtensions, "permessage-deflate"), 347new KeyValuePair<string, string>(HeaderNames.SecWebSocketVersion, "13"), 348new KeyValuePair<string, string>(HeaderNames.Origin, "http://www.example.com"), 409new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 410new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "websocket"), 411new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 412new KeyValuePair<string, string>(InternalHeaderNames.Path, "/chat"), 413new KeyValuePair<string, string>(InternalHeaderNames.Authority, "server.example.com"), 414new KeyValuePair<string, string>(HeaderNames.WebSocketSubProtocols, "chat, superchat"), 415new KeyValuePair<string, string>(HeaderNames.SecWebSocketExtensions, "permessage-deflate"), 416new KeyValuePair<string, string>(HeaderNames.SecWebSocketVersion, "13"), 417new KeyValuePair<string, string>(HeaderNames.Origin, "http://www.example.com"), 477new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 478new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "websocket"), 479new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 480new KeyValuePair<string, string>(InternalHeaderNames.Path, "/chat"), 481new KeyValuePair<string, string>(InternalHeaderNames.Authority, "server.example.com"), 482new KeyValuePair<string, string>(HeaderNames.WebSocketSubProtocols, "chat, superchat"), 483new KeyValuePair<string, string>(HeaderNames.SecWebSocketExtensions, "permessage-deflate"), 484new KeyValuePair<string, string>(HeaderNames.SecWebSocketVersion, "13"), 485new KeyValuePair<string, string>(HeaderNames.Origin, "http://www.example.com"), 539new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 540new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "websocket"), 541new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 542new KeyValuePair<string, string>(InternalHeaderNames.Path, "/chat"), 543new KeyValuePair<string, string>(InternalHeaderNames.Authority, "server.example.com"), 544new KeyValuePair<string, string>(HeaderNames.WebSocketSubProtocols, "chat, superchat"), 545new KeyValuePair<string, string>(HeaderNames.SecWebSocketExtensions, "permessage-deflate"), 546new KeyValuePair<string, string>(HeaderNames.SecWebSocketVersion, "13"), 547new KeyValuePair<string, string>(HeaderNames.Origin, "http://www.example.com"), 649new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 650new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "websocket"), 651new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 652new KeyValuePair<string, string>(InternalHeaderNames.Path, "/chat"), 653new KeyValuePair<string, string>(InternalHeaderNames.Authority, "server.example.com"), 654new KeyValuePair<string, string>(HeaderNames.WebSocketSubProtocols, "chat, superchat"), 655new KeyValuePair<string, string>(HeaderNames.SecWebSocketExtensions, "permessage-deflate"), 656new KeyValuePair<string, string>(HeaderNames.SecWebSocketVersion, "13"), 657new KeyValuePair<string, string>(HeaderNames.Origin, "http://www.example.com"), 692new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 693new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 694new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 695new KeyValuePair<string, string>(InternalHeaderNames.Authority, "example.com"),
Http3\Http3ConnectionTests.cs (60)
29new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 30new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 31new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 32new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 57new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 58new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 59new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 60new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 95new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 96new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 97new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 98new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 99new KeyValuePair<string, string>(HeaderNames.Expect, "100-continue"), 129new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 130new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 131new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 132new KeyValuePair<string, string>(HeaderNames.Cookie, "a=0"), 133new KeyValuePair<string, string>(HeaderNames.Cookie, "b=1"), 134new KeyValuePair<string, string>(HeaderNames.Cookie, "c=2"), 425new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 426new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 427new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 428new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 444new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 445new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 446new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 447new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 448new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json"), 482new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 483new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"), 484new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 485new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 486new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json") 492new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 493new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"), 494new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 495new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80") 526new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 527new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 528new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 529new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 560new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 561new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 562new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 563new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 583new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 584new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"), 585new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 586new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 587new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json") 661new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 662new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 663new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 664new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 665new KeyValuePair<string, string>(HeaderNames.Expect, "100-continue"), 715new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 716new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 717new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 718new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 719new KeyValuePair<string, string>(HeaderNames.Expect, "100-continue"),
Http3\Http3StreamTests.cs (362)
29new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 30new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 31new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 32new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 50new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 51new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 52new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 53new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 73new KeyValuePair<string, string>(InternalHeaderNames.Method, ""), 74new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 75new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 76new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 91new KeyValuePair<string, string>(InternalHeaderNames.Method, "Hello,World"), 92new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 93new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 94new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 109new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 110new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 111new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 112new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 131new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 132new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 133new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 134new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 135new KeyValuePair<string, string>("test", new string('a', 1024 * 32 + 1)) 150var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT") }; 165var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "OPTIONS"), 166new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 167new KeyValuePair<string, string>(InternalHeaderNames.Path, "*")}; 184var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "OPTIONS"), 185new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 186new KeyValuePair<string, string>(InternalHeaderNames.Path, "/")}; 204var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 205new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 206new KeyValuePair<string, string>(InternalHeaderNames.Path, "/a/path?a&que%35ry")}; 239var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 240new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 241new KeyValuePair<string, string>(InternalHeaderNames.Path, input)}; 264var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 265new KeyValuePair<string, string>(headerName, value) }; 280var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 281new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 282new KeyValuePair<string, string>(InternalHeaderNames.Scheme, scheme) }; // Not the expected "http" 299var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 300new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 301new KeyValuePair<string, string>(InternalHeaderNames.Scheme, scheme) }; // Not the expected "http" 324var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 325new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 326new KeyValuePair<string, string>(InternalHeaderNames.Scheme, scheme) }; // Not the expected "http" 341new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 342new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 343new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 361new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 362new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 363new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 364new KeyValuePair<string, string>(InternalHeaderNames.Authority, ""), 381new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 382new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 383new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 384new KeyValuePair<string, string>("Host", "abc"), 403new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 404new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 405new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 406new KeyValuePair<string, string>(InternalHeaderNames.Authority, ""), 407new KeyValuePair<string, string>("Host", "abc"), 426new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 427new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 428new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 429new KeyValuePair<string, string>(InternalHeaderNames.Authority, "def"), 430new KeyValuePair<string, string>("Host", "abc"), 449new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 450new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 451new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 452new KeyValuePair<string, string>(InternalHeaderNames.Authority, "def"), 453new KeyValuePair<string, string>("Host", "a=bc"), 472new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 473new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 474new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 475new KeyValuePair<string, string>(InternalHeaderNames.Authority, "local=host:80"), 491new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 492new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 493new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 494new KeyValuePair<string, string>(InternalHeaderNames.Authority, "d=ef"), 495new KeyValuePair<string, string>("Host", "abc"), 511new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 512new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 513new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 514new KeyValuePair<string, string>("Host", "host1"), 515new KeyValuePair<string, string>("Host", "host2"), 534new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET" + new string('a', 1024 * 3)), 535new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Hello/How/Are/You/" + new string('a', 1024 * 3)), 536new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 537new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost" + new string('a', 1024 * 3) + ":80"), 552new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 553new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 554new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 555new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 581new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 582new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 583new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 584new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 617new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 618new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 619new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 620new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 652new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 653new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 654new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 655new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 685new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 686new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 687new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 688new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 715new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 716new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 717new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 756new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 757new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"), 758new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 759new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 760new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json") 790new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 791new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"), 792new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 793new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 794new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json") 824new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 825new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 826new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 827new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 854new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 855new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 856new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 857new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 885new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 886new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 887new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 888new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 921new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 922new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 923new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 924new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 948new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 949new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 950new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 951new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 980new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 981new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 982new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 983new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 1006new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 1007new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1008new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1009new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 1034new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 1035new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1036new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1037new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 1072new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 1073new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1074new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1075new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 1103new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 1104new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1105new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1106new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 1132new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1133new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1134new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1179new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1180new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1181new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1231new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1232new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1233new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1279new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1280new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1281new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1332new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1333new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1334new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1381new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1382new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1383new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1433new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1434new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1435new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1474new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1475new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1476new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1534new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1535new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1536new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1589new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1590new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1591new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1646new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1647new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1648new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1704new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1705new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1706new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1763new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1764new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1765new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1827new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1828new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1829new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1890new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 1891new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1892new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1975new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 1976new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 1977new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 1981new KeyValuePair<string, string>("TestName", "TestValue"), 2004new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2005new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2006new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2010new KeyValuePair<string, string>("TestName", "TestValue"), 2048new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2049new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2050new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2054new KeyValuePair<string, string>("TestName", "TestValue"), 2123new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2124new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2125new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2164new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2165new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2166new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2167new KeyValuePair<string, string>(":unknown", "0"), 2178new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2179new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2180new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2181new KeyValuePair<string, string>(InternalHeaderNames.Status, "200"), 2194new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2195new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2196new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 2197new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2202var headers = requestHeaders.Concat(new[] { new KeyValuePair<string, string>(headerField.Key, headerField.Value) }); 2215var methodHeader = new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"); 2230new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2231new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2232new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 2233new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2234new KeyValuePair<string, string>("content-length", "0") 2254new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2255new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2256new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2320new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2321new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2322new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2323new KeyValuePair<string, string>("a", _4kHeaderValue), 2324new KeyValuePair<string, string>("b", _4kHeaderValue), 2325new KeyValuePair<string, string>("c", _4kHeaderValue), 2326new KeyValuePair<string, string>("d", _4kHeaderValue), 2327new KeyValuePair<string, string>("e", _4kHeaderValue), 2328new KeyValuePair<string, string>("f", _4kHeaderValue), 2329new KeyValuePair<string, string>("g", _4kHeaderValue), 2330new KeyValuePair<string, string>("h", _4kHeaderValue), 2351new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2352new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2353new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2354new KeyValuePair<string, string>("a", _4kHeaderValue), 2355new KeyValuePair<string, string>("b", _4kHeaderValue), 2356new KeyValuePair<string, string>("c", _4kHeaderValue), 2357new KeyValuePair<string, string>("d", _4kHeaderValue), 2358new KeyValuePair<string, string>("e", _4kHeaderValue), 2359new KeyValuePair<string, string>("f", _4kHeaderValue), 2360new KeyValuePair<string, string>("g", _4kHeaderValue), 2361new KeyValuePair<string, string>("h", _4kHeaderValue), 2362new KeyValuePair<string, string>("i", _4kHeaderValue), 2363new KeyValuePair<string, string>("j", _4kHeaderValue), 2364new KeyValuePair<string, string>("k", _4kHeaderValue), 2365new KeyValuePair<string, string>("l", _4kHeaderValue), 2366new KeyValuePair<string, string>("m", _4kHeaderValue), 2367new KeyValuePair<string, string>("n", _4kHeaderValue), 2368new KeyValuePair<string, string>("o", _4kHeaderValue), 2369new KeyValuePair<string, string>("p", _4kHeaderValue), 2382new KeyValuePair<string, string>("a", new string('a', limit + 1)), 2397new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2398new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2399new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2403headers.Add(new KeyValuePair<string, string>(i.ToString(CultureInfo.InvariantCulture), i.ToString(CultureInfo.InvariantCulture))); 2425new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2426new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2427new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2431headers.Add(new KeyValuePair<string, string>(i.ToString(CultureInfo.InvariantCulture), i.ToString(CultureInfo.InvariantCulture))); 2442new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2443new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2444new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2445new KeyValuePair<string, string>("Custom", "val\0ue"), 2456new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2457new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2458new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2459new KeyValuePair<string, string>("Cus\0tom", "value"), 2470new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2471new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2472new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2473new KeyValuePair<string, string>("connection", "keep-alive") 2484new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2485new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2486new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2487new KeyValuePair<string, string>("te", "trailers, deflate") 2498new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2499new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2500new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2501new KeyValuePair<string, string>("te", "trailers") 2517new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 2518new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2519new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2520new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 2551new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 2552new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2553new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2554new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 2591new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 2592new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2593new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2624new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 2625new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2626new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2668new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 2669new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2670new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2676new KeyValuePair<string, string>(HeaderNames.ContentLength, "18"), 2720new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 2721new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2722new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2728new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"), 2759new KeyValuePair<string, string>(InternalHeaderNames.Method, new string('A', 8192 / 2)), 2760new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + new string('A', 8192 / 2)), 2761new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http") 2791new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2792new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2793new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2794new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 2823new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2824new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2825new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2826new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 2864new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 2865new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2866new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2900new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2901new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2902new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2903new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 2940new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2941new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2942new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2943new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 2981new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 2982new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 2983new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 2984new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 3005new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 3006new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3007new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3064new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 3065new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 3066new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 3067new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
Http3\Http3TestBase.cs (13)
39new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 40new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 41new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 42new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 43new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 44new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 45new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 46new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 47new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 52new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 53new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + expectedBytes), 54new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 55new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
Http3\Http3TimeoutTests.cs (18)
56new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 57new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 58new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 85new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 86new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 87new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 168new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 169new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 170new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 171new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 250new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"), 251new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 252new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 253new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 392new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 393new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 394new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 395new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
Http3\WebTransport\WebTransportHandshakeTests.cs (8)
68new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 69new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "webtransport"), 70new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 71new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 72new KeyValuePair<string, string>(InternalHeaderNames.Authority, "server.example.com"), 73new KeyValuePair<string, string>(HeaderNames.Origin, "server.example.com"), 74new KeyValuePair<string, string>(WebTransportSession.CurrentSupportedVersion, "1") 135headersConnectFrame.Add(new KeyValuePair<string, string>(GetHeaderFromName(headers[i]), headers[i + 1]));
Http3\WebTransport\WebTransportTestUtilities.cs (7)
63new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"), 64new KeyValuePair<string, string>(InternalHeaderNames.Protocol, "webtransport"), 65new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 66new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 67new KeyValuePair<string, string>(InternalHeaderNames.Authority, "server.example.com"), 68new KeyValuePair<string, string>(HeaderNames.Origin, "server.example.com"), 69new KeyValuePair<string, string>(WebTransportSession.CurrentSupportedVersion, "1")
HttpsConnectionMiddlewareTests.cs (2)
62new KeyValuePair<string, string>("content", "Hello World?") 96new KeyValuePair<string, string>("content", "Hello World?")
KestrelMetricsTests.cs (3)
51connectionContext.Features.Get<IConnectionMetricsTagsFeature>().Tags.Add(new KeyValuePair<string, object>("custom", "value!")); 330connectionContext.Features.Get<IConnectionMetricsTagsFeature>().Tags.Add(new KeyValuePair<string, object>("custom", "value!")); 352overridenFeature.Tags.Add(new KeyValuePair<string, object>("test", "Value!"));
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (2)
141Current = result ? new KeyValuePair<string, string>(key, _stringValuesEnumerator.Current!) : default; 151Current = new KeyValuePair<string, string>(name, value.ToString());
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
297new KeyValuePair<Http3SettingType, long>(type, value));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (15)
114MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 118MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 395yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 399yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 403yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 411yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 419yield return new KeyValuePair<Type, object>(typeof(IConnectionSocketFeature), _currentIConnectionSocketFeature); 423yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 427yield return new KeyValuePair<Type, object>(typeof(IStreamDirectionFeature), _currentIStreamDirectionFeature); 431yield return new KeyValuePair<Type, object>(typeof(IStreamIdFeature), _currentIStreamIdFeature); 435yield return new KeyValuePair<Type, object>(typeof(IStreamAbortFeature), _currentIStreamAbortFeature); 439yield return new KeyValuePair<Type, object>(typeof(IStreamClosedFeature), _currentIStreamClosedFeature); 443yield return new KeyValuePair<Type, object>(typeof(IConnectionMetricsTagsFeature), _currentIConnectionMetricsTagsFeature);
InProcessWebSite (3)
src\Servers\IIS\IIS\test\testassets\shared\WebSockets\HandshakeHelpers.cs (3)
15yield return new KeyValuePair<string, string>(Constants.Headers.Connection, Constants.Headers.Upgrade); 16yield return new KeyValuePair<string, string>(Constants.Headers.Upgrade, Constants.Headers.UpgradeWebSocket); 17yield return new KeyValuePair<string, string>(Constants.Headers.SecWebSocketAccept, CreateResponseKey(key));
Interop.FunctionalTests (5)
Http3\Http3TlsTests.cs (5)
409new KeyValuePair<string, string>("Endpoints:end1:Url", "https://127.0.0.1:0"), 410new KeyValuePair<string, string>("Endpoints:end1:Protocols", "Http3"), 411new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx")), 412new KeyValuePair<string, string>("Certificates:Default:Password", "testPassword"), 441new KeyValuePair<string, string>("Certificates:Development:Password", "1234"),
Metrics (13)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
Metrics.Legacy (13)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
Microsoft.Arcade.Test.Common (2)
DiffUtil.cs (1)
144yield return new KeyValuePair<int, int>(i, j);
FakeHttpClient.cs (1)
57new KeyValuePair<string, IEnumerator<HttpResponseMessage>>(kvp.Key, kvp.Value.GetEnumerator()))
Microsoft.AspNetCore (4)
WebApplicationBuilder.cs (4)
54new KeyValuePair<string, string?>(WebHostDefaults.WebRootKey, options.WebRootPath), 117new KeyValuePair<string, string?>(WebHostDefaults.WebRootKey, options.WebRootPath), 170new KeyValuePair<string, string?>(WebHostDefaults.WebRootKey, options.WebRootPath), 261new KeyValuePair<string, string?>(HostDefaults.ContentRootKey, cwd),
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\Infrastructure\ExportProviderExtensions.cs (1)
34var importMany = contract.MetadataConstraints.Contains(new KeyValuePair<string, object>("IsImportMany", true));
Microsoft.AspNetCore.Authentication.OpenIdConnect (5)
OpenIdConnectHandler.cs (5)
112message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 127message = new OpenIdConnectMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 316var message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 639authorizationResponse = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray()))); 666authorizationResponse = new OpenIdConnectMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
Microsoft.AspNetCore.Authentication.Test (61)
AuthenticationMiddlewareTests.cs (2)
162new KeyValuePair<string, string>("Authentication:Schemes:Bearer:ValidIssuer", "SomeIssuer"), 163new KeyValuePair<string, string>("Authentication:Schemes:Bearer:ValidAudiences:0", "https://localhost:5001")
JwtBearerTests_Handler.cs (24)
962new("Authentication:Schemes:Bearer:ValidIssuer", "dotnet-user-jwts"), 963new("Authentication:Schemes:Bearer:ValidIssuers:0", "dotnet-user-jwts-2"), 964new("Authentication:Schemes:Bearer:ValidAudience", "http://localhost:5000"), 965new("Authentication:Schemes:Bearer:ValidAudiences:0", "http://localhost:5001"), 966new("Authentication:Schemes:Bearer:BackchannelTimeout", "00:01:00"), 967new("Authentication:Schemes:Bearer:RequireHttpsMetadata", "false"), 968new("Authentication:Schemes:Bearer:SaveToken", "True"), 969new("Authentication:Schemes:Bearer:SigningKeys:0:Issuer", "dotnet-user-jwts"), 970new("Authentication:Schemes:Bearer:SigningKeys:0:Value", key), 971new("Authentication:Schemes:Bearer:SigningKeys:0:Length", "32"), 1006new KeyValuePair<string, string>("Authentication:Schemes:Bearer:ValidAudiences:0", "http://localhost:5000"), 1007new KeyValuePair<string, string>("Authentication:Schemes:Bearer:ValidAudiences:1", "https://localhost:5001") 1032new("Authentication:Schemes:Bearer:ValidIssuers:0", "dotnet-user-jwts"), 1033new("Authentication:Schemes:Bearer:ValidIssuers:1", "dotnet-user-jwts-2"), 1034new("Authentication:Schemes:Bearer:SigningKeys:0:Issuer", "dotnet-user-jwts"), 1035new("Authentication:Schemes:Bearer:SigningKeys:0:Value", firstKey), 1036new("Authentication:Schemes:Bearer:SigningKeys:0:Length", "32"), 1037new("Authentication:Schemes:Bearer:SigningKeys:1:Issuer", "dotnet-user-jwts-2"), 1038new("Authentication:Schemes:Bearer:SigningKeys:1:Value", secondKey), 1039new("Authentication:Schemes:Bearer:SigningKeys:1:Length", "32"), 1059new("Authentication:Schemes:Bearer:Authority", "https://localhost:5001"), 1079new("Authentication:Schemes:Bearer:Authority", "https://localhost:5001"), 1080new("Authentication:Schemes:Bearer:ValidateIssuer", "false"), 1081new("Authentication:Schemes:Bearer:ValidateAudience", "false"),
OpenIdConnect\OpenIdConnectTests.cs (27)
427new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:Authority", "https://authority.com"), 428new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:BackchannelTimeout", "00:05:00"), 429new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:ClientId", "client-id"), 430new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:ClientSecret", "client-secret"), 431new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:RequireHttpsMetadata", "false"), 432new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:CorrelationCookie:Domain", "https://localhost:5000"), 433new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:CorrelationCookie:Name", "CookieName"), 460new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:Authority", "https://authority.com"), 461new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:BackchannelTimeout", ""), 462new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:ClientId", "client-id"), 463new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:ClientSecret", "client-secret"), 464new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:CorrelationCookie:Domain", "https://localhost:5000"), 465new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:CorrelationCookie:IsEssential", "False"), 466new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:CorrelationCookie:SecurePolicy", "always"), 497new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:Authority", "https://authority.com"), 498new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:BackchannelTimeout", "definitelynotatimespan"), 499new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:ClientId", "client-id"), 500new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:ClientSecret", "client-secret"), 501new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:CorrelationCookie:IsEssential", "definitelynotaboolean"), 520new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:Authority", "https://authority.com"), 521new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:ClientId", "client-id"), 522new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:ClientSecret", "client-secret"), 523new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:Scope:0", "given_name"), 524new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:Scope:1", "birthdate"), 547new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:Authority", "https://authority.com"), 548new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:ClientId", "client-id"), 549new KeyValuePair<string, string>("Authentication:Schemes:OpenIdConnect:ClientSecret", "client-secret"),
WsFederation\WsFederationTest.cs (4)
249kvps.Add(new KeyValuePair<string, string>("wa", "wsignin1.0")); 250kvps.Add(new KeyValuePair<string, string>("wresult", File.ReadAllText(tokenFile))); 253kvps.Add(new KeyValuePair<string, string>("wctx", wctx)); 257kvps.Add(new KeyValuePair<string, string>("suppressWctx", "true"));
WsFederation\WsFederationTest_Handler.cs (4)
247kvps.Add(new KeyValuePair<string, string>("wa", "wsignin1.0")); 248kvps.Add(new KeyValuePair<string, string>("wresult", File.ReadAllText(tokenFile))); 251kvps.Add(new KeyValuePair<string, string>("wctx", wctx)); 255kvps.Add(new KeyValuePair<string, string>("suppressWctx", "true"));
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 (2)
AuthorizationMetrics.cs (1)
45new("user.is_authenticated", user.Identity?.IsAuthenticated ?? false)
src\Shared\Debugger\DebuggerHelpers.cs (1)
114private static KeyValuePair<string, object?> Create(string key, object? value) => new KeyValuePair<string, object?>(key, value);
Microsoft.AspNetCore.Components (5)
ComponentsActivitySource.cs (1)
48new KeyValuePair<string, object?>("aspnetcore.components.route", route));
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (4)
292_arrayStorage[_count++] = new KeyValuePair<string, object?>(key, value); 296_arrayStorage[index] = new KeyValuePair<string, object?>(key, value); 383_arrayStorage[_count] = new KeyValuePair<string, object?>(key, value); 597_arrayStorage[Count] = new KeyValuePair<string, object?>(key, value);
Microsoft.AspNetCore.Components.Endpoints.Tests (6)
Binding\FormDataMapperTests.cs (6)
432.Select(i => new KeyValuePair<string, StringValues>( 463.Select(i => new KeyValuePair<string, StringValues>( 509.Select(i => new KeyValuePair<string, StringValues>( 570.Select(i => new KeyValuePair<string, StringValues>( 1067.Select(i => new KeyValuePair<string, StringValues>( 1659var expected = new KeyValuePair<string, int>("Age", 20);
Microsoft.AspNetCore.Components.Server (1)
Circuits\CircuitActivitySource.cs (1)
39new KeyValuePair<string, object?>("aspnetcore.components.circuit.id", circuitId));
Microsoft.AspNetCore.Components.Tests (8)
ComponentsActivitySourceTest.cs (2)
50linkstore.SetActivityContext(ComponentsActivityLinkStore.Circuit, new ActivityContext(ActivityTraceId.CreateRandom(), ActivitySpanId.CreateRandom(), ActivityTraceFlags.Recorded), new KeyValuePair<string, object>("aspnetcore.components.circuit.id", "test-circuit-id")); 85linkstore.SetActivityContext(ComponentsActivityLinkStore.Circuit, default, new KeyValuePair<string, object>("aspnetcore.components.circuit.id", "test-circuit-id"));
Rendering\RenderTreeBuilderTest.cs (6)
384new KeyValuePair<string, object>("attribute1", "test1"), 385new KeyValuePair<string, object>("attribute2", "123"), 386new KeyValuePair<string, object>("attribute3", true), 398new KeyValuePair<string, object>("attribute1", "test1"), 399new KeyValuePair<string, object>("attribute2", "123"), 400new KeyValuePair<string, object>("attribute3", true),
Microsoft.AspNetCore.Components.Web (1)
Forms\Mapping\FormMappingContext.cs (1)
108pendingErrors.Add(new KeyValuePair<string, FormMappingError>(key, mappingError));
Microsoft.AspNetCore.Components.WebAssembly.Tests (2)
Hosting\WebAssemblyHostBuilderTest.cs (2)
25new KeyValuePair<string, string>("key", "value"), 195new KeyValuePair<string, string>("key", "value"),
Microsoft.AspNetCore.Cors (1)
src\Shared\Debugger\DebuggerHelpers.cs (1)
114private static KeyValuePair<string, object?> Create(string key, object? value) => new KeyValuePair<string, object?>(key, value);
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\XmlKeyManager.cs (1)
718return new KeyValuePair<IXmlRepository, IXmlEncryptor?>(repository, encryptor);
Microsoft.AspNetCore.DataProtection.Tests (6)
Internal\KeyManagementOptionsPostSetupTest.cs (5)
24new KeyValuePair<string, string>(KeyManagementOptionsPostSetup.ReadOnlyDataProtectionKeyDirectoryKey, keyDir), 41new KeyValuePair<string, string>(KeyManagementOptionsPostSetup.ReadOnlyDataProtectionKeyDirectoryKey, keyDir), 60new KeyValuePair<string, string>(KeyManagementOptionsPostSetup.ReadOnlyDataProtectionKeyDirectoryKey, ""), 79new KeyValuePair<string, string>(KeyManagementOptionsPostSetup.ReadOnlyDataProtectionKeyDirectoryKey, keyDir), 109new KeyValuePair<string, string>(KeyManagementOptionsPostSetup.ReadOnlyDataProtectionKeyDirectoryKey, keyDir),
ServiceCollectionTests.cs (1)
78new KeyValuePair<string, string>(KeyManagementOptionsPostSetup.ReadOnlyDataProtectionKeyDirectoryKey, keyDir),
Microsoft.AspNetCore.Diagnostics (4)
src\Shared\Metrics\MetricsExtensions.cs (4)
43list[i] = new KeyValuePair<string, object?>(name, value); 55tags.Add(new KeyValuePair<string, object?>(name, value)); 87tags.Add(new KeyValuePair<string, object?>(name, value)); 101tags.Add(new KeyValuePair<string, object?>(name, value));
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Logging\HeaderReader.cs (1)
44logContext.Add(new(_normalizedHeaders[i], redacted));
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (7)
Logging\AcceptanceTests.Mvc.cs (1)
137x.RouteParameterDataClasses.Add(new(NoDataClassParamName, DataClassification.None));
Logging\HeaderNormalizerTests.cs (2)
19new KeyValuePair<string, DataClassification>("Accept-Charset", DataClassification.Unknown), 20new KeyValuePair<string, DataClassification>("CONTENT-TYPE", DataClassification.Unknown)
Logging\HttpLoggingServiceExtensionsTests.cs (4)
37new KeyValuePair<string, string?>("HttpLogging:RequestPathLoggingMode", "Structured"), 38new KeyValuePair<string, string?>("HttpLogging:RequestPathParameterRedactionMode","None"), 39new KeyValuePair<string, string?>("HttpLogging:ExcludePathStartsWith:[0]","/path0toexclude"), 40new KeyValuePair<string, string?>("HttpLogging:ExcludePathStartsWith:[1]","/path1toexclude"),
Microsoft.AspNetCore.FunctionalTests (2)
WebHostFunctionalTests.cs (2)
229deploymentParameters.EnvironmentVariables.Add(new KeyValuePair<string, string>("aspnetcore_environment", environment)); 230deploymentParameters.EnvironmentVariables.Add(new KeyValuePair<string, string>("envKey", "envValue"));
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\XmlComments\GrpcXmlCommentsDocumentFilter.cs (1)
33.Select(group => new KeyValuePair<string, ActionDescriptor>(group.Key, group.First()));
Microsoft.AspNetCore.Hosting (35)
Internal\HostingApplicationDiagnostics.cs (2)
505return new KeyValuePair<string, object>("RequestId", _traceIdentifier); 509return new KeyValuePair<string, object>("RequestPath", _path);
Internal\HostingRequestFinishedLog.cs (12)
350 => new KeyValuePair<string, object?>("ElapsedMilliseconds", Elapsed.TotalMilliseconds), 361 => new KeyValuePair<string, object?>(nameof(response.StatusCode), response.StatusCode), 372 => new KeyValuePair<string, object?>(nameof(response.ContentType), response.ContentType), 383 => new KeyValuePair<string, object?>(nameof(response.ContentLength), response.ContentLength), 394 => new KeyValuePair<string, object?>(nameof(request.Protocol), request.Protocol), 405 => new KeyValuePair<string, object?>(nameof(request.Method), request.Method), 416 => new KeyValuePair<string, object?>(nameof(request.Scheme), request.Scheme), 427 => new KeyValuePair<string, object?>(nameof(request.Host), request.Host.Value), 438 => new KeyValuePair<string, object?>(nameof(request.PathBase), request.PathBase.Value), 449 => new KeyValuePair<string, object?>(nameof(request.Path), request.Path.Value), 4510 => new KeyValuePair<string, object?>(nameof(request.QueryString), request.QueryString.Value), 4611 => new KeyValuePair<string, object?>("{OriginalFormat}", OriginalFormat),
Internal\HostingRequestStartingLog.cs (10)
250 => new KeyValuePair<string, object?>(nameof(_request.Protocol), _request.Protocol), 261 => new KeyValuePair<string, object?>(nameof(_request.Method), _request.Method), 272 => new KeyValuePair<string, object?>(nameof(_request.ContentType), _request.ContentType), 283 => new KeyValuePair<string, object?>(nameof(_request.ContentLength), _request.ContentLength), 294 => new KeyValuePair<string, object?>(nameof(_request.Scheme), _request.Scheme), 305 => new KeyValuePair<string, object?>(nameof(_request.Host), _request.Host.Value), 316 => new KeyValuePair<string, object?>(nameof(_request.PathBase), _request.PathBase.Value), 327 => new KeyValuePair<string, object?>(nameof(_request.Path), _request.Path.Value), 338 => new KeyValuePair<string, object?>(nameof(_request.QueryString), _request.QueryString.Value), 349 => new KeyValuePair<string, object?>("{OriginalFormat}", OriginalFormat),
Internal\HostingRequestUnhandledLog.cs (7)
230 => new KeyValuePair<string, object?>(nameof(_httpContext.Request.Method), _httpContext.Request.Method), 241 => new KeyValuePair<string, object?>(nameof(_httpContext.Request.Scheme), _httpContext.Request.Scheme), 252 => new KeyValuePair<string, object?>(nameof(_httpContext.Request.Host), _httpContext.Request.Host), 263 => new KeyValuePair<string, object?>(nameof(_httpContext.Request.PathBase), _httpContext.Request.PathBase), 274 => new KeyValuePair<string, object?>(nameof(_httpContext.Request.Path), _httpContext.Request.Path), 285 => new KeyValuePair<string, object?>(nameof(_httpContext.Response.StatusCode), _httpContext.Response.StatusCode), 296 => new KeyValuePair<string, object?>("{OriginalFormat}", OriginalFormat),
src\Shared\Metrics\MetricsExtensions.cs (4)
43list[i] = new KeyValuePair<string, object?>(name, value); 55tags.Add(new KeyValuePair<string, object?>(name, value)); 87tags.Add(new KeyValuePair<string, object?>(name, value)); 101tags.Add(new KeyValuePair<string, object?>(name, value));
Microsoft.AspNetCore.Hosting.Tests (11)
GenericWebHostBuilderTests.cs (3)
113new KeyValuePair<string, string>("urls", urls), 114new KeyValuePair<string, string>("http_ports", httpPorts), 115new KeyValuePair<string, string>("https_ports", httpsPorts),
HostingApplicationDiagnosticsTests.cs (1)
270context.HttpContext.Features.GetRequiredFeature<IHttpMetricsTagsFeature>().Tags.Add(new KeyValuePair<string, object>("custom.tag", "custom.value"));
WebHostBuilderTests.cs (7)
327new KeyValuePair<string, string>("key1", "value1") 347new KeyValuePair<string, string>("key1", "value1") 401new KeyValuePair<string, string>("key1", "value1") 1108new KeyValuePair<string,string>("appconfig", "appvalue") 1323new KeyValuePair<string, string>("key", "value"), 1324new KeyValuePair<string, string>("nested:key", "nestedvalue"), 1698new KeyValuePair<string,string>("testhostingstartup:config", "value")
Microsoft.AspNetCore.Http (5)
Internal\RequestCookieCollection.cs (1)
203return new KeyValuePair<string, string>(current.Key, (string)current.Value!);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (4)
130_arrayStorage[_count++] = new KeyValuePair<TKey, TValue>(key, value); 134_arrayStorage[index] = new KeyValuePair<TKey, TValue>(key, value); 239_arrayStorage[_count] = new KeyValuePair<TKey, TValue>(key, value); 472_arrayStorage[Count] = new KeyValuePair<TKey, TValue>(key, value);
Microsoft.AspNetCore.Http.Abstractions (7)
Routing\RouteValueDictionary.cs (6)
292_arrayStorage[_count++] = new KeyValuePair<string, object?>(key, value); 296_arrayStorage[index] = new KeyValuePair<string, object?>(key, value); 383_arrayStorage[_count] = new KeyValuePair<string, object?>(key, value); 597_arrayStorage[Count] = new KeyValuePair<string, object?>(key, value); 684array[i] = new KeyValuePair<string, object?>(property.Name, property.GetValue(storage.Value)); 857Current = new KeyValuePair<string, object?>(property.Name, property.GetValue(storage.Value));
src\Shared\Debugger\DebuggerHelpers.cs (1)
114private static KeyValuePair<string, object?> Create(string key, object? value) => new KeyValuePair<string, object?>(key, value);
Microsoft.AspNetCore.Http.Abstractions.Tests (72)
QueryStringTests.cs (10)
68new KeyValuePair<string, string?>("key1", "value1"), 69new KeyValuePair<string, string?>("key2", "value2"), 70new KeyValuePair<string, string?>("key3", "value3"), 71new KeyValuePair<string, string?>("key4", null), 72new KeyValuePair<string, string?>("key5", "") 82new KeyValuePair<string, StringValues>("key1", new StringValues("value1")), 83new KeyValuePair<string, StringValues>("key2", new StringValues("value2")), 84new KeyValuePair<string, StringValues>("key3", new StringValues("value3")), 85new KeyValuePair<string, StringValues>("key4", new StringValues()), 86new KeyValuePair<string, StringValues>("key5", new StringValues("")),
RouteValueDictionaryTests.cs (62)
82new KeyValuePair<string, object?>("Name", "James"), 83new KeyValuePair<string, object?>("Age", 30), 84new KeyValuePair<string, object?>("Address", new Address() { City = "Redmond", State = "WA" }) 101new KeyValuePair<string, string>("First Name", "James"), 102new KeyValuePair<string, string>("Last Name", "Henrik"), 103new KeyValuePair<string, string>("Middle Name", "Bob") 158new KeyValuePair<string, object?>("name", "Billy"), 159new KeyValuePair<string, object?>("Name", "Joey"), 175new("name", "Billy"), 176new("Name", "Joey"), 863kvp => Assert.Equal(new KeyValuePair<string, object?>("age", 30), kvp), 864kvp => Assert.Equal(new KeyValuePair<string, object?>("key", "value"), kvp), 941((ICollection<KeyValuePair<string, object?>>)dict).Add(new KeyValuePair<string, object?>("key", "value")); 1021var input = new KeyValuePair<string, object?>("key", "value"); 1040var input = new KeyValuePair<string, object?>("KEY", "value"); 1059var input = new KeyValuePair<string, object?>("other", "value"); 1079var input = new KeyValuePair<string, object?>("key", "valUE"); 1095var input = new KeyValuePair<string, object?>("key", "value"); 1106kvp => Assert.Equal(new KeyValuePair<string, object?>("key", "value"), kvp)); 1115var input = new KeyValuePair<string, object?>("KEY", "value"); 1126kvp => Assert.Equal(new KeyValuePair<string, object?>("key", "value"), kvp)); 1135var input = new KeyValuePair<string, object?>("other", "value"); 1146kvp => Assert.Equal(new KeyValuePair<string, object?>("key", "value"), kvp)); 1156var input = new KeyValuePair<string, object?>("key", "valUE"); 1167kvp => Assert.Equal(new KeyValuePair<string, object?>("key", "value"), kvp)); 1311new KeyValuePair<string, object?>("key", "value") 1326var input = new KeyValuePair<string, object?>("key", "value"); 1346var input = new KeyValuePair<string, object?>("KEY", "value"); 1366var input = new KeyValuePair<string, object?>("other", "value"); 1387var input = new KeyValuePair<string, object?>("key", "valUE"); 1793kvp => Assert.Equal(new KeyValuePair<string, object?>("key", "value"), kvp), 1794kvp => Assert.Equal(new KeyValuePair<string, object?>("otherKey", "value"), kvp), 1814kvp => Assert.Equal(new KeyValuePair<string, object?>("key", "value"), kvp)); 1830kvp => Assert.Equal(new KeyValuePair<string, object?>("key", "value"), kvp), 1852kvp => Assert.Equal(new KeyValuePair<string, object?>("key0", "value0"), kvp), 1853kvp => Assert.Equal(new KeyValuePair<string, object?>("key1", "value1"), kvp), 1877kvp => Assert.Equal(new KeyValuePair<string, object?>("key0", "value0"), kvp), 1878kvp => Assert.Equal(new KeyValuePair<string, object?>("key1", "value1"), kvp), 1879kvp => Assert.Equal(new KeyValuePair<string, object?>("key2", "value2"), kvp), 1880kvp => Assert.Equal(new KeyValuePair<string, object?>("key3", "value3"), kvp), 1881kvp => Assert.Equal(new KeyValuePair<string, object?>("key4", "value4"), kvp), 1903kvp => Assert.Equal(new KeyValuePair<string, object?>("key0", "value0"), kvp), 2091new KeyValuePair<string, object?>("a", 0), 2092new KeyValuePair<string, object?>("b", 1), 2093new KeyValuePair<string, object?>("c", 2), 2099array[0] = new KeyValuePair<string, object?>("aa", 10); 2125new KeyValuePair<string, object?>(null!, null), 2126new KeyValuePair<string, object?>("a", 0), 2127new KeyValuePair<string, object?>(null!, null), 2128new KeyValuePair<string, object?>(null!, null), 2129new KeyValuePair<string, object?>("b", 1), 2130new KeyValuePair<string, object?>("c", 2), 2131new KeyValuePair<string, object?>("d", 3), 2132new KeyValuePair<string, object?>(null!, null), 2143new KeyValuePair<string, object?>("d", 3), 2144new KeyValuePair<string, object?>("a", 0), 2145new KeyValuePair<string, object?>("c", 2), 2146new KeyValuePair<string, object?>("b", 1), 2147new KeyValuePair<string, object?>(null!, null), 2148new KeyValuePair<string, object?>(null!, null), 2149new KeyValuePair<string, object?>(null!, null), 2150new KeyValuePair<string, object?>(null!, null),
Microsoft.AspNetCore.Http.Connections (5)
Internal\ConnectionLogScope.cs (1)
26return new KeyValuePair<string, object?>("TransportConnectionId", ConnectionId);
Internal\HttpConnectionsMetrics.cs (4)
51new KeyValuePair<string, object?>("signalr.connection.status", ResolveStopStatus(status)), 52new KeyValuePair<string, object?>("signalr.transport", ResolveTransportType(transportType))); 63_currentConnectionsCounter.Add(1, new KeyValuePair<string, object?>("signalr.transport", ResolveTransportType(transportType))); 75_currentConnectionsCounter.Add(-1, new KeyValuePair<string, object?>("signalr.transport", ResolveTransportType(transportType)));
Microsoft.AspNetCore.Http.Connections.Client (1)
Internal\ConnectionLogScope.cs (1)
34return new KeyValuePair<string, object?>(ClientConnectionIdKey, ConnectionId);
Microsoft.AspNetCore.Http.Extensions (2)
QueryBuilder.cs (2)
55_params.Add(new KeyValuePair<string, string>(key, value)); 66_params.Add(new KeyValuePair<string, string>(key, value));
Microsoft.AspNetCore.Http.Extensions.Tests (8)
QueryBuilderTests.cs (6)
64new KeyValuePair<string, string>("key1", "value1"), 65new KeyValuePair<string, string>("key2", "value2"), 66new KeyValuePair<string, string>("key3", "value3"), 76new KeyValuePair<string, StringValues>("key1", new StringValues(new [] { "value1", string.Empty, "value3" })), 77new KeyValuePair<string, StringValues>("key2", string.Empty), 78new KeyValuePair<string, StringValues>("key3", StringValues.Empty)
RequestDelegateGenerator\CompileTimeCreationTests.cs (1)
162new SourceFileResolver(ImmutableArray<string>.Empty, currentDirectory, ImmutableArray.Create(new KeyValuePair<string, string>(currentDirectory, mappedDirectory))));
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
38internal static readonly CSharpParseOptions ParseOptions = new CSharpParseOptions(LanguageVersion.Preview).WithFeatures(new[] { new KeyValuePair<string, string>("InterceptorsNamespaces", "Microsoft.AspNetCore.Http.Generated") });
Microsoft.AspNetCore.Http.Microbenchmarks (12)
AdaptiveCapacityDictionaryBenchmark.cs (11)
23_oneValue = new KeyValuePair<string, string>("a", "b"); 27new KeyValuePair<string, string>("a", "b"), 28new KeyValuePair<string, string>("c", "d"), 29new KeyValuePair<string, string>("e", "f"), 30new KeyValuePair<string, string>("g", "h"), 31new KeyValuePair<string, string>("i", "j"), 32new KeyValuePair<string, string>("k", "l"), 33new KeyValuePair<string, string>("m", "n"), 34new KeyValuePair<string, string>("o", "p"), 35new KeyValuePair<string, string>("q", "r"), 36new KeyValuePair<string, string>("s", "t"),
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
38internal static readonly CSharpParseOptions ParseOptions = new CSharpParseOptions(LanguageVersion.Preview).WithFeatures(new[] { new KeyValuePair<string, string>("InterceptorsNamespaces", "Microsoft.AspNetCore.Http.Generated") });
Microsoft.AspNetCore.Http.Results.Tests (6)
ResultsTests.cs (3)
1280var extensions = new List<KeyValuePair<string, object>> { new("test", "value") }; 1430var errors = new List<KeyValuePair<string, string[]>> { new("testField", new[] { "test error" }) }; 1436var extensions = new List<KeyValuePair<string, object>> { new("testField", "test value") };
TypedResultsTests.cs (3)
1096var extensions = new List<KeyValuePair<string, object>> { new("test", "value") }; 1217var errors = new List<KeyValuePair<string, string[]>> { new("testField", new[] { "test error" }) }; 1222var extensions = new List<KeyValuePair<string, object>> { new("testField", "test value") };
Microsoft.AspNetCore.Http.Tests (3)
HeaderDictionaryTests.cs (2)
96Assert.Throws<InvalidOperationException>(() => headers.Add(new KeyValuePair<string, StringValues>("header1", "value1"))); 99Assert.Throws<InvalidOperationException>(() => headers.Remove(new KeyValuePair<string, StringValues>("header1", "value1")));
Internal\ItemsDictionaryTests.cs (1)
26var pairs = new KeyValuePair<object, object>[] { new KeyValuePair<object, object>("first", "value") };
Microsoft.AspNetCore.HttpLogging (1)
HttpLoggingInterceptorContext.cs (1)
90InternalParameters.Add(new(key, value));
Microsoft.AspNetCore.InternalTesting (2)
Logging\LogValuesAssert.cs (1)
25Contains(new[] { new KeyValuePair<string, object>(key, value) }, actualValues);
xunit\QuarantinedTestTraitDiscoverer.cs (1)
18yield return new KeyValuePair<string, string>("Quarantined", "true");
Microsoft.AspNetCore.InternalTesting.Tests (35)
LogValuesAssertTest.cs (35)
32new KeyValuePair<string, object>("RouteValue", "Failure"), 33new KeyValuePair<string, object>("RouteKey", "id") 40new KeyValuePair<string, object>("RouteValue", "Failure"), 41new KeyValuePair<string, object>("RouteKey", "id") 45new KeyValuePair<string, object>("RouteValue", "Failure"), 46new KeyValuePair<string, object>("RouteKey", "id"), 47new KeyValuePair<string, object>("RouteConstraint", "Something") 54new KeyValuePair<string, object>("RouteValue", "Failure"), 55new KeyValuePair<string, object>("RouteKey", "id") 59new KeyValuePair<string, object>("RouteValue", "Failure"), 60new KeyValuePair<string, object>("RouteKey", "id"), 90new KeyValuePair<string, object>("RouteValue", "Failure"), 91new KeyValuePair<string, object>("RouteKey", "id") 98new KeyValuePair<string, object>("RouteValue", "Failure"), 99new KeyValuePair<string, object>("RouteKey", "id"), 100new KeyValuePair<string, object>("RouteConstraint", "Something") 104new KeyValuePair<string, object>("RouteValue", "Failure"), 105new KeyValuePair<string, object>("RouteKey", "id") 132new KeyValuePair<string, object>("RouteConstraint", "Something"), 133new KeyValuePair<string, object>("RouteValue", "Failure"), 134new KeyValuePair<string, object>("RouteKey", "id") 138new KeyValuePair<string, object>("RouteKey", "id"), 139new KeyValuePair<string, object>("RouteConstraint", "Something"), 140new KeyValuePair<string, object>("RouteValue", "Failure"), 153new KeyValuePair<string, object>("RouteConstraint", "Something"), 154new KeyValuePair<string, object>("RouteKey", "id"), 155new KeyValuePair<string, object>("RouteValue", "Failure"), 175new KeyValuePair<string, object>("RouteKey", "id"), 176new KeyValuePair<string, object>("RouteValue", "Failure"), 180new KeyValuePair<string, object>("ROUTEKEY", "id"), 181new KeyValuePair<string, object>("RouteValue", "Failure"), 187new KeyValuePair<string, object>("RouteKey", "id"), 188new KeyValuePair<string, object>("RouteValue", "Failure"), 192new KeyValuePair<string, object>("RouteKey", "id"), 193new KeyValuePair<string, object>("RouteValue", "FAILURE"),
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (10)
JsonPatchDocumentJObjectTest.cs (10)
48var model = new ObjectWithJObject { CustomData = new JsonObject([new("Email", "foo@bar.com"), new("Name", "Bar")]) }; 65var model = new ObjectWithJObject { CustomData = new JsonObject([new("Email", "foo@bar.com")]) }; 81var model = new ObjectWithJObject { CustomData = new JsonObject([new("FirstName", "Bar"), new("LastName", "Bar")]) }; 97var model = new ObjectWithJObject { CustomData = new JsonObject([new("FirstName", "Bar")]) }; 147var model = new ObjectWithJObject { CustomData = new JsonObject([new("Email", "foo@bar.com"), new("Name", "Bar")]) }; 163var model = new ObjectWithJObject { CustomData = new JsonObject([new("Email", "foo@bar.com"), new("Name", "Bar")]) };
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelStateDictionary.cs (1)
1030new KeyValuePair<string, ModelStateEntry>(_modelStateNode.Key, _modelStateNode);
Microsoft.AspNetCore.Mvc.Core (87)
Diagnostics\MvcDiagnostics.cs (83)
550 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 561 => new KeyValuePair<string, object>(nameof(HttpContext), HttpContext), 572 => new KeyValuePair<string, object>(nameof(RouteData), RouteData), 1060 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 1071 => new KeyValuePair<string, object>(nameof(HttpContext), HttpContext), 1082 => new KeyValuePair<string, object>(nameof(RouteData), RouteData), 1570 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 1581 => new KeyValuePair<string, object>(nameof(AuthorizationContext), AuthorizationContext), 1592 => new KeyValuePair<string, object>(nameof(Filter), Filter), 2080 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 2091 => new KeyValuePair<string, object>(nameof(AuthorizationContext), AuthorizationContext), 2102 => new KeyValuePair<string, object>(nameof(Filter), Filter), 2590 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 2601 => new KeyValuePair<string, object>(nameof(ResourceExecutingContext), ResourceExecutingContext), 2612 => new KeyValuePair<string, object>(nameof(Filter), Filter), 3100 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 3111 => new KeyValuePair<string, object>(nameof(ResourceExecutedContext), ResourceExecutedContext), 3122 => new KeyValuePair<string, object>(nameof(Filter), Filter), 3610 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 3621 => new KeyValuePair<string, object>(nameof(ResourceExecutingContext), ResourceExecutingContext), 3632 => new KeyValuePair<string, object>(nameof(Filter), Filter), 4120 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 4131 => new KeyValuePair<string, object>(nameof(ResourceExecutingContext), ResourceExecutingContext), 4142 => new KeyValuePair<string, object>(nameof(Filter), Filter), 4630 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 4641 => new KeyValuePair<string, object>(nameof(ResourceExecutedContext), ResourceExecutedContext), 4652 => new KeyValuePair<string, object>(nameof(Filter), Filter), 5140 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 5151 => new KeyValuePair<string, object>(nameof(ResourceExecutedContext), ResourceExecutedContext), 5162 => new KeyValuePair<string, object>(nameof(Filter), Filter), 5650 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 5661 => new KeyValuePair<string, object>(nameof(ExceptionContext), ExceptionContext), 5672 => new KeyValuePair<string, object>(nameof(Filter), Filter), 6160 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 6171 => new KeyValuePair<string, object>(nameof(ExceptionContext), ExceptionContext), 6182 => new KeyValuePair<string, object>(nameof(Filter), Filter), 6670 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 6681 => new KeyValuePair<string, object>(nameof(ActionExecutingContext), ActionExecutingContext), 6692 => new KeyValuePair<string, object>(nameof(Filter), Filter), 7180 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 7191 => new KeyValuePair<string, object>(nameof(ActionExecutedContext), ActionExecutedContext), 7202 => new KeyValuePair<string, object>(nameof(Filter), Filter), 7690 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 7701 => new KeyValuePair<string, object>(nameof(ActionExecutingContext), ActionExecutingContext), 7712 => new KeyValuePair<string, object>(nameof(Filter), Filter), 8200 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 8211 => new KeyValuePair<string, object>(nameof(ActionExecutingContext), ActionExecutingContext), 8222 => new KeyValuePair<string, object>(nameof(Filter), Filter), 8710 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 8721 => new KeyValuePair<string, object>(nameof(ActionExecutedContext), ActionExecutedContext), 8732 => new KeyValuePair<string, object>(nameof(Filter), Filter), 9220 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 9231 => new KeyValuePair<string, object>(nameof(ActionExecutedContext), ActionExecutedContext), 9242 => new KeyValuePair<string, object>(nameof(Filter), Filter), 9730 => new KeyValuePair<string, object>(nameof(ActionContext), ActionContext), 9741 => new KeyValuePair<string, object>(nameof(ActionArguments), ActionArguments), 9752 => new KeyValuePair<string, object>(nameof(Controller), Controller), 10310 => new KeyValuePair<string, object>(nameof(ActionContext), ActionContext), 10321 => new KeyValuePair<string, object>(nameof(Controller), Controller), 10332 => new KeyValuePair<string, object>(nameof(Controller), Controller), 10343 => new KeyValuePair<string, object>(nameof(Result), Result), 10830 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 10841 => new KeyValuePair<string, object>(nameof(ResultExecutingContext), ResultExecutingContext), 10852 => new KeyValuePair<string, object>(nameof(Filter), Filter), 11340 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 11351 => new KeyValuePair<string, object>(nameof(ResultExecutedContext), ResultExecutedContext), 11362 => new KeyValuePair<string, object>(nameof(Filter), Filter), 11850 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 11861 => new KeyValuePair<string, object>(nameof(ResultExecutingContext), ResultExecutingContext), 11872 => new KeyValuePair<string, object>(nameof(Filter), Filter), 12360 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 12371 => new KeyValuePair<string, object>(nameof(ResultExecutingContext), ResultExecutingContext), 12382 => new KeyValuePair<string, object>(nameof(Filter), Filter), 12870 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 12881 => new KeyValuePair<string, object>(nameof(ResultExecutedContext), ResultExecutedContext), 12892 => new KeyValuePair<string, object>(nameof(Filter), Filter), 13380 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 13391 => new KeyValuePair<string, object>(nameof(ResultExecutedContext), ResultExecutedContext), 13402 => new KeyValuePair<string, object>(nameof(Filter), Filter), 13820 => new KeyValuePair<string, object>(nameof(ActionContext), ActionContext), 13831 => new KeyValuePair<string, object>(nameof(Result), Result), 14250 => new KeyValuePair<string, object>(nameof(ActionContext), ActionContext), 14261 => new KeyValuePair<string, object>(nameof(Result), Result),
ModelBinding\Binders\KeyValuePairModelBinder.cs (2)
53var model = new KeyValuePair<TKey?, TValue?>( 84var model = new KeyValuePair<TKey?, TValue?>();
MvcCoreLoggerExtensions.cs (2)
297return new KeyValuePair<string, object>("ActionId", _action.Id); 301return new KeyValuePair<string, object>("ActionName", _action.DisplayName ?? string.Empty);
Microsoft.AspNetCore.Mvc.Core.Test (40)
ApplicationModels\ActionModelTest.cs (1)
79action.Properties.Add(new KeyValuePair<object, object>("test key", "test value"));
ApplicationModels\ControllerModelTest.cs (1)
79controller.Properties.Add(new KeyValuePair<object, object>("test key", "test value"));
ApplicationModels\ParameterModelTest.cs (1)
25parameter.Properties.Add(new KeyValuePair<object, object>("test key", "test value"));
ApplicationModels\PropertyModelTest.cs (1)
21propertyModel.Properties.Add(new KeyValuePair<object, object>("test key", "test value"));
ModelBinding\Binders\DictionaryModelBinderTest.cs (2)
371new KeyValuePair<string, int>("prefix[23]", 23), 372new KeyValuePair<string, int>("prefix[27]", 27),
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (1)
101Assert.Equal(new KeyValuePair<int, string>(42, "some-value"), bindingContext.Result.Model);
ModelBinding\Metadata\DefaultModelMetadataTest.cs (20)
582new KeyValuePair<string, int>("Property1", 23), 583new KeyValuePair<string, int>("Property2", 23), 584new KeyValuePair<string, int>("Property3", 23), 585new KeyValuePair<string, int>("Property4", 23), 593new KeyValuePair<string, int>("Property4", 23), 594new KeyValuePair<string, int>("Property3", 24), 595new KeyValuePair<string, int>("Property2", 25), 596new KeyValuePair<string, int>("Property1", 26), 604new KeyValuePair<string, int>("Property1", 26), 605new KeyValuePair<string, int>("Property2", 25), 606new KeyValuePair<string, int>("Property3", 24), 607new KeyValuePair<string, int>("Property4", 23), 614new KeyValuePair<string, int>("Alpha", 26), 615new KeyValuePair<string, int>("Bravo", 24), 616new KeyValuePair<string, int>("Charlie", 23), 617new KeyValuePair<string, int>("Delta", 25), 625new KeyValuePair<string, int>("Joan", 1), 626new KeyValuePair<string, int>("Jonathan", 0), 627new KeyValuePair<string, int>("Jon", 0), 628new KeyValuePair<string, int>("John", -1),
ModelBinding\Validation\DefaultCollectionValidationStrategyTest.cs (3)
68Assert.Equal(new KeyValuePair<int, string>(2, "two"), e.Model); 74Assert.Equal(new KeyValuePair<int, string>(3, "three"), e.Model); 80Assert.Equal(new KeyValuePair<int, string>(5, "five"), e.Model);
ModelBinding\Validation\ExplicitIndexCollectionValidationStrategyTest.cs (3)
68Assert.Equal(new KeyValuePair<int, string>(3, "three"), e.Model); 74Assert.Equal(new KeyValuePair<int, string>(5, "five"), e.Model); 80Assert.Equal(new KeyValuePair<int, string>(2, "two"), e.Model);
MvcCoreLoggerExtensionsTest.cs (6)
20new object[]{ "{foo = \"bar\"}", new KeyValuePair<string, string>("foo", "bar") }, 22new KeyValuePair<string, string>("foo", "bar"), 23new KeyValuePair<string, string>("other", "value") }, 28new object[]{ "{page = \"bar\"}", new KeyValuePair<string, string>("page", "bar") }, 30new KeyValuePair<string, string>("page", "bar"), 31new KeyValuePair<string, string>("other", "value") },
Routing\AttributeRouteTest.cs (1)
442kvp => Assert.Equal(new KeyValuePair<string, object>("slug", "hello"), kvp));
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
193groupedDisplayNamesAndValues.Add(new KeyValuePair<EnumGroupAndName, string>(
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (58)
DataAnnotationsMetadataProviderTest.cs (58)
820new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName("Zero", string.Empty), "0"), 821new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDisplayNames.One)), "1"), 822new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, "dos value"), "2"), 823new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, "tres value"), "3"), 824new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, "name from resources"), "-2"), 825new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName("Negatives", "menos uno value"), "-1"), 873new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName("Zero", string.Empty), "0"), 874new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDisplayNames.One)), "1"), 875new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, "dos"), "2"), 876new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, "tres"), "3"), 877new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, "name from resources"), "-2"), 878new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName("Negatives", "menos uno"), "-1"), 885new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName("Zero", string.Empty), "0"), 886new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDisplayNames.One)), "1"), 887new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, "dos"), "2"), 888new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, "tres"), "3"), 889new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, "name from resources"), "-2"), 890new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName("Negatives", "menos uno"), "-1"), 899new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.Zero)), "0"), 900new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.None)), "0"), 901new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.One)), "1"), 902new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.Two)), "2"), 903new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.Duece)), "2"), 904new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.Three)), "3"), 905new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.MoreThanTwo)), "3"), 912new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.Zero)), "0"), 913new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.None)), "0"), 914new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.One)), "1"), 915new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.Two)), "2"), 916new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.Duece)), "2"), 917new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.Three)), "3"), 918new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDuplicates.MoreThanTwo)), "3"), 925new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFlags.Zero)), "0"), 926new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFlags.One)), "1"), 927new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFlags.Two)), "2"), 928new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFlags.Four)), "4"), 929new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFlags.All)), "-1"), 936new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFlags.Zero)), "0"), 937new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFlags.One)), "1"), 938new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFlags.Two)), "2"), 939new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFlags.Four)), "4"), 940new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFlags.All)), "-1"), 947new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.Zero)), "0"), 948new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.One)), "1"), 949new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.Two)), "2"), 950new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.Three)), "3"), 951new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.MinusTwo)), "-2"), 952new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.MinusOne)), "-1"), 959new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.Zero)), "0"), 960new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.One)), "1"), 961new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.Two)), "2"), 962new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.Three)), "3"), 963new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.MinusTwo)), "-2"), 964new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithFields.MinusOne)), "-1"), 1000new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDisplayOrder.Three)), "2"), 1001new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDisplayOrder.Two)), "1"), 1002new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDisplayOrder.One)), "0"), 1003new KeyValuePair<EnumGroupAndName, string>(new EnumGroupAndName(string.Empty, nameof(EnumWithDisplayOrder.Null)), "3"),
Microsoft.AspNetCore.Mvc.FunctionalTests (133)
AntiforgeryMiddlewareTest.cs (19)
44new("__RequestVerificationToken", tokens.RequestToken), 45new("name", "Test task"), 46new("isComplete", "false"), 47new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)), 86new("name", "Test task"), 87new("isComplete", "false"), 88new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)), 128new("__RequestVerificationToken", tokens.RequestToken), 129new("name", "Test task"), 130new("isComplete", "false"), 131new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)), 160new("__RequestVerificationToken", tokens.RequestToken), 161new("name", "Test task"), 162new("isComplete", "false"), 163new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)), 192new("__RequestVerificationToken", tokens.RequestToken), 193new("name", "Test task"), 194new("isComplete", "false"), 195new("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.CurrentCulture)),
AntiforgeryTests.cs (9)
71new KeyValuePair<string,string>("__RequestVerificationToken", formToken), 72new KeyValuePair<string,string>("UserName", "abra"), 73new KeyValuePair<string,string>("Password", "cadabra"), 121new KeyValuePair<string,string>("__RequestVerificationToken", formToken), 122new KeyValuePair<string,string>("UserName", "test"), 123new KeyValuePair<string,string>("Password", "password"), 150new KeyValuePair<string,string>("__RequestVerificationToken", formToken), 151new KeyValuePair<string,string>("UserName", "test"), 152new KeyValuePair<string,string>("Password", "password"),
HtmlGenerationTest.cs (11)
327new KeyValuePair<string,string>("Number", string.Empty), 328new KeyValuePair<string,string>("Name", string.Empty), 329new KeyValuePair<string,string>("Email", string.Empty), 330new KeyValuePair<string,string>("PhoneNumber", string.Empty), 331new KeyValuePair<string,string>("Password", string.Empty) 379new KeyValuePair<string,string>("Number", string.Empty), 380new KeyValuePair<string,string>("Name", string.Empty), 381new KeyValuePair<string,string>("Email", string.Empty), 382new KeyValuePair<string,string>("PhoneNumber", string.Empty), 383new KeyValuePair<string,string>("Password", string.Empty), 384new KeyValuePair<string,string>("Address", string.Empty),
InputObjectValidationTests.cs (1)
187new KeyValuePair<string, string>("Alias", "xyz"),
NonNullableReferenceTypesTest.cs (4)
56new KeyValuePair<string, string>("__RequestVerificationToken", formToken), 98new KeyValuePair<string, string>("__RequestVerificationToken", formToken), 99new KeyValuePair<string, string>("Name", "Pranav"), 100new KeyValuePair<string, string>("description", "Meme")
RazorPageModelTest.cs (12)
43new KeyValuePair<string, string>("Name", "Overriden"), 44new KeyValuePair<string, string>("Age", "25"), 68new KeyValuePair<string, string>("Name", "Foo"), 69new KeyValuePair<string, string>("Age", "25"), 93new KeyValuePair<string, string>("Name", "Foo"), 94new KeyValuePair<string, string>("Age", "200"), 119new KeyValuePair<string, string>("Name", "Overriden"), 120new KeyValuePair<string, string>("Age", "25"), 144new KeyValuePair<string, string>("Name", "Foo"), 145new KeyValuePair<string, string>("Age", "25"), 169new KeyValuePair<string, string>("Name", "Foo"), 170new KeyValuePair<string, string>("Age", "200"),
RazorPagesTest.cs (13)
675new KeyValuePair<string, string>("Name", "Foo"), 676new KeyValuePair<string, string>("Age", "25"), 704new KeyValuePair<string, string>("Age", "325"), 730new KeyValuePair<string, string>("Name", "Foo"), 731new KeyValuePair<string, string>("Age", "25"), 761new KeyValuePair<string, string>("Age", "325"), 846new KeyValuePair<string, string>("Name", "Test-Name"), 847new KeyValuePair<string, string>("Age", "32"), 871new KeyValuePair<string, string>("Name", "Test-Name"), 872new KeyValuePair<string, string>("Age", "32"), 987new KeyValuePair<string, string>("value", "37"), 1332new KeyValuePair<string, string>("Property1", "345"), 1333new KeyValuePair<string, string>("Property2", "25"),
RequestFormLimitsTest.cs (19)
42kvps.Add(new KeyValuePair<string, string>("key1", "value1")); 43kvps.Add(new KeyValuePair<string, string>("key2", "value2")); 44kvps.Add(new KeyValuePair<string, string>("key3", "value3")); 45kvps.Add(new KeyValuePair<string, string>("RequestVerificationToken", "invalid-data")); 64kvps.Add(new KeyValuePair<string, string>("key1", "value1")); 65kvps.Add(new KeyValuePair<string, string>("key2", "value2")); 66kvps.Add(new KeyValuePair<string, string>("SampleInt", "10")); 89kvps.Add(new KeyValuePair<string, string>($"key{i}", $"value{i}")); 91kvps.Add(new KeyValuePair<string, string>("SampleInt", "50")); 92kvps.Add(new KeyValuePair<string, string>("RequestVerificationToken", "invalid-data")); 113kvps.Add(new KeyValuePair<string, string>("key1", new string('a', 1024))); 114kvps.Add(new KeyValuePair<string, string>("key2", "value2")); 115kvps.Add(new KeyValuePair<string, string>("RequestVerificationToken", "invalid-data")); 138kvps.Add(new KeyValuePair<string, string>("key1", "value1")); 139kvps.Add(new KeyValuePair<string, string>("key1", "value2")); 140kvps.Add(new KeyValuePair<string, string>("key1", "value3")); 141kvps.Add(new KeyValuePair<string, string>("RequestVerificationToken", "invalid-data")); 161kvps.Add(new KeyValuePair<string, string>("key1", "value1")); 162kvps.Add(new KeyValuePair<string, string>("RequestVerificationToken", "invalid-data"));
RequestSizeLimitTest.cs (4)
42kvps.Add(new KeyValuePair<string, string>("SampleString", new string('p', 1024))); 43kvps.Add(new KeyValuePair<string, string>("RequestVerificationToken", "invalid-data")); 64kvps.Add(new KeyValuePair<string, string>("SampleString", "string")); 65kvps.Add(new KeyValuePair<string, string>("RequestVerificationToken", "invalid-data"));
RoutingEndpointRoutingTest.cs (1)
29new KeyValuePair<string, object>("page", "pagevalue"),
RoutingTestsBase.cs (11)
384new KeyValuePair<string, object>("controller", "Store"), 388new KeyValuePair<string, object>("action", "ListProducts"), 417new KeyValuePair<string, object>("controller", "Friends"), 421new KeyValuePair<string, object>("action", method), 427new KeyValuePair<string, object>("id", "Peter"), 662new KeyValuePair<string, object>("controller", "Blog"), 666new KeyValuePair<string, object>("action", "Edit"), 670new KeyValuePair<string, object>("postId", "5"), 877new KeyValuePair<string, object>("id", "5"), 898new KeyValuePair<string, object>("id", "5"), 919new KeyValuePair<string, object>("teamId", "5"),
RoutingWithoutRazorPagesTestsBase.cs (1)
53new KeyValuePair<string, object>("page", "pagevalue"),
TempDataInCookiesTest.cs (2)
119new KeyValuePair<string, string>("value", "Foo"), 172new KeyValuePair<string, string>("value", "Foo"),
TempDataInCookiesUsingCookieConsentTest.cs (2)
42new KeyValuePair<string, string>("value", "Foo"), 75new KeyValuePair<string, string>("value", "Foo"),
TempDataPropertyTest.cs (8)
38new KeyValuePair<string, string>("FullName", "Bob"), 39new KeyValuePair<string, string>("id", "1"), 66new KeyValuePair<string, string>("FullName", "Bob"), 67new KeyValuePair<string, string>("id", "1"), 94new KeyValuePair<string, string>("FullName", "Bob"), 95new KeyValuePair<string, string>("id", "1"), 131new KeyValuePair<string, string>("FullName", "Bob"), 132new KeyValuePair<string, string>("id", "1"),
TempDataTestBase.cs (13)
41new KeyValuePair<string, string>("value", "Foo"), 72new KeyValuePair<string, string>("value", "Foo"), 91new KeyValuePair<string, string>("value", "Foo"), 122new KeyValuePair<string, string>("value", "Foo"), 156new KeyValuePair<string, string>("value", "Foo"), 157new KeyValuePair<string, string>("intValue", "10"), 158new KeyValuePair<string, string>("listValues", "Foo1"), 159new KeyValuePair<string, string>("listValues", "Foo2"), 160new KeyValuePair<string, string>("listValues", "Foo3"), 161new KeyValuePair<string, string>("datetimeValue", "10/10/2010"), 162new KeyValuePair<string, string>("guidValue", testGuid.ToString()), 187new KeyValuePair<string, string>("Name", "Jordan"), 201new KeyValuePair<string, string>("Name", "Jordan"),
VersioningTestsBase.cs (3)
164new KeyValuePair<string, object>("id", "5"), 191new KeyValuePair<string, object>("id", "5"), 240new KeyValuePair<string, object>("id", "5"),
Microsoft.AspNetCore.Mvc.IntegrationTests (9)
ComplexRecordIntegrationTest.cs (2)
1735Assert.Equal(new KeyValuePair<string, int>("key0", 10), model.ProductId); 1790Assert.Equal(new KeyValuePair<string, int>("key0", 10), model.ProductId);
ComplexTypeIntegrationTestBase.cs (2)
1776Assert.Equal(new KeyValuePair<string, int>("key0", 10), model.ProductId); 1831Assert.Equal(new KeyValuePair<string, int>("key0", 10), model.ProductId);
KeyValuePairModelBinderIntegrationTest.cs (5)
38Assert.Equal(new KeyValuePair<string, int>("key0", 10), model); 256Assert.Equal(new KeyValuePair<string, int>("key0", 10), model); 296Assert.Equal(new KeyValuePair<string, int>("key0", 10), model); 335Assert.Equal(new KeyValuePair<string, int>(), modelBindingResult.Model); 500Assert.Equal(new KeyValuePair<string, Person>(), modelBindingResult.Model);
Microsoft.AspNetCore.Mvc.Razor (8)
Diagnostics\MvcDiagnostics.cs (8)
640 => new KeyValuePair<string, object>(nameof(Page), Page), 651 => new KeyValuePair<string, object>(nameof(ViewContext), ViewContext), 662 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 673 => new KeyValuePair<string, object>(nameof(HttpContext), HttpContext), 1250 => new KeyValuePair<string, object>(nameof(Page), Page), 1261 => new KeyValuePair<string, object>(nameof(ViewContext), ViewContext), 1272 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 1283 => new KeyValuePair<string, object>(nameof(HttpContext), HttpContext),
Microsoft.AspNetCore.Mvc.RazorPages (39)
Diagnostics\MvcDiagnostics.cs (39)
610 => new KeyValuePair<string, object>(nameof(ActionContext), ActionContext), 621 => new KeyValuePair<string, object>(nameof(Arguments), Arguments), 632 => new KeyValuePair<string, object>(nameof(HandlerMethodDescriptor), HandlerMethodDescriptor), 643 => new KeyValuePair<string, object>(nameof(Instance), Instance), 1270 => new KeyValuePair<string, object>(nameof(ActionContext), ActionContext), 1281 => new KeyValuePair<string, object>(nameof(Arguments), Arguments), 1292 => new KeyValuePair<string, object>(nameof(HandlerMethodDescriptor), HandlerMethodDescriptor), 1303 => new KeyValuePair<string, object>(nameof(Instance), Instance), 1314 => new KeyValuePair<string, object>(nameof(Result), Result!), 1800 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 1811 => new KeyValuePair<string, object>(nameof(HandlerExecutionContext), HandlerExecutionContext), 1822 => new KeyValuePair<string, object>(nameof(Filter), Filter), 2310 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 2321 => new KeyValuePair<string, object>(nameof(HandlerExecutedContext), HandlerExecutedContext), 2332 => new KeyValuePair<string, object>(nameof(Filter), Filter), 2820 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 2831 => new KeyValuePair<string, object>(nameof(HandlerExecutingContext), HandlerExecutingContext), 2842 => new KeyValuePair<string, object>(nameof(Filter), Filter), 3330 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 3341 => new KeyValuePair<string, object>(nameof(HandlerExecutingContext), HandlerExecutingContext), 3352 => new KeyValuePair<string, object>(nameof(Filter), Filter), 3840 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 3851 => new KeyValuePair<string, object>(nameof(HandlerExecutedContext), HandlerExecutedContext), 3862 => new KeyValuePair<string, object>(nameof(Filter), Filter), 4350 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 4361 => new KeyValuePair<string, object>(nameof(HandlerExecutedContext), HandlerExecutedContext), 4372 => new KeyValuePair<string, object>(nameof(Filter), Filter), 4860 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 4871 => new KeyValuePair<string, object>(nameof(HandlerSelectedContext), HandlerSelectedContext), 4882 => new KeyValuePair<string, object>(nameof(Filter), Filter), 5370 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 5381 => new KeyValuePair<string, object>(nameof(HandlerSelectedContext), HandlerSelectedContext), 5392 => new KeyValuePair<string, object>(nameof(Filter), Filter), 5880 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 5891 => new KeyValuePair<string, object>(nameof(HandlerSelectedContext), HandlerSelectedContext), 5902 => new KeyValuePair<string, object>(nameof(Filter), Filter), 6390 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 6401 => new KeyValuePair<string, object>(nameof(HandlerSelectedContext), HandlerSelectedContext), 6412 => new KeyValuePair<string, object>(nameof(Filter), Filter),
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Cache\CacheTagKey.cs (1)
286result.Add(new KeyValuePair<string, string>(trimmedValue.Value, value ?? string.Empty));
Microsoft.AspNetCore.Mvc.ViewFeatures (31)
AttributeDictionary.cs (2)
43var item = new KeyValuePair<string, string?>(key, value); 185Add(new KeyValuePair<string, string?>(key, value));
Diagnostics\MvcDiagnostics.cs (27)
550 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 561 => new KeyValuePair<string, object>(nameof(ViewComponentContext), ViewComponentContext), 572 => new KeyValuePair<string, object>(nameof(ViewComponent), ViewComponent), 1130 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 1141 => new KeyValuePair<string, object>(nameof(ViewComponentContext), ViewComponentContext), 1152 => new KeyValuePair<string, object>(nameof(ViewComponent), ViewComponent), 1163 => new KeyValuePair<string, object>(nameof(ViewComponentResult), ViewComponentResult), 1640 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 1651 => new KeyValuePair<string, object>(nameof(ViewComponentContext), ViewComponentContext), 1662 => new KeyValuePair<string, object>(nameof(View), View), 2150 => new KeyValuePair<string, object>(nameof(ActionDescriptor), ActionDescriptor), 2161 => new KeyValuePair<string, object>(nameof(ViewComponentContext), ViewComponentContext), 2172 => new KeyValuePair<string, object>(nameof(View), View), 2590 => new KeyValuePair<string, object>(nameof(View), View), 2601 => new KeyValuePair<string, object>(nameof(ViewContext), ViewContext), 3020 => new KeyValuePair<string, object>(nameof(View), View), 3031 => new KeyValuePair<string, object>(nameof(ViewContext), ViewContext), 3700 => new KeyValuePair<string, object>(nameof(ActionContext), ActionContext), 3711 => new KeyValuePair<string, object>(nameof(IsMainPage), IsMainPage ? BoxedTrue : BoxedFalse), 3722 => new KeyValuePair<string, object>(nameof(Result), Result), 3733 => new KeyValuePair<string, object>(nameof(ViewName), ViewName), 3744 => new KeyValuePair<string, object>(nameof(View), View), 4410 => new KeyValuePair<string, object>(nameof(ActionContext), ActionContext), 4421 => new KeyValuePair<string, object>(nameof(IsMainPage), IsMainPage ? BoxedTrue : BoxedFalse), 4432 => new KeyValuePair<string, object>(nameof(Result), Result), 4443 => new KeyValuePair<string, object>(nameof(ViewName), ViewName), 4454 => new KeyValuePair<string, object>(nameof(SearchedLocations), SearchedLocations),
ViewComponents\DefaultViewComponentInvoker.cs (2)
299return new KeyValuePair<string, object>("ViewComponentName", _descriptor.DisplayName); 303return new KeyValuePair<string, object>("ViewComponentId", _descriptor.Id);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (99)
AttributeDictionaryTest.cs (93)
23kvp => Assert.Equal(new KeyValuePair<string, string>("one", "1"), kvp), 24kvp => Assert.Equal(new KeyValuePair<string, string>("two", "2"), kvp), 25kvp => Assert.Equal(new KeyValuePair<string, string>("zero", "0"), kvp)); 35attributes.Add(new KeyValuePair<string, string>("zero", "0")); 36attributes.Add(new KeyValuePair<string, string>("one", "1")); 37attributes.Add(new KeyValuePair<string, string>("two", "2")); 43kvp => Assert.Equal(new KeyValuePair<string, string>("one", "1"), kvp), 44kvp => Assert.Equal(new KeyValuePair<string, string>("two", "2"), kvp), 45kvp => Assert.Equal(new KeyValuePair<string, string>("zero", "0"), kvp)); 68attributes.Add(new KeyValuePair<string, string>("zero", "0")); 69attributes.Add(new KeyValuePair<string, string>("one", "1")); 70attributes.Add(new KeyValuePair<string, string>("two", "2")); 86attributes.Add(new KeyValuePair<string, string>("zero", "0")); 87attributes.Add(new KeyValuePair<string, string>("one", "1")); 88attributes.Add(new KeyValuePair<string, string>("two", "2")); 91var result = attributes.Contains(new KeyValuePair<string, string>("zero", "0")); 103attributes.Add(new KeyValuePair<string, string>("zero", "0")); 104attributes.Add(new KeyValuePair<string, string>("one", "1")); 105attributes.Add(new KeyValuePair<string, string>("two", "2")); 108var result = attributes.Contains(new KeyValuePair<string, string>("zero", "nada")); 120attributes.Add(new KeyValuePair<string, string>("zero", "0")); 121attributes.Add(new KeyValuePair<string, string>("one", "1")); 122attributes.Add(new KeyValuePair<string, string>("two", "2")); 137attributes.Add(new KeyValuePair<string, string>("zero", "0")); 138attributes.Add(new KeyValuePair<string, string>("one", "1")); 139attributes.Add(new KeyValuePair<string, string>("two", "2")); 154attributes.Add(new KeyValuePair<string, string>("zero", "0")); 155attributes.Add(new KeyValuePair<string, string>("one", "1")); 156attributes.Add(new KeyValuePair<string, string>("two", "2")); 167kvp => Assert.Equal(new KeyValuePair<string, string>("one", "1"), kvp), 168kvp => Assert.Equal(new KeyValuePair<string, string>("two", "2"), kvp), 169kvp => Assert.Equal(new KeyValuePair<string, string>("zero", "0"), kvp)); 191attributes.Add(new KeyValuePair<string, string>("zero", "0")); 192attributes.Add(new KeyValuePair<string, string>("one", "1")); 193attributes.Add(new KeyValuePair<string, string>("two", "2")); 213attributes.Add(new KeyValuePair<string, string>("zero", "0")); 214attributes.Add(new KeyValuePair<string, string>("one", "1")); 215attributes.Add(new KeyValuePair<string, string>("two", "2")); 225kvp => Assert.Equal(new KeyValuePair<string, string>("two", "2"), kvp), 226kvp => Assert.Equal(new KeyValuePair<string, string>("zero", "0"), kvp)); 235attributes.Add(new KeyValuePair<string, string>("zero", "0")); 236attributes.Add(new KeyValuePair<string, string>("one", "1")); 237attributes.Add(new KeyValuePair<string, string>("two", "2")); 247kvp => Assert.Equal(new KeyValuePair<string, string>("one", "1"), kvp), 248kvp => Assert.Equal(new KeyValuePair<string, string>("two", "2"), kvp), 249kvp => Assert.Equal(new KeyValuePair<string, string>("zero", "0"), kvp)); 258attributes.Add(new KeyValuePair<string, string>("zero", "0")); 259attributes.Add(new KeyValuePair<string, string>("one", "1")); 260attributes.Add(new KeyValuePair<string, string>("two", "2")); 263var result = attributes.Remove(new KeyValuePair<string, string>("one", "1")); 270kvp => Assert.Equal(new KeyValuePair<string, string>("two", "2"), kvp), 271kvp => Assert.Equal(new KeyValuePair<string, string>("zero", "0"), kvp)); 280attributes.Add(new KeyValuePair<string, string>("zero", "0")); 281attributes.Add(new KeyValuePair<string, string>("one", "1")); 282attributes.Add(new KeyValuePair<string, string>("two", "2")); 285var result = attributes.Remove(new KeyValuePair<string, string>("one", "0")); 292kvp => Assert.Equal(new KeyValuePair<string, string>("one", "1"), kvp), 293kvp => Assert.Equal(new KeyValuePair<string, string>("two", "2"), kvp), 294kvp => Assert.Equal(new KeyValuePair<string, string>("zero", "0"), kvp)); 303attributes.Add(new KeyValuePair<string, string>("zero", "0")); 304attributes.Add(new KeyValuePair<string, string>("one", "1")); 305attributes.Add(new KeyValuePair<string, string>("two", "2")); 323attributes.Add(new KeyValuePair<string, string>("zero", "0")); 324attributes.Add(new KeyValuePair<string, string>("one", "1")); 325attributes.Add(new KeyValuePair<string, string>("two", "2")); 343attributes.Add(new KeyValuePair<string, string>("zero", "0")); 344attributes.Add(new KeyValuePair<string, string>("one", "1")); 345attributes.Add(new KeyValuePair<string, string>("two", "2")); 365attributes.Add(new KeyValuePair<string, string>("zero", "0")); 366attributes.Add(new KeyValuePair<string, string>("one", "1")); 367attributes.Add(new KeyValuePair<string, string>("two", "2")); 382attributes.Add(new KeyValuePair<string, string>("zero", "0")); 383attributes.Add(new KeyValuePair<string, string>("one", "1")); 384attributes.Add(new KeyValuePair<string, string>("two", "2")); 396attributes.Add(new KeyValuePair<string, string>("zero", "0")); 397attributes.Add(new KeyValuePair<string, string>("one", "1")); 398attributes.Add(new KeyValuePair<string, string>("two", "2")); 407kvp => Assert.Equal(new KeyValuePair<string, string>("one", "1!"), kvp), 408kvp => Assert.Equal(new KeyValuePair<string, string>("two", "2"), kvp), 409kvp => Assert.Equal(new KeyValuePair<string, string>("zero", "0"), kvp)); 418attributes.Add(new KeyValuePair<string, string>("zero", "0")); 419attributes.Add(new KeyValuePair<string, string>("one", "1")); 420attributes.Add(new KeyValuePair<string, string>("two", "2")); 429kvp => Assert.Equal(new KeyValuePair<string, string>("exciting!", "1!"), kvp), 430kvp => Assert.Equal(new KeyValuePair<string, string>("one", "1"), kvp), 431kvp => Assert.Equal(new KeyValuePair<string, string>("two", "2"), kvp), 432kvp => Assert.Equal(new KeyValuePair<string, string>("zero", "0"), kvp)); 441attributes.Add(new KeyValuePair<string, string>("zero", "0")); 442attributes.Add(new KeyValuePair<string, string>("one", "1")); 443attributes.Add(new KeyValuePair<string, string>("two", "2")); 452kvp => Assert.Equal(new KeyValuePair<string, string>("oNe", "1!"), kvp), 453kvp => Assert.Equal(new KeyValuePair<string, string>("two", "2"), kvp), 454kvp => Assert.Equal(new KeyValuePair<string, string>("zero", "0"), kvp));
Rendering\HtmlHelperTest.cs (3)
22new KeyValuePair<string, object>("selected", false) 30new KeyValuePair<string, object>("SeLeCtEd", true) 38new KeyValuePair<string, object>("SelECTeD", true)
Rendering\TagBuilderTest.cs (3)
38Assert.Equal(new KeyValuePair<string, string>(expectedKey, expectedValue), attribute); 53Assert.Equal(new KeyValuePair<string, string>("class", "btn btn-success"), attribute); 68Assert.Equal(new KeyValuePair<string, string>("ID", "something"), attribute);
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
SnapshotTestHelper.cs (1)
28.WithFeatures([new KeyValuePair<string, string>("InterceptorsNamespaces", "Microsoft.AspNetCore.OpenApi.Generated")]);
Microsoft.AspNetCore.OutputCaching (2)
OutputCacheEntryFormatter.cs (1)
516pairs.Add(new(header, i));
OutputCachePolicyBuilder.cs (1)
217return ValueTask.FromResult(new KeyValuePair<string, string>(key, value));
Microsoft.AspNetCore.OutputCaching.Tests (4)
OutputCachePoliciesTests.cs (2)
291IOutputCachePolicy policy = new VaryByValuePolicy((context, CancellationToken) => ValueTask.FromResult(new KeyValuePair<string, string>(key, value))); 295Assert.Contains(new KeyValuePair<string, string>(key, value), context.CacheVaryByRules.VaryByValues);
OutputCachePolicyBuilderTests.cs (2)
224.VaryByValue(context => new KeyValuePair<string, string>("color", "blue")) 225.VaryByValue((context, cancellationToken) => ValueTask.FromResult(new KeyValuePair<string, string>("size", "1m")))
Microsoft.AspNetCore.Owin (16)
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 (2)
216yield return new KeyValuePair<string, object>(entryPair.Key, value); 221yield return new KeyValuePair<string, object>(Convert.ToString(entryPair.Key, CultureInfo.InvariantCulture), entryPair.Value);
OwinFeatureCollection.cs (10)
400yield return new KeyValuePair<Type, object>(typeof(IHttpRequestFeature), this); 401yield return new KeyValuePair<Type, object>(typeof(IHttpResponseFeature), this); 402yield return new KeyValuePair<Type, object>(typeof(IHttpResponseBodyFeature), this); 403yield return new KeyValuePair<Type, object>(typeof(IHttpConnectionFeature), this); 404yield return new KeyValuePair<Type, object>(typeof(IHttpRequestIdentifierFeature), this); 405yield return new KeyValuePair<Type, object>(typeof(IHttpRequestLifetimeFeature), this); 406yield return new KeyValuePair<Type, object>(typeof(IHttpAuthenticationFeature), this); 407yield return new KeyValuePair<Type, object>(typeof(IOwinEnvironmentFeature), this); 412yield return new KeyValuePair<Type, object>(typeof(ITlsConnectionFeature), this); 416yield return new KeyValuePair<Type, object>(typeof(IHttpWebSocketFeature), this);
Microsoft.AspNetCore.Routing (16)
Matching\DfaMatcher.cs (2)
249slots[slotIndex] = new KeyValuePair<string, object?>( 269slots[catchAll.slotIndex] = new KeyValuePair<string, object?>(
Matching\DfaMatcherBuilder.cs (3)
776_slots.Add(new KeyValuePair<string, object>(parameterPart.Name, requiredValue)); 781_slots.Add(hasDefaultValue ? new KeyValuePair<string, object>(parameterPart.Name, parameterPart.Default) : default); 821_constraints.Add(new KeyValuePair<string, IRouteConstraint>(kvp.Key, routeConstraint));
RoutingMetrics.cs (4)
34new KeyValuePair<string, object?>("http.route", route), 35new KeyValuePair<string, object?>("aspnetcore.routing.match_status", "success"), 36new KeyValuePair<string, object?>("aspnetcore.routing.is_fallback", isFallback ? BoxedTrue : BoxedFalse)); 42new KeyValuePair<string, object?>("aspnetcore.routing.match_status", "failure"));
src\Shared\Debugger\DebuggerHelpers.cs (1)
114private static KeyValuePair<string, object?> Create(string key, object? value) => new KeyValuePair<string, object?>(key, value);
Template\TemplateBinder.cs (6)
184slots[i] = new KeyValuePair<string, object?>(key, value); 318slots[i] = new KeyValuePair<string, object?>(key, ambientValue); 331slots[i] = new KeyValuePair<string, object?>(key, ambientValue); 343slots[i] = new KeyValuePair<string, object?>(key, defaultValue); 726slots[i] = new KeyValuePair<string, object?>(pattern.Parameters[i].Name, null); 731slots[i + pattern.Parameters.Count] = new KeyValuePair<string, object?>(filters[i].Key, null);
Microsoft.AspNetCore.Routing.FunctionalTests (52)
MinimalFormTests.cs (52)
57new KeyValuePair<string,string>("__RequestVerificationToken", tokens.RequestToken), 58new KeyValuePair<string,string>("name", "Test task"), 59new KeyValuePair<string,string>("isComplete", "false"), 60new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 117new KeyValuePair<string,string>("__RequestVerificationToken", tokens.RequestToken), 118new KeyValuePair<string,string>("name", "Test task"), 119new KeyValuePair<string,string>("isComplete", "false"), 120new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 163new KeyValuePair<string,string>("name", "Test task"), 164new KeyValuePair<string,string>("isComplete", "false"), 165new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 202new KeyValuePair<string,string>("name", "Test task"), 203new KeyValuePair<string,string>("isComplete", "false"), 204new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 279new KeyValuePair<string,string>("name", "Test task"), 280new KeyValuePair<string,string>("isComplete", "false"), 281new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 326new KeyValuePair<string,string>("name", "Test task"), 327new KeyValuePair<string,string>("isComplete", "false"), 328new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 422new KeyValuePair<string,string>("name", "Test task"), 423new KeyValuePair<string,string>("isComplete", "false"), 424new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 478new KeyValuePair<string,string>("__RequestVerificationToken", tokens.RequestToken), 479new KeyValuePair<string,string>("name", "Test task"), 480new KeyValuePair<string,string>("isComplete", "false"), 481new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 537new KeyValuePair<string,string>("__RequestVerificationToken", tokens.RequestToken), 538new KeyValuePair<string,string>("[name]", "Test task"), 539new KeyValuePair<string,string>("[name1]", "Test task"), 540new KeyValuePair<string,string>("[isComplete]", "false"), 541new KeyValuePair<string,string>("[isComplete1]", "false"), 542new KeyValuePair<string,string>("[dueDate]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 543new KeyValuePair<string,string>("[dueDate1]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 589new KeyValuePair<string,string>("__RequestVerificationToken", tokens.RequestToken), 590new KeyValuePair<string,string>("[name]", "Test task"), 591new KeyValuePair<string,string>("[name1]", "Test task"), 592new KeyValuePair<string,string>("[isComplete]", "false"), 593new KeyValuePair<string,string>("[isComplete1]", "false"), 594new KeyValuePair<string,string>("[dueDate]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 595new KeyValuePair<string,string>("[dueDate1]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 641new KeyValuePair<string,string>("__RequestVerificationToken", tokens.RequestToken), 642new KeyValuePair<string,string>("[name]", "Test task"), 643new KeyValuePair<string,string>("[name1]", "Test task"), 644new KeyValuePair<string,string>("[isComplete]", "false"), 645new KeyValuePair<string,string>("[isComplete1]", "false"), 646new KeyValuePair<string,string>("[dueDate]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 647new KeyValuePair<string,string>("[dueDate1]", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)), 690new KeyValuePair<string,string>("__RequestVerificationToken", tokens.RequestToken), 691new KeyValuePair<string,string>("name", "Test task"), 692new KeyValuePair<string,string>("isComplete", "false"), 693new KeyValuePair<string,string>("dueDate", DateTime.Today.AddDays(1).ToString(CultureInfo.InvariantCulture)),
Microsoft.AspNetCore.Routing.Tests (39)
Matching\DfaMatcherBuilderTest.cs (12)
3249s => Assert.Equal(new KeyValuePair<string, object>("a", "aa"), s), 3250s => Assert.Equal(new KeyValuePair<string, object>("b", "bb"), s), 3251s => Assert.Equal(new KeyValuePair<string, object>("c", "cc"), s)); 3281s => Assert.Equal(new KeyValuePair<string, object>("c", "cc"), s), 3282s => Assert.Equal(new KeyValuePair<string, object>(null, null), s), 3283s => Assert.Equal(new KeyValuePair<string, object>(null, null), s)); 3311s => Assert.Equal(new KeyValuePair<string, object>("a", "aa"), s), 3312s => Assert.Equal(new KeyValuePair<string, object>("d", "dd"), s), 3313s => Assert.Equal(new KeyValuePair<string, object>("c", "cc"), s), 3314s => Assert.Equal(new KeyValuePair<string, object>(null, null), s)); 3344s => Assert.Equal(new KeyValuePair<string, object>("b", "bb"), s), 3345s => Assert.Equal(new KeyValuePair<string, object>(null, null), s));
Matching\MatcherAssert.cs (1)
51var zipped = keys.Zip(values, (k, v) => new KeyValuePair<string, object>(k, v));
Patterns\DefaultRoutePatternTransformerTest.cs (26)
39kvp => Assert.Equal(new KeyValuePair<string, object>("a", null), kvp), 40kvp => Assert.Equal(new KeyValuePair<string, object>("b", string.Empty), kvp)); 80kvp => Assert.Equal(new KeyValuePair<string, object>("action", "Index"), kvp), 81kvp => Assert.Equal(new KeyValuePair<string, object>("controller", "Home"), kvp)); // default is preserved 85kvp => Assert.Equal(new KeyValuePair<string, object>("controller", RoutePattern.RequiredValueAny), kvp)); 144kvp => Assert.Equal(new KeyValuePair<string, object>("action", "Index"), kvp), 145kvp => Assert.Equal(new KeyValuePair<string, object>("controller", "Home"), kvp)); 166kvp => Assert.Equal(new KeyValuePair<string, object>("action", "Index"), kvp), 167kvp => Assert.Equal(new KeyValuePair<string, object>("controller", "Home"), kvp)); 193kvp => Assert.Equal(new KeyValuePair<string, object>("action", "Index"), kvp), 194kvp => Assert.Equal(new KeyValuePair<string, object>("area", "Admin"), kvp), 195kvp => Assert.Equal(new KeyValuePair<string, object>("controller", "Home"), kvp)); 203Assert.Equal(new KeyValuePair<string, object>("area", "Admin"), Assert.Single(actual.Defaults)); 228kvp => Assert.Equal(new KeyValuePair<string, object>("action", "Index"), kvp), 229kvp => Assert.Equal(new KeyValuePair<string, object>("controller", "Home"), kvp)); 269kvp => Assert.Equal(new KeyValuePair<string, object>("action", "Index"), kvp), 270kvp => Assert.Equal(new KeyValuePair<string, object>("controller", "Home"), kvp)); 310kvp => Assert.Equal(new KeyValuePair<string, object>("action", null), kvp), 311kvp => Assert.Equal(new KeyValuePair<string, object>("controller", ""), kvp)); 332kvp => Assert.Equal(new KeyValuePair<string, object>("action", "Index"), kvp), 333kvp => Assert.Equal(new KeyValuePair<string, object>("controller", "Home"), kvp)); 354kvp => Assert.Equal(new KeyValuePair<string, object>("action", "Index"), kvp), 355kvp => Assert.Equal(new KeyValuePair<string, object>("controller", "Home"), kvp)); 376kvp => Assert.Equal(new KeyValuePair<string, object>("action", "Index"), kvp), 377kvp => Assert.Equal(new KeyValuePair<string, object>("area", "Admin"), kvp), 378kvp => Assert.Equal(new KeyValuePair<string, object>("controller", "Home"), kvp));
Microsoft.AspNetCore.Server.HttpSys (43)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (41)
2539yield return new KeyValuePair<string, StringValues>(HeaderNames.Accept, Accept); 2543yield return new KeyValuePair<string, StringValues>(HeaderNames.AcceptCharset, AcceptCharset); 2547yield return new KeyValuePair<string, StringValues>(HeaderNames.AcceptEncoding, AcceptEncoding); 2551yield return new KeyValuePair<string, StringValues>(HeaderNames.AcceptLanguage, AcceptLanguage); 2555yield return new KeyValuePair<string, StringValues>(HeaderNames.Allow, Allow); 2559yield return new KeyValuePair<string, StringValues>(HeaderNames.Authorization, Authorization); 2563yield return new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, CacheControl); 2567yield return new KeyValuePair<string, StringValues>(HeaderNames.Connection, Connection); 2571yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentEncoding, ContentEncoding); 2575yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentLanguage, ContentLanguage); 2579yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentLength, ContentLength); 2583yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentLocation, ContentLocation); 2587yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentMD5, ContentMD5); 2591yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentRange, ContentRange); 2595yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentType, ContentType); 2599yield return new KeyValuePair<string, StringValues>(HeaderNames.Cookie, Cookie); 2603yield return new KeyValuePair<string, StringValues>(HeaderNames.Date, Date); 2607yield return new KeyValuePair<string, StringValues>(HeaderNames.Expect, Expect); 2611yield return new KeyValuePair<string, StringValues>(HeaderNames.Expires, Expires); 2615yield return new KeyValuePair<string, StringValues>(HeaderNames.From, From); 2619yield return new KeyValuePair<string, StringValues>(HeaderNames.Host, Host); 2623yield return new KeyValuePair<string, StringValues>(HeaderNames.IfMatch, IfMatch); 2627yield return new KeyValuePair<string, StringValues>(HeaderNames.IfModifiedSince, IfModifiedSince); 2631yield return new KeyValuePair<string, StringValues>(HeaderNames.IfNoneMatch, IfNoneMatch); 2635yield return new KeyValuePair<string, StringValues>(HeaderNames.IfRange, IfRange); 2639yield return new KeyValuePair<string, StringValues>(HeaderNames.IfUnmodifiedSince, IfUnmodifiedSince); 2643yield return new KeyValuePair<string, StringValues>(HeaderNames.KeepAlive, KeepAlive); 2647yield return new KeyValuePair<string, StringValues>(HeaderNames.LastModified, LastModified); 2651yield return new KeyValuePair<string, StringValues>(HeaderNames.MaxForwards, MaxForwards); 2655yield return new KeyValuePair<string, StringValues>(HeaderNames.Pragma, Pragma); 2659yield return new KeyValuePair<string, StringValues>(HeaderNames.ProxyAuthorization, ProxyAuthorization); 2663yield return new KeyValuePair<string, StringValues>(HeaderNames.Range, Range); 2667yield return new KeyValuePair<string, StringValues>(HeaderNames.Referer, Referer); 2671yield return new KeyValuePair<string, StringValues>(HeaderNames.TE, TE); 2675yield return new KeyValuePair<string, StringValues>(HeaderNames.Trailer, Trailer); 2679yield return new KeyValuePair<string, StringValues>(HeaderNames.TransferEncoding, TransferEncoding); 2683yield return new KeyValuePair<string, StringValues>(HeaderNames.Translate, Translate); 2687yield return new KeyValuePair<string, StringValues>(HeaderNames.Upgrade, Upgrade); 2691yield return new KeyValuePair<string, StringValues>(HeaderNames.UserAgent, UserAgent); 2695yield return new KeyValuePair<string, StringValues>(HeaderNames.Via, Via); 2699yield return new KeyValuePair<string, StringValues>(HeaderNames.Warning, Warning);
StandardFeatureCollection.cs (1)
102yield return new KeyValuePair<Type, object>(featureFunc.Key, feature);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (71)
Http2Tests.cs (17)
84new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 85new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 86new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 87new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 134new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 135new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 136new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 137new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 184new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 185new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 186new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 187new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 188new KeyValuePair<string, string>(HeaderNames.ContentLength, "11"), 249new KeyValuePair<string, string>(InternalHeaderNames.Method, method), 250new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 251new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 252new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
Listener\ResponseHeaderTests.cs (2)
322var kvp = new KeyValuePair<string, StringValues>(key, value); 328var kvp = new KeyValuePair<string, StringValues>(key, value);
src\Shared\Http2cat\Http2Utilities.cs (52)
38new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 39new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 40new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 41new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"), 42new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 43new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 44new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 45new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 46new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 51new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 52new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 53new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"), 54new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 55new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"), 56new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"), 57new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"), 58new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"), 59new KeyValuePair<string, string>("upgrade-insecure-requests", "1"), 64new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 65new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 66new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 67new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 72new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 73new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 74new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"), 75new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 76new KeyValuePair<string, string>("expect", "100-continue"), 81new KeyValuePair<string, string>("trailer-one", "1"), 82new KeyValuePair<string, string>("trailer-two", "2"), 87new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 88new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 89new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 90new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 91new KeyValuePair<string, string>("a", FourKHeaderValue), 92new KeyValuePair<string, string>("b", FourKHeaderValue), 93new KeyValuePair<string, string>("c", FourKHeaderValue), 94new KeyValuePair<string, string>("d", FourKHeaderValue) 99new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"), 100new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"), 101new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 102new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"), 103new KeyValuePair<string, string>("a", FourKHeaderValue), 104new KeyValuePair<string, string>("b", FourKHeaderValue), 105new KeyValuePair<string, string>("c", FourKHeaderValue), 106new KeyValuePair<string, string>("d", FourKHeaderValue), 107new KeyValuePair<string, string>("e", FourKHeaderValue), 108new KeyValuePair<string, string>("f", FourKHeaderValue), 109new KeyValuePair<string, string>("g", FourKHeaderValue), 114new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"), 115new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + expectedBytes), 116new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"), 117new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
Microsoft.AspNetCore.Server.IIS (70)
Core\IISHttpContext.cs (2)
686_onStarting.Push(new KeyValuePair<Func<object, Task>, object>(callback, state)); 698_onCompleted.Push(new KeyValuePair<Func<object, Task>, object>(callback, state));
Core\IISHttpContext.FeatureCollection.cs (2)
100MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 104MaybeExtra.Add(new KeyValuePair<Type, object>(key, value));
Core\IISHttpContext.Features.cs (24)
357yield return new KeyValuePair<Type, object>(IHttpRequestFeatureType, _currentIHttpRequestFeature); 361yield return new KeyValuePair<Type, object>(IHttpRequestBodyDetectionFeature, _currentIHttpRequestBodyDetectionFeature); 365yield return new KeyValuePair<Type, object>(IHttpResponseFeatureType, _currentIHttpResponseFeature); 369yield return new KeyValuePair<Type, object>(IHttpResponseBodyFeatureType, _currentIHttpResponseBodyFeature); 373yield return new KeyValuePair<Type, object>(IHttpRequestIdentifierFeatureType, _currentIHttpRequestIdentifierFeature); 377yield return new KeyValuePair<Type, object>(IServiceProvidersFeatureType, _currentIServiceProvidersFeature); 381yield return new KeyValuePair<Type, object>(IHttpRequestLifetimeFeatureType, _currentIHttpRequestLifetimeFeature); 385yield return new KeyValuePair<Type, object>(IHttpConnectionFeatureType, _currentIHttpConnectionFeature); 389yield return new KeyValuePair<Type, object>(IHttpAuthenticationFeatureType, _currentIHttpAuthenticationFeature); 393yield return new KeyValuePair<Type, object>(IQueryFeatureType, _currentIQueryFeature); 397yield return new KeyValuePair<Type, object>(IFormFeatureType, _currentIFormFeature); 401yield return new KeyValuePair<Type, object>(IHttpUpgradeFeatureType, _currentIHttpUpgradeFeature); 405yield return new KeyValuePair<Type, object>(IResponseCookiesFeatureType, _currentIResponseCookiesFeature); 409yield return new KeyValuePair<Type, object>(IItemsFeatureType, _currentIItemsFeature); 413yield return new KeyValuePair<Type, object>(ITlsConnectionFeatureType, _currentITlsConnectionFeature); 417yield return new KeyValuePair<Type, object>(ITlsHandshakeFeatureType, _currentITlsHandshakeFeature); 421yield return new KeyValuePair<Type, object>(IHttpWebSocketFeatureType, _currentIHttpWebSocketFeature); 425yield return new KeyValuePair<Type, object>(ISessionFeatureType, _currentISessionFeature); 429yield return new KeyValuePair<Type, object>(IHttpBodyControlFeatureType, _currentIHttpBodyControlFeature); 433yield return new KeyValuePair<Type, object>(IServerVariablesFeature, _currentIServerVariablesFeature); 437yield return new KeyValuePair<Type, object>(IHttpMaxRequestBodySizeFeature, _currentIHttpMaxRequestBodySizeFeature); 441yield return new KeyValuePair<Type, object>(IHttpResponseTrailersFeature, _currentIHttpResponseTrailersFeature); 445yield return new KeyValuePair<Type, object>(IHttpResponseTrailersFeature, _currentIHttpResetFeature); 449yield return new KeyValuePair<Type, object>(IHttpActivityFeature, _currentIHttpActivityFeature);
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (41)
2539yield return new KeyValuePair<string, StringValues>(HeaderNames.Accept, Accept); 2543yield return new KeyValuePair<string, StringValues>(HeaderNames.AcceptCharset, AcceptCharset); 2547yield return new KeyValuePair<string, StringValues>(HeaderNames.AcceptEncoding, AcceptEncoding); 2551yield return new KeyValuePair<string, StringValues>(HeaderNames.AcceptLanguage, AcceptLanguage); 2555yield return new KeyValuePair<string, StringValues>(HeaderNames.Allow, Allow); 2559yield return new KeyValuePair<string, StringValues>(HeaderNames.Authorization, Authorization); 2563yield return new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, CacheControl); 2567yield return new KeyValuePair<string, StringValues>(HeaderNames.Connection, Connection); 2571yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentEncoding, ContentEncoding); 2575yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentLanguage, ContentLanguage); 2579yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentLength, ContentLength); 2583yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentLocation, ContentLocation); 2587yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentMD5, ContentMD5); 2591yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentRange, ContentRange); 2595yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentType, ContentType); 2599yield return new KeyValuePair<string, StringValues>(HeaderNames.Cookie, Cookie); 2603yield return new KeyValuePair<string, StringValues>(HeaderNames.Date, Date); 2607yield return new KeyValuePair<string, StringValues>(HeaderNames.Expect, Expect); 2611yield return new KeyValuePair<string, StringValues>(HeaderNames.Expires, Expires); 2615yield return new KeyValuePair<string, StringValues>(HeaderNames.From, From); 2619yield return new KeyValuePair<string, StringValues>(HeaderNames.Host, Host); 2623yield return new KeyValuePair<string, StringValues>(HeaderNames.IfMatch, IfMatch); 2627yield return new KeyValuePair<string, StringValues>(HeaderNames.IfModifiedSince, IfModifiedSince); 2631yield return new KeyValuePair<string, StringValues>(HeaderNames.IfNoneMatch, IfNoneMatch); 2635yield return new KeyValuePair<string, StringValues>(HeaderNames.IfRange, IfRange); 2639yield return new KeyValuePair<string, StringValues>(HeaderNames.IfUnmodifiedSince, IfUnmodifiedSince); 2643yield return new KeyValuePair<string, StringValues>(HeaderNames.KeepAlive, KeepAlive); 2647yield return new KeyValuePair<string, StringValues>(HeaderNames.LastModified, LastModified); 2651yield return new KeyValuePair<string, StringValues>(HeaderNames.MaxForwards, MaxForwards); 2655yield return new KeyValuePair<string, StringValues>(HeaderNames.Pragma, Pragma); 2659yield return new KeyValuePair<string, StringValues>(HeaderNames.ProxyAuthorization, ProxyAuthorization); 2663yield return new KeyValuePair<string, StringValues>(HeaderNames.Range, Range); 2667yield return new KeyValuePair<string, StringValues>(HeaderNames.Referer, Referer); 2671yield return new KeyValuePair<string, StringValues>(HeaderNames.TE, TE); 2675yield return new KeyValuePair<string, StringValues>(HeaderNames.Trailer, Trailer); 2679yield return new KeyValuePair<string, StringValues>(HeaderNames.TransferEncoding, TransferEncoding); 2683yield return new KeyValuePair<string, StringValues>(HeaderNames.Translate, Translate); 2687yield return new KeyValuePair<string, StringValues>(HeaderNames.Upgrade, Upgrade); 2691yield return new KeyValuePair<string, StringValues>(HeaderNames.UserAgent, UserAgent); 2695yield return new KeyValuePair<string, StringValues>(HeaderNames.Via, Via); 2699yield return new KeyValuePair<string, StringValues>(HeaderNames.Warning, Warning);
Microsoft.AspNetCore.Server.Kestrel.Core (239)
Internal\ConnectionLogScope.cs (1)
26return new KeyValuePair<string, object>("ConnectionId", _connectionId);
Internal\Http\HttpHeaders.Generated.cs (185)
7028array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Accept, _headers._Accept); 7037array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Connection, _headers._Connection); 7046array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Host, _headers._Host); 7055array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.UserAgent, _headers._UserAgent); 7064array[arrayIndex] = new KeyValuePair<string, StringValues>(InternalHeaderNames.Authority, _headers._Authority); 7073array[arrayIndex] = new KeyValuePair<string, StringValues>(InternalHeaderNames.Method, _headers._Method); 7082array[arrayIndex] = new KeyValuePair<string, StringValues>(InternalHeaderNames.Path, _headers._Path); 7091array[arrayIndex] = new KeyValuePair<string, StringValues>(InternalHeaderNames.Protocol, _headers._Protocol); 7100array[arrayIndex] = new KeyValuePair<string, StringValues>(InternalHeaderNames.Scheme, _headers._Scheme); 7109array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AcceptCharset, _headers._AcceptCharset); 7118array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AcceptEncoding, _headers._AcceptEncoding); 7127array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AcceptLanguage, _headers._AcceptLanguage); 7136array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlRequestHeaders, _headers._AccessControlRequestHeaders); 7145array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlRequestMethod, _headers._AccessControlRequestMethod); 7154array[arrayIndex] = new KeyValuePair<string, StringValues>(InternalHeaderNames.AltUsed, _headers._AltUsed); 7163array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Authorization, _headers._Authorization); 7172array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Baggage, _headers._Baggage); 7181array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, _headers._CacheControl); 7190array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ContentType, _headers._ContentType); 7199array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Cookie, _headers._Cookie); 7208array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.CorrelationContext, _headers._CorrelationContext); 7217array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Date, _headers._Date); 7226array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Expect, _headers._Expect); 7235array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.From, _headers._From); 7244array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.GrpcAcceptEncoding, _headers._GrpcAcceptEncoding); 7253array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.GrpcEncoding, _headers._GrpcEncoding); 7262array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.GrpcTimeout, _headers._GrpcTimeout); 7271array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.IfMatch, _headers._IfMatch); 7280array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.IfModifiedSince, _headers._IfModifiedSince); 7289array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.IfNoneMatch, _headers._IfNoneMatch); 7298array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.IfRange, _headers._IfRange); 7307array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.IfUnmodifiedSince, _headers._IfUnmodifiedSince); 7316array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.KeepAlive, _headers._KeepAlive); 7325array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.MaxForwards, _headers._MaxForwards); 7334array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Origin, _headers._Origin); 7343array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Pragma, _headers._Pragma); 7352array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ProxyAuthorization, _headers._ProxyAuthorization); 7361array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Range, _headers._Range); 7370array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Referer, _headers._Referer); 7379array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.RequestId, _headers._RequestId); 7388array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.TE, _headers._TE); 7397array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.TraceParent, _headers._TraceParent); 7406array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.TraceState, _headers._TraceState); 7415array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.TransferEncoding, _headers._TransferEncoding); 7424array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Translate, _headers._Translate); 7433array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Upgrade, _headers._Upgrade); 7442array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.UpgradeInsecureRequests, _headers._UpgradeInsecureRequests); 7451array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Via, _headers._Via); 7460array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Warning, _headers._Warning); 7469array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ContentLength, HeaderUtilities.FormatNonNegativeInt64(_contentLength.Value)); 8404_current = new KeyValuePair<string, StringValues>(HeaderNames.Accept, _collection._headers._Accept); 8409_current = new KeyValuePair<string, StringValues>(HeaderNames.Connection, _collection._headers._Connection); 8414_current = new KeyValuePair<string, StringValues>(HeaderNames.Host, _collection._headers._Host); 8419_current = new KeyValuePair<string, StringValues>(HeaderNames.UserAgent, _collection._headers._UserAgent); 8424_current = new KeyValuePair<string, StringValues>(InternalHeaderNames.Authority, _collection._headers._Authority); 8429_current = new KeyValuePair<string, StringValues>(InternalHeaderNames.Method, _collection._headers._Method); 8434_current = new KeyValuePair<string, StringValues>(InternalHeaderNames.Path, _collection._headers._Path); 8439_current = new KeyValuePair<string, StringValues>(InternalHeaderNames.Protocol, _collection._headers._Protocol); 8444_current = new KeyValuePair<string, StringValues>(InternalHeaderNames.Scheme, _collection._headers._Scheme); 8449_current = new KeyValuePair<string, StringValues>(HeaderNames.AcceptCharset, _collection._headers._AcceptCharset); 8454_current = new KeyValuePair<string, StringValues>(HeaderNames.AcceptEncoding, _collection._headers._AcceptEncoding); 8459_current = new KeyValuePair<string, StringValues>(HeaderNames.AcceptLanguage, _collection._headers._AcceptLanguage); 8464_current = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlRequestHeaders, _collection._headers._AccessControlRequestHeaders); 8469_current = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlRequestMethod, _collection._headers._AccessControlRequestMethod); 8474_current = new KeyValuePair<string, StringValues>(InternalHeaderNames.AltUsed, _collection._headers._AltUsed); 8479_current = new KeyValuePair<string, StringValues>(HeaderNames.Authorization, _collection._headers._Authorization); 8484_current = new KeyValuePair<string, StringValues>(HeaderNames.Baggage, _collection._headers._Baggage); 8489_current = new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, _collection._headers._CacheControl); 8494_current = new KeyValuePair<string, StringValues>(HeaderNames.ContentType, _collection._headers._ContentType); 8499_current = new KeyValuePair<string, StringValues>(HeaderNames.Cookie, _collection._headers._Cookie); 8504_current = new KeyValuePair<string, StringValues>(HeaderNames.CorrelationContext, _collection._headers._CorrelationContext); 8509_current = new KeyValuePair<string, StringValues>(HeaderNames.Date, _collection._headers._Date); 8514_current = new KeyValuePair<string, StringValues>(HeaderNames.Expect, _collection._headers._Expect); 8519_current = new KeyValuePair<string, StringValues>(HeaderNames.From, _collection._headers._From); 8524_current = new KeyValuePair<string, StringValues>(HeaderNames.GrpcAcceptEncoding, _collection._headers._GrpcAcceptEncoding); 8529_current = new KeyValuePair<string, StringValues>(HeaderNames.GrpcEncoding, _collection._headers._GrpcEncoding); 8534_current = new KeyValuePair<string, StringValues>(HeaderNames.GrpcTimeout, _collection._headers._GrpcTimeout); 8539_current = new KeyValuePair<string, StringValues>(HeaderNames.IfMatch, _collection._headers._IfMatch); 8544_current = new KeyValuePair<string, StringValues>(HeaderNames.IfModifiedSince, _collection._headers._IfModifiedSince); 8549_current = new KeyValuePair<string, StringValues>(HeaderNames.IfNoneMatch, _collection._headers._IfNoneMatch); 8554_current = new KeyValuePair<string, StringValues>(HeaderNames.IfRange, _collection._headers._IfRange); 8559_current = new KeyValuePair<string, StringValues>(HeaderNames.IfUnmodifiedSince, _collection._headers._IfUnmodifiedSince); 8564_current = new KeyValuePair<string, StringValues>(HeaderNames.KeepAlive, _collection._headers._KeepAlive); 8569_current = new KeyValuePair<string, StringValues>(HeaderNames.MaxForwards, _collection._headers._MaxForwards); 8574_current = new KeyValuePair<string, StringValues>(HeaderNames.Origin, _collection._headers._Origin); 8579_current = new KeyValuePair<string, StringValues>(HeaderNames.Pragma, _collection._headers._Pragma); 8584_current = new KeyValuePair<string, StringValues>(HeaderNames.ProxyAuthorization, _collection._headers._ProxyAuthorization); 8589_current = new KeyValuePair<string, StringValues>(HeaderNames.Range, _collection._headers._Range); 8594_current = new KeyValuePair<string, StringValues>(HeaderNames.Referer, _collection._headers._Referer); 8599_current = new KeyValuePair<string, StringValues>(HeaderNames.RequestId, _collection._headers._RequestId); 8604_current = new KeyValuePair<string, StringValues>(HeaderNames.TE, _collection._headers._TE); 8609_current = new KeyValuePair<string, StringValues>(HeaderNames.TraceParent, _collection._headers._TraceParent); 8614_current = new KeyValuePair<string, StringValues>(HeaderNames.TraceState, _collection._headers._TraceState); 8619_current = new KeyValuePair<string, StringValues>(HeaderNames.TransferEncoding, _collection._headers._TransferEncoding); 8624_current = new KeyValuePair<string, StringValues>(HeaderNames.Translate, _collection._headers._Translate); 8629_current = new KeyValuePair<string, StringValues>(HeaderNames.Upgrade, _collection._headers._Upgrade); 8634_current = new KeyValuePair<string, StringValues>(HeaderNames.UpgradeInsecureRequests, _collection._headers._UpgradeInsecureRequests); 8639_current = new KeyValuePair<string, StringValues>(HeaderNames.Via, _collection._headers._Via); 8644_current = new KeyValuePair<string, StringValues>(HeaderNames.Warning, _collection._headers._Warning); 8649_current = new KeyValuePair<string, StringValues>(HeaderNames.ContentLength, HeaderUtilities.FormatNonNegativeInt64(_collection._contentLength.GetValueOrDefault())); 14454array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Connection, _headers._Connection); 14463array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ContentType, _headers._ContentType); 14472array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Date, _headers._Date); 14481array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Server, _headers._Server); 14490array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AcceptRanges, _headers._AcceptRanges); 14499array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlAllowCredentials, _headers._AccessControlAllowCredentials); 14508array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlAllowHeaders, _headers._AccessControlAllowHeaders); 14517array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlAllowMethods, _headers._AccessControlAllowMethods); 14526array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlAllowOrigin, _headers._AccessControlAllowOrigin); 14535array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlExposeHeaders, _headers._AccessControlExposeHeaders); 14544array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlMaxAge, _headers._AccessControlMaxAge); 14553array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Age, _headers._Age); 14562array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Allow, _headers._Allow); 14571array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.AltSvc, _headers._AltSvc); 14580array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, _headers._CacheControl); 14589array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ContentEncoding, _headers._ContentEncoding); 14598array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ContentLanguage, _headers._ContentLanguage); 14607array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ContentLocation, _headers._ContentLocation); 14616array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ContentMD5, _headers._ContentMD5); 14625array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ContentRange, _headers._ContentRange); 14634array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ETag, _headers._ETag); 14643array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Expires, _headers._Expires); 14652array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.GrpcEncoding, _headers._GrpcEncoding); 14661array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.KeepAlive, _headers._KeepAlive); 14670array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.LastModified, _headers._LastModified); 14679array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Location, _headers._Location); 14688array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Pragma, _headers._Pragma); 14697array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ProxyAuthenticate, _headers._ProxyAuthenticate); 14706array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ProxyConnection, _headers._ProxyConnection); 14715array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.RetryAfter, _headers._RetryAfter); 14724array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.SetCookie, _headers._SetCookie); 14733array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Trailer, _headers._Trailer); 14742array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.TransferEncoding, _headers._TransferEncoding); 14751array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Upgrade, _headers._Upgrade); 14760array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Vary, _headers._Vary); 14769array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Via, _headers._Via); 14778array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.Warning, _headers._Warning); 14787array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.WWWAuthenticate, _headers._WWWAuthenticate); 14796array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ContentLength, HeaderUtilities.FormatNonNegativeInt64(_contentLength.Value)); 15254_current = new KeyValuePair<string, StringValues>(HeaderNames.Connection, _collection._headers._Connection); 15260_current = new KeyValuePair<string, StringValues>(HeaderNames.ContentType, _collection._headers._ContentType); 15266_current = new KeyValuePair<string, StringValues>(HeaderNames.Date, _collection._headers._Date); 15272_current = new KeyValuePair<string, StringValues>(HeaderNames.Server, _collection._headers._Server); 15278_current = new KeyValuePair<string, StringValues>(HeaderNames.AcceptRanges, _collection._headers._AcceptRanges); 15284_current = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlAllowCredentials, _collection._headers._AccessControlAllowCredentials); 15290_current = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlAllowHeaders, _collection._headers._AccessControlAllowHeaders); 15296_current = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlAllowMethods, _collection._headers._AccessControlAllowMethods); 15302_current = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlAllowOrigin, _collection._headers._AccessControlAllowOrigin); 15308_current = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlExposeHeaders, _collection._headers._AccessControlExposeHeaders); 15314_current = new KeyValuePair<string, StringValues>(HeaderNames.AccessControlMaxAge, _collection._headers._AccessControlMaxAge); 15320_current = new KeyValuePair<string, StringValues>(HeaderNames.Age, _collection._headers._Age); 15326_current = new KeyValuePair<string, StringValues>(HeaderNames.Allow, _collection._headers._Allow); 15332_current = new KeyValuePair<string, StringValues>(HeaderNames.AltSvc, _collection._headers._AltSvc); 15338_current = new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, _collection._headers._CacheControl); 15344_current = new KeyValuePair<string, StringValues>(HeaderNames.ContentEncoding, _collection._headers._ContentEncoding); 15350_current = new KeyValuePair<string, StringValues>(HeaderNames.ContentLanguage, _collection._headers._ContentLanguage); 15356_current = new KeyValuePair<string, StringValues>(HeaderNames.ContentLocation, _collection._headers._ContentLocation); 15362_current = new KeyValuePair<string, StringValues>(HeaderNames.ContentMD5, _collection._headers._ContentMD5); 15368_current = new KeyValuePair<string, StringValues>(HeaderNames.ContentRange, _collection._headers._ContentRange); 15374_current = new KeyValuePair<string, StringValues>(HeaderNames.ETag, _collection._headers._ETag); 15380_current = new KeyValuePair<string, StringValues>(HeaderNames.Expires, _collection._headers._Expires); 15386_current = new KeyValuePair<string, StringValues>(HeaderNames.GrpcEncoding, _collection._headers._GrpcEncoding); 15392_current = new KeyValuePair<string, StringValues>(HeaderNames.KeepAlive, _collection._headers._KeepAlive); 15398_current = new KeyValuePair<string, StringValues>(HeaderNames.LastModified, _collection._headers._LastModified); 15404_current = new KeyValuePair<string, StringValues>(HeaderNames.Location, _collection._headers._Location); 15410_current = new KeyValuePair<string, StringValues>(HeaderNames.Pragma, _collection._headers._Pragma); 15416_current = new KeyValuePair<string, StringValues>(HeaderNames.ProxyAuthenticate, _collection._headers._ProxyAuthenticate); 15422_current = new KeyValuePair<string, StringValues>(HeaderNames.ProxyConnection, _collection._headers._ProxyConnection); 15428_current = new KeyValuePair<string, StringValues>(HeaderNames.RetryAfter, _collection._headers._RetryAfter); 15434_current = new KeyValuePair<string, StringValues>(HeaderNames.SetCookie, _collection._headers._SetCookie); 15440_current = new KeyValuePair<string, StringValues>(HeaderNames.Trailer, _collection._headers._Trailer); 15446_current = new KeyValuePair<string, StringValues>(HeaderNames.TransferEncoding, _collection._headers._TransferEncoding); 15452_current = new KeyValuePair<string, StringValues>(HeaderNames.Upgrade, _collection._headers._Upgrade); 15458_current = new KeyValuePair<string, StringValues>(HeaderNames.Vary, _collection._headers._Vary); 15464_current = new KeyValuePair<string, StringValues>(HeaderNames.Via, _collection._headers._Via); 15470_current = new KeyValuePair<string, StringValues>(HeaderNames.Warning, _collection._headers._Warning); 15476_current = new KeyValuePair<string, StringValues>(HeaderNames.WWWAuthenticate, _collection._headers._WWWAuthenticate); 15482_current = new KeyValuePair<string, StringValues>(HeaderNames.ContentLength, HeaderUtilities.FormatNonNegativeInt64(_collection._contentLength.GetValueOrDefault())); 17537array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ETag, _headers._ETag); 17546array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.GrpcMessage, _headers._GrpcMessage); 17555array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.GrpcStatus, _headers._GrpcStatus); 17564array[arrayIndex] = new KeyValuePair<string, StringValues>(HeaderNames.ContentLength, HeaderUtilities.FormatNonNegativeInt64(_contentLength.Value)); 17590_current = new KeyValuePair<string, StringValues>(HeaderNames.ETag, _collection._headers._ETag); 17596_current = new KeyValuePair<string, StringValues>(HeaderNames.GrpcMessage, _collection._headers._GrpcMessage); 17602_current = new KeyValuePair<string, StringValues>(HeaderNames.GrpcStatus, _collection._headers._GrpcStatus);
Internal\Http\HttpProtocol.cs (2)
799_onStarting.Push(new KeyValuePair<Func<object, Task>, object>(callback, state)); 808_onCompleted.Push(new KeyValuePair<Func<object, Task>, object>(callback, state));
Internal\Http\HttpProtocol.Generated.cs (37)
175MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 179MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 808yield return new KeyValuePair<Type, object>(typeof(IHttpRequestFeature), _currentIHttpRequestFeature); 812yield return new KeyValuePair<Type, object>(typeof(IHttpResponseFeature), _currentIHttpResponseFeature); 816yield return new KeyValuePair<Type, object>(typeof(IHttpResponseBodyFeature), _currentIHttpResponseBodyFeature); 820yield return new KeyValuePair<Type, object>(typeof(IRouteValuesFeature), _currentIRouteValuesFeature); 824yield return new KeyValuePair<Type, object>(typeof(IEndpointFeature), _currentIEndpointFeature); 828yield return new KeyValuePair<Type, object>(typeof(IServiceProvidersFeature), _currentIServiceProvidersFeature); 832yield return new KeyValuePair<Type, object>(typeof(IHttpActivityFeature), _currentIHttpActivityFeature); 836yield return new KeyValuePair<Type, object>(typeof(IHttpMetricsTagsFeature), _currentIHttpMetricsTagsFeature); 840yield return new KeyValuePair<Type, object>(typeof(IItemsFeature), _currentIItemsFeature); 844yield return new KeyValuePair<Type, object>(typeof(IQueryFeature), _currentIQueryFeature); 848yield return new KeyValuePair<Type, object>(typeof(IRequestBodyPipeFeature), _currentIRequestBodyPipeFeature); 852yield return new KeyValuePair<Type, object>(typeof(IFormFeature), _currentIFormFeature); 856yield return new KeyValuePair<Type, object>(typeof(IHttpAuthenticationFeature), _currentIHttpAuthenticationFeature); 860yield return new KeyValuePair<Type, object>(typeof(IHttpRequestIdentifierFeature), _currentIHttpRequestIdentifierFeature); 864yield return new KeyValuePair<Type, object>(typeof(IHttpConnectionFeature), _currentIHttpConnectionFeature); 868yield return new KeyValuePair<Type, object>(typeof(ISessionFeature), _currentISessionFeature); 872yield return new KeyValuePair<Type, object>(typeof(IResponseCookiesFeature), _currentIResponseCookiesFeature); 876yield return new KeyValuePair<Type, object>(typeof(IHttpRequestTrailersFeature), _currentIHttpRequestTrailersFeature); 880yield return new KeyValuePair<Type, object>(typeof(IHttpResponseTrailersFeature), _currentIHttpResponseTrailersFeature); 884yield return new KeyValuePair<Type, object>(typeof(ITlsConnectionFeature), _currentITlsConnectionFeature); 888yield return new KeyValuePair<Type, object>(typeof(IHttpExtendedConnectFeature), _currentIHttpExtendedConnectFeature); 892yield return new KeyValuePair<Type, object>(typeof(IHttpUpgradeFeature), _currentIHttpUpgradeFeature); 896yield return new KeyValuePair<Type, object>(typeof(IHttpWebSocketFeature), _currentIHttpWebSocketFeature); 900yield return new KeyValuePair<Type, object>(typeof(IHttpWebTransportFeature), _currentIHttpWebTransportFeature); 904yield return new KeyValuePair<Type, object>(typeof(IBadRequestExceptionFeature), _currentIBadRequestExceptionFeature); 908yield return new KeyValuePair<Type, object>(typeof(IHttpRequestTimeoutFeature), _currentIHttpRequestTimeoutFeature); 912yield return new KeyValuePair<Type, object>(typeof(IHttp2StreamIdFeature), _currentIHttp2StreamIdFeature); 916yield return new KeyValuePair<Type, object>(typeof(IHttpRequestLifetimeFeature), _currentIHttpRequestLifetimeFeature); 920yield return new KeyValuePair<Type, object>(typeof(IHttpMaxRequestBodySizeFeature), _currentIHttpMaxRequestBodySizeFeature); 924yield return new KeyValuePair<Type, object>(typeof(IHttpMinRequestBodyDataRateFeature), _currentIHttpMinRequestBodyDataRateFeature); 928yield return new KeyValuePair<Type, object>(typeof(IHttpMinResponseDataRateFeature), _currentIHttpMinResponseDataRateFeature); 932yield return new KeyValuePair<Type, object>(typeof(IHttpBodyControlFeature), _currentIHttpBodyControlFeature); 936yield return new KeyValuePair<Type, object>(typeof(IHttpRequestBodyDetectionFeature), _currentIHttpRequestBodyDetectionFeature); 940yield return new KeyValuePair<Type, object>(typeof(IHttpResetFeature), _currentIHttpResetFeature); 944yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature);
Internal\Http3\Http3HeadersEnumerator.cs (2)
102Current = result ? new KeyValuePair<string, string>(key, _stringValuesEnumerator.Current!) : default; 112Current = new KeyValuePair<string, string>(name, value.ToString());
Internal\HttpConnection.cs (2)
140metricsTags.Tags.Add(new KeyValuePair<string, object?>("network.protocol.name", "http")); 141metricsTags.Tags.Add(new KeyValuePair<string, object?>("network.protocol.version", httpVersion));
Internal\Infrastructure\KestrelConnection.cs (1)
86_onCompleted.Push(new KeyValuePair<Func<object, Task>, object>(callback, state));
Middleware\HttpMultiplexedConnectionMiddleware.cs (1)
50metricsTags.Tags.Add(new KeyValuePair<string, object?>("tls.protocol.version", "1.3"));
Middleware\HttpsConnectionMiddleware.cs (2)
225metricsTagsFeature.Tags.Add(new KeyValuePair<string, object?>("tls.protocol.name", protocolName)); 227metricsTagsFeature.Tags.Add(new KeyValuePair<string, object?>("tls.protocol.version", protocolVersion));
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (2)
141Current = result ? new KeyValuePair<string, string>(key, _stringValuesEnumerator.Current!) : default; 151Current = new KeyValuePair<string, string>(name, value.ToString());
src\Shared\Metrics\MetricsExtensions.cs (4)
43list[i] = new KeyValuePair<string, object?>(name, value); 55tags.Add(new KeyValuePair<string, object?>(name, value)); 87tags.Add(new KeyValuePair<string, object?>(name, value)); 101tags.Add(new KeyValuePair<string, object?>(name, value));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (56)
Http2\Http2HPackEncoderTests.cs (8)
402new KeyValuePair<string, string>("CustomHeader", "CustomValue"), 420new KeyValuePair<string, string>("CustomHeader!#$%&'*+-.^_`|~", "CustomValue"), 442new KeyValuePair<string, string>("date", "Mon, 24 Jul 2017 19:22:30 GMT"), 443new KeyValuePair<string, string>("content-type", "text/html; charset=utf-8"), 444new KeyValuePair<string, string>("server", "Kestrel") 500new KeyValuePair<string, string>("date", "Mon, 24 Jul 2017 19:22:30 GMT"), 501new KeyValuePair<string, string>("content-type", "text/html; charset=utf-8"), 502new KeyValuePair<string, string>("server", "Kestrel")
HttpRequestHeadersTests.cs (12)
185new KeyValuePair<string, StringValues>("Host", v1), 186new KeyValuePair<string, StringValues>("Content-Length", v2), 187new KeyValuePair<string, StringValues>("custom", v3), 203new KeyValuePair<string, StringValues>("Host", v1), 204new KeyValuePair<string, StringValues>("Content-Length", v2), 205new KeyValuePair<string, StringValues>("custom", v3), 234var kv1 = new KeyValuePair<string, StringValues>("host", new[] { "localhost" }); 235var kv2 = new KeyValuePair<string, StringValues>("custom", new[] { "value" }); 236var kv3 = new KeyValuePair<string, StringValues>("Content-Length", new[] { "0" }); 237var kv1b = new KeyValuePair<string, StringValues>("host", new[] { "not-localhost" }); 238var kv2b = new KeyValuePair<string, StringValues>("custom", new[] { "not-value" }); 239var kv3b = new KeyValuePair<string, StringValues>("Content-Length", new[] { "1" });
HttpResponseHeadersTests.cs (6)
127var kvp = new KeyValuePair<string, StringValues>(key, value); 133var kvp = new KeyValuePair<string, StringValues>(key, value); 221var kvp = new KeyValuePair<string, StringValues>("Unknown", value); 227var kvp = new KeyValuePair<string, StringValues>("Unknown", value); 253var kvp = new KeyValuePair<string, StringValues>("Unknown", value); 257kvp = new KeyValuePair<string, StringValues>("Unknown", value);
KestrelServerTests.cs (11)
759new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"), 760new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5001"), 842new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"), 843new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5002"), 844new KeyValuePair<string, string>("Endpoints:C:Url", "http://*:5003"), 870new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"), 871new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5002"), 872new KeyValuePair<string, string>("Endpoints:C:Url", "http://*:5003"), 873new KeyValuePair<string, string>("Endpoints:C:Protocols", "Http1"), 918new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"), 919new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5001"),
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (2)
141Current = result ? new KeyValuePair<string, string>(key, _stringValuesEnumerator.Current!) : default; 151Current = new KeyValuePair<string, string>(name, value.ToString());
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (2)
977DecodedStaticHeaders[index] = new KeyValuePair<string, string>(Encoding.ASCII.GetString(entry.Name), Encoding.ASCII.GetString(entry.Value)); 984DecodedStaticHeaders[index] = new KeyValuePair<string, string>(Encoding.ASCII.GetString(name), Encoding.ASCII.GetString(value));
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (15)
115new KeyValuePair<string, string>(":method", "GET"), 116new KeyValuePair<string, string>(":scheme", "https"), 117new KeyValuePair<string, string>(":authority", "127.0.0.1:5001"), 118new KeyValuePair<string, string>(":path", "/"), 119new KeyValuePair<string, string>("alt-used", "127.0.0.1:5001"), 132new KeyValuePair<string, string>(":method", "GET"), 133new KeyValuePair<string, string>(":scheme", "http"), 134new KeyValuePair<string, string>(":authority", ""), 135new KeyValuePair<string, string>(":path", "/"), 175new KeyValuePair<string, string>(":method", new string('A', 8192 / 2)), 176new KeyValuePair<string, string>(":path", new string('A', 8192 / 2)), 177new KeyValuePair<string, string>(":scheme", "http") 302KeyValuePair<string, string>[] expectedValues = new[] { new KeyValuePair<string, string>(expectedHeaderName, expectedHeaderValue) }; 389DecodedStaticHeaders[index] = new KeyValuePair<string, string>(Encoding.ASCII.GetString(entry.Name), Encoding.ASCII.GetString(entry.Value)); 396DecodedStaticHeaders[index] = new KeyValuePair<string, string>(Encoding.ASCII.GetString(name), Encoding.ASCII.GetString(value));
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (18)
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (2)
141Current = result ? new KeyValuePair<string, string>(key, _stringValuesEnumerator.Current!) : default; 151Current = new KeyValuePair<string, string>(name, value.ToString());
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
297new KeyValuePair<Http3SettingType, long>(type, value));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (15)
114MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 118MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 395yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 399yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 403yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 411yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 419yield return new KeyValuePair<Type, object>(typeof(IConnectionSocketFeature), _currentIConnectionSocketFeature); 423yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 427yield return new KeyValuePair<Type, object>(typeof(IStreamDirectionFeature), _currentIStreamDirectionFeature); 431yield return new KeyValuePair<Type, object>(typeof(IStreamIdFeature), _currentIStreamIdFeature); 435yield return new KeyValuePair<Type, object>(typeof(IStreamAbortFeature), _currentIStreamAbortFeature); 439yield return new KeyValuePair<Type, object>(typeof(IStreamClosedFeature), _currentIStreamClosedFeature); 443yield return new KeyValuePair<Type, object>(typeof(IConnectionMetricsTagsFeature), _currentIConnectionMetricsTagsFeature);
Microsoft.AspNetCore.Server.Kestrel.Tests (158)
ConfigurationReaderTests.cs (47)
34new KeyValuePair<string, string>("Certificates", ""), 47new KeyValuePair<string, string>("Certificates:FileCert:Path", "/path/cert.pfx"), 48new KeyValuePair<string, string>("Certificates:FileCert:Password", "certpassword"), 49new KeyValuePair<string, string>("Certificates:StoreCert:Subject", "certsubject"), 50new KeyValuePair<string, string>("Certificates:StoreCert:Store", "certstore"), 51new KeyValuePair<string, string>("Certificates:StoreCert:Location", "cetlocation"), 52new KeyValuePair<string, string>("Certificates:StoreCert:AllowInvalid", "true"), 79new KeyValuePair<string, string>("Certificates:filecert:Path", "/path/cert.pfx"), 80new KeyValuePair<string, string>("CERTIFICATES:FILECERT:PASSWORD", "certpassword"), 100new KeyValuePair<string, string>("Certificates:filecert:Password", "certpassword"), 101new KeyValuePair<string, string>("Certificates:FILECERT:Password", "certpassword"), 122new KeyValuePair<string, string>("Endpoints", ""), 135new KeyValuePair<string, string>("Endpoints:End1", ""), 146new KeyValuePair<string, string>("Endpoints:End1:Url", ""), 157new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 158new KeyValuePair<string, string>("Endpoints:End2:Url", "https://*:5002"), 159new KeyValuePair<string, string>("Endpoints:End2:ClientCertificateMode", "AllowCertificate"), 160new KeyValuePair<string, string>("Endpoints:End3:Url", "https://*:5003"), 161new KeyValuePair<string, string>("Endpoints:End3:ClientCertificateMode", "RequireCertificate"), 162new KeyValuePair<string, string>("Endpoints:End3:Certificate:Path", "/path/cert.pfx"), 163new KeyValuePair<string, string>("Endpoints:End3:Certificate:Password", "certpassword"), 164new KeyValuePair<string, string>("Endpoints:End4:Url", "https://*:5004"), 165new KeyValuePair<string, string>("Endpoints:End4:ClientCertificateMode", "NoCertificate"), 166new KeyValuePair<string, string>("Endpoints:End4:Certificate:Subject", "certsubject"), 167new KeyValuePair<string, string>("Endpoints:End4:Certificate:Store", "certstore"), 168new KeyValuePair<string, string>("Endpoints:End4:Certificate:Location", "cetlocation"), 169new KeyValuePair<string, string>("Endpoints:End4:Certificate:AllowInvalid", "true"), 226new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 227new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "Tls11"), 242new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 243new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "Tls11"), 244new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:1", "Tls12"), 259new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 260new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "TLS11"), 275new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 288new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 303new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 304new KeyValuePair<string, string>("Endpoints:End1:Sni::Protocols", "Http1"), 318new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 319new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Protocols", "Http1"), 320new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:SslProtocols:0", "Tls12"), 321new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Certificate:Path", "/path/cert.pfx"), 322new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Certificate:Password", "certpassword"), 323new KeyValuePair<string, string>("Endpoints:End1:SNI:*.example.org:ClientCertificateMode", "AllowCertificate"), 347new KeyValuePair<string, string>("EndpointDefaults:SslProtocols:0", "Tls11"), 372new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 385new KeyValuePair<string, string>("EndpointDefaults:ClientCertificateMode", "AllowCertificate"),
HttpsConfigurationTests.cs (8)
89new KeyValuePair<string, string>("Endpoints:end1:Url", address), 90new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx")), 91new KeyValuePair<string, string>("Certificates:Default:Password", "testPassword"), 127new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx")), 128new KeyValuePair<string, string>("Certificates:Default:Password", "testPassword"), 159new KeyValuePair<string, string>("Endpoints:end1:Url", address), 160new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "aspnetdevcert.pfx")), 161new KeyValuePair<string, string>("Certificates:Default:Password", "testPassword"),
KestrelConfigurationLoaderTests.cs (103)
43new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"), 44new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5001"), 64new KeyValuePair<string, string>("Endpoints:Found:Url", "http://*:5001"), 125new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 136new KeyValuePair<string, string>("Endpoints:End2:Url", "http://*:5002"), 172new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 207new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 208new KeyValuePair<string,string>("Certificates:Default:Path", testCertPath) 245new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 285new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 286new KeyValuePair<string, string>("Certificates:Development:Password", "1234"), 329new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 333new KeyValuePair<string, string>("Certificates:Development:Password", "1234"), 337new KeyValuePair<string, string>("Certificates:Default:path", defaultCertPath), 338new KeyValuePair<string, string>("Certificates:Default:Password", "testPassword"), 399new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 400new KeyValuePair<string, string>("Endpoints:End1:Certificate:Path", TestResources.TestCertificatePath), 401new KeyValuePair<string, string>("Endpoints:End1:Certificate:Password", "testPassword") 451new KeyValuePair<string, string>("Certificates:Development:Password", "1234"), 498new KeyValuePair<string, string>("Certificates:Development:Password", "1234"), 559new KeyValuePair<string, string>("Certificates:Development:Password", "1234"), 594new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 595new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")), 596new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-aspnet.key")) 618new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 619new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")), 620new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-ecdsa.key")), 621new KeyValuePair<string, string>("Certificates:Default:Password", "aspnetcore") 643new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 644new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")), 645new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-aspnet.key")), 646new KeyValuePair<string, string>("Certificates:Default:Password", "abcde"), 668new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 669new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")), 670new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-aspnet.pub")), 707new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 708new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", certificateFile)), 709new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", certificateKey)), 711.Concat(password != null ? new[] { new KeyValuePair<string, string>("Certificates:Default:Password", password) } : Array.Empty<KeyValuePair<string, string>>())) 741new KeyValuePair<string, string>("Certificates:Development:Password", "12341234"), 772new KeyValuePair<string, string>("Certificates:Development:Password", "12341234") 797new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 799new KeyValuePair<string, string>("Endpoints:End1:Certificate:Path", "fakecert.pfx"), 807new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 808new KeyValuePair<string, string>("Endpoints:End1:Certificate:Subject", "example.org"), 816new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 817new KeyValuePair<string, string>("Endpoints:End1:ClientCertificateMode", ClientCertificateMode.RequireCertificate.ToString()), 825new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 826new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", SslProtocols.Tls13.ToString()), 834new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 835new KeyValuePair<string, string>("Endpoints:End1:Sni:Protocols", HttpProtocols.Http1.ToString()), 849new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 850new KeyValuePair<string, string>("EndpointDefaults:ClientCertificateMode", ClientCertificateMode.RequireCertificate.ToString()), 862new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"), 863new KeyValuePair<string, string>("EndpointDefaults:SslProtocols:0", SslProtocols.Tls13.ToString()), 898new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 899new KeyValuePair<string, string>("Endpoints:End1:Certificate:Path", certificatePath), 900new KeyValuePair<string, string>("Endpoints:End1:Certificate:Password", certificatePassword), 997new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 998new KeyValuePair<string, string>("Endpoints:End1:Certificate:Path", fileLink.FullName), 999new KeyValuePair<string, string>("Endpoints:End1:Certificate:Password", certificatePassword), 1093new KeyValuePair<string, string>("EndpointDefaults:Protocols", input), 1094new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1163new KeyValuePair<string, string>("Endpoints:End1:Protocols", input), 1164new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1214new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "Tls11"), 1215new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1255new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "Tls11"), 1256new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1284new KeyValuePair<string, string>("EndpointDefaults:SslProtocols:0", "Tls11"), 1285new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1318new KeyValuePair<string, string>("EndpointDefaults:SslProtocols:0", "Tls11"), 1319new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1351new KeyValuePair<string, string>("Endpoints:End1:ClientCertificateMode", "AllowCertificate"), 1352new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1385new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1386new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Protocols", HttpProtocols.None.ToString()), 1387new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:SslProtocols:0", SslProtocols.Tls13.ToString()), 1388new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:ClientCertificateMode", ClientCertificateMode.RequireCertificate.ToString()), 1389new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Certificate:Path", certPath), 1390new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Certificate:KeyPath", keyPath), 1419new KeyValuePair<string, string>("Endpoints:End1:ClientCertificateMode", "AllowCertificate"), 1420new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1446new KeyValuePair<string, string>("EndpointDefaults:ClientCertificateMode", "AllowCertificate"), 1447new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1476new KeyValuePair<string, string>("EndpointDefaults:ClientCertificateMode", "AllowCertificate"), 1477new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"), 1497new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"), 1498new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5001"), 1509new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"), 1510new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5002"), 1511new KeyValuePair<string, string>("Endpoints:C:Url", "http://*:5003"), 1536new KeyValuePair<string, string>("Endpoints:DefaultProtocol:Url", "http://*:5000"), 1537new KeyValuePair<string, string>("Endpoints:NonDefaultProtocol:Url", "http://*:5001"), 1538new KeyValuePair<string, string>("Endpoints:NonDefaultProtocol:Protocols", "Http1AndHttp2"), 1545new KeyValuePair<string, string>("Endpoints:DefaultProtocol:Url", "http://*:5000"), 1546new KeyValuePair<string, string>("Endpoints:NonDefaultProtocol:Url", "http://*:5001"), 1547new KeyValuePair<string, string>("Endpoints:NonDefaultProtocol:Protocols", "Http1AndHttp2"), 1548new KeyValuePair<string, string>("EndpointDefaults:Protocols", "Http1"), 1573new KeyValuePair<string, string>("Endpoints:Changed:Url", "http://*:5001"), 1574new KeyValuePair<string, string>("Endpoints:Unchanged:Url", "http://*:5000"), 1588new KeyValuePair<string, string>("Endpoints:Changed:Url", "http://*:5002"), 1589new KeyValuePair<string, string>("Endpoints:Unchanged:Url", "http://*:5000"),
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (15)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (15)
114MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 118MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 395yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 399yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 403yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 411yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 419yield return new KeyValuePair<Type, object>(typeof(IConnectionSocketFeature), _currentIConnectionSocketFeature); 423yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 427yield return new KeyValuePair<Type, object>(typeof(IStreamDirectionFeature), _currentIStreamDirectionFeature); 431yield return new KeyValuePair<Type, object>(typeof(IStreamIdFeature), _currentIStreamIdFeature); 435yield return new KeyValuePair<Type, object>(typeof(IStreamAbortFeature), _currentIStreamAbortFeature); 439yield return new KeyValuePair<Type, object>(typeof(IStreamClosedFeature), _currentIStreamClosedFeature); 443yield return new KeyValuePair<Type, object>(typeof(IConnectionMetricsTagsFeature), _currentIConnectionMetricsTagsFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (24)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (15)
114MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 118MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 395yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 399yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 403yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 411yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 419yield return new KeyValuePair<Type, object>(typeof(IConnectionSocketFeature), _currentIConnectionSocketFeature); 423yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 427yield return new KeyValuePair<Type, object>(typeof(IStreamDirectionFeature), _currentIStreamDirectionFeature); 431yield return new KeyValuePair<Type, object>(typeof(IStreamIdFeature), _currentIStreamIdFeature); 435yield return new KeyValuePair<Type, object>(typeof(IStreamAbortFeature), _currentIStreamAbortFeature); 439yield return new KeyValuePair<Type, object>(typeof(IStreamClosedFeature), _currentIStreamClosedFeature); 443yield return new KeyValuePair<Type, object>(typeof(IConnectionMetricsTagsFeature), _currentIConnectionMetricsTagsFeature);
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (9)
101MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 105MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 281yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 285yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 289yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 293yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 297yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 301yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 305yield return new KeyValuePair<Type, object>(typeof(ITlsConnectionFeature), _currentITlsConnectionFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (15)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (15)
114MaybeExtra[i] = new KeyValuePair<Type, object>(key, value); 118MaybeExtra.Add(new KeyValuePair<Type, object>(key, value)); 395yield return new KeyValuePair<Type, object>(typeof(IConnectionIdFeature), _currentIConnectionIdFeature); 399yield return new KeyValuePair<Type, object>(typeof(IConnectionTransportFeature), _currentIConnectionTransportFeature); 403yield return new KeyValuePair<Type, object>(typeof(IConnectionItemsFeature), _currentIConnectionItemsFeature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature); 411yield return new KeyValuePair<Type, object>(typeof(IMemoryPoolFeature), _currentIMemoryPoolFeature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature); 419yield return new KeyValuePair<Type, object>(typeof(IConnectionSocketFeature), _currentIConnectionSocketFeature); 423yield return new KeyValuePair<Type, object>(typeof(IProtocolErrorCodeFeature), _currentIProtocolErrorCodeFeature); 427yield return new KeyValuePair<Type, object>(typeof(IStreamDirectionFeature), _currentIStreamDirectionFeature); 431yield return new KeyValuePair<Type, object>(typeof(IStreamIdFeature), _currentIStreamIdFeature); 435yield return new KeyValuePair<Type, object>(typeof(IStreamAbortFeature), _currentIStreamAbortFeature); 439yield return new KeyValuePair<Type, object>(typeof(IStreamClosedFeature), _currentIStreamClosedFeature); 443yield return new KeyValuePair<Type, object>(typeof(IConnectionMetricsTagsFeature), _currentIConnectionMetricsTagsFeature);
Microsoft.AspNetCore.Shared.Tests (80)
AdaptiveCapacityDictionaryTests.cs (14)
447((ICollection<KeyValuePair<string, object?>>)dict).Add(new KeyValuePair<string, object?>("key", "value")); 497var input = new KeyValuePair<string, object?>("key", "value"); 516var input = new KeyValuePair<string, object?>("KEY", "value"); 535var input = new KeyValuePair<string, object?>("other", "value"); 555var input = new KeyValuePair<string, object?>("key", "valUE"); 661new KeyValuePair<string, object?>("key", "value") 676var input = new KeyValuePair<string, object?>("key", "value"); 696var input = new KeyValuePair<string, object?>("KEY", "value"); 716var input = new KeyValuePair<string, object?>("other", "value"); 737var input = new KeyValuePair<string, object?>("key", "valUE"); 1016kvp => Assert.Equal(new KeyValuePair<string, object?>("key", "value"), kvp), 1044kvp => Assert.Equal(new KeyValuePair<string, object?>("key0", "value0"), kvp), 1045kvp => Assert.Equal(new KeyValuePair<string, object?>("key1", "value1"), kvp), 1072kvp => Assert.Equal(new KeyValuePair<string, object?>("key0", "value0"), kvp),
PropertyHelperTest.cs (3)
593new KeyValuePair<string, object>("selected", false) 601new KeyValuePair<string, object>("SeLeCtEd", true) 609new KeyValuePair<string, object>("SelECTeD", true)
runtime\Http2\HPackDecoderTest.cs (2)
977DecodedStaticHeaders[index] = new KeyValuePair<string, string>(Encoding.ASCII.GetString(entry.Name), Encoding.ASCII.GetString(entry.Value)); 984DecodedStaticHeaders[index] = new KeyValuePair<string, string>(Encoding.ASCII.GetString(name), Encoding.ASCII.GetString(value));
runtime\Http3\QPackDecoderTest.cs (15)
115new KeyValuePair<string, string>(":method", "GET"), 116new KeyValuePair<string, string>(":scheme", "https"), 117new KeyValuePair<string, string>(":authority", "127.0.0.1:5001"), 118new KeyValuePair<string, string>(":path", "/"), 119new KeyValuePair<string, string>("alt-used", "127.0.0.1:5001"), 132new KeyValuePair<string, string>(":method", "GET"), 133new KeyValuePair<string, string>(":scheme", "http"), 134new KeyValuePair<string, string>(":authority", ""), 135new KeyValuePair<string, string>(":path", "/"), 175new KeyValuePair<string, string>(":method", new string('A', 8192 / 2)), 176new KeyValuePair<string, string>(":path", new string('A', 8192 / 2)), 177new KeyValuePair<string, string>(":scheme", "http") 302KeyValuePair<string, string>[] expectedValues = new[] { new KeyValuePair<string, string>(expectedHeaderName, expectedHeaderValue) }; 389DecodedStaticHeaders[index] = new KeyValuePair<string, string>(Encoding.ASCII.GetString(entry.Name), Encoding.ASCII.GetString(entry.Value)); 396DecodedStaticHeaders[index] = new KeyValuePair<string, string>(Encoding.ASCII.GetString(name), Encoding.ASCII.GetString(value));
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (4)
130_arrayStorage[_count++] = new KeyValuePair<TKey, TValue>(key, value); 134_arrayStorage[index] = new KeyValuePair<TKey, TValue>(key, value); 239_arrayStorage[_count] = new KeyValuePair<TKey, TValue>(key, value); 472_arrayStorage[Count] = new KeyValuePair<TKey, TValue>(key, value);
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (41)
2539yield return new KeyValuePair<string, StringValues>(HeaderNames.Accept, Accept); 2543yield return new KeyValuePair<string, StringValues>(HeaderNames.AcceptCharset, AcceptCharset); 2547yield return new KeyValuePair<string, StringValues>(HeaderNames.AcceptEncoding, AcceptEncoding); 2551yield return new KeyValuePair<string, StringValues>(HeaderNames.AcceptLanguage, AcceptLanguage); 2555yield return new KeyValuePair<string, StringValues>(HeaderNames.Allow, Allow); 2559yield return new KeyValuePair<string, StringValues>(HeaderNames.Authorization, Authorization); 2563yield return new KeyValuePair<string, StringValues>(HeaderNames.CacheControl, CacheControl); 2567yield return new KeyValuePair<string, StringValues>(HeaderNames.Connection, Connection); 2571yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentEncoding, ContentEncoding); 2575yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentLanguage, ContentLanguage); 2579yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentLength, ContentLength); 2583yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentLocation, ContentLocation); 2587yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentMD5, ContentMD5); 2591yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentRange, ContentRange); 2595yield return new KeyValuePair<string, StringValues>(HeaderNames.ContentType, ContentType); 2599yield return new KeyValuePair<string, StringValues>(HeaderNames.Cookie, Cookie); 2603yield return new KeyValuePair<string, StringValues>(HeaderNames.Date, Date); 2607yield return new KeyValuePair<string, StringValues>(HeaderNames.Expect, Expect); 2611yield return new KeyValuePair<string, StringValues>(HeaderNames.Expires, Expires); 2615yield return new KeyValuePair<string, StringValues>(HeaderNames.From, From); 2619yield return new KeyValuePair<string, StringValues>(HeaderNames.Host, Host); 2623yield return new KeyValuePair<string, StringValues>(HeaderNames.IfMatch, IfMatch); 2627yield return new KeyValuePair<string, StringValues>(HeaderNames.IfModifiedSince, IfModifiedSince); 2631yield return new KeyValuePair<string, StringValues>(HeaderNames.IfNoneMatch, IfNoneMatch); 2635yield return new KeyValuePair<string, StringValues>(HeaderNames.IfRange, IfRange); 2639yield return new KeyValuePair<string, StringValues>(HeaderNames.IfUnmodifiedSince, IfUnmodifiedSince); 2643yield return new KeyValuePair<string, StringValues>(HeaderNames.KeepAlive, KeepAlive); 2647yield return new KeyValuePair<string, StringValues>(HeaderNames.LastModified, LastModified); 2651yield return new KeyValuePair<string, StringValues>(HeaderNames.MaxForwards, MaxForwards); 2655yield return new KeyValuePair<string, StringValues>(HeaderNames.Pragma, Pragma); 2659yield return new KeyValuePair<string, StringValues>(HeaderNames.ProxyAuthorization, ProxyAuthorization); 2663yield return new KeyValuePair<string, StringValues>(HeaderNames.Range, Range); 2667yield return new KeyValuePair<string, StringValues>(HeaderNames.Referer, Referer); 2671yield return new KeyValuePair<string, StringValues>(HeaderNames.TE, TE); 2675yield return new KeyValuePair<string, StringValues>(HeaderNames.Trailer, Trailer); 2679yield return new KeyValuePair<string, StringValues>(HeaderNames.TransferEncoding, TransferEncoding); 2683yield return new KeyValuePair<string, StringValues>(HeaderNames.Translate, Translate); 2687yield return new KeyValuePair<string, StringValues>(HeaderNames.Upgrade, Upgrade); 2691yield return new KeyValuePair<string, StringValues>(HeaderNames.UserAgent, UserAgent); 2695yield return new KeyValuePair<string, StringValues>(HeaderNames.Via, Via); 2699yield return new KeyValuePair<string, StringValues>(HeaderNames.Warning, Warning);
Microsoft.AspNetCore.SignalR.Client.Core (1)
Internal\ConnectionLogScope.cs (1)
35return new KeyValuePair<string, object?>(ClientConnectionIdKey, ConnectionId);
Microsoft.AspNetCore.SignalR.Core (4)
Internal\DefaultHubDispatcher.cs (3)
848new("rpc.method", methodName), 849new("rpc.system", "signalr"), 850new("rpc.service", _fullHubName),
Internal\HubGroupList.cs (1)
39var groupToRemove = new KeyValuePair<string, GroupConnectionList>(groupName, EmptyGroupConnectionList);
Microsoft.AspNetCore.StaticFiles.Tests (1)
StaticFilesTestServer.cs (1)
21new KeyValuePair<string, string>("webroot", ".")
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (1)
2926new KeyValuePair<string,string>("testhostingstartup:config", "value")
WebHostTests.cs (1)
65new KeyValuePair<string, string>("FORWARDEDHEADERS_ENABLED", "true" ),
Microsoft.AspNetCore.WebUtilities (3)
FormReader.cs (2)
130return new KeyValuePair<string, string>(_currentKey, _currentValue); 163return new KeyValuePair<string, string>(_currentKey, _currentValue);
QueryHelpers.cs (1)
33uri, new[] { new KeyValuePair<string, string?>(name, value) });
Microsoft.Build (59)
BackEnd\BuildManager\GlobalPropertiesLookup.cs (1)
34.Select(p => new KeyValuePair<string, string?>(p.Key, ExtractEscapedValue(p.Value)))
BackEnd\Components\Logging\BuildEventArgTransportSink.cs (1)
150LogMessagePacket logPacket = new LogMessagePacket(new KeyValuePair<int, BuildEventArgs>(sinkId, buildEvent));
BackEnd\Components\Logging\LoggingService.cs (1)
1674loggingEventKeyValuePair = new KeyValuePair<int, BuildEventArgs>(loggingEventKeyValuePair.Key, buildEventArgs);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
220keyValuePairList.Add(new KeyValuePair<string, string>((string)kvp.Key, (string)kvp.Value));
BackEnd\Components\RequestBuilder\Lookup.cs (1)
809var modify = new KeyValuePair<ProjectItemInstance, MetadataModifications>(actualItem, metadataChangeCopy);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
1432yield return new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.Escape(kvp.Value)); 1439yield return new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.Escape(kvp.Value)); 1446yield return new KeyValuePair<string, string>((string)de.Key, EscapingUtilities.Escape((string)de.Value));
Collections\ArrayDictionary.cs (2)
151array[arrayIndex + i] = new KeyValuePair<TKey, TValue>(keys[i], values[i]); 237new KeyValuePair<TKey, TValue>(
Collections\CopyOnWritePropertyDictionary.cs (2)
370yield return new(kvp.Value.Key, kvp.Value); 378yield return new(property.Key, property);
Collections\ReadOnlyConvertingDictionary.cs (1)
206return new KeyValuePair<K, N>(original.Key, _converter(original.Value));
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (2)
496yield return new KeyValuePair<string, T>(entry.Key, entry); 646array[i] = new KeyValuePair<string, T>(entry.Key, entry);
Collections\WeakValueDictionary.cs (2)
244yield return new KeyValuePair<K, V>(kvp.Key, null); 248yield return new KeyValuePair<K, V>(kvp.Key, target);
Construction\ProjectTaskElement.cs (1)
182parameterLocations.Add(new KeyValuePair<string, ElementLocation>(entry.Key, entry.Value.Item2));
Definition\Project.cs (1)
2134yield return new KeyValuePair<string, string>(property.Name, ((IProperty)property).EvaluatedValueEscaped);
Definition\ProjectItem.cs (1)
148IEnumerable<KeyValuePair<string, string>> IItemData.EnumerateMetadata() => Metadata.Select(m => new KeyValuePair<string, string>(m.Name, m.EvaluatedValue));
Evaluation\Evaluator.cs (1)
931_usingTaskElements.Add(new KeyValuePair<string, ProjectUsingTaskElement>(currentProjectOrImport.DirectoryPath, usingTask));
Evaluation\Expander.cs (21)
2242itemsFromCapture.Add(new KeyValuePair<string, S>(evaluatedIncludeEscaped, item)); 2262itemsFromCapture.Add(new KeyValuePair<string, S>(joinedItems, null)); 2459itemsFromCapture.Add(new KeyValuePair<string, S>(resultantItem, item)); 2464itemsFromCapture.Add(new KeyValuePair<string, S>(item.EvaluatedIncludeEscaped, item)); 2476transformedItems.Add(new KeyValuePair<string, S>(Convert.ToString(itemsOfType.Count, CultureInfo.InvariantCulture), null /* no base item */)); 2519transformedItems.Add(new KeyValuePair<string, S>(result, item.Value)); 2523transformedItems.Add(new KeyValuePair<string, S>(null, item.Value)); 2595transformedItems.Add(new KeyValuePair<string, S>(escapedPath, null)); 2670transformedItems.Add(new KeyValuePair<string, S>(escapedDirectoryPath, null)); 2733transformedItems.Add(new KeyValuePair<string, S>(directoryName, item.Value)); 2737transformedItems.Add(new KeyValuePair<string, S>(null, item.Value)); 2778transformedItems.Add(new KeyValuePair<string, S>(itemSpec, item.Value)); 2784transformedItems.Add(new KeyValuePair<string, S>(metadataValue, item.Value)); 2789transformedItems.Add(new KeyValuePair<string, S>(metadataValue, item.Value)); 2919transformedItems.Add(new KeyValuePair<string, S>(include, item.Value)); 2923transformedItems.Add(new KeyValuePair<string, S>(null, item.Value)); 3070transformedItems.Add(new KeyValuePair<string, S>(include, item.Value)); 3074transformedItems.Add(new KeyValuePair<string, S>(null, item.Value)); 3090transformedItems.Add(new KeyValuePair<string, S>(item.Key, null)); 3228transformedItems.Add(new KeyValuePair<string, S>("true", item.Value)); 3239transformedItems.Add(new KeyValuePair<string, S>("false", null));
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (1)
255metadataList.Add(new KeyValuePair<ProjectMetadataElement, string>(metadataElement, evaluatedValue));
Graph\ProjectGraph.cs (1)
774entriesToUpdate.Add(new KeyValuePair<ProjectGraphNode, ImmutableList<string>>(pair.Key, targetList));
Graph\ProjectInterpretation.cs (1)
297directMetadata: [new KeyValuePair<string, string>(ItemMetadataNames.PropertiesMetadataName, $"{globalPropertyName}={globalPropertyValue}")],
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (2)
174array[index] = new KeyValuePair<string, T>(itemInstance.Key, itemInstance); 192yield return new KeyValuePair<string, T>(kvp.Key, instance);
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (2)
94array[currentIndex] = new KeyValuePair<string, ProjectPropertyInstance>(itemKey, instance); 151yield return new KeyValuePair<string, ProjectPropertyInstance>(itemKey, instance);
Instance\ProjectItemInstance.cs (3)
1107result.Add(new KeyValuePair<string, string>(projectMetadataInstance.Name, projectMetadataInstance.EvaluatedValue)); 1122yield return new KeyValuePair<string, string>(projectMetadataInstance.Name, projectMetadataInstance.EvaluatedValue); 1488.Select(metadatum => new KeyValuePair<string, string>(metadatum.Name, GetMetadataEscaped(metadatum.Name)));
Logging\BaseConsoleLogger.cs (1)
634IItem<ProjectMetadata> iitem => iitem.Metadata?.Select(m => new KeyValuePair<string, string>(m.Name, m.EvaluatedValue)),
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
1183nameValueIndexListBuffer.Add(new KeyValuePair<int, int>(keyIndex, valueIndex));
Logging\ProfilerLogger.cs (1)
222pair => new KeyValuePair<EvaluationLocation, ProfiledLocation>(pair.Key, pair.Value));
LogMessagePacketBase.cs (1)
367return new KeyValuePair<int, BuildEventArgs>(_sinkId, _buildEvent);
TaskParameter.cs (2)
1012var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 1029var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value));
Utilities\Utilities.cs (1)
689callback(arg, new KeyValuePair<string, string>(tuple.Name, tuple.Value));
Microsoft.Build.BuildCheck.UnitTests (1)
EditorConfig_Tests.cs (1)
761return new KeyValuePair<K, V>(key, value);
Microsoft.Build.CommandLine.UnitTests (1)
CommandLineSwitches_Tests.cs (1)
1546.Select(i => new KeyValuePair<string, string>((string)i.Key, (string)i.Value)))
Microsoft.Build.Engine.OM.UnitTests (14)
Construction\ProjectFormatting_Tests.cs (1)
536new[] { new KeyValuePair<string, string>("metadata", "value") });
Definition\DefinitionEditing_Tests.cs (3)
205metadata.Add(new KeyValuePair<string, string>("m", "m1")); 1970metadata.Add(new KeyValuePair<string, string>("m", "m1")); 2129metadata.Add(new KeyValuePair<string, string>("m", "m1"));
Instance\ProjectInstance_Tests.cs (3)
128metadata.Add(new KeyValuePair<string, string>("m", "m1")); 129metadata.Add(new KeyValuePair<string, string>("n", "n1")); 130metadata.Add(new KeyValuePair<string, string>("o", "o%40"));
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (5)
73new KeyValuePair<string, string>("m1", "v1"), 74new KeyValuePair<string, string>("m2", "v2"), 75new KeyValuePair<string, string>("m3", "v3"), 702new KeyValuePair<string, string>("igm1", "v1"), 703new KeyValuePair<string, string>("igm2", "v2"),
ObjectModelRemoting\LinkedEvaluationModify_Tests.cs (2)
122new KeyValuePair<string, string>("a", "aValue"), 123new KeyValuePair<string, string>("b", "bValue"),
Microsoft.Build.Engine.UnitTests (28)
BackEnd\LoggingService_Tests.cs (1)
702LogMessagePacket packet = new LogMessagePacket(new KeyValuePair<int, BuildEventArgs>(1, messageEvent));
BackEnd\Lookup_Tests.cs (5)
205table1.Add(new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("m1", "m1") }, project.FullPath)); 206table1.Add(new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("m1", "m2") }, project.FullPath)); 215new ProjectItemInstance(project, "i1", "a2", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should get added 216new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should not get added 217new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m3") }, project.FullPath), // Should get added
BackEnd\NodePackets_Tests.cs (2)
327LogMessagePacket packet = new LogMessagePacket(new KeyValuePair<int, BuildEventArgs>(0, arg)); 361LogMessagePacket packet = new LogMessagePacket(new KeyValuePair<int, BuildEventArgs>(0, buildEvent));
BackEnd\SdkResolverService_Tests.cs (1)
438metadata.ShouldBeSameIgnoringOrder(new[] { new KeyValuePair<string, string>("MetadataName", "MetadataValue") });
BackEnd\TaskThatReturnsDictionaryTaskItem.cs (2)
158array.SetValue(new KeyValuePair<TKey, TValue>(_keys[i], _values[i]), index + i); 178yield return new KeyValuePair<TKey, TValue>(_keys[i], _values[i]);
BuildEventArgsDataEnumeration.cs (1)
33new KeyValuePair<string, string>("foo","bar")
Construction\SolutionProjectGenerator_Tests.cs (2)
1667globalProperties.Add(new KeyValuePair<string, string>("Configuration", "Debug")); 1668globalProperties.Add(new KeyValuePair<string, string>("Platform", "Mixed Platforms"));
Instance\TaskItem_Tests.cs (4)
200item.EnumerateMetadata().ShouldBeSetEquivalentTo(new KeyValuePair<string, string>[] { new("a", "override"), new("b", "base") }); 202((Dictionary<string, string>)item.CloneCustomMetadata()).ShouldBeSetEquivalentTo(new KeyValuePair<string, string>[] { new("a", "override"), new("b", "base") });
WarningsAsMessagesAndErrors_Tests.cs (10)
101new KeyValuePair<string, string>("MSBuildWarningsAsErrors", "123"), 102new KeyValuePair<string, string>("MSBuildWarningsAsErrors", $@"$(MSBuildWarningsAsErrors); 104new KeyValuePair<string, string>("MSBuildWarningsAsErrors", "$(MSBuildWarningsAsErrors);ABC") 117new KeyValuePair<string, string>("MSBuildWarningsAsErrors", "123"), 118new KeyValuePair<string, string>("MSBuildWarningsAsErrors", "$(MSBuildWarningsAsErrors);ABC") 187new KeyValuePair<string, string>("MSBuildWarningsAsMessages", "123"), 188new KeyValuePair<string, string>("MSBuildWarningsAsMessages", $@"$(MSBuildWarningsAsMessages); 190new KeyValuePair<string, string>("MSBuildWarningsAsMessages", "$(MSBuildWarningsAsMessages);ABC") 203new KeyValuePair<string, string>("MSBuildWarningsAsMessages", "123"), 204new KeyValuePair<string, string>("MSBuildWarningsAsMessages", "$(MSBuildWarningsAsMessages);ABC")
Microsoft.Build.Framework (10)
ImmutableSegmentedDictionary.cs (1)
81.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
ImmutableSegmentedDictionary`2.cs (2)
147if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 232if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
ImmutableSegmentedDictionary`2+Builder.cs (1)
103if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
ITaskItemExtensions.cs (1)
62list[i++] = new KeyValuePair<string, string>(metadataName, valueOrError);
NativeMethods.cs (1)
1475myChildren.Add(new KeyValuePair<int, SafeProcessHandle>(possibleChildProcess.Id, childHandle));
SegmentedDictionary`2.cs (4)
316array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 903objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1171_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1201return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
IntegrationTests.cs (1)
50list.Add(new KeyValuePair<string, string>(
Microsoft.Build.Tasks.Core (8)
AssemblyDependency\ReferenceTable.cs (7)
1161var newEntry = new KeyValuePair<AssemblyNameExtension, Reference>(unifiedDependency.PostUnified, newReference); 2863yield return new KeyValuePair<string, string>(ItemMetadataNames.resolvedFrom, reference.ResolvedSearchPath); 2866yield return new KeyValuePair<string, string>(ItemMetadataNames.copyLocal, reference.IsCopyLocal ? "true" : "false"); 2871yield return new KeyValuePair<string, string>(ItemMetadataNames.redist, reference.RedistName); 2878yield return new KeyValuePair<string, string>(ItemMetadataNames.frameworkFile, "true"); 2884yield return new KeyValuePair<string, string>(ItemMetadataNames.imageRuntime, reference.ImageRuntime); 2891yield return new KeyValuePair<string, string>(ItemMetadataNames.isRedistRoot, (bool)reference.IsRedistRoot ? "true" : "false");
BootstrapperUtil\BootstrapperBuilder.cs (1)
1534var de = new KeyValuePair<string, string>(configFileKey, eulaAttribute.Value);
Microsoft.Build.Tasks.UnitTests (6)
Copy_Tests.cs (2)
2010filesActuallyCopied.Add(new KeyValuePair<FileState, FileState>(source, dest)); 2077filesActuallyCopied.Add(new KeyValuePair<FileState, FileState>(source, dest));
XslTransformation_Tests.cs (4)
1131xmlInputs.Add(new KeyValuePair<XslTransformation.XmlInput.XmlModes, object>(XslTransformation.XmlInput.XmlModes.Xml, _xmlDocument)); 1132xmlInputs.Add(new KeyValuePair<XslTransformation.XmlInput.XmlModes, object>(XslTransformation.XmlInput.XmlModes.XmlFile, xmlPaths)); 1134xslInputs.Add(new KeyValuePair<XslTransformation.XsltInput.XslModes, object>(XslTransformation.XsltInput.XslModes.Xslt, _xslDocument)); 1135xslInputs.Add(new KeyValuePair<XslTransformation.XsltInput.XslModes, object>(XslTransformation.XsltInput.XslModes.XsltFile, xslPath));
Microsoft.Build.Utilities.Core (4)
TaskItem.cs (3)
508_metadata.SetItems(metadata.Select(kvp => new KeyValuePair<string, string>(kvp.Key, kvp.Value ?? string.Empty))); 524var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 541var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value));
ToolTask.cs (1)
1373_environmentVariablePairs.Add(new KeyValuePair<string, string>(nameValuePair[0], nameValuePair[1]));
Microsoft.CodeAnalysis (33)
CodeGen\SwitchStringJumpTableEmitter.cs (1)
149jumpTableLabels[i] = new KeyValuePair<ConstantValue, object>(hashConstant, hashBucketLabel);
Collections\SmallDictionary.cs (1)
763public KeyValuePair<K, V> Current => new KeyValuePair<K, V>(_current!.Key, _current!.Value);
CommandLine\CommandLineParser.cs (1)
383pathMapBuilder.Add(new KeyValuePair<string, string>(from, to));
CommandLine\SarifV1ErrorLogger.cs (1)
293list.Add(new KeyValuePair<string, DiagnosticDescriptor>(pair.Value, pair.Key));
CvtRes.cs (11)
621if (_commentsContents != null) yield return new KeyValuePair<string, string>("Comments", _commentsContents); 622if (_companyNameContents != null) yield return new KeyValuePair<string, string>("CompanyName", _companyNameContents); 623if (_fileDescriptionContents != null) yield return new KeyValuePair<string, string>("FileDescription", _fileDescriptionContents); 625yield return new KeyValuePair<string, string>("FileVersion", _fileVersionContents); 627if (_internalNameContents != null) yield return new KeyValuePair<string, string>("InternalName", _internalNameContents); 628if (_legalCopyrightContents != null) yield return new KeyValuePair<string, string>("LegalCopyright", _legalCopyrightContents); 629if (_legalTrademarksContents != null) yield return new KeyValuePair<string, string>("LegalTrademarks", _legalTrademarksContents); 630if (_originalFileNameContents != null) yield return new KeyValuePair<string, string>("OriginalFilename", _originalFileNameContents); 631if (_productNameContents != null) yield return new KeyValuePair<string, string>("ProductName", _productNameContents); 633yield return new KeyValuePair<string, string>("ProductVersion", _productVersionContents); 635if (_assemblyVersionContents != null) yield return new KeyValuePair<string, string>("Assembly Version", _assemblyVersionContents.ToString());
InternalUtilities\ConcurrentLruCache.cs (1)
72copy[index++] = new KeyValuePair<K, V>(key,
InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
MetadataReader\MetadataDecoder.cs (1)
1581return (new KeyValuePair<string, TypedConstant>(name, value), kind == CustomAttributeNamedArgumentKind.Property, typeCode, elementTypeCode);
MetadataReader\MetadataHelpers.cs (2)
866new KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>( 884new KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>(
MetadataReader\TypeNameDecoder.cs (1)
230typeArgumentsBuilder.Add(new KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>(GetTypeSymbol(argument, out refersToNoPia), ImmutableArray<ModifierInfo<TypeSymbol>>.Empty));
RuleSet\RuleSetProcessor.cs (1)
183return new KeyValuePair<string, ReportDiagnostic>(ruleId, action);
SourceFileResolver.cs (1)
79pathMapBuilder.Add(new KeyValuePair<string, string>(normalizedKey, normalizedValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
TreeDumper.cs (2)
262stack.Push(new KeyValuePair<TreeDumperNode?, TreeDumperNode>(null, this)); 270stack.Push(new KeyValuePair<TreeDumperNode?, TreeDumperNode>(currentNode, child));
Microsoft.CodeAnalysis.Analyzers (22)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (3)
71ImmutableDictionary.CreateRange([new KeyValuePair<string, string?>(RulePropertyName, EqualityRuleName)]); 74ImmutableDictionary.CreateRange([new KeyValuePair<string, string?>(RulePropertyName, GetHashCodeRuleName)]); 77ImmutableDictionary.CreateRange([new KeyValuePair<string, string?>(RulePropertyName, CollectionRuleName)]);
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.FixAllProvider.cs (3)
33diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(fixAllContext.Project, diagnostics)); 41diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(fixAllContext.Project, diagnostics)); 50diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(project, diagnostics));
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (3)
47diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(fixAllContext.Project, diagnostics)); 55diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(fixAllContext.Project, diagnostics)); 64diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(project, diagnostics));
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
Microsoft.CodeAnalysis.AnalyzerUtilities (14)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\PooledHashSetExtensions.cs (1)
53?.Select(o => new KeyValuePair<string, ImmutableHashSet<string>>(o.Method, o.Parameters.ToImmutableHashSet()))
Microsoft.CodeAnalysis.BannedApiAnalyzers (13)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
Microsoft.CodeAnalysis.CodeStyle (11)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
216properties = properties.AddRange(tagIndices.Select(kvp => new KeyValuePair<string, string?>(kvp.Key, EncodeIndices(kvp.Value, additionalLocations.Count()))));
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
Microsoft.CodeAnalysis.Collections.Package (8)
Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder_Attributes.cs (2)
816visitedArgument = new KeyValuePair<String, TypedConstant>(fa.FieldSymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.HasAnyErrors)); 821visitedArgument = new KeyValuePair<String, TypedConstant>(pa.PropertySymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.HasAnyErrors));
CodeGen\EmitStatement.cs (1)
1243dispatch.Cases.Select(p => new KeyValuePair<ConstantValue, object>(p.value, p.label)).ToArray(),
Symbols\Compilation_WellKnownMembers.cs (1)
427builder.Add(new KeyValuePair<string, TypedConstant>(
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
1281newArguments.Add(new KeyValuePair<string, TypedConstant>(oldArgument.Key, newConstant));
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
110Select(static m => new KeyValuePair<MethodSymbol, MethodSymbol>(m.UnderlyingMethod, m)));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
EditAndContinue\StatementMatchingTests.cs (1)
40new KeyValuePair<SyntaxNode, SyntaxNode>(((BlockSyntax)m1.RootNodes.First()).Statements[1], ((BlockSyntax)m2.RootNodes.First()).Statements[0])
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
ObjectFormatterTests.cs (1)
602var obj = new KeyValuePair<int, string>(1, "x");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (12)
Semantics\InterceptorsTests.cs (12)
5262var resolver = new SourceFileResolver([], null, [new KeyValuePair<string, string>(pathPrefix, "/_/")]); 5317var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/")); 5353var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/")); 5387var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/")); 5457new KeyValuePair<string, string>(pathPrefix1, "/_/"), 5458new KeyValuePair<string, string>(pathPrefix2, "/_/") 5496var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, @"\_\")); 5531var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, @"\_/")); 5573var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, @"\_/")); 6014var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/")); 6055var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/")); 6117var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(directory2, "./"));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Symbols\IndexerTests.cs (5)
154new KeyValuePair<string, string>("System.Object IC.this[System.String index].get", "System.Object B.this[System.String index].get"), 155new KeyValuePair<string, string>("void IC.this[System.String index].set", "void B.this[System.String index].set"), 165new KeyValuePair<string, string>("System.Object IB.this[System.String index].get", "System.Object C.this[System.String index].get"), 166new KeyValuePair<string, string>("System.Object IC.this[System.String index].get", "System.Object C.this[System.String index].get"), 167new KeyValuePair<string, string>("void IC.this[System.String index].set", "void C.this[System.String index].set"),
Symbols\Metadata\PE\LoadingAttributes.cs (1)
537new AttributeArgs(null, new KeyValuePair<string, string>[]{ new KeyValuePair<string, string>("WrapNonExceptionThrows", "True")} )
Symbols\Source\FileModifierTests.cs (1)
841ImmutableArray.Create(new KeyValuePair<string, string>(root2, root1)));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
Diagnostics\DiagnosticTest.cs (5)
2911var expected = new KeyValuePair<string, string>(expectedFrom, expectedTo); 2926Assert.Equal(new KeyValuePair<string, string>("C:\\temp/goo" + sep, "/temp\\goo" + sep), parse("/pathmap:C:\\temp/goo=/temp\\goo", "a.cs").PathMap[0]); 2927Assert.Equal(new KeyValuePair<string, string>("noslash" + sep, "withoutslash" + sep), parse("/pathmap:noslash=withoutslash", "a.cs").PathMap[0]); 2929Assert.Equal(new KeyValuePair<string, string>("/temp/", "/goo/"), doublemap[0]); 2930Assert.Equal(new KeyValuePair<string, string>("/temp/", "/bar/"), doublemap[1]);
Parsing\CSharpParseOptionsTests.cs (1)
34var kvp = new KeyValuePair<string, string>("IOperation", "true");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
TestOptions.cs (3)
108return options.WithFeatures(options.Features.Concat(new[] { new KeyValuePair<string, string>("strict", "true") })); 113return options.WithFeatures(options.Features.Concat(new[] { new KeyValuePair<string, string>("peverify-compat", "true") })); 148return options.WithFeatures(options.Features.Concat(new[] { new KeyValuePair<string, string>(feature, value) }));
Microsoft.CodeAnalysis.Extensions.Package (9)
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
Microsoft.CodeAnalysis.Features (2)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (1)
108properties.Add(new KeyValuePair<string, string>(NewPositionKey, change.NewPosition.ToString()));
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
216properties = properties.AddRange(tagIndices.Select(kvp => new KeyValuePair<string, string?>(kvp.Key, EncodeIndices(kvp.Value, additionalLocations.Count()))));
Microsoft.CodeAnalysis.InteractiveHost (9)
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
Microsoft.CodeAnalysis.LanguageServer (3)
Logging\RoslynLogger.cs (3)
247properties.Add(new(GetPropertyName(id, name), val)); 252properties.Add(new(GetPropertyName(id, "Message"), logMessage.GetMessage())); 257properties.Add(new(GetPropertyName(id, "Delta"), delta.Value));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (2)
60new KeyValuePair<OptionKey2, object?>(new OptionKey2(FormattingOptions2.IndentationSize, LanguageNames.CSharp), 3), 61new KeyValuePair<OptionKey2, object?>(new OptionKey2(FormattingOptions2.IndentationSize, LanguageNames.VisualBasic), 5)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (13)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
Microsoft.CodeAnalysis.PublicApiAnalyzers (13)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (8)
AnnotatePublicApiFix.cs (3)
211diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(fixAllContext.Project, diagnostics)); 220diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(fixAllContext.Project, diagnostics)); 230diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(project, diagnostics));
DeclarePublicApiFix.cs (5)
315updatedPublicSurfaceAreaText.Add(new KeyValuePair<DocumentId, SourceText>(publicSurfaceAreaAdditionalDocument.Id, newSourceText)); 319addedPublicSurfaceAreaText.Add(new KeyValuePair<ProjectId, SourceText>(project.Id, newSourceText)); 362diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(fixAllContext.Project, diagnostics)); 371diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(fixAllContext.Project, diagnostics)); 381diagnosticsToFix.Add(new KeyValuePair<Project, ImmutableArray<Diagnostic>>(project, diagnostics));
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
BasicDeterministicKeyBuilderTests.cs (1)
182var parseOptions = VisualBasicParseOptions.Default.WithPreprocessorSymbols(values.Select(x => new KeyValuePair<string, object>(x.Key, x.Value!)));
DeterministicKeyBuilderTests.cs (1)
470.WithFeatures(features.Select(x => new KeyValuePair<string, string>(x.Key, x.Value)));
Microsoft.CodeAnalysis.ResxSourceGenerator (13)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
Microsoft.CodeAnalysis.Test.Utilities (5)
Assert\DiffUtil.cs (1)
147yield return new KeyValuePair<int, int>(i, j);
Traits\CompilerTraitDiscoverer.cs (1)
25yield return new KeyValuePair<string, string>("Compiler", value);
Traits\WorkItemTraitDiscoverer.cs (3)
19yield return new KeyValuePair<string, string>("WorkItemId", id.ToString()); 20yield return new KeyValuePair<string, string>("WorkItemUrl", url); 24yield return new KeyValuePair<string, string>("WorkItemUrl", onlyUrl);
Microsoft.CodeAnalysis.Threading.Package (9)
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
Microsoft.CodeAnalysis.UnitTests (29)
Collections\ImmutableDictionaryBuilderTestBase.cs (7)
27builder.Add(new KeyValuePair<string, int>("six", 6)); 82Assert.True(builder.Contains(new KeyValuePair<string, int>("five", 5))); 90Assert.True(builder.Remove(new KeyValuePair<string, int>("five", 5))); 91Assert.False(builder.Remove(new KeyValuePair<string, int>("foo", 1))); 113Assert.Equal(new KeyValuePair<string, int>(), array[0]); 114Assert.Equal(new KeyValuePair<string, int>("five", 5), array[1]); 248Assert.Equal(new object?[] { null, new KeyValuePair<string, int>("b", 2) }, array);
Collections\ImmutableDictionaryTestBase.cs (11)
81new KeyValuePair<string, int>("Microsoft", 80), 82new KeyValuePair<string, int>("Microsoft", 70), 90new KeyValuePair<string, int>("a", 1), new KeyValuePair<string, int>("b", 2), 91new KeyValuePair<string, int>("a", 3), 131Assert.Throws<NotSupportedException>(() => dictionary.Add(new KeyValuePair<string, int>())); 132Assert.Throws<NotSupportedException>(() => dictionary.Remove(new KeyValuePair<string, int>())); 247Assert.False(empty.Contains(new KeyValuePair<K, V?>(someKey, default(V)))); 263Assert.True(IsSame(map, map.AddRange(new[] { new KeyValuePair<TKey, TValue>(key, value2) }))); 301Assert.False(map.Contains(new KeyValuePair<TKey, TValue>(key, value))); 303Assert.True(map.Add(key, value).Contains(new KeyValuePair<TKey, TValue>(key, value)));
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (3)
91map = map.AddRange(Enumerable.Range(1, 100).Select(n => new KeyValuePair<int, GenericParameterHelper>(n, new GenericParameterHelper()))); 200var list = new List<KeyValuePair<int, int>> { new KeyValuePair<int, int>(3, 5), new KeyValuePair<int, int>(8, 10) };
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (4)
97.AddRange(Enumerable.Range(1, 10).Select(n => new KeyValuePair<int, string?>(n, null))) 100Enumerable.Range(1, 10).Select(n => new KeyValuePair<int, string?>(n, null)), 109Enumerable.Range(1, 11).Select(n => new KeyValuePair<int, string?>(n, null)), 119Enumerable.Range(1, 11).Select(n => new KeyValuePair<int, string?>(n, null)),
Collections\SegmentedCollectionsMarshalTests.cs (2)
701SegmentedDictionary<int, TValue> dictionary = new SegmentedDictionary<int, TValue>(Enumerable.Range(0, 17).Select(x => new KeyValuePair<int, TValue>(x, createValue()))); 768ImmutableSegmentedDictionary<int, T> immutableDictionary = ImmutableSegmentedDictionary.CreateRange(Enumerable.Range(0, 17).Select(x => new KeyValuePair<int, T>(x, createValue())));
Diagnostics\AnalysisContextInfoTests.cs (1)
27.WithFeatures(new[] { new KeyValuePair<string, string>("IOperation", "true") });
InternalUtilities\ConcurrentLruCacheTests.cs (1)
49_store[_index++] = new KeyValuePair<K, V>(key, value);
Microsoft.CodeAnalysis.VisualBasic (9)
Binding\Binder_XmlLiterals.vb (1)
848importedNamespaces.Add(New KeyValuePair(Of String, String)(prefix, [namespace]))
Symbols\NamedTypeSymbol.vb (2)
334Select New KeyValuePair(Of String, ImmutableArray(Of Symbol))(name, Me.GetMembers(name))) 377Select New KeyValuePair(Of String, ImmutableArray(Of Symbol))(name, Me.GetMembers(name)))
Symbols\ReducedExtensionMethodSymbol.vb (1)
195fixed.Add(New KeyValuePair(Of TypeParameterSymbol, TypeSymbol)(typeParametersToFixArray(i), fixWithArray(i)))
Symbols\TypeSubstitution.vb (5)
450pairs.Add(New KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)(param, arg)) 611pairs(i) = New KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)(typeParametersDefinitions(i), New TypeWithModifiers(alphaRenamedTypeParameters(i))) 680pairs(countOfMeaningfulPairs) = New KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)(typeParametersDefinitions(i), argument) 780pairs.Add(New KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)(oldPairs(i).Key, newValue)) 852pairs(pairIndex) = New KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)(typeParametersDefinitions(i), args(i))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (3)
Parser\ParseDirectives.vb (3)
1258New KeyValuePair(Of String, Object)("DEBUG", True), 1259New KeyValuePair(Of String, Object)("Ide", True), 1260New KeyValuePair(Of String, Object)("DeBuG", Nothing)})
Microsoft.CodeAnalysis.Workspaces (9)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (10)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
72copy[index++] = new KeyValuePair<K, V>(key,
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (12)
VisualStudioMSBuildWorkspaceTests.cs (12)
1853new KeyValuePair<string, object>("_MyType", "Windows"), 1854new KeyValuePair<string, object>("CONFIG", "Debug"), 1855new KeyValuePair<string, object>("DEBUG", -1), 1856new KeyValuePair<string, object>("F", false), 1857new KeyValuePair<string, object>("PLATFORM", "AnyCPU"), 1858new KeyValuePair<string, object>("T", -1), 1859new KeyValuePair<string, object>("TARGET", "library"), 1860new KeyValuePair<string, object>("TRACE", -1), 1861new KeyValuePair<string, object>("VBC_VER", 123), 1862new KeyValuePair<string, object>("X", 1), 1863new KeyValuePair<string, object>("Y", 2), 1864new KeyValuePair<string, object>("Z", true),
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SolutionTests\SolutionTests.cs (1)
1835: new VisualBasicParseOptions(preprocessorSymbols: [new("DEBUG", null)]);
SolutionTests\SourceGeneratorExecutionVersionMapTests.cs (2)
23var project1Kvp = new KeyValuePair<ProjectId, SourceGeneratorExecutionVersion>(projectId1, new(MajorVersion: 1, MinorVersion: 1)); 24var project2Kvp = new KeyValuePair<ProjectId, SourceGeneratorExecutionVersion>(projectId2, new(MajorVersion: 2, MinorVersion: 2));
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (1)
464result.Add(new KeyValuePair<string, object>(name, value));
Microsoft.Data.Analysis (1)
DataFrameRow.cs (1)
42return _dataFrame.Columns.Select(col => new KeyValuePair<string, object>(col.Name, col[_rowIndex]));
Microsoft.DotNet.Arcade.Sdk (2)
src\InstallDotNetCore.cs (1)
227items.Add(new KeyValuePair<string, string>(version.GetString(), architecture));
src\SaveItems.cs (1)
39metadataPairs = metadata.Keys.OfType<string>().Select(key => new KeyValuePair<string, string>(key, metadata[key] as string));
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
577yield return new KeyValuePair<NuGetFramework, Version>(fx, assemblyVersion);
Microsoft.DotNet.Helix.Client (2)
generated-code\HelixApi.cs (2)
416Add(new KeyValuePair<string, string>(key, str)); 421Add(new KeyValuePair<string, string>(key, value));
Microsoft.DotNet.NuGetRepack.Tests (1)
TestHelpers\DiffUtil.cs (1)
144yield return new KeyValuePair<int, int>(i, j);
Microsoft.DotNet.SignTool (1)
src\Configuration.cs (1)
226_filesToCopy.Add(new KeyValuePair<string, string>(existingSignInfo.FullPath, file.FullPath));
Microsoft.DotNet.XUnitAssert.Tests (45)
EqualityAssertsTests.cs (32)
1568 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42); 1569 var actual = new KeyValuePair<IEnumerable<string>, int>(new string[] { "Key1", "Key2" }, 42); 1578 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42); 1579 var actual = new KeyValuePair<IEnumerable<string>, int>(new string[] { "Key1", "Key3" }, 42); 1596 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" }); 1597 var actual = new KeyValuePair<string, IEnumerable<string>>("Key1", new string[] { "Value1a", "Value1b" }); 1606 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" }); 1607 var actual = new KeyValuePair<string, IEnumerable<string>>("Key1", new string[] { "Value1a", "Value2a" }); 1627 var expected = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 1628 var actual = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 1636 var expected = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 1637 var actual = new KeyValuePair<EquatableObject, int>(new() { Char = 'b' }, 42); 1657 var expected = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 1658 var actual = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 1666 var expected = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 1667 var actual = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'b' }); 3796 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42); 3797 var actual = new KeyValuePair<IEnumerable<string>, int>(new string[] { "Key1", "Key2" }, 42); 3814 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42); 3815 var actual = new KeyValuePair<IEnumerable<string>, int>(new string[] { "Key1", "Key3" }, 42); 3824 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" }); 3825 var actual = new KeyValuePair<string, IEnumerable<string>>("Key1", new string[] { "Value1a", "Value1b" }); 3842 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" }); 3843 var actual = new KeyValuePair<string, IEnumerable<string>>("Key1", new string[] { "Value1a", "Value2a" }); 3855 var expected = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 3856 var actual = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 3872 var expected = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 3873 var actual = new KeyValuePair<EquatableObject, int>(new() { Char = 'b' }, 42); 3885 var expected = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 3886 var actual = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 3902 var expected = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 3903 var actual = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'b' });
EquivalenceAssertsTests.cs (12)
1354 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 4 }); 1355 var actual = new KeyValuePair<int, int[]>(42, new[] { 9, 4, 1 }); 1363 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 4 }); 1364 var actual = new KeyValuePair<int, int[]>(41, new[] { 9, 4, 1 }); 1380 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 6 }); 1381 var actual = new KeyValuePair<int, int[]>(42, new[] { 9, 4, 1 }); 1400 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 4 }); 1401 var actual = new KeyValuePair<int, int[]>(42, new[] { 4, 1 }); 1409 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 4 }); 1410 var actual = new KeyValuePair<int, int[]>(41, new[] { 4, 1 }); 1426 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 6 }); 1427 var actual = new KeyValuePair<int, int[]>(42, new[] { 4, 1 });
Sdk\ArgumentFormatterTests.cs (1)
293 var kvp = new KeyValuePair<object, List<object>>(42, new() { 21.12M, "2600" });
Microsoft.DotNet.XUnitExtensions (11)
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (2)
103yield return new KeyValuePair<string, string>(XunitConstants.Category, category); 110yield return new KeyValuePair<string, string>(XunitConstants.Category, category);
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalClassDiscoverer.cs (1)
31yield return new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing);
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\OuterLoopTestsDiscoverer.cs (1)
28return new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.OuterLoop) };
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\PlatformSpecificDiscoverer.cs (1)
32new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing) };
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnCIDiscoverer.cs (1)
25yield return new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing);
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnCoreClrDiscoverer.cs (1)
54return new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing) };
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnMonoDiscoverer.cs (1)
30return new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing) };
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnPlatformDiscoverer.cs (1)
28return new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing) };
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnTargetFrameworkDiscoverer.cs (1)
30new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing) } :
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\TestCategoryDiscoverer.cs (1)
28yield return new KeyValuePair<string, string>("Category", ctorArgs[0].ToString());
Microsoft.DotNet.XUnitV3Extensions (11)
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\ConditionalClassAttribute.cs (1)
39return [new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing)];
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\OuterLoopAttribute.cs (1)
84return new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.OuterLoop) };
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\PlatformSpecificAttribute.cs (1)
37new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing) };
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnCIAttribute.cs (1)
31return [new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing)];
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnCoreClrAttribute.cs (1)
40return new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing) };
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnMonoAttribute.cs (1)
36return new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing) };
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnPlatformAttribute.cs (1)
34return new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing) };
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnTargetFrameworkAttribute.cs (1)
35new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.Failing) } :
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\TestCategoryAttribute.cs (1)
33return [new KeyValuePair<string, string>("Category", _category)];
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (2)
103yield return new KeyValuePair<string, string>(XunitConstants.Category, category); 110yield return new KeyValuePair<string, string>(XunitConstants.Category, category);
Microsoft.Extensions.AI (9)
ChatCompletion\FunctionInvokingChatClient.cs (4)
802new(OpenTelemetryConsts.GenAI.Operation.Name, "execute_tool"), 803new(OpenTelemetryConsts.GenAI.Tool.Call.Id, context.CallContent.CallId), 804new(OpenTelemetryConsts.GenAI.Tool.Name, context.Function.Name), 805new(OpenTelemetryConsts.GenAI.Tool.Description, context.Function.Description),
ChatCompletion\OpenTelemetryChatClient.cs (2)
518new(OpenTelemetryConsts.Event.Name, id.Name), 519new(OpenTelemetryConsts.GenAI.SystemName, _system),
Embeddings\OpenTelemetryEmbeddingGenerator.cs (3)
161new(OpenTelemetryConsts.GenAI.Operation.Name, OpenTelemetryConsts.GenAI.Embeddings), 162new(OpenTelemetryConsts.GenAI.Request.Model, modelId), 163new(OpenTelemetryConsts.GenAI.SystemName, _modelProvider),
Microsoft.Extensions.AI.Abstractions.Tests (10)
Functions\AIFunctionArgumentsTests.cs (6)
98new KeyValuePair<string, object?>("key1", "value1"), 99new KeyValuePair<string, object?>("key2", "value2"), 134new KeyValuePair<string, object?>("key1", "value1"), 135new KeyValuePair<string, object?>("key2", "value2"), 158args.Add(new KeyValuePair<string, object?>("key1", "value1")); 163args.Add(new KeyValuePair<string, object?>("key2", "value2"));
test\Shared\JsonSchemaExporter\TestTypes.cs (4)
819Value: new([new("one", 1), new("two", 2), new("three", 3)]), 1119public IEnumerator<KeyValuePair<string, int>> GetEnumerator() => Enumerable.Repeat(new KeyValuePair<string, int>(nameof(BaseValue), BaseValue), 1).GetEnumerator();
Microsoft.Extensions.AI.Tests (8)
ChatCompletion\OpenTelemetryChatClientTests.cs (8)
206log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.system.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 207log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.user.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 208log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.assistant.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 209log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.tool.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 210log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.assistant.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 211log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.user.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 212log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.choice"), ((IList<KeyValuePair<string, string?>>)log.State!)[0])); 216Assert.Equal(new KeyValuePair<string, string?>("gen_ai.system", "testservice"), ((IList<KeyValuePair<string, string?>>)log.State!)[1]);
Microsoft.Extensions.Compliance.Abstractions.Tests (6)
Classification\DataClassificationTypeConverterTests.cs (6)
36new KeyValuePair<string, string?>("Key:Example", "Example:Test"), 37new KeyValuePair<string, string?>("Key:Facts:Value", "Taxonomy:Value"), 38new KeyValuePair<string, string?>("Key:Facts:Data", "Custom:Data"), 39new KeyValuePair<string, string?>("Key:Facts:None", "None"), 40new KeyValuePair<string, string?>("Key:Facts:Unknown", "Unknown"), 41new KeyValuePair<string, string?>("Key:Facts:Invalid", "Invalid"),
Microsoft.Extensions.Configuration.Abstractions (1)
ConfigurationExtensions.cs (1)
65yield return new KeyValuePair<string, string?>(section.Path.Substring(prefixLength), section.Value);
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
ConfigurationProviderTestBase.cs (1)
362values.Add(new KeyValuePair<string, string>(sectionName + tuple.Key, tuple.Value));
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\CallSiteFactory.cs (1)
366callSitesByIndex.Add(new(index, callSite));
Microsoft.Extensions.Diagnostics.HealthChecks (3)
DefaultHealthCheckService.cs (1)
285_values.Add(new KeyValuePair<string, object>("HealthCheckName", name));
HealthCheckLogScope.cs (2)
22return new KeyValuePair<string, object>(nameof(HealthCheckName), HealthCheckName); 40yield return new KeyValuePair<string, object>(nameof(HealthCheckName), HealthCheckName);
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (3)
DefaultHealthCheckServiceTest.cs (3)
226kvp => Assert.Equal(kvp, new KeyValuePair<string, object>("name", "A"))); 233kvp => Assert.Equal(kvp, new KeyValuePair<string, object>("name", "B"))); 240kvp => Assert.Equal(kvp, new KeyValuePair<string, object>("name", "C")));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (34)
Windows\Disk\WindowsDiskMetrics.cs (7)
23private static readonly KeyValuePair<string, object?> _directionReadTag = new(DirectionKey, "read"); 24private static readonly KeyValuePair<string, object?> _directionWriteTag = new(DirectionKey, "write"); 143measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionWriteTag, new(DeviceKey, pair.Key) })); 152measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionReadTag, new(DeviceKey, pair.Key) })); 168measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionWriteTag, new(DeviceKey, pair.Key) })); 177measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionReadTag, new(DeviceKey, pair.Key) })); 192measurements.Add(new Measurement<double>(pair.Value, new TagList { new(DeviceKey, pair.Key) }));
Windows\Network\WindowsNetworkMetrics.cs (27)
26KeyValuePair<string, object?> tcpTag = new("network.transport", "tcp"); 45KeyValuePair<string, object?> tcpVersionFourTag = new(NetworkTypeKey, "ipv4"); 46KeyValuePair<string, object?> tcpVersionSixTag = new(NetworkTypeKey, "ipv6"); 52measurements.Add(new Measurement<long>(stateV4.ClosedCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "close") })); 53measurements.Add(new Measurement<long>(stateV4.ListenCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "listen") })); 54measurements.Add(new Measurement<long>(stateV4.SynSentCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "syn_sent") })); 55measurements.Add(new Measurement<long>(stateV4.SynRcvdCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "syn_recv") })); 56measurements.Add(new Measurement<long>(stateV4.EstabCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "established") })); 57measurements.Add(new Measurement<long>(stateV4.FinWait1Count, new TagList { tcpVersionFourTag, new(NetworkStateKey, "fin_wait_1") })); 58measurements.Add(new Measurement<long>(stateV4.FinWait2Count, new TagList { tcpVersionFourTag, new(NetworkStateKey, "fin_wait_2") })); 59measurements.Add(new Measurement<long>(stateV4.CloseWaitCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "close_wait") })); 60measurements.Add(new Measurement<long>(stateV4.ClosingCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "closing") })); 61measurements.Add(new Measurement<long>(stateV4.LastAckCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "last_ack") })); 62measurements.Add(new Measurement<long>(stateV4.TimeWaitCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "time_wait") })); 63measurements.Add(new Measurement<long>(stateV4.DeleteTcbCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "delete") })); 67measurements.Add(new Measurement<long>(stateV6.ClosedCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "close") })); 68measurements.Add(new Measurement<long>(stateV6.ListenCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "listen") })); 69measurements.Add(new Measurement<long>(stateV6.SynSentCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "syn_sent") })); 70measurements.Add(new Measurement<long>(stateV6.SynRcvdCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "syn_recv") })); 71measurements.Add(new Measurement<long>(stateV6.EstabCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "established") })); 72measurements.Add(new Measurement<long>(stateV6.FinWait1Count, new TagList { tcpVersionSixTag, new(NetworkStateKey, "fin_wait_1") })); 73measurements.Add(new Measurement<long>(stateV6.FinWait2Count, new TagList { tcpVersionSixTag, new(NetworkStateKey, "fin_wait_2") })); 74measurements.Add(new Measurement<long>(stateV6.CloseWaitCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "close_wait") })); 75measurements.Add(new Measurement<long>(stateV6.ClosingCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "closing") })); 76measurements.Add(new Measurement<long>(stateV6.LastAckCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "last_ack") })); 77measurements.Add(new Measurement<long>(stateV6.TimeWaitCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "time_wait") })); 78measurements.Add(new Measurement<long>(stateV6.DeleteTcbCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "delete") }));
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (8)
Windows\Disk\WindowsDiskMetricsTests.cs (8)
75var readTag = new KeyValuePair<string, object?>("disk.io.direction", "read"); 76var writeTag = new KeyValuePair<string, object?>("disk.io.direction", "write"); 77var deviceTagC = new KeyValuePair<string, object?>("system.device", "C:"); 78var deviceTagD = new KeyValuePair<string, object?>("system.device", "D:"); 149var readTag = new KeyValuePair<string, object?>("disk.io.direction", "read"); 150var writeTag = new KeyValuePair<string, object?>("disk.io.direction", "write"); 151var deviceTagC = new KeyValuePair<string, object?>("system.device", "C:"); 152var deviceTagD = new KeyValuePair<string, object?>("system.device", "D:");
Microsoft.Extensions.Diagnostics.Testing (2)
Logging\FakeLogger.cs (2)
149l.Add(new KeyValuePair<string, string?>(pair.Key, ConvertToString(pair))); 153l.Add(new KeyValuePair<string, string?>(pair.Key, null));
Microsoft.Extensions.Diagnostics.Testing.Tests (39)
Logging\FakeLoggerTests.cs (5)
78new("K0", "V0"), 79new("K1", "V1"), 80new("K2", null), 81new("K3", new[] { 0, 1, 2 }), 134new("K0", dt),
Metrics\MeasurementExtensionsTests.cs (34)
21counter.Add(1, new("A", "a"), new("B", "b")); 22counter.Add(2, new("A", "a"), new("B", "b")); 23counter.Add(3, new("X", "x"), new("Y", "y")); 46counter.Add(1, new("A", "a"), new("B", "b")); 47counter.Add(2, new("A", "a"), new("B", "b")); 48counter.Add(3, new("X", "x"), new("Y", "y")); 52var filtered = fullSnap.ContainsTags(new KeyValuePair<string, object?>("A", "a")).ToList(); 60filtered = fullSnap.ContainsTags(new KeyValuePair<string, object?>("A", "X")).ToList(); 71counter.Add(1, new("A", "a"), new("B", "b")); 72counter.Add(2, new("A", "a"), new("B", "b")); 73counter.Add(3, new("X", "x"), new("Y", "y")); 99counter.Add(1, new("A", "a"), new("B", "b")); 100counter.Add(2, new("A", "a"), new("B", "b")); 101counter.Add(3, new("X", "x"), new("Y", "y")); 105var filtered = fullSnap.MatchesTags(new KeyValuePair<string, object?>("A", "a"), new("B", "b")).ToList(); 113filtered = fullSnap.MatchesTags(new KeyValuePair<string, object?>("A", "a")).ToList(); 116filtered = fullSnap.MatchesTags(new KeyValuePair<string, object?>("A", "a"), new("B", "x")).ToList(); 119filtered = fullSnap.MatchesTags(new KeyValuePair<string, object?>("A", "a"), new("B", "b"), new("C", "c")).ToList();
Microsoft.Extensions.Hosting (6)
HostApplicationBuilder.cs (3)
149optionList.Add(new KeyValuePair<string, string?>(HostDefaults.ApplicationKey, settings.ApplicationName)); 154optionList.Add(new KeyValuePair<string, string?>(HostDefaults.EnvironmentKey, settings.EnvironmentName)); 159optionList.Add(new KeyValuePair<string, string?>(HostDefaults.ContentRootKey, settings.ContentRootPath));
HostingHostBuilderExtensions.cs (3)
42new KeyValuePair<string, string?>(HostDefaults.EnvironmentKey, environment) 62new KeyValuePair<string, string?>(HostDefaults.ContentRootKey, contentRoot) 232new KeyValuePair<string, string?>(HostDefaults.ContentRootKey, cwd),
Microsoft.Extensions.Hosting.Testing (2)
FakeHostingExtensions.cs (2)
182source.InitialData = source.InitialData!.Concat(new[] { new KeyValuePair<string, string?>(key, value) }); 186_ = builder.Add(new FakeConfigurationSource(new KeyValuePair<string, string?>(key, value)));
Microsoft.Extensions.Hosting.Testing.Tests (2)
FakeConfigurationSourceTests.cs (2)
15new KeyValuePair<string, string?>("testKey", "testValue"), 16new KeyValuePair<string, string?>("anotherTestKey", "anotherTestValue"));
Microsoft.Extensions.Http (2)
Logging\HttpHeadersLogValue.cs (2)
43values.Add(new KeyValuePair<string, object>(kvp.Key, kvp.Value)); 50values.Add(new KeyValuePair<string, object>(kvp.Key, kvp.Value));
Microsoft.Extensions.Http.Diagnostics (12)
Logging\Internal\HttpHeadersReader.cs (2)
89destination.Add(new(header.Key, _redactor.Redact(header.Value, classification))); 104destination.Add(new(header, _redactor.Redact(values, classification)));
Logging\Internal\Log.cs (7)
104loggerMessageState.TagArray[index++] = new(HttpClientLoggingTagNames.Method, record.Method); 105loggerMessageState.TagArray[index++] = new(HttpClientLoggingTagNames.Host, record.Host); 106loggerMessageState.TagArray[index++] = new(HttpClientLoggingTagNames.Path, record.Path); 107loggerMessageState.TagArray[index++] = new(HttpClientLoggingTagNames.Duration, record.Duration); 111loggerMessageState.TagArray[index++] = new(HttpClientLoggingTagNames.StatusCode, record.StatusCode.Value); 131loggerMessageState.TagArray[index++] = new(HttpClientLoggingTagNames.RequestBody, record.RequestBody); 136loggerMessageState.TagArray[index] = new(HttpClientLoggingTagNames.ResponseBody, record.ResponseBody);
Logging\Internal\LoggerMessageStateExtensions.cs (3)
32state.TagArray[index++] = new(key, items[i].Value); 51state.TagArray[index++] = new(key, items[i].Value); 67state.TagArray[index++] = new(parameters[i].Name, parameters[i].Value);
Microsoft.Extensions.Http.Diagnostics.Tests (34)
Logging\HttpClientLoggingExtensionsTest.cs (2)
157var paramToRedact = new KeyValuePair<string, DataClassification>("userId", FakeTaxonomy.PrivateData); 266var paramToRedact = new KeyValuePair<string, DataClassification>("userId", FakeTaxonomy.PrivateData);
Logging\HttpHeadersReaderTest.cs (11)
86new KeyValuePair<string, string>("Header1", Redacted), 87new KeyValuePair<string, string>("Header2", Redacted) 92new KeyValuePair<string, string>("Header3", "Value.3"), 93new KeyValuePair<string, string>("Header4", "Value.4"), 94new KeyValuePair<string, string>("hEaDeR7", Redacted) 149List<KeyValuePair<string, string>> expectedRequest = [new KeyValuePair<string, string>("Header1", "Value.1")]; 150List<KeyValuePair<string, string>> expectedResponse = [new KeyValuePair<string, string>("Header3", "Value.3")]; 153expectedRequest.Add(new KeyValuePair<string, string>("Content-Header1", "Content.1")); 154expectedRequest.Add(new KeyValuePair<string, string>("Content-Type", MediaTypeNames.Application.Soap)); 156expectedResponse.Add(new KeyValuePair<string, string>("Content-Header2", "Content.2")); 157expectedResponse.Add(new KeyValuePair<string, string>("Content-Length", "24"));
Logging\HttpRequestReaderTest.cs (15)
44var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 45var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 46var header3 = new KeyValuePair<string, string>("Header3", "Value3"); 170var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 171var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 241var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 242var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 318var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 319var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 375var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 376var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 446var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 447var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 513var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 514var header2 = new KeyValuePair<string, string>("Header2", "Value2");
Logging\Internal\TestEnricher.cs (2)
14internal readonly KeyValuePair<string, object?> KvpRequest = new("test key request", "test value"); 15internal readonly KeyValuePair<string, object?> KvpResponse = new("test key response", "test value");
Logging\LoggerMessageStateExtensionsTests.cs (2)
37List<KeyValuePair<string, string>> headers = [new(Header1, "v1"), new(Header2, "v2")];
Logging\LogRecordPoolingTest.cs (2)
20testObject.RequestHeaders!.Add(new KeyValuePair<string, string>("key1", "value1")); 21testObject.ResponseHeaders!.Add(new KeyValuePair<string, string>("key2", "value2"));
Microsoft.Extensions.Http.Resilience (1)
Resilience\Internal\HttpResilienceMetricsEnricher.cs (1)
21context.Tags.Add(new(HttpResilienceTagNames.ErrorType, ((int)response.StatusCode).ToInvariantString()));
Microsoft.Extensions.Http.Resilience.Tests (1)
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.Logging (6)
LoggerFactoryScopeProvider.cs (6)
145_items[count++] = new KeyValuePair<string, object?>("SpanId", activity.GetSpanId()); 150_items[count++] = new KeyValuePair<string, object?>("TraceId", activity.GetTraceId()); 155_items[count++] = new KeyValuePair<string, object?>("ParentId", activity.GetParentId()); 160_items[count++] = new KeyValuePair<string, object?>("TraceState", activity.TraceStateString); 165_items[count++] = new KeyValuePair<string, object?>("TraceFlags", activity.ActivityTraceFlags); 276public KeyValuePair<string, object?> Current => new KeyValuePair<string, object?>(_enumerator.Current.Key, _enumerator.Current.Value);
Microsoft.Extensions.Logging.Abstractions (33)
FormattedLogValues.cs (1)
71return new KeyValuePair<string, object?>("{OriginalFormat}", _originalMessage);
LoggerMessage.cs (28)
483return new KeyValuePair<string, object?>("{OriginalFormat}", _formatter.OriginalFormat); 524return new KeyValuePair<string, object?>(_formatter.ValueNames[0], _value0); 526return new KeyValuePair<string, object?>("{OriginalFormat}", _formatter.OriginalFormat); 574return new KeyValuePair<string, object?>(_formatter.ValueNames[0], _value0); 576return new KeyValuePair<string, object?>(_formatter.ValueNames[1], _value1); 578return new KeyValuePair<string, object?>("{OriginalFormat}", _formatter.OriginalFormat); 621return new KeyValuePair<string, object?>(_formatter.ValueNames[0], _value0); 623return new KeyValuePair<string, object?>(_formatter.ValueNames[1], _value1); 625return new KeyValuePair<string, object?>(_formatter.ValueNames[2], _value2); 627return new KeyValuePair<string, object?>("{OriginalFormat}", _formatter.OriginalFormat); 677return new KeyValuePair<string, object?>(_formatter.ValueNames[0], _value0); 679return new KeyValuePair<string, object?>(_formatter.ValueNames[1], _value1); 681return new KeyValuePair<string, object?>(_formatter.ValueNames[2], _value2); 683return new KeyValuePair<string, object?>(_formatter.ValueNames[3], _value3); 685return new KeyValuePair<string, object?>("{OriginalFormat}", _formatter.OriginalFormat); 739return new KeyValuePair<string, object?>(_formatter.ValueNames[0], _value0); 741return new KeyValuePair<string, object?>(_formatter.ValueNames[1], _value1); 743return new KeyValuePair<string, object?>(_formatter.ValueNames[2], _value2); 745return new KeyValuePair<string, object?>(_formatter.ValueNames[3], _value3); 747return new KeyValuePair<string, object?>(_formatter.ValueNames[4], _value4); 749return new KeyValuePair<string, object?>("{OriginalFormat}", _formatter.OriginalFormat); 805return new KeyValuePair<string, object?>(_formatter.ValueNames[0], _value0); 807return new KeyValuePair<string, object?>(_formatter.ValueNames[1], _value1); 809return new KeyValuePair<string, object?>(_formatter.ValueNames[2], _value2); 811return new KeyValuePair<string, object?>(_formatter.ValueNames[3], _value3); 813return new KeyValuePair<string, object?>(_formatter.ValueNames[4], _value4); 815return new KeyValuePair<string, object?>(_formatter.ValueNames[5], _value5); 817return new KeyValuePair<string, object?>("{OriginalFormat}", _formatter.OriginalFormat);
LogValuesFormatter.cs (4)
230return new KeyValuePair<string, object?>(_valueNames[index], values[index]); 233return new KeyValuePair<string, object?>("{OriginalFormat}", OriginalFormat); 241valueArray[index] = new KeyValuePair<string, object?>(_valueNames[index], values[index]); 244valueArray[valueArray.Length - 1] = new KeyValuePair<string, object?>("{OriginalFormat}", OriginalFormat);
Microsoft.Extensions.Logging.EventSource (5)
EventSourceLogger.cs (5)
139new KeyValuePair<string, string?>("TypeName", exceptionInfo.TypeName), 140new KeyValuePair<string, string?>("Message", exceptionInfo.Message), 141new KeyValuePair<string, string?>("HResult", exceptionInfo.HResult.ToString()), 142new KeyValuePair<string, string?>("VerboseMessage", exceptionInfo.VerboseMessage), 248arguments[i] = new KeyValuePair<string, string?>(keyValuePair.Key, keyValuePair.Value?.ToString());
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (4)
DependencyInjectionExtensionsTests.cs (4)
29new KeyValuePair<string, string?>($"My:Pools:{typeof(TestClass).FullName!}", "twenty!"), 30new KeyValuePair<string, string?>($"My:Pools:{typeof(TestDependency).FullName!}", "4096"), 47new KeyValuePair<string, string?>($"My:Pools:{typeof(TestClass).FullName!}", "2048"), 48new KeyValuePair<string, string?>($"My:Pools:{typeof(TestDependency).FullName!}", "4096"),
Microsoft.Extensions.Resilience (3)
Resilience\Internal\ResilienceMetricsEnricher.cs (3)
32context.Tags.Add(new(ResilienceTagNames.ErrorType, _exceptionSummarizer.Summarize(e).Description)); 37context.Tags.Add(new(ResilienceTagNames.RequestName, requestMetadata.RequestName)); 38context.Tags.Add(new(ResilienceTagNames.DependencyName, requestMetadata.DependencyName));
Microsoft.Extensions.SecretManager.Tools.Tests (10)
SecretManagerTests.cs (10)
90new KeyValuePair<string, string>("key1", Guid.NewGuid().ToString()), 91new KeyValuePair<string, string>("Facebook:AppId", Guid.NewGuid().ToString()), 92new KeyValuePair<string, string>(@"key-@\/.~123!#$%^&*())-+==", @"key-@\/.~123!#$%^&*())-+=="), 93new KeyValuePair<string, string>("key2", string.Empty), 94new KeyValuePair<string, string>("-oneDashedKey", "-oneDashedValue"), 95new KeyValuePair<string, string>("--twoDashedKey", "--twoDashedValue") 285new KeyValuePair<string, string>("key1", Guid.NewGuid().ToString()), 286new KeyValuePair<string, string>("Facebook:AppId", Guid.NewGuid().ToString()), 287new KeyValuePair<string, string>(@"key-@\/.~123!#$%^&*())-+==", @"key-@\/.~123!#$%^&*())-+=="), 288new KeyValuePair<string, string>("key2", string.Empty)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
tests\Shared\Logging\LogValuesAssert.cs (1)
21Contains(new[] { new KeyValuePair<string, object>(key, value) }, actualValues);
Microsoft.Extensions.Telemetry (14)
Enrichment\ApplicationLogEnricher.cs (4)
40l.Add(new(ApplicationEnricherTags.ApplicationName, applicationMetadata.ApplicationName)); 45l.Add(new(ApplicationEnricherTags.EnvironmentName, applicationMetadata.EnvironmentName)); 50l.Add(new(ApplicationEnricherTags.DeploymentRing, applicationMetadata.DeploymentRing)); 55l.Add(new(ApplicationEnricherTags.BuildVersion, applicationMetadata.BuildVersion));
Logging\ExtendedLogger.cs (2)
242msgState.RedactedTagArray[i] = new(cp.Name, jr); 246msgState.RedactedTagArray[i] = new(cp.Name, null);
Logging\ExtendedLogger.EnrichmentTagCollector.cs (1)
16public void Add(string key, object value) => extraTags.Add(new KeyValuePair<string, object?>(key, value));
Logging\Import\LoggerFactoryScopeProvider.cs (6)
161_items[count++] = new KeyValuePair<string, object?>("SpanId", activity.GetSpanId()); 166_items[count++] = new KeyValuePair<string, object?>("TraceId", activity.GetTraceId()); 171_items[count++] = new KeyValuePair<string, object?>("ParentId", activity.GetParentId()); 176_items[count++] = new KeyValuePair<string, object?>("TraceState", activity.TraceStateString); 181_items[count++] = new KeyValuePair<string, object?>("TraceFlags", activity.ActivityTraceFlags); 294new KeyValuePair<string, object?>(_enumerator.Current.Key, _enumerator.Current.Value);
src\Shared\LogBuffering\SerializedLogRecordFactory.cs (1)
40serializedAttributes.Add(new KeyValuePair<string, object?>(key, value));
Microsoft.Extensions.Telemetry.Abstractions (1)
Logging\LoggerMessageState.cs (1)
87TagArray[index] = new(name, value);
Microsoft.Extensions.Telemetry.Abstractions.Tests (7)
Logging\LoggerMessageHelperTests.cs (2)
43new(null, "Un"), 44new("Two", null),
Logging\LoggerMessageStateTests.cs (5)
24lms.TagArray[index] = new(PropName, Value); 35lms.TagArray[index] = new(PropName, Value); 56lms.TagArray[index] = new(PropName + "X", Value); 140lms.TagArray[index] = new(PropName, Value); 150lms.TagArray[index] = new(PropName, Value);
Microsoft.Extensions.Telemetry.PerformanceTests (12)
ModernCodeGen.cs (12)
17state.TagArray[6] = new("connectionId", connectionId); 18state.TagArray[5] = new("type", type); 19state.TagArray[4] = new("streamId", streamId); 20state.TagArray[3] = new("length", length); 21state.TagArray[2] = new("flags", flags); 22state.TagArray[1] = new("other", other); 23state.TagArray[0] = new("{OriginalFormat}", "Connection id '{connectionId}' received {type} frame for stream ID {streamId} with length {length} and flags {flags} and {other}"); 52state.TagArray[4] = new("start", start); 53state.TagArray[3] = new("end", end); 54state.TagArray[2] = new("options", options); 55state.TagArray[1] = new("guid", guid.ToString()); 56state.TagArray[0] = new("{OriginalFormat}", "Range [{start}..{end}], options {options}, guid {guid}");
Microsoft.Extensions.Telemetry.Tests (32)
Buffering\GlobalBufferLoggerBuilderExtensionsTests.cs (2)
48new ("Program.MyLogger", LogLevel.Information, 1, "number one", [new("region", "westus2"), new ("priority", 1)]),
Buffering\LogBufferingFilterRuleTests.cs (8)
29new LogBufferingFilterRule("Program.MyLogger", LogLevel.Warning, 1, attributes: [new("region2", "westus2")]), // inapplicable key 30new LogBufferingFilterRule("Program.MyLogger", LogLevel.Warning, 1, attributes:[new("region", "westus3")]), // inapplicable value 31new LogBufferingFilterRule("Program.MyLogger", LogLevel.Warning, 1, attributes:[new("region", "westus2")]), // the best rule - [11] 67new LogBufferingFilterRule("Program.MyLogger", LogLevel.Warning, 1, attributes:[new("region", "westus2")]), // the best rule 68new LogBufferingFilterRule("Program.MyLogger*", LogLevel.Warning, 1, attributes:[new("region", "westus2")]), // same as the best, but last and should be selected 85new LogBufferingFilterRule("Program.MyLogger", LogLevel.Warning, 1, attributes:[new("priority", 1)]), 86new LogBufferingFilterRule("Program.MyLogger", LogLevel.Warning, 1, attributes:[new("priority", 2)]), // the best rule 87new LogBufferingFilterRule("Program.MyLogger", LogLevel.Warning, 1, attributes:[new("priority", 3)]),
Logging\ExtendedLoggerTests.cs (21)
34new KeyValuePair<string, object?>("EK1", "EV1"), 40new KeyValuePair<string, object?>("SEK1", "SEV1"), 67lms.TagArray[index] = new("PK2", "PV2"); 153lms.TagArray[index] = new("PK2", "PV2"); 169new KeyValuePair<string, object?>("EK1", "EV1"), 170new KeyValuePair<string, object?>("EK2", "EV2"), 189lms.TagArray[index] = new("PK2", "PV2"); 224new KeyValuePair<string, object?>("EK1", "EV1"), 230new KeyValuePair<string, object?>("SEK1", "SEV1"), 312var a = new[] { new KeyValuePair<string, object?>("K1", "V1") }; 807new KeyValuePair<string, object?>("K1", "V1"), 811new KeyValuePair<string, object?>("K2", "V2"), 834state.TagArray[index] = new("K3", "V3"); 835state.TagArray[index + 1] = new("{OriginalFormat}", "V4"); 863new KeyValuePair<string, object?>("K1", "V1"), 867new KeyValuePair<string, object?>("K2", "V2"), 887new("K3", "V3"), 888new("{OriginalFormat}", "V4") 897new("K3", "V3"), 898new("{OriginalFormat}", "V4") 1205a[i++] = new(kvp.Key, (string)kvp.Value!);
Sampling\SamplingLoggerBuilderExtensionsTests.cs (1)
196new KeyValuePair<string, string?>("RandomProbabilisticSampler:Rules:0:Probability", invalidProbabilityValue.ToString(CultureInfo.InvariantCulture))
Microsoft.Extensions.Validation.GeneratorTests (1)
ValidationsGeneratorTestBase.cs (1)
43.WithFeatures([new KeyValuePair<string, string>("InterceptorsNamespaces", "Microsoft.Extensions.Validation.Generated")]);
Microsoft.Gen.Logging.Generated.Tests (23)
LogMethodTests.cs (23)
213AssertLastState(collector, new("p0", "0"), new("p1", "1")); 636new KeyValuePair<string, string?>("A1", "0"), 637new KeyValuePair<string, string?>("{OriginalFormat}", "M0 {A1}")); 644new KeyValuePair<string, string?>("A1", "42"), 645new KeyValuePair<string, string?>("{OriginalFormat}", "M1 {A1} {A1}")); 652new KeyValuePair<string, string?>("A1", "42"), 653new KeyValuePair<string, string?>("a2", "43"), 654new KeyValuePair<string, string?>("A3", "44"), 655new KeyValuePair<string, string?>("a4", "45"), 656new KeyValuePair<string, string?>("A5", "46"), 657new KeyValuePair<string, string?>("a6", "47"), 658new KeyValuePair<string, string?>("A7", "48"), 659new KeyValuePair<string, string?>("{OriginalFormat}", "M2 {A1} {a2} {A3} {a4} {A5} {a6} {A7}")); 666new KeyValuePair<string, string?>("A1", "42"), 667new KeyValuePair<string, string?>("a2", "43"), 668new KeyValuePair<string, string?>("{OriginalFormat}", "M3 {a2} {A1}")); 682new KeyValuePair<string, string?>("{OriginalFormat}", "M0")); 696new KeyValuePair<string, string?>("{OriginalFormat}", "M0")); 952AssertLastState(collector, new("p0", "0"), new("p1", "1"), new("p2", "2")); 976var kvp = new KeyValuePair<string, string?>($"p{i}", i.ToString());
Microsoft.Gen.Metrics.Generated.Tests (4)
MetricTests.cs (2)
99Assert.Equal(new KeyValuePair<string, object?>("s1", "val_1"), tag); 127Assert.Equal(new KeyValuePair<string, object?>("s1", "val1"), tag);
MetricTests.Ext.cs (2)
82Assert.Equal(new KeyValuePair<string, object?>("s1", "val_1"), tag); 109Assert.Equal(new KeyValuePair<string, object?>("s1", "val1"), tag);
Microsoft.Maui (2)
Debugger\DebuggerDisplayHelpers.cs (1)
113 static KeyValuePair<string, object?> Create(string key, object? value) => new KeyValuePair<string, object?>(key, value);
HotReload\HotReloadHelper.cs (1)
167 var views = HandlerService!.Where(x => x.ImplementationType == t).Select(x => new KeyValuePair<Type, Type>(x.ServiceType, x.ImplementationType!)).ToList();
Microsoft.Maui.Controls (9)
Application\Application.cs (1)
264 OnParentResourcesChanged([new KeyValuePair<string, object>(AppThemeBinding.AppThemeResource, newTheme)]);
OrderedDictionary.cs (3)
136 array[arrayIndex++] = new KeyValuePair<TKey, TValue>(key, _dict[key]); 247 yield return new KeyValuePair<TKey, TValue>(key, this[key]); 262 get { return new KeyValuePair<TKey, TValue>(_keyOrder[index], this[index]); }
PlatformBindingHelpers.cs (2)
114 proxy.BindingsBackpack.Add(new KeyValuePair<BindableProperty, BindingBase>(targetProperty, binding)); 125 proxy.ValuesBackpack.Add(new KeyValuePair<BindableProperty, object>(targetProperty, value));
ResourceDictionary.cs (1)
374 OnValuesChanged(new KeyValuePair<string, object>(key, value));
SetterSpecificityList.cs (1)
106 return index < 0 ? default : new KeyValuePair<SetterSpecificity, T>(_keys[index], _values[index]);
VisualElement\VisualElement.cs (1)
1562 changedResources.Add(new KeyValuePair<string, object>(value.Key, mergedClassStyles));
Microsoft.Maui.Controls.Xaml (2)
XamlParser.cs (2)
216 xmlns.Add(new KeyValuePair<string, string>(reader.LocalName, reader.Value)); 234 attributes.Add(new KeyValuePair<XmlName, INode>(propertyName, propertyNode));
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (1)
src\Graphics\src\Graphics\Platforms\Windows\AsyncPump.cs (1)
103 _mQueue.Add(new KeyValuePair<SendOrPostCallback, object>(d, state));
Microsoft.ML.AutoML (2)
SweepableEstimator\SweepableEstimatorPipeline.cs (1)
53var kvPairs = _estimators.Select((e, i) => new KeyValuePair<string, SearchSpace.SearchSpace>(i.ToString(), e.SearchSpace));
SweepableEstimator\SweepablePipeline.cs (1)
52var kvPairs = _estimators.Select((e, i) => new KeyValuePair<string, Parameter>(i.ToString(), e.Value.Parameter));
Microsoft.ML.AutoML.Interactive (4)
NotebookMonitor.cs (4)
51new KeyValuePair<string, object>("Trial",result.TrialSettings.TrialId), 52new KeyValuePair<string, object>("Metric", result.Metric), 53new KeyValuePair<string, object>("Trainer",SweepablePipeline.ToString(result.TrialSettings.Parameter).Replace("Unknown=>","")), 54new KeyValuePair<string, object>("Parameters",activeRunParam),
Microsoft.ML.AutoML.Tests (1)
UserInputValidationTests.cs (1)
359new List<KeyValuePair<float, bool>>() { new KeyValuePair<float, bool>(1, true) });
Microsoft.ML.Core (13)
CommandLine\CmdParser.cs (4)
836yield return new KeyValuePair<string, string>(key, val); 1584comList.Add(new KeyValuePair<string, IComponentFactory>(tag, factory)); 1705val.Values.Add(new KeyValuePair<string, object>(tag, newValue)); 1712Utils.Add(ref val.Values, new KeyValuePair<string, object>("", newValue));
Data\AnnotationUtils.cs (1)
199return new KeyValuePair<string, DataViewType>(kind, type);
Data\Repository.cs (1)
344_closed.Enqueue(new KeyValuePair<string, Stream>(ent.Path, ent.Stream));
Data\RoleMappedSchema.cs (5)
118=> new KeyValuePair<ColumnRole, string>(this, name); 122=> new KeyValuePair<ColumnRole, string>(role, name); 267yield return new KeyValuePair<ColumnRole, DataViewSchema.Column>(roleAndList.Key, info); 279yield return new KeyValuePair<ColumnRole, string>(roleAndList.Key, info.Name); 292yield return new KeyValuePair<ColumnRole, string>(role, info.Name);
Utilities\LruCache.cs (1)
65var node = _lru.AddFirst(new KeyValuePair<TKey, TValue>(key, value));
Utilities\ReservoirSampler.cs (1)
196var tmp = _counts.Select((count, i) => new KeyValuePair<int, int>(count, i)).First(kvp => kvp.Key == 0);
Microsoft.ML.Data (34)
DataDebuggerPreview.cs (1)
76rowInfo.Values[col] = new KeyValuePair<string, object>(column.Name, value);
DataLoadSave\Binary\BinaryLoader.cs (2)
2164var cols = loader._aliveColumns.Select(t => new KeyValuePair<bool, TableOfContentsEntry>(true, t)) 2165.Concat(loader._deadColumns.Select(t => new KeyValuePair<bool, TableOfContentsEntry>(false, t)))
DataLoadSave\LegacyCompositeDataLoader.cs (3)
141.Select(x => new KeyValuePair<string, string>(x.Key, GetTagData(x.Value))) 285var tagData = new[] { new KeyValuePair<string, string>(tag, creationArgs) }; 486tagData.Add(new KeyValuePair<string, string>(tag, argsString));
DataView\Transposer.cs (1)
610heap.Add(new KeyValuePair<int, int>(rbuff.IsDense ? 0 : rbuff.GetIndices()[0], r));
Deprecated\Instances\HeaderSchema.cs (2)
347yield return new KeyValuePair<int, string>(i, _names[i]); 479yield return new KeyValuePair<int, string>(_indices[i], _names[i]);
Deprecated\Vector\VectorUtils.cs (2)
93bottomHeap.Add(new KeyValuePair<int, float>(idx, value)); 106topHeap.Add(new KeyValuePair<int, float>(idx, value));
Evaluators\EvaluatorUtils.cs (2)
343yield return new KeyValuePair<string, double>(schema[i].Name, metricVal); 366yield return new KeyValuePair<string, double>(
Model\Pfa\BoundPfaContext.cs (2)
215vars[i] = new KeyValuePair<string, JToken>(names[i], vars[i].Value); 225return DeclareVar(new KeyValuePair<string, JToken>(name, value))[0];
Model\Pfa\PfaContext.cs (1)
150return new KeyValuePair<string, JToken>(varName, JToken.Parse(token));
Scorers\PredictedLabelScorerBase.cs (1)
192yield return new KeyValuePair<string, DataViewType>(sch[i].Name, sch[i].Type);
Scorers\RowToRowScorerBase.cs (1)
441foreach (var pair in Mapper.OutputSchema[iinfo - DerivedColumnCount].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type)))
Transforms\ColumnBindingsBase.cs (1)
516return Input[index].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type));
Transforms\ColumnConcatenatingTransformer.cs (5)
89taggedColumn.Source = res.Source.Select(s => new KeyValuePair<string, string>(null, s)).ToArray(); 812return new KeyValuePair<string, JToken>(outName, null); 820return new KeyValuePair<string, JToken>(outName, null); 827return new KeyValuePair<string, JToken>(outName, null); 853return new KeyValuePair<string, JToken>(outName, result);
Transforms\Hashing.cs (2)
1731Collector.Add(hashValues[i], new KeyValuePair<int, T>(i, valueValues[i])); 1737Collector.Add(hashValues[i], new KeyValuePair<int, T>(hashIndices[i], valueValues[i]));
Transforms\KeyToValue.cs (1)
206toDeclare.Add(new KeyValuePair<string, JToken>(info.outputColumnName, result));
Transforms\KeyToVector.cs (1)
654toDeclare.Add(new KeyValuePair<string, JToken>(info.Name, result));
Transforms\MetadataDispatcher.cs (2)
226yield return new KeyValuePair<string, DataViewType>(g.Kind, g.Type); 236foreach (var kvp in info.SchemaSrc[info.IndexSrc].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type)))
Transforms\Normalizer.cs (1)
807toDeclare.Add(new KeyValuePair<string, JToken>(info.Name, result));
Transforms\TransformBase.cs (1)
597toDeclare.Add(new KeyValuePair<string, JToken>(info.Name, result));
Transforms\ValueToKeyMappingTransformer.cs (1)
947toDeclare.Add(new KeyValuePair<string, JToken>(info.Name, result));
Utilities\ModelFileUtils.cs (1)
316list.Add(new KeyValuePair<string, string>(roleStr, colStr));
Microsoft.ML.DataView (6)
SchemaDebuggerProxy.cs (1)
46result.Add(new KeyValuePair<string, object>(name, value));
VBuffer.cs (5)
480yield return new KeyValuePair<int, T>(i, values[i]); 485yield return new KeyValuePair<int, T>(indices[i], values[i]); 495yield return new KeyValuePair<int, T>(slotCur, default(T)); 497yield return new KeyValuePair<int, T>(slotCur, values[i]); 501yield return new KeyValuePair<int, T>(slotCur, default(T));
Microsoft.ML.Ensemble (2)
PipelineEnsemble.cs (2)
744list.Add(new KeyValuePair<string, object>(key, listCur)); 749list.Add(new KeyValuePair<string, object>(key, sb.ToString()));
Microsoft.ML.EntryPoints (4)
FeatureCombiner.cs (2)
176concatNames.Add(new KeyValuePair<string, string>(col.Name, colName)); 187concatNames.Add(new KeyValuePair<string, string>(col.Name, colName));
JsonUtils\JsonManifestUtils.cs (2)
273inputs.Add(new KeyValuePair<Double, JObject>(inputAttr.SortOrder, jo)); 302outputs.Add(new KeyValuePair<Double, JObject>(outputAttr.SortOrder, jo));
Microsoft.ML.FastTree (12)
FastTree.cs (11)
1017result.Add(new KeyValuePair<int, int>(indices[i], ge)); 2406_sparse.Add(new KeyValuePair<int, double>(index, value)); 2421_sparse.Add(new KeyValuePair<int, double>(i, _dense[i])); 2579yield return new KeyValuePair<int, int>(kvp.Key, binned); 2590yield return new KeyValuePair<int, int>(last, zeroBin); 2593yield return new KeyValuePair<int, int>(kvp.Key, binned); 2596yield return new KeyValuePair<int, int>(last, zeroBin); 2607yield return new KeyValuePair<int, int>(i, binned); 2612yield return new KeyValuePair<int, int>(i, zeroBin); 3160yield return new KeyValuePair<string, double>(name, Math.Sqrt(pair.Value) * normFactor); 3171results.Add(new KeyValuePair<string, object>(pair.Key, pair.Value));
Training\EnsembleCompression\LassoBasedEnsembleCompressor.cs (1)
98labelFreqList.Add(new KeyValuePair<short, int>(i, perLabelDocCount[i]));
Microsoft.ML.Recommender (2)
MatrixFactorizationPredictor.cs (2)
472roles.Add(new KeyValuePair<RoleMappedSchema.ColumnRole, string>(RecommenderUtils.MatrixColumnIndexKind, MatrixColumnIndexColumnName)); 473roles.Add(new KeyValuePair<RoleMappedSchema.ColumnRole, string>(RecommenderUtils.MatrixRowIndexKind, MatrixRowIndexColumnName));
Microsoft.ML.ResultProcessor (5)
ResultProcessor.cs (5)
968return new KeyValuePair<int, Dictionary<string, float>>(-1, null); 974return new KeyValuePair<int, Dictionary<string, float>>(-1, null); 1000return new KeyValuePair<int, Dictionary<string, float>>(foldIdx, valuesDict); 1072srcFiles.Add(new KeyValuePair<string, string>(null, src)); 1078srcFiles.Add(new KeyValuePair<string, string>(taggedPattern.Key, src));
Microsoft.ML.StandardTrainers (13)
Standard\LinearPredictorUtils.cs (3)
214var list = new List<KeyValuePair<string, Single>>() { new KeyValuePair<string, Single>("(Bias)", bias) }; 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 (2)
842results.Add(new KeyValuePair<string, object>( 859results.Add(new KeyValuePair<string, object>(
Standard\ModelStatistics.cs (6)
175resultCollection.Add(new KeyValuePair<string, object>("Count of training examples", TrainingExampleCount)); 176resultCollection.Add(new KeyValuePair<string, object>("Residual Deviance", Deviance)); 177resultCollection.Add(new KeyValuePair<string, object>("Null Deviance", NullDeviance)); 178resultCollection.Add(new KeyValuePair<string, object>("AIC", 2 * ParametersCount + Deviance)); 543resultCollection.Add(new KeyValuePair<string, object>( 551resultCollection.Add(new KeyValuePair<string, object>(
Standard\MulticlassClassification\OneVersusAllTrainer.cs (1)
213roles[0] = new KeyValuePair<CR, string>(new CR(DefaultColumnNames.Label), LabelColumn.Name);
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (1)
191roles[0] = new KeyValuePair<CR, string>(new CR(DefaultColumnNames.Label), LabelColumn.Name);
Microsoft.ML.Sweeper (5)
Algorithms\NelderMead.cs (5)
166_pendingSweeps.Add(new KeyValuePair<ParameterSet, float[]>(FloatArrayAsParameterSet(nextPoint), nextPoint)); 216_pendingSweeps.Add(new KeyValuePair<ParameterSet, float[]>(FloatArrayAsParameterSet(nextPoint), nextPoint)); 370result.Add(new KeyValuePair<IRunResult, float[]>(run, sweep.Value)); 410_pendingSweeps.Add(new KeyValuePair<ParameterSet, float[]>(newParameterSet, newPoint)); 412_pendingSweepsNotSubmitted.Enqueue(new KeyValuePair<ParameterSet, float[]>(FloatArrayAsParameterSet(newPoint), newPoint));
Microsoft.ML.Tests (42)
Transformers\ValueMappingTests.cs (42)
140new KeyValuePair<string, string>("foo", "a"), 141new KeyValuePair<string, string>("bar", "b"), 142new KeyValuePair<string, string>("test", "c"), 143new KeyValuePair<string, string>("wahoo", "d")}; 365new KeyValuePair<string,int>("foo", 1), 366new KeyValuePair<string,int>("bar", 2), 367new KeyValuePair<string,int>("test", 3), 368new KeyValuePair<string,int>("wahoo", 4)}; 397new KeyValuePair<string, string>("foo", "t"), 398new KeyValuePair<string, string>("bar", "s"), 399new KeyValuePair<string, string>("test", "u"), 400new KeyValuePair<string, string>("wahoo", "v") }; 431new KeyValuePair<string, uint>("foo", 51), 432new KeyValuePair<string, uint>("bar", 25), 433new KeyValuePair<string, uint>("test", 42), 434new KeyValuePair<string, uint>("wahoo", 61)}; 472new KeyValuePair<string, ulong>("foo", 51), 473new KeyValuePair<string, ulong>("bar", Int32.MaxValue + 1L), 474new KeyValuePair<string, ulong>("test", 42), 475new KeyValuePair<string, ulong>("wahoo", 61)}; 513new KeyValuePair<string, string>("foo", "foo1"), 514new KeyValuePair<string, string>("bar", "foo2"), 515new KeyValuePair<string, string>("test", "foo1"), 516new KeyValuePair<string, string>("wahoo", "foo3")}; 553new KeyValuePair<string, string>("foo", "foo1"), 554new KeyValuePair<string, string>("bar", "foo2"), 555new KeyValuePair<string, string>("test", "foo1"), 556new KeyValuePair<string, string>("wahoo", "foo3")}; 595new KeyValuePair<string, int>("foo", 1), 596new KeyValuePair<string, int>("bar", 2), 597new KeyValuePair<string, int>("test", 3), 598new KeyValuePair<string, int>("wahoo", 4)}; 614new KeyValuePair<string,int[]>("foo", new int[] {2, 3, 4 }), 615new KeyValuePair<string,int[]>("bar", new int[] {100, 200 }), 616new KeyValuePair<string,int[]>("test", new int[] {400, 500, 600, 700 }), 634new KeyValuePair<ReadOnlyMemory<char>,int>("foo".AsMemory(), 1), 635new KeyValuePair<ReadOnlyMemory<char>,int>("bar".AsMemory(), 2), 636new KeyValuePair<ReadOnlyMemory<char>,int>("test".AsMemory(), 3), 637new KeyValuePair<ReadOnlyMemory<char>,int>("wahoo".AsMemory(), 4) 688new KeyValuePair<string,int>("foo", 2), 689new KeyValuePair<string,int>("bar", 43), 690new KeyValuePair<string,int>("test", 56)};
Microsoft.ML.TimeSeries (1)
RootCauseAnalyzer.cs (1)
130return new Dictionary<string, object>(keyList.Select(dim => new KeyValuePair<string, object>(dim, dimension[dim])).ToDictionary(kvp => kvp.Key, kvp => kvp.Value));
Microsoft.ML.Tokenizers (2)
Utils\LruCache.cs (2)
103cached.Value = new KeyValuePair<string, TValue>(key, value); 116var node = new LinkedListNode<KeyValuePair<string, TValue>>(new KeyValuePair<string, TValue>(key, value));
Microsoft.ML.Transforms (13)
Text\LdaSingleBox.cs (8)
238topicRet.Add(new KeyValuePair<int, float>(currentTopic, (float)_alpha)); 241topicRet.Add(new KeyValuePair<int, float>(_topics[i], _probabilities[i] + (float)_alpha)); 246topicRet.Add(new KeyValuePair<int, float>(_topics[i], (float)_probabilities[i])); 254topicRet.Add(new KeyValuePair<int, float>(currentTopic, (float)_alpha)); 288topicRet.Add(new KeyValuePair<int, float>(pTopic[i], (float)pProb[i])); 321topicRet.Add(new KeyValuePair<int, float>(pTopic[i], (float)pProb[i])); 342wordTopicVector[i] = new KeyValuePair<int, int>(_topics[i], _probabilities[i]); 353topicSummary[i] = new KeyValuePair<int, float>(_summaryTerm[i], _summaryTermProb[i]);
Text\TextFeaturizingEstimator.cs (4)
590srcTaggedCols.Add(new KeyValuePair<string, string>("Char", charFeatureCol)); 591srcTaggedCols.Add(new KeyValuePair<string, string>("Word", wordFeatureCol)); 600srcTaggedCols.Add(new KeyValuePair<string, string>(charFeatureCol, charFeatureCol)); 602srcTaggedCols.Add(new KeyValuePair<string, string>(wordFeatureCol, wordFeatureCol));
Text\WordTokenizing.cs (1)
356toDeclare.Add(new KeyValuePair<string, JToken>(info.Name, result));
Microsoft.VisualStudio.LanguageServices (1)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
72copy[index++] = new KeyValuePair<K, V>(key,
MSBuild (8)
LogMessagePacketBase.cs (1)
367return new KeyValuePair<int, BuildEventArgs>(_sinkId, _buildEvent);
OutOfProcTaskHostNode.cs (5)
1158s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(null, oldValue); 1164s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue); 1175s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, null); 1181s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue); 1207LogMessagePacket logMessage = new LogMessagePacket(new KeyValuePair<int, BuildEventArgs>(_currentConfiguration.NodeId, e));
TaskParameter.cs (2)
1012var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 1029var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value));
MSBuildTaskHost (9)
LogMessagePacketBase.cs (1)
367return new KeyValuePair<int, BuildEventArgs>(_sinkId, _buildEvent);
NativeMethods.cs (1)
1475myChildren.Add(new KeyValuePair<int, SafeProcessHandle>(possibleChildProcess.Id, childHandle));
OutOfProcTaskHostNode.cs (5)
1158s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(null, oldValue); 1164s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue); 1175s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, null); 1181s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue); 1207LogMessagePacket logMessage = new LogMessagePacket(new KeyValuePair<int, BuildEventArgs>(_currentConfiguration.NodeId, e));
TaskParameter.cs (2)
1012var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 1029var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value));
OutputCachingSample (1)
Startup.cs (1)
46app.MapGet("/vary", Gravatar.WriteGravatar).CacheOutput(c => c.VaryByValue((context) => new KeyValuePair<string, string>("time", (DateTime.Now.Second % 2).ToString(CultureInfo.InvariantCulture))));
PresentationCore (5)
System\Windows\Media\CharacterMetricsDictionary.cs (3)
141array[k++] = new KeyValuePair<int, CharacterMetrics>( 567return new KeyValuePair<int, CharacterMetrics>(_unicodeScalar, _value); 574return new KeyValuePair<int, CharacterMetrics>(_unicodeScalar, _value);
System\Windows\Media\GlyphTypeface.cs (2)
1824array[arrayIndex + i] = new KeyValuePair<ushort, double>(i, this[i]); 1849yield return new KeyValuePair<ushort, double>(i, this[i]);
PresentationFramework (12)
MS\Internal\Helper.cs (1)
782KeyValuePair<int, object> keyValue = new KeyValuePair<int, object>(dpIndex, value);
MS\Internal\WeakDictionary.cs (1)
339yield return new KeyValuePair<TKey, TValue>(key, (TValue)_hashTable[obj]);
System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (1)
620_list.Add(new KeyValuePair<object, T>(item, value));
System\Windows\Shell\WindowChromeWorker.cs (9)
62new HANDLE_MESSAGE(WM.SETTEXT, _HandleSetTextOrIcon), 63new HANDLE_MESSAGE(WM.SETICON, _HandleSetTextOrIcon), 64new HANDLE_MESSAGE(WM.NCACTIVATE, _HandleNCActivate), 65new HANDLE_MESSAGE(WM.NCCALCSIZE, _HandleNCCalcSize), 66new HANDLE_MESSAGE(WM.NCHITTEST, _HandleNCHitTest), 67new HANDLE_MESSAGE(WM.NCRBUTTONUP, _HandleNCRButtonUp), 68new HANDLE_MESSAGE(WM.SIZE, _HandleSize), 69new HANDLE_MESSAGE(WM.WINDOWPOSCHANGED, _HandleWindowPosChanged), 70new HANDLE_MESSAGE(WM.DWMCOMPOSITIONCHANGED, _HandleDwmCompositionChanged),
PresentationUI (1)
MS\Internal\Documents\RightsManagementProvider.cs (1)
1540new KeyValuePair<string, string>("NOLICCACHE", "1");
Roslyn.Diagnostics.Analyzers (13)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
ScenarioTests.Common.Tests (2)
ScenarioTestTypes.cs (2)
191_queue.Add(new KeyValuePair<SendOrPostCallback, object>(d, state)); 196_queue.Add(new KeyValuePair<SendOrPostCallback, object>(RunOnCapturedState, (d, state, ec)));
Shared (4)
JsonSchemaExporter\JsonSchemaExporter.cs (3)
160derivedTypeDiscriminator = new(typeDiscriminatorKey, discriminatorSchema); 328(properties ??= new()).Add(new(property.Name, propertySchema)); 385new(ValuesKeyword,
LogBuffering\SerializedLogRecordFactory.cs (1)
40serializedAttributes.Add(new KeyValuePair<string, object?>(key, value));
Shared.Tests (8)
EmptyCollections\EmptyReadonlyDictionaryTests.cs (4)
39Assert.False(dict.Contains(new KeyValuePair<int, string>(1, "One"))); 60Assert.Throws<NotSupportedException>(() => coll.Add(new KeyValuePair<int, string>(1, "One"))); 61Assert.False(coll.Remove(new KeyValuePair<int, string>(1, "One"))); 62Assert.False(coll.Contains(new KeyValuePair<int, string>(1, "One")));
JsonSchemaExporter\TestTypes.cs (4)
819Value: new([new("one", 1), new("two", 2), new("three", 3)]), 1119public IEnumerator<KeyValuePair<string, int>> GetEnumerator() => Enumerable.Repeat(new KeyValuePair<string, int>(nameof(BaseValue), BaseValue), 1).GetEnumerator();
Sockets.BindTests (1)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (1)
906new KeyValuePair<string, string>("EndpointDefaults:Protocols", input),
Stress.ApiService (10)
Program.cs (8)
59metrics.IncrementCounter(1, new TagList([new KeyValuePair<string, object?>("add-tag", "1")])); 60metrics.IncrementCounter(2, new TagList([new KeyValuePair<string, object?>("add-tag", "")])); 74metrics.IncrementCounter(1, new TagList([new KeyValuePair<string, object?>($"add-tag-{i}", j.ToString(CultureInfo.InvariantCulture))])); 153new KeyValuePair<string, object?>("Message", message), 154new KeyValuePair<string, object?>("ActivityId", 123), 155new KeyValuePair<string, object?>("Level", (int) 10), 156new KeyValuePair<string, object?>("Tid", Environment.CurrentManagedThreadId), 157new KeyValuePair<string, object?>("Pid", Environment.ProcessId),
TestMetrics.cs (2)
20new KeyValuePair<string, object?>("meter-tag", Guid.NewGuid().ToString()) 25new KeyValuePair<string, object?>("instrument-tag", Guid.NewGuid().ToString())
Stress.TelemetryService (1)
GaugeMetrics.cs (1)
28measurements.Add(new Measurement<long>(workingSet, new KeyValuePair<string, object?>("process.id", process.Id)));
System.Collections (17)
System\Collections\Generic\OrderedDictionary.cs (3)
604return new(e.Key, e.Value); 1221array[arrayIndex++] = new(entry.Key, entry.Value); 1444Current = new KeyValuePair<TKey, TValue>(entry.Key, entry.Value);
System\Collections\Generic\SortedDictionary.cs (9)
112TreeSet<KeyValuePair<TKey, TValue>>.Node? node = _set.FindNode(new KeyValuePair<TKey, TValue>(key, default(TValue)!)); 124TreeSet<KeyValuePair<TKey, TValue>>.Node? node = _set.FindNode(new KeyValuePair<TKey, TValue>(key, default(TValue)!)); 127_set.Add(new KeyValuePair<TKey, TValue>(key, value)); 131node.Item = new KeyValuePair<TKey, TValue>(node.Item.Key, value); 193_set.Add(new KeyValuePair<TKey, TValue>(key, value)); 205return _set.Contains(new KeyValuePair<TKey, TValue>(key, default(TValue)!)); 254return _set.Remove(new KeyValuePair<TKey, TValue>(key, default(TValue)!)); 261TreeSet<KeyValuePair<TKey, TValue>>.Node? node = _set.FindNode(new KeyValuePair<TKey, TValue>(key, default(TValue)!)); 470return new KeyValuePair<TKey, TValue>(Current.Key, Current.Value);
System\Collections\Generic\SortedList.cs (5)
447KeyValuePair<TKey, TValue> entry = new KeyValuePair<TKey, TValue>(keys[i], values[i]); 480keyValuePairArray[i + index] = new KeyValuePair<TKey, TValue>(keys[i], values[i]); 495objects[i + index] = new KeyValuePair<TKey, TValue>(keys[i], values[i]); 823public KeyValuePair<TKey, TValue> Current => new KeyValuePair<TKey, TValue>(_key!, _value!); 840return new KeyValuePair<TKey, TValue>(_key!, _value!);
System.Collections.Concurrent (10)
System\Collections\Concurrent\ConcurrentDictionary.cs (3)
813array[index] = new KeyValuePair<TKey, TValue>(current._key, current._value); 843array[index] = new KeyValuePair<TKey, TValue>(current._key, current._value); 896Current = new KeyValuePair<TKey, TValue>(node._key, node._value);
System\Collections\Concurrent\PartitionerStatic.cs (7)
709= new KeyValuePair<long, TSource>(_sharedIndex.Value, 794= new KeyValuePair<long, TSource>(_sharedIndex.Value, 820= new KeyValuePair<long, TSource>(_sharedIndex.Value, 1222return new KeyValuePair<long, TSource>(_startIndex + _localOffset.Value, 1306return new KeyValuePair<long, TSource>(_startIndex + _localOffset.Value, 1529return (new KeyValuePair<long, TSource>(_offset, _list[_offset])); 1586return (new KeyValuePair<long, TSource>(_offset, _array[_offset]));
System.Collections.Immutable (15)
System\Collections\Frozen\FrozenDictionary.cs (4)
395destination[i] = new KeyValuePair<TKey, TValue>(keys[i], values[i]); 428pairs[index++] = new KeyValuePair<TKey, TValue>(item.Key, item.Value); 449objects[index++] = new KeyValuePair<TKey, TValue>(item.Key, item.Value); 710return new KeyValuePair<TKey, TValue>(_keys[_index], _values[_index]);
System\Collections\Frozen\FrozenSetInternalBase.cs (1)
236return new KeyValuePair<int, int>(uniqueFoundCount, unfoundCount);
System\Collections\Immutable\ImmutableDictionary.cs (2)
189.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element)))); 323return map.Contains(new KeyValuePair<TKey, TValue>(key, value));
System\Collections\Immutable\ImmutableDictionary_2.HashBucket.cs (4)
142var kv = new KeyValuePair<TKey, TValue>(key, value); 222var kv = new KeyValuePair<TKey, TValue>(key, default(TValue)!); 274var kv = new KeyValuePair<TKey, TValue>(key, default(TValue)!); 313var kv = new KeyValuePair<TKey, TValue>(equalKey, default(TValue)!);
System\Collections\Immutable\ImmutableSortedDictionary.cs (1)
145.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (1)
128get { return new KeyValuePair<TKey, TValue>(_key, _value); }
System\Collections\Immutable\SortedInt32KeyNode.cs (2)
122get { return new KeyValuePair<int, TValue>(_key, _value!); } 249freezeAction?.Invoke(new KeyValuePair<int, TValue>(_key, _value!));
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\Validator.cs (1)
528items.Add(new KeyValuePair<ValidationContext, object?>(context, property.GetValue(instance)));
System.ComponentModel.Composition (3)
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (2)
297_values[index] = new KeyValuePair<object, object?>(key, value); 314_values[_valueCount] = new KeyValuePair<object, object?>(key, value);
System\ComponentModel\Composition\Hosting\CompositionServices.cs (1)
487return properties.Select(property => new KeyValuePair<string, Type>(property.Name, property.PropertyType));
System.Data.Common (2)
System\Data\Common\ObjectStorage.cs (2)
589KeyValuePair<Type, XmlRootAttribute> key = new KeyValuePair<Type, XmlRootAttribute>(type, attribute); 626key = new KeyValuePair<Type, XmlRootAttribute>(type, new XmlRootAttribute());
System.Diagnostics.DiagnosticSource (23)
System\Diagnostics\Activity.cs (8)
488KeyValuePair<string, object?> kvp = new KeyValuePair<string, object?>(key, value); 512KeyValuePair<string, object?> kvp = new KeyValuePair<string, object?>(key, value); 587exceptionTags.Add(new KeyValuePair<string, object?>(ExceptionMessageTag, exception.Message)); 592exceptionTags.Add(new KeyValuePair<string, object?>(ExceptionStackTraceTag, exception.ToString())); 597exceptionTags.Add(new KeyValuePair<string, object?>(ExceptionTypeTag, exception.GetType().ToString())); 633KeyValuePair<string, string?> kvp = new KeyValuePair<string, string?>(key, value); 657KeyValuePair<string, string?> kvp = new KeyValuePair<string, string?>(key, value); 1802yield return new KeyValuePair<string, string?>(current.Value.Key, (string?)current.Value.Value);
System\Diagnostics\ActivityTagsCollection.cs (3)
82_list[index] = new KeyValuePair<string, object?>(key, value); 86_list.Add(new KeyValuePair<string, object?>(key, value)); 149_list.Add(new KeyValuePair<string, object?>(key, value));
System\Diagnostics\DiagnosticListener.cs (1)
259curSubscription.Observer.OnNext(new KeyValuePair<string, object?>(name, value));
System\Diagnostics\DsesFilterAndTransform.cs (1)
654return new KeyValuePair<string, string?>(_outputName, obj?.ToString());
System\Diagnostics\LegacyPropagator.cs (1)
171baggageList.Insert(0, new KeyValuePair<string, string?>(
System\Diagnostics\Metrics\AggregatorStore.cs (1)
505labels[i] = new KeyValuePair<string, string>(indexedNames[i], indexedValues[i]?.ToString() ?? "");
System\Diagnostics\Metrics\RuntimeMetrics.cs (6)
139s_exceptions.Add(1, new KeyValuePair<string, object?>("error.type", e.Exception.GetType().Name)); 166yield return new(collectionsFromThisGeneration - collectionsFromHigherGeneration, new KeyValuePair<string, object?>("gc.heap.generation", s_genNames[gen])); 181yield return new(processCpuUsage.UserTime.TotalSeconds, [new KeyValuePair<string, object?>("cpu.mode", "user")]); 182yield return new(processCpuUsage.PrivilegedTime.TotalSeconds, [new KeyValuePair<string, object?>("cpu.mode", "system")]); 191yield return new(gcInfo.GenerationInfo[i].SizeAfterBytes, new KeyValuePair<string, object?>("gc.heap.generation", s_genNames[i])); 201yield return new(gcInfo.GenerationInfo[i].FragmentationAfterBytes, new KeyValuePair<string, object?>("gc.heap.generation", s_genNames[i]));
System\Diagnostics\Metrics\TagList.netcore.cs (1)
93Add(new KeyValuePair<string, object?>(key, value));
System\Diagnostics\W3CPropagator.cs (1)
114baggageList.Add(new KeyValuePair<string, string?>(key, value));
System.IO.Packaging (1)
System\IO\Packaging\Package.cs (1)
441partDictionary.Add(normalizedPartName, new KeyValuePair<PackUriHelper.ValidatedPartUri, PackagePart>(partUri, parts[i]));
System.Linq.Expressions (4)
System\Dynamic\ExpandoObject.cs (1)
767yield return new KeyValuePair<string, object?>(data.Class.Keys[i], temp);
System\Linq\Expressions\Interpreter\InstructionList.cs (1)
240_debugCookies.Add(new KeyValuePair<int, object?>(Count - 1, cookie));
System\Linq\Expressions\Interpreter\Utilities.cs (2)
300_keysAndValues[i] = new KeyValuePair<TKey, TValue>(key, value); 317_keysAndValues[index] = new KeyValuePair<TKey, TValue>(key, value);
System.Linq.Parallel (1)
System\Linq\Parallel\Utils\HashLookup.cs (1)
137get { return new KeyValuePair<TKey, TValue>(slots[index].key, slots[index].value); }
System.Net.Http (5)
System\Net\Http\DiagnosticsHelper.cs (1)
26return new KeyValuePair<string, object?>("http.request.method", isUnknownMethod ? "_OTHER" : known!.Method);
System\Net\Http\Headers\HttpHeaders.cs (1)
373yield return new KeyValuePair<string, IEnumerable<string>>(entry.Key.Name, values);
System\Net\Http\Headers\HttpHeadersNonValidated.cs (1)
148_current = new KeyValuePair<string, HeaderStringValues>(
System\Net\Http\SocketsHttpHandler\FailedProxyCache.cs (1)
88_failedProxies.TryRemove(new KeyValuePair<Uri, long>(uri, renewTicks));
System\Net\Http\SocketsHttpHandler\Metrics\ConnectionMetrics.cs (1)
49private static KeyValuePair<string, object?> GetStateTag(bool idle) => new KeyValuePair<string, object?>("http.connection.state", idle ? "idle" : "active");
System.Net.NameResolution (4)
System\Net\Dns.cs (4)
587asyncState = family == AddressFamily.Unspecified ? (object)ipAddress : new KeyValuePair<IPAddress, AddressFamily>(ipAddress, family); 621asyncState = family == AddressFamily.Unspecified ? (object)hostName : new KeyValuePair<string, AddressFamily>(hostName, family); 761((ICollection<KeyValuePair<object, Task>>)s_tasks).Remove(new KeyValuePair<object, Task>(key!, task!)); 774((ICollection<KeyValuePair<object, Task>>)s_tasks).Remove(new KeyValuePair<object, Task>(key!, task));
System.Net.Security (2)
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (2)
134yield return new KeyValuePair<string, string>(NegotiationInfoClass.Kerberos, KerberosOid); 137yield return new KeyValuePair<string, string>(NegotiationInfoClass.NTLM, NtlmOid);
System.Net.WebSockets.Client (2)
System\Net\WebSockets\HttpResponseHeadersReadOnlyCollection.cs (1)
49yield return new KeyValuePair<string, IEnumerable<string>>(header.Key, header.Value);
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
506return new KeyValuePair<string, string>(
System.Private.CoreLib (31)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (4)
365array[index++] = new KeyValuePair<TKey, TValue>(entries[i].key, entries[i].value); 1520objects[index++] = new KeyValuePair<TKey, TValue>(entries[i].key, entries[i].value); 1800_current = new KeyValuePair<TKey, TValue>(entry.key, entry.value); 1828return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\KeyValuePair.cs (1)
16new KeyValuePair<TKey, TValue>(key, value);
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (1)
199objects[index++] = new KeyValuePair<TKey, TValue>(item.Key, item.Value);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterPayload.cs (21)
52yield return new KeyValuePair<string, object?>("Name", Name); 53yield return new KeyValuePair<string, object?>("DisplayName", DisplayName); 54yield return new KeyValuePair<string, object?>("DisplayUnits", DisplayUnits); 55yield return new KeyValuePair<string, object?>("Mean", Mean); 56yield return new KeyValuePair<string, object?>("StandardDeviation", StandardDeviation); 57yield return new KeyValuePair<string, object?>("Count", Count); 58yield return new KeyValuePair<string, object?>("Min", Min); 59yield return new KeyValuePair<string, object?>("Max", Max); 60yield return new KeyValuePair<string, object?>("IntervalSec", IntervalSec); 61yield return new KeyValuePair<string, object?>("Series", $"Interval={IntervalSec}"); 62yield return new KeyValuePair<string, object?>("CounterType", "Mean"); 63yield return new KeyValuePair<string, object?>("Metadata", Metadata); 107yield return new KeyValuePair<string, object?>("Name", Name); 108yield return new KeyValuePair<string, object?>("DisplayName", DisplayName); 109yield return new KeyValuePair<string, object?>("DisplayRateTimeScale", DisplayRateTimeScale); 110yield return new KeyValuePair<string, object?>("Increment", Increment); 111yield return new KeyValuePair<string, object?>("IntervalSec", IntervalSec); 112yield return new KeyValuePair<string, object?>("Series", $"Interval={IntervalSec}"); 113yield return new KeyValuePair<string, object?>("CounterType", "Sum"); 114yield return new KeyValuePair<string, object?>("Metadata", Metadata); 115yield return new KeyValuePair<string, object?>("DisplayUnits", DisplayUnits);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (1)
89yield return new KeyValuePair<string, object?>(this.m_names[i], this.m_values[i]);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventTypes.cs (1)
170this.nameInfos.TryGet(new KeyValuePair<string, EventTags>(name, tags)) ??
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (1)
466_current = new KeyValuePair<TKey, TValue>(key, value);
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.Windows.Core.TestUtilities (1)
XUnit\SkipOnArchitectureAttribute.cs (1)
34return new[] { new KeyValuePair<string, string>(XunitConstants.Category, XunitConstants.IgnoreForCI) };
System.Reflection.Emit (3)
System\Reflection\Emit\ILGeneratorImpl.cs (2)
469_memberReferences.Add(new KeyValuePair<object, BlobWriter> 639new KeyValuePair<MethodInfo, Type[]>(methodInfo, optionalParameterTypes));
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
782KeyValuePair<MethodInfo, BlobBuilder> pair = new(method, signature);
System.Reflection.Metadata (2)
System\Reflection\Metadata\Ecma335\BlobDictionary.cs (1)
61entry = new(immutableKey, value);
System\Reflection\Metadata\Internal\NamespaceCache.cs (1)
182remaps.Add(new KeyValuePair<NamespaceDefinitionHandle, NamespaceDataBuilder>(group.Key, existingRecord));
System.Text.Json (3)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
121derivedTypeDiscriminator = new(typeDiscriminatorKey, discriminatorSchema); 242(properties ??= []).Add(new(property.Name, propertySchema)); 301new(ValuesKeyword,
System.Text.RegularExpressions (4)
System\Text\RegularExpressions\GroupCollection.cs (1)
283return new KeyValuePair<string, Group>(value.Name, value);
System\Text\RegularExpressions\Symbolic\SparseIntMap.cs (3)
50dense.Add(new KeyValuePair<int, T>(key, default)); 70_dense[index] = new KeyValuePair<int, T>(key, value); 83_dense.Add(new KeyValuePair<int, T>(key, default));
System.Threading.Channels (6)
System\Threading\Channels\AsyncOperation.cs (1)
377}, new KeyValuePair<Action<object?>, object?>(continuation, state));
System\Threading\Channels\BoundedChannel.cs (1)
688}, new KeyValuePair<BoundedChannel<T>, AsyncOperation>(this, op));
System\Threading\Channels\RendezvousChannel.cs (1)
482}, new KeyValuePair<RendezvousChannel<T>, AsyncOperation>(this, op));
System\Threading\Channels\SingleConsumerUnboundedChannel.cs (1)
395}, new KeyValuePair<SingleConsumerUnboundedChannel<T>, AsyncOperation>(this, op));
System\Threading\Channels\UnboundedChannel.cs (1)
327}, new KeyValuePair<UnboundedChannel<T>, AsyncOperation>(this, op));
System\Threading\Channels\UnboundedPriorityChannel.cs (1)
333}, new KeyValuePair<UnboundedPrioritizedChannel<T>, AsyncOperation>(this, op));
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\RateLimitLease.cs (1)
69yield return new KeyValuePair<string, object?>(name, metadata);
System.Threading.Tasks.Dataflow (24)
Blocks\BatchBlock.cs (12)
792var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 793var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage); 810var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 811var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage); 907var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 908var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage); 923var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 924var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage); 1006var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!); 1007var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, consumedMessage); 1051var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!); 1052var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, consumedMessage);
Blocks\JoinBlock.cs (2)
526_nonGreedy.ConsumedMessage = new KeyValuePair<bool, T>(false, default(T)!); 669_nonGreedy.ConsumedMessage = new KeyValuePair<bool, T>(true, consumedValue!);
Internal\QueuedMap.cs (7)
81_storage[newIndex] = new KeyValuePair<int, T>(TERMINATOR_INDEX, item); 87_storage.Add(new KeyValuePair<int, T>(TERMINATOR_INDEX, item)); 100_storage[_tailIndex] = new KeyValuePair<int, T>(newIndex, _storage[_tailIndex].Value); 127_storage[_headIndex] = new KeyValuePair<int, T>(_freeIndex, default(T)!); 146_storage[index] = new KeyValuePair<int, T>(_storage[index].Key, item); 182_queue.Replace(indexOfKeyInQueue, new KeyValuePair<TKey, TValue>(key, value)); 187indexOfKeyInQueue = _queue.Enqueue(new KeyValuePair<TKey, TValue>(key, value));
Internal\ReorderingBuffer.cs (1)
87_reorderingBuffer.Add(id, new KeyValuePair<bool, TOutput>(itemIsValid, item!));
Internal\TargetCore.cs (2)
220_messages.Enqueue(new KeyValuePair<TInput, long>(messageValue!, messageId)); 674result = new KeyValuePair<TInput, long>(consumedValue!, messageId);
System.Xaml (5)
System\Xaml\NameScope.cs (2)
122array[arrayIndex++] = new KeyValuePair<string, object>((string)entry.Key, entry.Value); 278return new KeyValuePair<string, object>((string)_enumerator.Key, _enumerator.Value);
System\Xaml\NameScopeDictionary.cs (2)
166return new KeyValuePair<string, object>(name, _underlyingNameScope.FindName(name)); 172return new KeyValuePair<string, object>((string)dictionaryEnumerator.Key, dictionaryEnumerator.Value);
System\Xaml\Schema\TypeReflector.cs (1)
658candidates.Add(new KeyValuePair<MethodInfo, MethodInfo>(curGetter, curSetter));
Test.Utilities (14)
CSharpSecurityCodeFixVerifier`2+Test.cs (1)
48new[] { new KeyValuePair<string, string>("flow-analysis", "true") }));
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
VisualBasicSecurityCodeFixVerifier`2+Test.cs (1)
27new[] { new KeyValuePair<string, string>("flow-analysis", "true") }));
Text.Analyzers (13)
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
64yield return new KeyValuePair<K, SetWithInsertionOrder<V>>(
src\Dependencies\Collections\KeyValuePair.cs (1)
26new KeyValuePair<TKey, TValue>(key, value);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (1)
83.AddRange(source.Select(element => new KeyValuePair<TKey, TValue>(keySelector(element), elementSelector(element))));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
149if (self.Contains(new KeyValuePair<TKey, TValue>(key, value))) 222if (self.Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
112if (Contains(new KeyValuePair<TKey, TValue>(key, value)))
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (4)
381array[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 933objects[index++] = new KeyValuePair<TKey, TValue>(entries[i]._key, entries[i]._value); 1207_current = new KeyValuePair<TKey, TValue>(entry._key, entry._value); 1237return new KeyValuePair<TKey, TValue>(_current.Key, _current.Value);
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
342_wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair<string?, TValue?>(null, default), (s, match) => new KeyValuePair<string?, TValue?>(null, default));
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (1)
877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value);
UnitTests.Common (1)
TestTypes.cs (1)
279_queue.Add(new KeyValuePair<SendOrPostCallback, object>(d, state));
VBCSCompiler.UnitTests (3)
CompilerServerTests.cs (3)
38new KeyValuePair<string, string>("hello.cs", 53new KeyValuePair<string, string>("hello.vb", 292new[] { new KeyValuePair<string, string>("TMPDIR", newTempDir.Path) },
WindowsBase.Tests (42)
System\Windows\NameScopeTests.cs (42)
132Assert.True(nameScope.Contains(new KeyValuePair<string, object>(name, scopedElement))); 145Assert.True(nameScope.Contains(new KeyValuePair<string, object>(name, scopedElement))); 253Assert.True(nameScope.Contains(new KeyValuePair<string, object>(name, scopedElement))); 266Assert.True(nameScope.Contains(new KeyValuePair<string, object>(name, scopedElement))); 343nameScope.Add(new KeyValuePair<string, object>(name, scopedElement)); 347Assert.True(nameScope.Contains(new KeyValuePair<string, object>(name, scopedElement))); 356nameScope.Add(new KeyValuePair<string, object>(name, scopedElement)); 360Assert.True(nameScope.Contains(new KeyValuePair<string, object>(name, scopedElement))); 376nameScope.Add(new KeyValuePair<string, object>("name1", scopedElement1)); 380nameScope.Add(new KeyValuePair<string, object>("NAME1", scopedElement2)); 385nameScope.Add(new KeyValuePair<string, object>("name2", scopedElement2)); 397Assert.Throws<ArgumentException>("item", () => nameScope.Add(new KeyValuePair<string, object>(null!, scopedElement))); 405Assert.Throws<ArgumentException>(() => nameScope.Add(new KeyValuePair<string, object>(string.Empty, scopedElement))); 416Assert.Throws<ArgumentException>(() => nameScope.Add(new KeyValuePair<string, object>(name, scopedElement))); 423Assert.Throws<ArgumentException>("item", () => nameScope.Add(new KeyValuePair<string, object>("name", null!))); 433Assert.Throws<ArgumentException>(() => nameScope.Add(new KeyValuePair<string, object>("name", new object()))); 448Assert.False(nameScope.Contains(new KeyValuePair<string, object>("name", scopedElement))); 457Assert.False(nameScope.Contains(new KeyValuePair<string, object>("name", scopedElement))); 472Assert.False(nameScope.Contains(new KeyValuePair<string, object>("name", new object()))); 481Assert.False(nameScope.Contains(new KeyValuePair<string, object>("name", new object()))); 497Assert.Equal(new KeyValuePair<string, object>("name", scopedElement), array[0]); 501Assert.Equal(new KeyValuePair<string, object>("name", scopedElement), array[1]); 505Assert.Equal(new KeyValuePair<string, object>("name", scopedElement), array[1]); 565Assert.True(nameScope.Contains(new KeyValuePair<string, object>("name", scopedElement))); 566Assert.True(nameScope.Contains(new KeyValuePair<string, object>("name", 1))); 567Assert.True(nameScope.Contains(new KeyValuePair<string, object>("name", new object()))); 568Assert.False(nameScope.Contains(new KeyValuePair<string, object>("NAME", scopedElement))); 569Assert.False(nameScope.Contains(new KeyValuePair<string, object>("nAmE", scopedElement))); 570Assert.False(nameScope.Contains(new KeyValuePair<string, object>("name2", scopedElement))); 571Assert.False(nameScope.Contains(new KeyValuePair<string, object>("", scopedElement))); 588Assert.False(nameScope.Contains(new KeyValuePair<string, object>(name, new object()))); 607Assert.False(nameScope.Contains(new KeyValuePair<string, object>(name, new object()))); 614Assert.Throws<ArgumentException>("item", () => nameScope.Contains(new KeyValuePair<string, object>(null!, new object()))); 850Assert.True(nameScope.Contains(new KeyValuePair<string, object>(name, scopedElement))); 863Assert.True(nameScope.Contains(new KeyValuePair<string, object>(name, scopedElement))); 1004nameScope.Remove(new KeyValuePair<string, object>("name", scopedElement)); 1009Assert.False(nameScope.Remove(new KeyValuePair<string, object>("name", scopedElement))); 1018Assert.Throws<ArgumentException>("item", () => nameScope.Remove(new KeyValuePair<string, object>(null!, new object()))); 1035Assert.False(nameScope.Remove(new KeyValuePair<string, object>(name, new object()))); 1054Assert.False(nameScope.Remove(new KeyValuePair<string, object>(name, new object()))); 1064Assert.False(nameScope.Remove(new KeyValuePair<string, object>("name", new object()))); 1065Assert.False(nameScope.Remove(new KeyValuePair<string, object>("name", null!)));
XmlFileLogger (2)
ItemGroupParser.cs (1)
90return new KeyValuePair<string, string>(name, value);
ObjectModel\Item.cs (1)
59_metadata.Add(new KeyValuePair<string, string>(key, value));
xunit.console (1)
CommandLine.cs (1)
506return new KeyValuePair<string, string>(option, value);
10604 references to KeyValuePair
Analyzer.Utilities.UnitTests (2)
FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisTests.cs (2)
106foreach (KeyValuePair<(Location Location, IMethodSymbol? Method), HazardousUsageEvaluationResult> kvp in actual) 141foreach (KeyValuePair<(Location Location, IMethodSymbol? Method), HazardousUsageEvaluationResult> kvp in actual)
AnalyzerRunner (8)
DiagnosticAnalyzerRunner.cs (7)
139foreach (var pair in projectGroup.Take(5)) 324var projectDiagnosticTasks = new List<KeyValuePair<ProjectId, Task<AnalysisResult>>>(); 348foreach (var task in projectDiagnosticTasks) 358foreach (var pair in previousResult.AnalyzerTelemetryInfo) 417foreach (var pair in analysisResult.AnalyzerTelemetryInfo) 430foreach (var pair in telemetryInfoDictionary.OrderBy(x => x.Key.GetType().Name, StringComparer.OrdinalIgnoreCase)) 437foreach (var pair in telemetryInfoDictionary.OrderBy(x => x.Key.GetType().Name, StringComparer.OrdinalIgnoreCase))
Program.cs (1)
168foreach (var pair in diagnosticStatistics)
aspire (5)
Backchannel\BackchannelDataTypes.cs (1)
161public IReadOnlyList<KeyValuePair<string, string>>? Options { get; init; }
Commands\ConfigCommand.cs (1)
179foreach (var kvp in allConfig)
Commands\PublishCommandBase.cs (1)
491var selectedChoice = await _interactionService.PromptForSelectionAsync(
Configuration\ConfigurationService.cs (1)
232foreach (var kvp in obj)
DotNetCliRunner.cs (1)
410foreach (var envKvp in env)
Aspire.Azure.AI.Inference.Tests (1)
ConformanceTests.cs (1)
43=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
Aspire.Azure.AI.OpenAI.Tests (1)
ConformanceTests.cs (1)
59=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
Aspire.Azure.Data.Tables.Tests (1)
ConformanceTests.cs (1)
70=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
Aspire.Azure.Messaging.EventHubs (4)
src\Shared\StableConnectionStringBuilder.cs (4)
19internal sealed class StableConnectionStringBuilder : IEnumerable<KeyValuePair<string, string>> 157IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator() 167IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<string, string>>)this).GetEnumerator();
Aspire.Azure.Messaging.ServiceBus (4)
src\Shared\StableConnectionStringBuilder.cs (4)
19internal sealed class StableConnectionStringBuilder : IEnumerable<KeyValuePair<string, string>> 157IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator() 167IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<string, string>>)this).GetEnumerator();
Aspire.Azure.Messaging.ServiceBus.Tests (3)
ConformanceTests.cs (1)
64protected KeyValuePair<string, string?> GetMainConfigEntry(string? key)
ConformanceTests_Queue.cs (1)
22=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
ConformanceTests_Topic.cs (1)
23=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
Aspire.Azure.Messaging.WebPubSub (4)
src\Shared\StableConnectionStringBuilder.cs (4)
19internal sealed class StableConnectionStringBuilder : IEnumerable<KeyValuePair<string, string>> 157IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator() 167IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<string, string>>)this).GetEnumerator();
Aspire.Azure.Messaging.WebPubSub.Tests (1)
ConformanceTests.cs (1)
59private KeyValuePair<string, string?> GetMainConfigEntry(string? key)
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (2)
ConformanceTests.cs (1)
88=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
ConformanceTests_TypeSpecificConfig.cs (1)
17=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.Azure.Npgsql.Tests (1)
ConformanceTests.cs (1)
65=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.Azure.Security.KeyVault.Tests (3)
CertificateClientConformanceTests.cs (1)
63=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
KeyClientConformanceTests.cs (1)
65=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
SecretClientConformanceTests.cs (1)
64=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
Aspire.Azure.Storage.Blobs.Tests (1)
ConformanceTests.cs (1)
74=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
Aspire.Azure.Storage.Queues.Tests (1)
ConformanceTests.cs (1)
73=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
Aspire.Cli.Tests (3)
Commands\PublishCommandPromptingIntegrationTests.cs (3)
123var options = new List<KeyValuePair<string, string>> 505public void AddPrompt(string promptId, string label, string inputType, string message, bool isRequired, IReadOnlyList<KeyValuePair<string, string>>? options = null, string? defaultValue = null) 588internal sealed record PromptInputData(string Label, string InputType, bool IsRequired, IReadOnlyList<KeyValuePair<string, string>>? Options = null, string? Value = null);
Aspire.Confluent.Kafka (4)
ConsumerConnectionFactory.cs (1)
16foreach (var property in consumerConfig)
ProducerConnectionFactory.cs (1)
16foreach (var property in producerConfig)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\InstrumentedConsumerBuilder.cs (1)
21public InstrumentedConsumerBuilder(IEnumerable<KeyValuePair<string, string>> config)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\InstrumentedProducerBuilder.cs (1)
21public InstrumentedProducerBuilder(IEnumerable<KeyValuePair<string, string>> config)
Aspire.Confluent.Kafka.Tests (2)
ConsumerConformanceTests.cs (1)
26configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
ProducerConformanceTests.cs (1)
27configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.Dashboard (72)
Components\Controls\Chart\ChartBase.cs (5)
29private List<KeyValuePair<string, string>[]>? _renderedDimensionAttributes; 152foreach (var trace in traces) 159foreach (var item in traces) 171foreach (var trace in traces.OrderBy(kvp => kvp.Key)) 277foreach (var percentileValues in traces)
Components\Controls\Chart\ChartContainer.razor.cs (2)
145private static bool MatchFilter(KeyValuePair<string, string>[] attributes, DimensionFilterViewModel filter) 217foreach (var item in _instrument.KnownAttributeValues.OrderBy(kvp => kvp.Key))
Components\Pages\Resources.razor.cs (2)
495foreach (var kvp in _resourceByName) 521foreach (var resourceViewModel in _resourceByName)
Components\Pages\TraceDetail.razor.cs (1)
307private SpanLinkViewModel CreateLinkViewModel(string traceId, string spanId, KeyValuePair<string, string>[] attributes, Dictionary<string, OtlpTrace> traceCache)
Model\BrowserLinkOutgoingPeerResolver.cs (1)
22public bool TryResolvePeer(KeyValuePair<string, string>[] attributes, out string? name, out ResourceViewModel? matchedResource)
Model\IOutgoingPeerResolver.cs (1)
8bool TryResolvePeer(KeyValuePair<string, string>[] attributes, out string? name, out ResourceViewModel? matchedResourced);
Model\ResourceOutgoingPeerResolver.cs (2)
97public bool TryResolvePeer(KeyValuePair<string, string>[] attributes, out string? name, out ResourceViewModel? matchedResource) 102internal static bool TryResolvePeerNameCore(IDictionary<string, ResourceViewModel> resources, KeyValuePair<string, string>[] attributes, [NotNullWhen(true)] out string? name, [NotNullWhen(true)] out ResourceViewModel? resourceMatch)
Model\SpanLinkViewModel.cs (1)
12public required KeyValuePair<string, string>[] Attributes { get; init; }
Otlp\Model\MetricValues\DimensionScope.cs (2)
15public KeyValuePair<string, string>[] Attributes { get; init; } 24public DimensionScope(int capacity, KeyValuePair<string, string>[] attributes)
Otlp\Model\MetricValues\MetricValueBase.cs (1)
42public required KeyValuePair<string, string>[] Attributes { get; init; }
Otlp\Model\OtlpApplication.cs (8)
35private readonly ConcurrentDictionary<KeyValuePair<string, string>[], OtlpApplicationView> _applicationViews = new(ApplicationViewKeyComparer.Instance); 52KeyValuePair<string, string>[]? tempAttributes = null; 122private void AddMetrics(OtlpInstrument instrument, Metric metric, AddContext context, ref KeyValuePair<string, string>[]? tempAttributes) 230foreach (var instrument in _instruments) 312private sealed class ApplicationViewKeyComparer : IEqualityComparer<KeyValuePair<string, string>[]> 316public bool Equals(KeyValuePair<string, string>[]? x, KeyValuePair<string, string>[]? y) 346public int GetHashCode([DisallowNull] KeyValuePair<string, string>[] obj)
Otlp\Model\OtlpApplicationView.cs (2)
17public KeyValuePair<string, string>[] Properties { get; } 50foreach (var kv in Properties)
Otlp\Model\OtlpHelpers.cs (20)
183public static KeyValuePair<string, string>[] ToKeyValuePairs(this RepeatedField<KeyValue> attributes, OtlpContext context) 187return Array.Empty<KeyValuePair<string, string>>(); 190var values = new KeyValuePair<string, string>[Math.Min(attributes.Count, context.Options.MaxAttributeCount)]; 203public static KeyValuePair<string, string>[] ToKeyValuePairs(this RepeatedField<KeyValue> attributes, OtlpContext context, Func<KeyValue, bool> filter) 207return Array.Empty<KeyValuePair<string, string>>(); 211List<KeyValuePair<string, string>>? values = null; 221values ??= new List<KeyValuePair<string, string>>(readLimit); 229var existingAttribute = values[existingIndex]; 247static int GetIndex(List<KeyValuePair<string, string>> values, string name) 260public static void CopyKeyValuePairs(RepeatedField<KeyValue> attributes, KeyValuePair<string, string>[] parentAttributes, OtlpContext context, out int copyCount, [NotNull] ref KeyValuePair<string, string>[]? copiedAttributes) 274copiedAttributes = new KeyValuePair<string, string>[copyCount]; 288private static void CopyKeyValues(RepeatedField<KeyValue> attributes, KeyValuePair<string, string>[] copiedAttributes, int index, OtlpContext context, out int copyCount) 306var existingAttribute = copiedAttributes[existingIndex]; 324public static string? GetValue(this KeyValuePair<string, string>[] values, string name) 335public static int GetIndex(this KeyValuePair<string, string>[] values, string name) 347public static string? GetPeerAddress(this KeyValuePair<string, string>[] values) 378public static bool HasKey(this KeyValuePair<string, string>[] values, string name) 390public static string ConcatProperties(this KeyValuePair<string, string>[] properties) 394foreach (var kv in properties)
Otlp\Model\OtlpInstrument.cs (13)
39public Dictionary<ReadOnlyMemory<KeyValuePair<string, string>>, DimensionScope> Dimensions { get; } = new(ScopeAttributesComparer.Instance); 43public DimensionScope FindScope(RepeatedField<KeyValue> attributes, ref KeyValuePair<string, string>[]? tempAttributes) 71private DimensionScope CreateDimensionScope(Memory<KeyValuePair<string, string>> comparableAttributes) 119foreach (var item in instrument.KnownAttributeValues) 123foreach (var item in instrument.Dimensions) 132private sealed class ScopeAttributesComparer : IEqualityComparer<ReadOnlyMemory<KeyValuePair<string, string>>> 136public bool Equals(ReadOnlyMemory<KeyValuePair<string, string>> x, ReadOnlyMemory<KeyValuePair<string, string>> y) 141public int GetHashCode([DisallowNull] ReadOnlyMemory<KeyValuePair<string, string>> obj) 144foreach (KeyValuePair<string, string> pair in obj.Span) 153private sealed class KeyValuePairComparer : IComparer<KeyValuePair<string, string>> 157public int Compare(KeyValuePair<string, string> x, KeyValuePair<string, string> y)
Otlp\Model\OtlpLogEntry.cs (1)
15public KeyValuePair<string, string>[] Attributes { get; }
Otlp\Model\OtlpScope.cs (2)
17public KeyValuePair<string, string>[] Attributes { get; } 19public OtlpScope(string name, string version, KeyValuePair<string, string>[] attributes)
Otlp\Model\OtlpSpan.cs (2)
37public required KeyValuePair<string, string>[] Attributes { get; init; } 114foreach (var kv in Attributes.OrderBy(a => a.Key))
Otlp\Model\OtlpSpanEvent.cs (1)
19public required KeyValuePair<string, string>[] Attributes { get; init; }
Otlp\Model\OtlpSpanLink.cs (1)
16public required KeyValuePair<string, string>[] Attributes { get; init; }
Otlp\Storage\TelemetryRepository.cs (4)
126foreach (var kvp in _applications) 377foreach (var kvp in logEntry.Attributes) 1018foreach (var kvp in newSpan.Attributes) 1277foreach (var knownAttributeValues in instrument.KnownAttributeValues)
Aspire.Dashboard.Components.Tests (27)
Pages\ResourcesTests.cs (3)
288private static void AssertResourceFilterListEquals(IRenderedComponent<Components.Pages.Resources> cut, IEnumerable<KeyValuePair<string, bool>> types, IEnumerable<KeyValuePair<string, bool>> states, IEnumerable<KeyValuePair<string, bool>> healthStates)
tests\Shared\Logging\LogValuesAssert.cs (9)
19IEnumerable<KeyValuePair<string, object>> actualValues) 31IEnumerable<KeyValuePair<string, object>> expectedValues, 32IEnumerable<KeyValuePair<string, object>> actualValues) 39foreach (var expectedPair in expectedValues) 52private static string GetString(IEnumerable<KeyValuePair<string, object>> logValues) 57private sealed class LogValueComparer : IEqualityComparer<KeyValuePair<string, object>> 59public bool Equals(KeyValuePair<string, object> x, KeyValuePair<string, object> y) 64public int GetHashCode(KeyValuePair<string, object> obj)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (15)
47public static OtlpScope CreateOtlpScope(OtlpContext context, string? name = null, IEnumerable<KeyValuePair<string, string>>? attributes = null) 53public static InstrumentationScope CreateScope(string? name = null, IEnumerable<KeyValuePair<string, string>>? attributes = null) 59foreach (var attribute in attributes) 93public static Metric CreateSumMetric(string metricName, DateTime startTime, IEnumerable<KeyValuePair<string, string>>? attributes = null, IEnumerable<Exemplar>? exemplars = null, int? value = null) 112private static NumberDataPoint CreateNumberPoint(DateTime startTime, int value, IEnumerable<KeyValuePair<string, string>>? attributes = null, IEnumerable<Exemplar>? exemplars = null) 122foreach (var attribute in attributes) 138public static Span.Types.Event CreateSpanEvent(string name, int startTime, IEnumerable<KeyValuePair<string, string>>? attributes = null) 147foreach (var attribute in attributes) 156public static Span CreateSpan(string traceId, string spanId, DateTime startTime, DateTime endTime, string? parentSpanId = null, List<Span.Types.Event>? events = null, List<Span.Types.Link>? links = null, IEnumerable<KeyValuePair<string, string>>? attributes = null, Span.Types.SpanKind? kind = null) 178foreach (var attribute in attributes) 187public static LogRecord CreateLogRecord(DateTime? time = null, DateTime? observedTime = null, string? message = null, SeverityNumber? severity = null, IEnumerable<KeyValuePair<string, string>>? attributes = null, bool? skipBody = null) 201foreach (var attribute in attributes) 209public static Resource CreateResource(string? name = null, string? instanceId = null, IEnumerable<KeyValuePair<string, string>>? attributes = null) 222foreach (var attribute in attributes) 305KeyValuePair<string, string>[]? attributes = null, OtlpSpanStatusCode? statusCode = null, string? statusMessage = null, OtlpSpanKind kind = OtlpSpanKind.Unspecified,
Aspire.Dashboard.Tests (53)
BrowserLinkOutgoingPeerResolverTests.cs (1)
114private static bool TryResolvePeerName(IOutgoingPeerResolver resolver, KeyValuePair<string, string>[] attributes, out string? peerName)
Integration\FrontendBrowserTokenAuthTests.cs (1)
266var list = values as IReadOnlyList<KeyValuePair<string, object>>;
Integration\StartupTests.cs (2)
632var list = values as IReadOnlyList<KeyValuePair<string, object>>; 714var list = values as IReadOnlyList<KeyValuePair<string, object>>;
ResourceOutgoingPeerResolverTests.cs (1)
217private static bool TryResolvePeerName(IDictionary<string, ResourceViewModel> resources, KeyValuePair<string, string>[] attributes, out string? peerName)
TelemetryRepositoryTests\LogTests.cs (1)
621var attributes = new List<KeyValuePair<string, string>>
TelemetryRepositoryTests\MetricsTests.cs (13)
109var metricAttributes = new List<KeyValuePair<string, string>>(); 110var meterAttributes = new List<KeyValuePair<string, string>>(); 223var metricAttributes = new List<KeyValuePair<string, string>>(); 224var meterAttributes = new List<KeyValuePair<string, string>> 403AssertDimensionValues(instrument.Dimensions, Array.Empty<KeyValuePair<string, string>>(), valueCount: 1); 404AssertDimensionValues(instrument.Dimensions, new KeyValuePair<string, string>[] { KeyValuePair.Create("key1", "value1") }, valueCount: 1); 405AssertDimensionValues(instrument.Dimensions, new KeyValuePair<string, string>[] { KeyValuePair.Create("key1", "value2") }, valueCount: 1); 406AssertDimensionValues(instrument.Dimensions, new KeyValuePair<string, string>[] { KeyValuePair.Create("key1", "value1"), KeyValuePair.Create("key2", "value1") }, valueCount: 1); 409private static Exemplar CreateExemplar(DateTime startTime, double value, IEnumerable<KeyValuePair<string, string>>? attributes = null) 421foreach (var attribute in attributes) 619var knownValues = Assert.Single(instrument.KnownAttributeValues); 1244private static void AssertDimensionValues(Dictionary<ReadOnlyMemory<KeyValuePair<string, string>>, DimensionScope> dimensions, ReadOnlyMemory<KeyValuePair<string, string>> key, int valueCount)
TelemetryRepositoryTests\OtlpHelpersTests.cs (6)
163KeyValuePair<string, string>[]? copiedAttributes = null; 190KeyValuePair<string, string>[]? copiedAttributes = null; 230KeyValuePair<string, string>[]? copiedAttributes = null; 274KeyValuePair<string, string>[]? copiedAttributes = null; 308KeyValuePair<string, string>[]? copiedAttributes = null; 349KeyValuePair<string, string>[]? copiedAttributes = null;
TelemetryRepositoryTests\TestOutgoingPeerResolver.cs (3)
11private readonly Func<KeyValuePair<string, string>[], (string? Name, ResourceViewModel? Resource)>? _onResolve; 14public TestOutgoingPeerResolver(Func<KeyValuePair<string, string>[], (string? Name, ResourceViewModel? Resource)>? onResolve = null) 38public bool TryResolvePeer(KeyValuePair<string, string>[] attributes, out string? name, out ResourceViewModel? matchedResourced)
TelemetryRepositoryTests\TraceTests.cs (1)
768var attributes = new List<KeyValuePair<string, string>>();
tests\Shared\Logging\LogValuesAssert.cs (9)
19IEnumerable<KeyValuePair<string, object>> actualValues) 31IEnumerable<KeyValuePair<string, object>> expectedValues, 32IEnumerable<KeyValuePair<string, object>> actualValues) 39foreach (var expectedPair in expectedValues) 52private static string GetString(IEnumerable<KeyValuePair<string, object>> logValues) 57private sealed class LogValueComparer : IEqualityComparer<KeyValuePair<string, object>> 59public bool Equals(KeyValuePair<string, object> x, KeyValuePair<string, object> y) 64public int GetHashCode(KeyValuePair<string, object> obj)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (15)
47public static OtlpScope CreateOtlpScope(OtlpContext context, string? name = null, IEnumerable<KeyValuePair<string, string>>? attributes = null) 53public static InstrumentationScope CreateScope(string? name = null, IEnumerable<KeyValuePair<string, string>>? attributes = null) 59foreach (var attribute in attributes) 93public static Metric CreateSumMetric(string metricName, DateTime startTime, IEnumerable<KeyValuePair<string, string>>? attributes = null, IEnumerable<Exemplar>? exemplars = null, int? value = null) 112private static NumberDataPoint CreateNumberPoint(DateTime startTime, int value, IEnumerable<KeyValuePair<string, string>>? attributes = null, IEnumerable<Exemplar>? exemplars = null) 122foreach (var attribute in attributes) 138public static Span.Types.Event CreateSpanEvent(string name, int startTime, IEnumerable<KeyValuePair<string, string>>? attributes = null) 147foreach (var attribute in attributes) 156public static Span CreateSpan(string traceId, string spanId, DateTime startTime, DateTime endTime, string? parentSpanId = null, List<Span.Types.Event>? events = null, List<Span.Types.Link>? links = null, IEnumerable<KeyValuePair<string, string>>? attributes = null, Span.Types.SpanKind? kind = null) 178foreach (var attribute in attributes) 187public static LogRecord CreateLogRecord(DateTime? time = null, DateTime? observedTime = null, string? message = null, SeverityNumber? severity = null, IEnumerable<KeyValuePair<string, string>>? attributes = null, bool? skipBody = null) 201foreach (var attribute in attributes) 209public static Resource CreateResource(string? name = null, string? instanceId = null, IEnumerable<KeyValuePair<string, string>>? attributes = null) 222foreach (var attribute in attributes) 305KeyValuePair<string, string>[]? attributes = null, OtlpSpanStatusCode? statusCode = null, string? statusMessage = null, OtlpSpanKind kind = OtlpSpanKind.Unspecified,
Aspire.EndToEnd.Tests (2)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
189foreach (var item in _buildEnv.EnvVars)
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
247foreach (var item in Environment)
Aspire.Hosting (10)
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
82public static IEnumerable<ContainerFileSystemItem> GetItems(KeyValuePair<string, FileTree> node)
ApplicationModel\IInteractionService.cs (1)
126public IReadOnlyList<KeyValuePair<string, string>>? Options { get; init; }
ApplicationModel\ResourceLoggerService.cs (1)
31foreach (var logger in _loggers)
ApplicationModel\ResourceNotificationService.cs (1)
476foreach (var state in _resourceNotificationStates)
Backchannel\BackchannelDataTypes.cs (1)
143public IReadOnlyList<KeyValuePair<string, string>>? Options { get; init; }
Dcp\DcpExecutor.cs (2)
1321foreach (var buildArgument in dockerfileBuildAnnotation.BuildArguments) 1351foreach (var buildSecret in dockerfileBuildAnnotation.BuildSecrets)
ProjectResourceBuilderExtensions.cs (1)
503foreach (var envVar in launchProfile.EnvironmentVariables)
src\Shared\SecretsStore.cs (2)
42public IEnumerable<KeyValuePair<string, string?>> AsEnumerable() => _secrets; 57foreach (var secret in _secrets.AsEnumerable())
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.DetectInvalidModelNames.cs (1)
20foreach (var operation in modelNameOperations)
Aspire.Hosting.Azure (12)
AzureBicepResource.cs (1)
180foreach (var input in Parameters)
AzureProvisioningResource.cs (2)
89var compiledBicep = compilation.First(); 159foreach (var aspireParameter in this.Parameters)
AzurePublishingContext.cs (4)
169foreach (var parameter in resource.Parameters) 244foreach (var parameter in resource.Parameters) 289foreach (var parameter in resource.Parameters) 415var compiledBicep = plan.Compile().First();
AzureResourcePreparer.cs (1)
375foreach (var kv in context.EnvironmentVariables)
Provisioning\BicepUtilities.cs (1)
33foreach (var parameter in resource.Parameters)
Provisioning\Internal\DefaultUserSecretsManager.cs (1)
89foreach (var kvp in source)
Provisioning\Provisioners\BicepProvisioner.cs (2)
57foreach (var item in outputObj.AsObject()) 246foreach (var item in outputObj.AsObject())
Aspire.Hosting.Azure.AppContainers (1)
ContainerAppContext.cs (1)
724foreach (var kv in EnvironmentVariables)
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceWebsiteContext.cs (1)
248foreach (var kv in EnvironmentVariables)
Aspire.Hosting.Azure.CosmosDB (4)
src\Shared\StableConnectionStringBuilder.cs (4)
19internal sealed class StableConnectionStringBuilder : IEnumerable<KeyValuePair<string, string>> 157IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator() 167IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<string, string>>)this).GetEnumerator();
Aspire.Hosting.Azure.PostgreSQL (4)
AzurePostgresExtensions.cs (4)
238foreach (var database in azureResource.Databases) 257foreach (var database in azureDatabases) 412foreach (var databaseNames in databases) 471foreach (var database in azureResource.Databases)
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusRule.cs (1)
58foreach (var property in CorrelationFilter.Properties)
Aspire.Hosting.Azure.Sql (4)
AzureSqlExtensions.cs (4)
188foreach (var database in azureResource.AzureSqlDatabases) 207foreach (var database in azureDatabases) 220foreach (var database in databases) 235foreach (var database in databases)
Aspire.Hosting.Azure.Tests (2)
AzureKeyVaultTests.cs (2)
71var runKvp = Assert.Single(runEnv); 72var pubishKvp = Assert.Single(publishEnv);
Aspire.Hosting.Azure.WebPubSub (1)
AzureWebPubSubExtensions.cs (1)
84foreach (var setting in resource.Hubs)
Aspire.Hosting.Docker (3)
DockerComposePublishingContext.cs (1)
152foreach (var entry in environment.CapturedEnvironmentVariables ?? [])
DockerComposeServiceResource.cs (2)
165foreach (var kv in EnvironmentVariables) 174foreach (var variable in env)
Aspire.Hosting.Kubernetes (3)
Extensions\ResourceExtensions.cs (2)
76foreach (var kvp in context.Secrets.Where(kvp => !processedKeys.Contains(kvp.Key))) 107foreach (var kvp in context.EnvironmentVariables.Where(kvp => !processedKeys.Contains(kvp.Key)))
KubernetesResource.cs (1)
255foreach (var environmentVariable in context.EnvironmentVariables)
Aspire.Hosting.Testing (8)
DistributedApplicationEntryPointInvoker.cs (7)
158private sealed class ApplicationBuilderDiagnosticListener(EntryPointInvoker owner) : IObserver<KeyValuePair<string, object?>> 176public void OnNext(KeyValuePair<string, object?> value) 209internal sealed class TestingBuilderFactory : IObserver<DiagnosticListener>, IObserver<KeyValuePair<string, object?>>, IDisposable 260void IObserver<KeyValuePair<string, object?>>.OnCompleted() 265void IObserver<KeyValuePair<string, object?>>.OnError(Exception error) 269void IObserver<KeyValuePair<string, object?>>.OnNext(KeyValuePair<string, object?> value)
DistributedApplicationFactory.cs (1)
281var firstLaunchProfile = launchProfiles.FirstOrDefault();
Aspire.Hosting.Testing.Tests (9)
tests\Shared\Logging\LogValuesAssert.cs (9)
19IEnumerable<KeyValuePair<string, object>> actualValues) 31IEnumerable<KeyValuePair<string, object>> expectedValues, 32IEnumerable<KeyValuePair<string, object>> actualValues) 39foreach (var expectedPair in expectedValues) 52private static string GetString(IEnumerable<KeyValuePair<string, object>> logValues) 57private sealed class LogValueComparer : IEqualityComparer<KeyValuePair<string, object>> 59public bool Equals(KeyValuePair<string, object> x, KeyValuePair<string, object> y) 64public int GetHashCode(KeyValuePair<string, object> obj)
Aspire.Hosting.Tests (14)
src\Shared\StableConnectionStringBuilder.cs (4)
19internal sealed class StableConnectionStringBuilder : IEnumerable<KeyValuePair<string, string>> 157IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator() 167IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<string, string>>)this).GetEnumerator();
tests\Shared\Logging\LogValuesAssert.cs (9)
19IEnumerable<KeyValuePair<string, object>> actualValues) 31IEnumerable<KeyValuePair<string, object>> expectedValues, 32IEnumerable<KeyValuePair<string, object>> actualValues) 39foreach (var expectedPair in expectedValues) 52private static string GetString(IEnumerable<KeyValuePair<string, object>> logValues) 57private sealed class LogValueComparer : IEqualityComparer<KeyValuePair<string, object>> 59public bool Equals(KeyValuePair<string, object> x, KeyValuePair<string, object> y) 64public int GetHashCode(KeyValuePair<string, object> obj)
WithEnvironmentTests.cs (1)
315var pair = Assert.Single(config);
Aspire.Microsoft.Azure.Cosmos (4)
src\Shared\StableConnectionStringBuilder.cs (4)
19internal sealed class StableConnectionStringBuilder : IEnumerable<KeyValuePair<string, string>> 157IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator() 167IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<string, string>>)this).GetEnumerator();
Aspire.Microsoft.Azure.Cosmos.Tests (1)
ConformanceTests.cs (1)
22=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.Microsoft.Data.SqlClient (3)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Implementation\SqlActivitySourceHelper.cs (1)
25public static readonly IEnumerable<KeyValuePair<string, object>> CreationTags = new[]
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceListener.cs (2)
11internal sealed class DiagnosticSourceListener : IObserver<KeyValuePair<string, object>> 33public void OnNext(KeyValuePair<string, object> value)
Aspire.Microsoft.Data.SqlClient.Tests (1)
ConformanceTests.cs (1)
61=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.Microsoft.EntityFrameworkCore.Cosmos (4)
src\Shared\StableConnectionStringBuilder.cs (4)
19internal sealed class StableConnectionStringBuilder : IEnumerable<KeyValuePair<string, string>> 157IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator() 167IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<string, string>>)this).GetEnumerator();
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (1)
ConformanceTests.cs (1)
30=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
Aspire.Microsoft.EntityFrameworkCore.SqlServer (3)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Implementation\SqlActivitySourceHelper.cs (1)
25public static readonly IEnumerable<KeyValuePair<string, object>> CreationTags = new[]
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\DiagnosticSourceListener.cs (2)
11internal sealed class DiagnosticSourceListener : IObserver<KeyValuePair<string, object>> 33public void OnNext(KeyValuePair<string, object> value)
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (2)
ConformanceTests.cs (1)
74=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
ConformanceTests_TypeSpecificConfig.cs (1)
18=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.Milvus.Client.Tests (1)
ConformanceTests.cs (1)
53=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[2]
Aspire.MySqlConnector.Tests (1)
ConformanceTests.cs (1)
67=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.NATS.Net.Tests (1)
ConformanceTests.cs (1)
52=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (2)
ConformanceTests.cs (1)
91=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
ConformanceTests_TypeSpecificConfig.cs (1)
17=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.Npgsql.Tests (1)
ConformanceTests.cs (1)
69=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.OpenAI.Tests (1)
ConformanceTests.cs (1)
50=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[]
Aspire.Oracle.EntityFrameworkCore.Tests (2)
ConformanceTests.cs (1)
69=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
ConformanceTests_TypeSpecificConfig.cs (1)
17=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[1]
Aspire.Playground.Tests (14)
tests\Aspire.TestUtilities\QuarantinedTestAttribute.cs (1)
52public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
tests\Aspire.TestUtilities\RequiresDockerAttribute.cs (1)
31public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
tests\Aspire.TestUtilities\RequiresPlaywrightAttribute.cs (1)
25public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
tests\Aspire.TestUtilities\RequiresSSLCertificateAttribute.cs (1)
16public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
tests\Aspire.TestUtilities\RequiresToolsAttribute.cs (1)
23public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
tests\Shared\Logging\LogValuesAssert.cs (9)
19IEnumerable<KeyValuePair<string, object>> actualValues) 31IEnumerable<KeyValuePair<string, object>> expectedValues, 32IEnumerable<KeyValuePair<string, object>> actualValues) 39foreach (var expectedPair in expectedValues) 52private static string GetString(IEnumerable<KeyValuePair<string, object>> logValues) 57private sealed class LogValueComparer : IEqualityComparer<KeyValuePair<string, object>> 59public bool Equals(KeyValuePair<string, object> x, KeyValuePair<string, object> y) 64public int GetHashCode(KeyValuePair<string, object> obj)
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (2)
ConformanceTests.cs (1)
84=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[2]
ConformanceTests_TypeSpecificConfig.cs (1)
17=> configuration.AddInMemoryCollection(new KeyValuePair<string, string?>[2]
Aspire.RabbitMQ.Client (3)
src\Components\Aspire.RabbitMQ.Client\RabbitMQEventSourceLogForwarder.cs (3)
72private readonly struct ErrorEventSourceEvent : IReadOnlyList<KeyValuePair<string, object?>> 86public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 99public KeyValuePair<string, object?> this[int index]
Aspire.RabbitMQ.Client.Tests (2)
AspireRabbitMQLoggingTests.cs (2)
138var errorEvent = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object?>>>(logs[0].State); 184var errorEvent = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object?>>>(logs[0].State);
Aspire.RabbitMQ.Client.v7.Tests (2)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (2)
138var errorEvent = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object?>>>(logs[0].State); 184var errorEvent = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object?>>>(logs[0].State);
Aspire.StackExchange.Redis (2)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (2)
25internal static readonly IEnumerable<KeyValuePair<string, object?>> CreationTags = new[] 112foreach (var entry in this.Cache)
Aspire.StackExchange.Redis.Tests (4)
AspireRedisExtensionsTests.cs (4)
161private static IEnumerable<KeyValuePair<string, string?>> GetDefaultConfiguration() => 166private static IEnumerable<KeyValuePair<string, string?>> GetSetsTrueConfig(bool useKeyed) => 172private static IEnumerable<KeyValuePair<string, string?>> GetConnectionString(bool abortConnect) => 179public void AbortOnConnectFailDefaults(bool useKeyed, IEnumerable<KeyValuePair<string, string?>> configValues, bool expectedAbortOnConnect)
Aspire.Templates.Tests (2)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
189foreach (var item in _buildEnv.EnvVars)
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
247foreach (var item in Environment)
Aspire.TestUtilities (5)
QuarantinedTestAttribute.cs (1)
52public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
RequiresDockerAttribute.cs (1)
31public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
RequiresPlaywrightAttribute.cs (1)
25public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
RequiresSSLCertificateAttribute.cs (1)
16public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
RequiresToolsAttribute.cs (1)
23public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
AuthSamples.FunctionalTests (5)
HttpClientExtensions.cs (4)
19IEnumerable<KeyValuePair<string, string>> formValues) 32IEnumerable<KeyValuePair<string, string>> formValues) 34foreach (var kvp in formValues) 52foreach (var header in submit.Headers)
TestAssert.cs (1)
95foreach (var header in headers)
AzureAppServicesHostingStartupSample (1)
Startup.cs (1)
40foreach (var header in context.Request.Headers)
AzureAppServicesSample (1)
Startup.cs (1)
51foreach (var header in context.Request.Headers)
Binding.Http.IntegrationTests (1)
BasicHttpBindingTests.4.0.0.cs (1)
166foreach (var header in oldContent.Headers)
BuildActionTelemetryTable (1)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
BuildBoss (2)
SolutionCheckerUtil.cs (1)
54foreach (var pair in map)
StructuredLoggerCheckerUtil.cs (1)
39foreach (var doubleWrite in doubleWrites)
BuildValidator (1)
Program.cs (1)
392static SourceLinkEntry makeSourceLink(KeyValuePair<string, string> entry)
Client.ClientBase.IntegrationTests (1)
ClientBaseTestHelpers.cs (1)
19foreach (KeyValuePair<string, string> keyValue in messageHeaders)
CodeStyleConfigFileGenerator (1)
Program.cs (1)
125foreach (var rule in sortedRulesById)
ConfigurationSchemaGenerator (2)
ConfigSchemaEmitter.cs (2)
747IEnumerable<KeyValuePair<string, JsonNode>> properties = 752foreach (var pair in properties)
CookiePolicySample (1)
Startup.cs (1)
106foreach (var cookie in cookies)
DefaultBuilder.SampleApp (1)
Startup.cs (1)
23foreach (var header in context.Request.Headers)
Diagnostics.EFCore.FunctionalTests (6)
DatabaseErrorPageMiddlewareTest.cs (1)
295var formData = new FormUrlEncodedContent(new List<KeyValuePair<string, string>>
MigrationsEndPointMiddlewareTest.cs (5)
120var formData = new FormUrlEncodedContent(new List<KeyValuePair<string, string>> 159var formData = new FormUrlEncodedContent(new List<KeyValuePair<string, string>>()); 188var formData = new FormUrlEncodedContent(new List<KeyValuePair<string, string>> 217var formData = new FormUrlEncodedContent(new List<KeyValuePair<string, string>> 256var formData = new FormUrlEncodedContent(new List<KeyValuePair<string, string>>
dotnet-openapi (2)
Commands\BaseCommand.cs (1)
195foreach (var kvp in attributePackages)
ProjectExtensions.cs (1)
15foreach (var kvp in metadata)
dotnet-svcutil-lib (107)
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentSchemaValidator.cs (1)
486foreach (KeyValuePair<string, string> pair in namespaceDecls)
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaInfo.cs (2)
359foreach (KeyValuePair<XmlQualifiedName, SchemaElementDecl> entry in sinfo._elementDecls) 366foreach (KeyValuePair<XmlQualifiedName, SchemaElementDecl> entry in sinfo._elementDeclsByType)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (1)
2170foreach (KeyValuePair<string, string> pair in namespaceDecls)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (1)
2708foreach (var item in _locals)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (2)
1177foreach (KeyValuePair<string, MemberInfo> pair in memberInfos) 1192foreach (KeyValuePair<string, MemberInfo> pair in replaceList)
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigator.cs (1)
1980foreach (KeyValuePair<string, string> pair in dictionary)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (5)
56foreach (KeyValuePair<XmlQualifiedName, DataContract> pair in dataContractSet) 77foreach (KeyValuePair<string, string> pair in options.Namespaces) 265foreach (KeyValuePair<XmlQualifiedName, DataContract> pair in _dataContractSet) 986foreach (KeyValuePair<XmlQualifiedName, DataContract> pair in knownContracts) 1316foreach (KeyValuePair<string, object> pair in baseMemberNames)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (6)
26public KeyValuePairAdapter(KeyValuePair<K, T> kvPair) 58internal KeyValuePair<K, T> GetKeyValuePair() 63internal static KeyValuePairAdapter<K, T> GetKeyValuePairAdapter(KeyValuePair<K, T> kvPair) 1490private IEnumerator<KeyValuePair<K, V>> _enumerator; 1492public GenericDictionaryEnumerator(IEnumerator<KeyValuePair<K, V>> enumerator) 1511KeyValuePair<K, V> current = _enumerator.Current;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (3)
43foreach (KeyValuePair<XmlQualifiedName, DataContract> pair in dataContractSet) 50foreach (KeyValuePair<DataContract, object> pair in dataContractSet._processedContracts) 321public IEnumerator<KeyValuePair<XmlQualifiedName, DataContract>> GetEnumerator()
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (1)
795s_typeOfKeyValuePair = typeof(KeyValuePair<,>);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeaderCollection.cs (1)
128foreach (KeyValuePair<string, int> pair in myHeaders)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (6)
1510KeyValuePair<string, object>[] properties, MessageHeaders headers) 1688KeyValuePair<string, object>[] properties = new KeyValuePair<string, object>[Properties.Count]; 1689((ICollection<KeyValuePair<string, object>>)Properties).CopyTo(properties, 0); 1713private KeyValuePair<string, object>[] _properties; 1718KeyValuePair<string, object>[] properties, MessageHeaders headers)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPool.cs (1)
95foreach (KeyValuePair<TKey, EndpointConnectionPool> poolEntry in _endpointPools)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (5)
33internal static void AddHeaderWithoutValidation(this HttpHeaders httpHeaders, KeyValuePair<string, IEnumerable<string>> header) 51foreach (KeyValuePair<string, object> property in messageProperties) 104IEnumerable<KeyValuePair<string, IEnumerable<string>>> headers = httpRequest.Headers; 112internal static WebHeaderCollection ToWebHeaderCollection(this IEnumerable<KeyValuePair<string, IEnumerable<string>>> headers) 115foreach (var header in headers)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (1)
344foreach (KeyValuePair<string, IEnumerable<string>> header in content.Headers)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageExtensionMethods.cs (1)
50IEnumerable<KeyValuePair<string, IEnumerable<string>>> headers = httpResponse.Headers;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageProperty.cs (1)
368foreach (KeyValuePair<string, IEnumerable<string>> header in content.Headers)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (7)
951public BodyWriterMessage(MessageHeaders headers, KeyValuePair<string, object>[] properties, BodyWriter bodyWriter) 1021KeyValuePair<string, object>[] properties = new KeyValuePair<string, object>[Properties.Count]; 1022((ICollection<KeyValuePair<string, object>>)Properties).CopyTo(properties, 0); 1708KeyValuePair<string, object>[] properties = new KeyValuePair<string, object>[Properties.Count]; 1709((ICollection<KeyValuePair<string, object>>)Properties).CopyTo(properties, 0);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageBuffer.cs (8)
53private KeyValuePair<string, object>[] _properties; 67_properties = new KeyValuePair<string, object>[message.Properties.Count]; 68((ICollection<KeyValuePair<string, object>>)message.Properties).CopyTo(_properties, 0); 150private KeyValuePair<string, object>[] _properties; 157KeyValuePair<string, object>[] properties, bool[] understoodHeaders, bool understoodHeadersModified) 243private KeyValuePair<string, object>[] _properties; 249KeyValuePair<string, object>[] properties, BodyWriter bodyWriter) 300protected KeyValuePair<string, object>[] Properties
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (16)
44internal MessageProperties(KeyValuePair<string, object>[] array) 416internal void CopyProperties(KeyValuePair<string, object>[] array) 425KeyValuePair<string, object> property = array[i]; 720void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int index) 761void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> pair) 771bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> pair) 793return ((IEnumerable<KeyValuePair<string, object>>)this).GetEnumerator(); 796IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator() 801List<KeyValuePair<string, object>> pairs = new List<KeyValuePair<string, object>>(_propertyCount); 833bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> pair)
FrameworkFork\System.ServiceModel\System\ServiceModel\Configuration\SecurityElementBase.cs (1)
159foreach (KeyValuePair<string, SupportingTokenParameters> operation1 in b1.OperationSupportingTokenParameters)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ImportedPolicyConversionContext.cs (9)
65foreach (KeyValuePair<OperationDescription, IEnumerable<XmlElement>> entry in operationBindingAssertions) 71foreach (KeyValuePair<MessageDescription, IEnumerable<XmlElement>> entry in messageBindingAssertions) 77foreach (KeyValuePair<FaultDescription, IEnumerable<XmlElement>> entry in faultBindingAssertions) 245KeyValuePair<K, IEnumerator<V>>[] digits = InitializeCounter<K, V>(sets, counterValue); 253private static KeyValuePair<K, IEnumerator<V>>[] InitializeCounter<K, V>(Dictionary<K, IEnumerable<V>> sets, Dictionary<K, V> counterValue) 255KeyValuePair<K, IEnumerator<V>>[] digits = new KeyValuePair<K, IEnumerator<V>>[sets.Count]; 259foreach (KeyValuePair<K, IEnumerable<V>> kvp in sets) 274private static bool IncrementCounter<K, V>(KeyValuePair<K, IEnumerator<V>>[] digits, Dictionary<K, IEnumerable<V>> sets, Dictionary<K, V> counterValue)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (2)
2314foreach (KeyValuePair<string, XmlElement> policyDocument in importer._policyDocuments) 2349private void AddExternalPolicy(WsdlImporter importer, KeyValuePair<string, XmlElement> policyDocument)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (2)
250KeyValuePair<Type, ArrayList>[] multipleHeaderValues = null; 282multipleHeaderValues = new KeyValuePair<Type, ArrayList>[parameters.Length];
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (5)
659private OperationFormatterMessage(MessageHeaders headers, KeyValuePair<string, object>[] properties, OperationFormatterBodyWriter bodyWriter) 682KeyValuePair<string, object>[] properties = new KeyValuePair<string, object>[base.Properties.Count]; 683((ICollection<KeyValuePair<string, object>>)base.Properties).CopyTo(properties, 0); 788KeyValuePair<string, object>[] properties, BodyWriter bodyWriter)
ImportModule.cs (2)
223foreach (KeyValuePair<string, string> namespaceMapping in options.NamespaceMappings) 323foreach (KeyValuePair<string, string> namespaceMapping in options.NamespaceMappings)
Shared\MSBuildProj.cs (3)
61public IEnumerable<KeyValuePair<string, string>> ResolvedProperties { get { return this._resolvedProperties; } } 949public async Task<IEnumerable<KeyValuePair<string, string>>> ResolveProperyValuesAsync(IEnumerable<string> propertyNames, ILogger logger, CancellationToken cancellationToken) 978foreach (var entry in propertyTable)
Shared\Options\OptionsSerializer.cs (2)
51foreach (var jPropInfo in jObject) 104foreach (var jProperty in jOptionsObject)
Shared\Options\OptionValueParser.cs (6)
74else if (valueType == typeof(KeyValuePair<string, string>)) 132else if (valueType == typeof(KeyValuePair<string, string>)) 134var pair = (KeyValuePair<string, string>)value; 210private static KeyValuePair<string, string> ParseKeyValuePair(string stringValue, OptionBase option) 217var value = new KeyValuePair<string, string>(parts[0].Trim(), parts[1].Trim());
Shared\Options\UpdateOptions.cs (3)
39public ListValue<KeyValuePair<string, string>> NamespaceMappings { get { return GetValue<ListValue<KeyValuePair<string, string>>>(NamespaceMappingsKey); } } 60new ListValueOption<KeyValuePair<string, string>>(NamespaceMappingsKey) { SerializationName = "namespaceMappings" },
Shared\Options\WCFCSUpdateOptions.cs (1)
173var value = new KeyValuePair<string, string>(valueKey.Trim(), valueVal.Trim());
Shared\Utilities\ProcessRunner.cs (1)
79foreach (var environmentVar in environmentVariables.Where(e => !string.IsNullOrWhiteSpace(e.Key)))
dotnet-svcutil-lib.Tests (1)
TestInit.cs (1)
464protected bool CompareFiles(string baselineFile, string generatedFile, out KeyValuePair<string, string>? diffLines)
dotnet-user-jwts (2)
Commands\ClearCommand.cs (1)
69foreach (var jwt in jwtStore.Jwts)
Commands\ListCommand.cs (1)
80foreach (var jwtRow in jwts)
dotnet-user-secrets (5)
Internal\ListCommand.cs (2)
47foreach (var secret in context.SecretStore.AsEnumerable()) 57foreach (var item in context.SecretStore.AsEnumerable())
Internal\SecretsStore.cs (2)
55public IEnumerable<KeyValuePair<string, string>> AsEnumerable() => _secrets; 76foreach (var secret in _secrets.AsEnumerable())
Internal\SetCommand.cs (1)
76foreach (var k in provider.CurrentData)
FilesWebSite (1)
Controllers\UploadFilesController.cs (1)
33foreach (var keyValuePair in product.Specs)
GenerateDocumentationAndConfigFiles (155)
Program.cs (6)
551foreach (var ruleById in allRulesById) 649foreach (var assemblymetadata in rulesMetadata) 666foreach (var rule in assemblymetadata.Value.rules) 790foreach (var ruleById in allRulesById) 1262foreach (var rule in sortedRulesById) 1443foreach (var rule in sortedRulesById)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
12public static void Deconstruct<TKey, TValue>(KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (29)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 200else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>)) 202span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable); 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (3)
18internal readonly struct EnumerableConditionalWeakTable<TKey, TValue>() : IEnumerable<KeyValuePair<TKey, TValue>> 38public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() 39=> ((IEnumerable<KeyValuePair<TKey, TValue>>)_table).GetEnumerator();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
237foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
406ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments = default)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
37public static readonly IEnumerable<KeyValuePair<byte, string>> ByteSpecialValues = []; 39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAttributeData.cs (3)
15ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) : AttributeData 18private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments = namedArguments.NullToEmpty(); 23protected override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _namedArguments;
GenerateRulesMissingDocumentation (1)
Program.cs (1)
58foreach (var ruleById in allRulesById)
GetDocument.Insider (3)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.7.25327.102\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
196private sealed class HostingListener : IObserver<DiagnosticListener>, IObserver<KeyValuePair<string, object?>> 323public void OnNext(KeyValuePair<string, object?> value)
Commands\GetDocumentCommand.cs (1)
72foreach (var keyValuePair in packagedAssemblies)
HeaderPropagationSample (3)
Startup.cs (3)
65foreach (var header in context.Request.Headers) 79foreach (var header in response.RequestMessage.Headers) 91foreach (var header in context.Request.Headers)
HelixTestRunner (1)
ProcessUtil.cs (1)
113foreach (var kvp in environmentVariables)
http2cat (23)
Program.cs (2)
48foreach (var header in decodedHeaders) 72foreach (var header in decodedTrailers)
src\Shared\Http2cat\HPackHeaderWriter.cs (4)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
src\Shared\Http2cat\Http2Utilities.cs (17)
36public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeaders = new[] 49public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeadersHttp = new[] 62public static readonly IEnumerable<KeyValuePair<string, string>> PostRequestHeaders = new[] 70public static readonly IEnumerable<KeyValuePair<string, string>> ExpectContinueRequestHeaders = new[] 79public static readonly IEnumerable<KeyValuePair<string, string>> RequestTrailers = new[] 85public static readonly IEnumerable<KeyValuePair<string, string>> OneContinuationRequestHeaders = new[] 97public static readonly IEnumerable<KeyValuePair<string, string>> TwoContinuationsRequestHeaders = new[] 112public static IEnumerable<KeyValuePair<string, string>> ReadRateRequestHeaders(int expectedBytes) => new[] 181public Task StartStreamAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, bool endStream) 225private static IEnumerator<KeyValuePair<string, string>> GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers) 279public Task SendHeadersWithPaddingAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, bool endStream) 319public Task SendHeadersWithPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte priority, int streamDependency, bool endStream) 362public Task SendHeadersWithPaddingAndPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, byte priority, int streamDependency, bool endStream) 499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers)
HttpLogging.Sample (2)
SampleHttpLoggingInterceptor.cs (2)
41foreach (var header in logContext.HttpContext.Request.Headers) 49foreach (var header in logContext.HttpContext.Response.Headers)
HttpOverridesSample (1)
Startup.cs (1)
21foreach (var header in context.Request.Headers)
IIS.FunctionalTests (30)
Http2TrailersResetTests.cs (6)
486private static List<KeyValuePair<string, string>> GetHeaders(string path) 490var kvp = new KeyValuePair<string, string>(InternalHeaderNames.Path, path); 495private static List<KeyValuePair<string, string>> GetPostHeaders(string path) 499var kvp = new KeyValuePair<string, string>(InternalHeaderNames.Path, path); 523private static readonly IEnumerable<KeyValuePair<string, string>> Headers = new[] 535private static readonly IEnumerable<KeyValuePair<string, string>> PostRequestHeaders = new[]
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (3)
380private static List<KeyValuePair<string, string>> GetHeaders(string path) 384var kvp = new KeyValuePair<string, string>(InternalHeaderNames.Path, path); 399private static readonly IEnumerable<KeyValuePair<string, string>> Headers = new[]
src\Shared\Http2cat\HPackHeaderWriter.cs (4)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
src\Shared\Http2cat\Http2Utilities.cs (17)
36public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeaders = new[] 49public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeadersHttp = new[] 62public static readonly IEnumerable<KeyValuePair<string, string>> PostRequestHeaders = new[] 70public static readonly IEnumerable<KeyValuePair<string, string>> ExpectContinueRequestHeaders = new[] 79public static readonly IEnumerable<KeyValuePair<string, string>> RequestTrailers = new[] 85public static readonly IEnumerable<KeyValuePair<string, string>> OneContinuationRequestHeaders = new[] 97public static readonly IEnumerable<KeyValuePair<string, string>> TwoContinuationsRequestHeaders = new[] 112public static IEnumerable<KeyValuePair<string, string>> ReadRateRequestHeaders(int expectedBytes) => new[] 181public Task StartStreamAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, bool endStream) 225private static IEnumerator<KeyValuePair<string, string>> GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers) 279public Task SendHeadersWithPaddingAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, bool endStream) 319public Task SendHeadersWithPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte priority, int streamDependency, bool endStream) 362public Task SendHeadersWithPaddingAndPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, byte priority, int streamDependency, bool endStream) 499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers)
IIS.LongTests (21)
src\Shared\Http2cat\HPackHeaderWriter.cs (4)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
src\Shared\Http2cat\Http2Utilities.cs (17)
36public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeaders = new[] 49public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeadersHttp = new[] 62public static readonly IEnumerable<KeyValuePair<string, string>> PostRequestHeaders = new[] 70public static readonly IEnumerable<KeyValuePair<string, string>> ExpectContinueRequestHeaders = new[] 79public static readonly IEnumerable<KeyValuePair<string, string>> RequestTrailers = new[] 85public static readonly IEnumerable<KeyValuePair<string, string>> OneContinuationRequestHeaders = new[] 97public static readonly IEnumerable<KeyValuePair<string, string>> TwoContinuationsRequestHeaders = new[] 112public static IEnumerable<KeyValuePair<string, string>> ReadRateRequestHeaders(int expectedBytes) => new[] 181public Task StartStreamAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, bool endStream) 225private static IEnumerator<KeyValuePair<string, string>> GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers) 279public Task SendHeadersWithPaddingAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, bool endStream) 319public Task SendHeadersWithPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte priority, int streamDependency, bool endStream) 362public Task SendHeadersWithPaddingAndPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, byte priority, int streamDependency, bool endStream) 499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers)
IIS.NewHandler.FunctionalTests (21)
src\Shared\Http2cat\HPackHeaderWriter.cs (4)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
src\Shared\Http2cat\Http2Utilities.cs (17)
36public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeaders = new[] 49public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeadersHttp = new[] 62public static readonly IEnumerable<KeyValuePair<string, string>> PostRequestHeaders = new[] 70public static readonly IEnumerable<KeyValuePair<string, string>> ExpectContinueRequestHeaders = new[] 79public static readonly IEnumerable<KeyValuePair<string, string>> RequestTrailers = new[] 85public static readonly IEnumerable<KeyValuePair<string, string>> OneContinuationRequestHeaders = new[] 97public static readonly IEnumerable<KeyValuePair<string, string>> TwoContinuationsRequestHeaders = new[] 112public static IEnumerable<KeyValuePair<string, string>> ReadRateRequestHeaders(int expectedBytes) => new[] 181public Task StartStreamAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, bool endStream) 225private static IEnumerator<KeyValuePair<string, string>> GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers) 279public Task SendHeadersWithPaddingAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, bool endStream) 319public Task SendHeadersWithPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte priority, int streamDependency, bool endStream) 362public Task SendHeadersWithPaddingAndPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, byte priority, int streamDependency, bool endStream) 499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers)
IIS.NewShim.FunctionalTests (21)
src\Shared\Http2cat\HPackHeaderWriter.cs (4)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
src\Shared\Http2cat\Http2Utilities.cs (17)
36public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeaders = new[] 49public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeadersHttp = new[] 62public static readonly IEnumerable<KeyValuePair<string, string>> PostRequestHeaders = new[] 70public static readonly IEnumerable<KeyValuePair<string, string>> ExpectContinueRequestHeaders = new[] 79public static readonly IEnumerable<KeyValuePair<string, string>> RequestTrailers = new[] 85public static readonly IEnumerable<KeyValuePair<string, string>> OneContinuationRequestHeaders = new[] 97public static readonly IEnumerable<KeyValuePair<string, string>> TwoContinuationsRequestHeaders = new[] 112public static IEnumerable<KeyValuePair<string, string>> ReadRateRequestHeaders(int expectedBytes) => new[] 181public Task StartStreamAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, bool endStream) 225private static IEnumerator<KeyValuePair<string, string>> GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers) 279public Task SendHeadersWithPaddingAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, bool endStream) 319public Task SendHeadersWithPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte priority, int streamDependency, bool endStream) 362public Task SendHeadersWithPaddingAndPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, byte priority, int streamDependency, bool endStream) 499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers)
IISExpress.FunctionalTests (24)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (3)
380private static List<KeyValuePair<string, string>> GetHeaders(string path) 384var kvp = new KeyValuePair<string, string>(InternalHeaderNames.Path, path); 399private static readonly IEnumerable<KeyValuePair<string, string>> Headers = new[]
src\Shared\Http2cat\HPackHeaderWriter.cs (4)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
src\Shared\Http2cat\Http2Utilities.cs (17)
36public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeaders = new[] 49public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeadersHttp = new[] 62public static readonly IEnumerable<KeyValuePair<string, string>> PostRequestHeaders = new[] 70public static readonly IEnumerable<KeyValuePair<string, string>> ExpectContinueRequestHeaders = new[] 79public static readonly IEnumerable<KeyValuePair<string, string>> RequestTrailers = new[] 85public static readonly IEnumerable<KeyValuePair<string, string>> OneContinuationRequestHeaders = new[] 97public static readonly IEnumerable<KeyValuePair<string, string>> TwoContinuationsRequestHeaders = new[] 112public static IEnumerable<KeyValuePair<string, string>> ReadRateRequestHeaders(int expectedBytes) => new[] 181public Task StartStreamAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, bool endStream) 225private static IEnumerator<KeyValuePair<string, string>> GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers) 279public Task SendHeadersWithPaddingAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, bool endStream) 319public Task SendHeadersWithPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte priority, int streamDependency, bool endStream) 362public Task SendHeadersWithPaddingAndPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, byte priority, int streamDependency, bool endStream) 499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers)
IISSample (1)
Startup.cs (1)
67foreach (var header in context.Request.Headers)
illink (15)
ILLink.RoslynAnalyzer (11)
DataFlow\LValueFlowCaptureProvider.cs (1)
82foreach (var kvp in lvalueFlowCaptureIdBuilder)
ISymbolExtensions.cs (1)
232foreach (var namedArgument in attr.NamedArguments)
src\tools\illink\src\ILLink.Shared\DataFlow\DefaultValueDictionary.cs (6)
20IEnumerable<KeyValuePair<TKey, TValue>> 61foreach (var kvp in other.Dictionary) 74public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() 76return Dictionary?.GetEnumerator() ?? Enumerable.Empty<KeyValuePair<TKey, TValue>>().GetEnumerator(); 87foreach (var kvp in Dictionary) 102foreach (var kvp in Dictionary)
src\tools\illink\src\ILLink.Shared\DataFlow\DictionaryLattice.cs (1)
30foreach (var kvp in right)
TrimAnalysis\ArrayValue.cs (2)
61foreach (var kvp in IndexValues) 72foreach (var kvp in IndexValues)
ILLink.Tasks (2)
CreateRuntimeRootDescriptorFile.cs (2)
374foreach (var type in members) 384foreach (var type in classNamesToClassMembers)
InMemory.FunctionalTests (111)
BadHttpRequestTests.cs (4)
289private class BadRequestEventListener : IObserver<KeyValuePair<string, object>>, IDisposable 292private Action<KeyValuePair<string, object>> _callback; 296public BadRequestEventListener(DiagnosticListener diagnosticListener, Action<KeyValuePair<string, object>> callback) 306public void OnNext(KeyValuePair<string, object> pair)
Http2\Http2ConnectionTests.cs (26)
300public void Add(KeyValuePair<string, StringValues> item) => _innerHeaders.Add(item); 302public bool Contains(KeyValuePair<string, StringValues> item) => _innerHeaders.Contains(item); 304public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) => _innerHeaders.CopyTo(array, arrayIndex); 305public IEnumerator<KeyValuePair<string, StringValues>> GetEnumerator() => _innerHeaders.GetEnumerator(); 307public bool Remove(KeyValuePair<string, StringValues> item) => _innerHeaders.Remove(item); 2247foreach (var header in _requestTrailers) 2849public Task HEADERS_Received_HeaderBlockContainsDuplicatePseudoHeaderField_ConnectionError(IEnumerable<KeyValuePair<string, string>> headers) 2859public async Task HEADERS_Received_HeaderBlockDoesNotContainMandatoryPseudoHeaderField_MethodIsCONNECT_NoError(IEnumerable<KeyValuePair<string, string>> headers) 2877public Task HEADERS_Received_HeaderBlockContainsPseudoHeaderFieldAfterRegularHeaders_ConnectionError(IEnumerable<KeyValuePair<string, string>> headers) 2885private async Task HEADERS_Received_InvalidHeaderFields_ConnectionError(IEnumerable<KeyValuePair<string, string>> headers, string expectedErrorMessage, ConnectionEndReason expectedEndReason) 2900public async Task HEADERS_Received_HeaderBlockDoesNotContainMandatoryPseudoHeaderField_StreamError(IEnumerable<KeyValuePair<string, string>> headers) 2958var headers = new List<KeyValuePair<string, string>>(); 4946public async Task CONTINUATION_Received_HeaderBlockDoesNotContainMandatoryPseudoHeaderField_StreamError(IEnumerable<KeyValuePair<string, string>> headers) 4971public async Task CONTINUATION_Received_HeaderBlockDoesNotContainMandatoryPseudoHeaderField_MethodIsCONNECT_NoError(IEnumerable<KeyValuePair<string, string>> headers) 6057public static TheoryData<IEnumerable<KeyValuePair<string, string>>> DuplicatePseudoHeaderFieldData 6061var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>(); 6070foreach (var headerField in requestHeaders) 6080public static TheoryData<IEnumerable<KeyValuePair<string, string>>> MissingPseudoHeaderFieldData 6084var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>(); 6092foreach (var headerField in requestHeaders) 6102public static TheoryData<IEnumerable<KeyValuePair<string, string>>> ConnectMissingPseudoHeaderFieldData 6106var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>(); 6107var methodHeader = new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"); 6115public static TheoryData<IEnumerable<KeyValuePair<string, string>>> PseudoHeaderFieldAfterRegularHeadersData 6119var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>(); 6129foreach (var headerField in requestHeaders.Where(h => h.Key.StartsWith(':')))
Http2\Http2StreamTests.cs (1)
835var headers = new List<KeyValuePair<string, string>>()
Http2\Http2TestBase.cs (21)
38protected static readonly IEnumerable<KeyValuePair<string, string>> _browserRequestHeaders = new[] 51protected static readonly IEnumerable<KeyValuePair<string, string>> _postRequestHeaders = new[] 59protected static readonly IEnumerable<KeyValuePair<string, string>> _expectContinueRequestHeaders = new[] 68protected static readonly IEnumerable<KeyValuePair<string, string>> _requestTrailers = new[] 74protected static readonly IEnumerable<KeyValuePair<string, string>> _oneContinuationRequestHeaders = new[] 86protected static readonly IEnumerable<KeyValuePair<string, string>> _twoContinuationsRequestHeaders = new[] 101protected static IEnumerable<KeyValuePair<string, string>> ReadRateRequestHeaders(int expectedBytes) => new[] 196foreach (var header in context.Request.Headers) 222foreach (var header in context.Request.Headers) 229foreach (var header in trailers) 507public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>(); 614protected Task StartStreamAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, bool endStream, bool flushFrame = true) 648protected Task SendHeadersWithPaddingAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, bool endStream) 690protected Task SendHeadersWithPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte priority, int streamDependency, bool endStream) 735protected Task SendHeadersWithPaddingAndPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, byte priority, int streamDependency, bool endStream) 883internal Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 965internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 981internal Http2HeadersEnumerator GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers) 1350protected void VerifyDecodedRequestHeaders(IEnumerable<KeyValuePair<string, string>> expectedHeaders) 1352foreach (var header in expectedHeaders)
Http3\Http3ConnectionTests.cs (8)
27private static readonly KeyValuePair<string, string>[] Headers = new[] 414var maxFieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); 811private async Task<ConnectionContext> MakeRequestAsync(int index, KeyValuePair<string, string>[] headers, bool sendData, bool waitForServerDispose) 864public void Add(KeyValuePair<string, StringValues> item) => _innerHeaders.Add(item); 866public bool Contains(KeyValuePair<string, StringValues> item) => _innerHeaders.Contains(item); 868public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) => _innerHeaders.CopyTo(array, arrayIndex); 869public IEnumerator<KeyValuePair<string, StringValues>> GetEnumerator() => _innerHeaders.GetEnumerator(); 871public bool Remove(KeyValuePair<string, StringValues> item) => _innerHeaders.Remove(item);
Http3\Http3StreamTests.cs (21)
2187public static TheoryData<IEnumerable<KeyValuePair<string, string>>> DuplicatePseudoHeaderFieldData 2191var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>(); 2200foreach (var headerField in requestHeaders) 2210public static TheoryData<IEnumerable<KeyValuePair<string, string>>> ConnectMissingPseudoHeaderFieldData 2214var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>(); 2215var methodHeader = new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"); 2223public static TheoryData<IEnumerable<KeyValuePair<string, string>>> PseudoHeaderFieldAfterRegularHeadersData 2227var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>(); 2237foreach (var headerField in requestHeaders.Where(h => h.Key.StartsWith(':'))) 2247public static TheoryData<IEnumerable<KeyValuePair<string, string>>> MissingPseudoHeaderFieldData 2251var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>(); 2259foreach (var headerField in requestHeaders) 2271public Task HEADERS_Received_HeaderBlockContainsDuplicatePseudoHeaderField_ConnectionError(IEnumerable<KeyValuePair<string, string>> headers) 2278public async Task HEADERS_Received_HeaderBlockDoesNotContainMandatoryPseudoHeaderField_MethodIsCONNECT_NoError(IEnumerable<KeyValuePair<string, string>> headers) 2289public Task HEADERS_Received_HeaderBlockContainsPseudoHeaderFieldAfterRegularHeaders_ConnectionError(IEnumerable<KeyValuePair<string, string>> headers) 2294private async Task HEADERS_Received_InvalidHeaderFields_StreamError(IEnumerable<KeyValuePair<string, string>> headers, string expectedErrorMessage, Http3ErrorCode? errorCode = null) 2306public async Task HEADERS_Received_HeaderBlockDoesNotContainMandatoryPseudoHeaderField_StreamError(IEnumerable<KeyValuePair<string, string>> headers) 2394var headers = new List<KeyValuePair<string, string>>(); 2422var headers = new List<KeyValuePair<string, string>>(); 2816var maxFieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout(); 3246var fieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout();
Http3\Http3TestBase.cs (2)
37protected static readonly IEnumerable<KeyValuePair<string, string>> _browserRequestHeaders = new[] 50protected static IEnumerable<KeyValuePair<string, string>> ReadRateRequestHeaders(int expectedBytes) => new[]
Http3\WebTransport\WebTransportHandshakeTests.cs (1)
132var headersConnectFrame = new List<KeyValuePair<string, string>>();
KestrelMetricsTests.cs (2)
433public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>();
src\Servers\Kestrel\shared\ConnectionCompletion.cs (5)
12public static Task FireOnCompletedAsync(ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>>? onCompleted) 22private static Task CompleteAsyncMayAwait(ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>> onCompleted) 24while (onCompleted.TryPop(out var entry)) 43private static async Task CompleteAsyncAwaited(Task currentTask, ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>> onCompleted) 54while (onCompleted.TryPop(out var entry))
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (3)
20internal sealed class Http2HeadersEnumerator : IEnumerator<KeyValuePair<string, string>> 34private IEnumerator<KeyValuePair<string, StringValues>>? _genericEnumerator; 43public KeyValuePair<string, string> Current { get; private set; }
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (9)
45_serverReceivedSettings = Channel.CreateUnbounded<KeyValuePair<Http3SettingType, long>>(); 82internal readonly Channel<KeyValuePair<Http3SettingType, long>> _serverReceivedSettings; 91internal ChannelReader<KeyValuePair<Http3SettingType, long>> ServerReceivedSettingsReader => _serverReceivedSettings.Reader; 267internal async ValueTask<Http3RequestStream> InitializeConnectionAndStreamsAsync(RequestDelegate application, IEnumerable<KeyValuePair<string, string>> headers, bool endStream = false) 418internal async ValueTask<Http3RequestStream> CreateRequestStream(IEnumerable<KeyValuePair<string, string>> headers, 694public Task SendHeadersAsync(IEnumerable<KeyValuePair<string, string>> headers, bool endStream = false) 712internal Http3HeadersEnumerator GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers) 1040public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>();
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (7)
42private List<KeyValuePair<Type, object>>? MaybeExtra; 78var kv = MaybeExtra[i]; 108MaybeExtra = new List<KeyValuePair<Type, object>>(2); 391private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 448foreach (var item in MaybeExtra) 455IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
InProcessWebSite (3)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.WebSockets.cs (1)
149foreach (var headerPair in responseHeaders)
src\Servers\IIS\IIS\test\testassets\shared\WebSockets\HandshakeHelpers.cs (1)
13public static IEnumerable<KeyValuePair<string, string>> GenerateResponseHeaders(string key)
src\Servers\IIS\IIS\test\testassets\shared\WebSockets\TestStartup.cs (1)
50foreach (var requestDelegate in delegates)
installer.tasks (1)
GenerateFileVersionProps.cs (1)
138foreach (var fileData in fileVersions)
Interop.FunctionalTests (4)
Http2\Http2RequestTests.cs (1)
53meterListener.SetMeasurementEventCallback<double>((Instrument instrument, double measurement, ReadOnlySpan<KeyValuePair<string, object>> tags, object state) =>
Http3\Http3RequestTests.cs (2)
175public IReadOnlyList<KeyValuePair<string, object>> LogScope { get; private set; } 220loggerPovider.LogScope ??= scopeObject as IReadOnlyList<KeyValuePair<string, object>>;
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
InteropTests (1)
src\Shared\Process\ProcessEx.cs (1)
116foreach (var envVar in envVars)
Metrics (132)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
Metrics.Legacy (132)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
Microsoft.Analyzers.Extra (3)
CallAnalysis\CallAnalyzer.Registrar.cs (3)
68foreach (var pair in methods) 146foreach (var pair in props) 202foreach (var pair in methods)
Microsoft.Analyzers.Local (6)
ApiLifecycle\Json\JsonObject.cs (3)
17internal sealed class JsonObject : IEnumerable<KeyValuePair<string, JsonValue>>, IEnumerable<JsonValue> 133public IEnumerator<KeyValuePair<string, JsonValue>> GetEnumerator() => _properties.GetEnumerator(); 166foreach (var property in _object)
CallAnalysis\CallAnalyzer.Registrar.cs (3)
68foreach (var pair in methods) 146foreach (var pair in props) 202foreach (var pair in methods)
Microsoft.Analyzers.Local.Tests (3)
Json\JsonObjectTest.cs (3)
66Assert.Equal(typeof(KeyValuePair<string, JsonValue>), value.GetType()); 79Assert.IsType<KeyValuePair<string, JsonValue>>(value); 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.Arcade.Test.Common (2)
DiffUtil.cs (2)
124protected IEnumerable<KeyValuePair<int, int>> GetMatchingPairs(TSequence sequenceA, int lengthA, TSequence sequenceB, int lengthB) 206foreach (var pair in GetMatchingPairs(sequenceA, lengthA, sequenceB, lengthB))
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
467foreach (var item in _builtApplication.Properties)
Microsoft.AspNetCore.App.Analyzers (3)
Mvc\DetectOverriddenAuthorizeAttribute.cs (1)
122foreach (var arg in attributeUsage.NamedArguments)
RouteEmbeddedLanguage\Infrastructure\RoutePatternParametersDetector.cs (1)
51foreach (var namedArgument in attributeData.NamedArguments)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
206foreach (var namedArgument in attribute.NamedArguments)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Http\HeaderDictionaryIndexerAnalyzerTests.cs (1)
183var mapping = propertyMapping.SingleOrDefault(kvp => kvp.Value == propertyName);
Microsoft.AspNetCore.App.CodeFixes (2)
Dependencies\ExtensionMethodsCompletionProvider.cs (2)
73foreach (var item in matchingExtensionMethods) 102KeyValuePair<ThisAndExtensionMethod, PackageSourceAndNamespace> pair,
Microsoft.AspNetCore.Authentication (2)
PropertiesSerializer.cs (1)
53foreach (var item in properties.Items)
TicketSerializer.cs (1)
134foreach (var property in claim.Properties)
Microsoft.AspNetCore.Authentication.Cookies (4)
CookieAuthenticationHandler.cs (1)
142foreach (var item in ticket.Properties.Items)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (3)
199var keyValuePairs = new KeyValuePair<string, string>[cookieChunkCount + 1]; 296var keyValuePairs = new KeyValuePair<string, string>[chunks + 1]; 315var keyValuePairs = new List<KeyValuePair<string, string>>();
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
90foreach (var file in _files)
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
331foreach (var additionalParameter in Options.AdditionalAuthorizationParameters)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectHandler.cs (1)
453foreach (var additionalParameter in Options.AdditionalAuthorizationParameters)
Microsoft.AspNetCore.Authentication.Test (9)
OAuthTests.cs (2)
136var setCookie = Assert.Single(res.Headers, h => h.Key == "Set-Cookie"); 164var setCookie = Assert.Single(res.Headers, h => h.Key == "Set-Cookie");
OpenIdConnect\OpenIdConnectTests.cs (4)
79var setCookie = Assert.Single(res.Headers, h => h.Key == "Set-Cookie"); 106var setCookie = Assert.Single(res.Headers, h => h.Key == "Set-Cookie"); 132var setCookie = Assert.Single(res.Headers, h => h.Key == "Set-Cookie"); 159var setCookie = Assert.Single(res.Headers, h => h.Key == "Set-Cookie");
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
WsFederation\WsFederationTest.cs (1)
248var kvps = new List<KeyValuePair<string, string>>();
WsFederation\WsFederationTest_Handler.cs (1)
246var kvps = new List<KeyValuePair<string, string>>();
Microsoft.AspNetCore.Authentication.Twitter (5)
TwitterHandler.cs (5)
202foreach (var queryParameter in queryParameters) 209foreach (var formItem in formData) 216foreach (var signaturePart in signatureParts) 238foreach (var queryParam in queryParameters) 248foreach (var authorizationPart in authorizationParts)
Microsoft.AspNetCore.Authorization (6)
src\Shared\Debugger\DebuggerHelpers.cs (6)
15return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1) }, includeNullValues, prefix); 20return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1), Create(key2, value2) }, includeNullValues, prefix); 25return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1), Create(key2, value2), Create(key3, value3) }, includeNullValues, prefix); 28public static string GetDebugText(ReadOnlySpan<KeyValuePair<string, object?>> values, bool includeNullValues = true, string? prefix = null) 44var kvp = values[i]; 114private static KeyValuePair<string, object?> Create(string key, object? value) => new KeyValuePair<string, object?>(key, value);
Microsoft.AspNetCore.Authorization.Test (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Components (44)
DynamicComponent.cs (1)
99foreach (var entry in Parameters)
ParameterAttribute.cs (1)
28/// can be used with <see cref="RenderTreeBuilder.AddMultipleAttributes(int, System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{string, System.Object}})"/>
ParameterView.cs (1)
306foreach (var kvp in parameters)
Reflection\MemberAssignment.cs (1)
49foreach (var item in dictionary)
Rendering\RenderTreeBuilder.cs (2)
437public void AddMultipleAttributes(int sequence, IEnumerable<KeyValuePair<string, object>>? attributes) 446foreach (var attribute in attributes)
RenderTree\Renderer.cs (1)
19using CategoryLink = Tuple<ActivityContext, KeyValuePair<string, object?>?>;
RenderTree\RenderTreeDiffBuilder.cs (2)
294foreach (var keyValuePair in keyedItemInfos) 529foreach (var kvp in diffContext.AttributeDiffSet)
RouteView.cs (1)
89foreach (var kvp in RouteData.RouteValues)
Routing\RouteTable.cs (2)
31foreach (var kvp in endpointRouteData.RouteValues) 81foreach (var kvp in routeValues)
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (21)
47internal KeyValuePair<string, object?>[] _arrayStorage; 108_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 167public RouteValueDictionary(IEnumerable<KeyValuePair<string, object?>>? values) 175_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 252private void Initialize(IEnumerable<KeyValuePair<string, object?>> keyValueEnumerable) 254_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 256foreach (var kvp in keyValueEnumerable) 315bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => false; 358void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) 409bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) 441void ICollection<KeyValuePair<string, object?>>.CopyTo( 442KeyValuePair<string, object?>[] array, 470IEnumerator<KeyValuePair<string, object?>> IEnumerable<KeyValuePair<string, object?>>.GetEnumerator() 482bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item) 695var array = new KeyValuePair<string, object?>[capacity]; 788public struct Enumerator : IEnumerator<KeyValuePair<string, object?>> 808public KeyValuePair<string, object?> Current { get; private set; }
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (2)
463foreach (var kvp in defaults) 496foreach (var kvp in requiredValues)
src\Http\Routing\src\Patterns\RoutePatternMatcher.cs (2)
187foreach (var kvp in Defaults) 493foreach (var item in outValues)
src\Http\Routing\src\RouteConstraintBuilder.cs (1)
55foreach (var kvp in _constraints)
src\Http\Routing\src\RouteConstraintMatcher.cs (1)
61foreach (var kvp in constraints)
src\Shared\Components\ComponentsActivityLinkStore.cs (3)
16using CategoryLink = Tuple<ActivityContext, KeyValuePair<string, object?>?>; 39public void SetActivityContext(string category, ActivityContext activityLink, KeyValuePair<string, object?>? tag) 46foreach (var kvp in _store)
src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentFacts.cs (1)
64foreach (var kvp in attribute.NamedArguments)
Microsoft.AspNetCore.Components.Endpoints (7)
Builder\ResourcePreloadCollection.cs (1)
46foreach (var group in _storage)
RazorComponentEndpointHost.cs (1)
57foreach (var kvp in ComponentParameters)
Rendering\EndpointHtmlRenderer.cs (1)
289public IEnumerator<KeyValuePair<string, StringValues>> GetEnumerator()
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (1)
85foreach (var kvp in auto.Saved)
src\Shared\Components\ComponentsActivityLinkStore.cs (3)
16using CategoryLink = Tuple<ActivityContext, KeyValuePair<string, object?>?>; 39public void SetActivityContext(string category, ActivityContext activityLink, KeyValuePair<string, object?>? tag) 46foreach (var kvp in _store)
Microsoft.AspNetCore.Components.Endpoints.Tests (6)
Binding\FormDataMapperTests.cs (4)
81foreach (var kvp in collection) 1659var expected = new KeyValuePair<string, int>("Age", 20); 1670var result = FormDataMapper.Map<KeyValuePair<string, int>>(reader, options);
Binding\FormDataMetadataFactoryTests.cs (2)
157var metadata = factory.GetOrCreateMetadataFor(typeof(KeyValuePair<int, string>), options); 161Assert.Equal(typeof(KeyValuePair<int, string>), metadata.Type);
Microsoft.AspNetCore.Components.Forms (3)
EditContext.cs (3)
109foreach (var state in _fieldStates) 123foreach (var state in _fieldStates) 144foreach (var state in _fieldStates)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentFacts.cs (1)
64foreach (var kvp in attribute.NamedArguments)
Microsoft.AspNetCore.Components.Server (4)
src\Shared\Components\ComponentsActivityLinkStore.cs (3)
16using CategoryLink = Tuple<ActivityContext, KeyValuePair<string, object?>?>; 39public void SetActivityContext(string category, ActivityContext activityLink, KeyValuePair<string, object?>? tag) 46foreach (var kvp in _store)
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (1)
599foreach (var header in headers)
Microsoft.AspNetCore.Components.Server.Tests (2)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
src\SignalR\common\SignalR.Common\test\Internal\Protocol\HubMessageHelpers.cs (1)
14foreach (var header in headers)
Microsoft.AspNetCore.Components.Tests (9)
ParameterViewTest.Assignment.cs (1)
718[Parameter(CaptureUnmatchedValues = true)] public KeyValuePair<string, object>[] CaptureUnmatchedValuesProp { get; set; }
PersistentState\ComponentStatePersistenceManagerTest.cs (1)
127var persisted = Assert.Single(testStore.State);
PersistentState\PersistentServicesRegistryTest.cs (1)
148var kvp = Assert.Single(testStore.State);
RendererTest.cs (1)
5385foreach (var kvp in ChildParameters)
Rendering\RenderTreeBuilderTest.cs (4)
382var attributes = new List<KeyValuePair<string, object>>() 396var attributes = new KeyValuePair<string, object>[] 407private void CanAddMultipleAttributesTest(IEnumerable<KeyValuePair<string, object>> attributes) 421foreach (var attribute in attributes)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Components.Web (3)
Forms\InputBase.cs (1)
355foreach (var item in source)
Forms\Mapping\FormMappingContext.cs (2)
14private List<KeyValuePair<string, FormMappingError>>? _pendingErrors; 101private static void AddErrorCore(Dictionary<string, FormMappingError> errors, string key, FormattableString error, string? attemptedValue, ref List<KeyValuePair<string, FormMappingError>>? pendingErrors)
Microsoft.AspNetCore.Components.WebView (1)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
121foreach (var child in candidate.Children!)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
70foreach (var item in _counters)
Microsoft.AspNetCore.Connections.Abstractions (16)
ConnectionItems.cs (13)
84void ICollection<KeyValuePair<object, object?>>.Add(KeyValuePair<object, object?> item) 89void ICollection<KeyValuePair<object, object?>>.Clear() 94bool ICollection<KeyValuePair<object, object?>>.Contains(KeyValuePair<object, object?> item) 99void ICollection<KeyValuePair<object, object?>>.CopyTo(KeyValuePair<object, object?>[] array, int arrayIndex) 104int ICollection<KeyValuePair<object, object?>>.Count 109bool ICollection<KeyValuePair<object, object?>>.IsReadOnly 114bool ICollection<KeyValuePair<object, object?>>.Remove(KeyValuePair<object, object?> item) 123IEnumerator<KeyValuePair<object, object?>> IEnumerable<KeyValuePair<object, object?>>.GetEnumerator()
Features\IConnectionMetricsTagsFeature.cs (1)
16ICollection<KeyValuePair<string, object?>> Tags { get; }
src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
Microsoft.AspNetCore.CookiePolicy (3)
ResponseCookiesWrapper.cs (3)
138public void Append(ReadOnlySpan<KeyValuePair<string, string>> keyValuePairs, CookieOptions options) 142var nonSuppressedValues = new List<KeyValuePair<string, string>>(keyValuePairs.Length); 144foreach (var keyValuePair in keyValuePairs)
Microsoft.AspNetCore.CookiePolicy.Test (3)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (3)
199var keyValuePairs = new KeyValuePair<string, string>[cookieChunkCount + 1]; 296var keyValuePairs = new KeyValuePair<string, string>[chunks + 1]; 315var keyValuePairs = new List<KeyValuePair<string, string>>();
Microsoft.AspNetCore.Cors (6)
src\Shared\Debugger\DebuggerHelpers.cs (6)
15return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1) }, includeNullValues, prefix); 20return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1), Create(key2, value2) }, includeNullValues, prefix); 25return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1), Create(key2, value2), Create(key3, value3) }, includeNullValues, prefix); 28public static string GetDebugText(ReadOnlySpan<KeyValuePair<string, object?>> values, bool includeNullValues = true, string? prefix = null) 44var kvp = values[i]; 114private static KeyValuePair<string, object?> Create(string key, object? value) => new KeyValuePair<string, object?>(key, value);
Microsoft.AspNetCore.DataProtection (4)
KeyManagement\XmlKeyManager.cs (2)
102var keyRepositoryEncryptorPair = GetFallbackKeyRepositoryEncryptorPair(); 645internal KeyValuePair<IXmlRepository, IXmlEncryptor?> GetFallbackKeyRepositoryEncryptorPair()
XmlEncryption\XmlEncryptionExtensions.cs (2)
63foreach (var entry in placeholderReplacements) 144foreach (var entry in placeholderReplacements)
Microsoft.AspNetCore.DataProtection.Tests (2)
Internal\KeyManagementOptionsSetupTest.cs (1)
81foreach (var entry in regValues)
RegistryPolicyResolverTests.cs (1)
255foreach (var entry in regValues)
Microsoft.AspNetCore.Diagnostics (15)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
242foreach (var pair in httpContext.Request.Headers)
DeveloperExceptionPage\Views\ErrorPage.Designer.cs (4)
897foreach (var kv in Model.Query.OrderBy(kv => kv.Key)) 984foreach (var kv in Model.Cookies.OrderBy(kv => kv.Key)) 1068foreach (var kv in Model.Headers.OrderBy(kv => kv.Key)) 1421foreach (var kv in Model.RouteValues.OrderBy(kv => kv.Key))
src\Shared\Diagnostics\ActivityCreator.cs (3)
20IEnumerable<KeyValuePair<string, object?>>? tags, 77foreach (var tag in tags) 115foreach (var baggageItem in baggage)
src\Shared\Metrics\MetricsExtensions.cs (7)
33private static void SetTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags) 37if (tags is List<KeyValuePair<string, object?>> list) 50foreach (var tag in tags) 62private static bool TryAddTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags) 66if (tags is List<KeyValuePair<string, object?>> list) 68foreach (var tag in list) 78foreach (var tag in tags)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (8)
DatabaseErrorPageMiddleware.cs (5)
22public class DatabaseErrorPageMiddleware : IObserver<DiagnosticListener>, IObserver<KeyValuePair<string, object?>> 162void IObserver<KeyValuePair<string, object?>>.OnNext(KeyValuePair<string, object?> keyValuePair) 191void IObserver<KeyValuePair<string, object?>>.OnCompleted() 195void IObserver<KeyValuePair<string, object?>>.OnError(Exception error)
src\Shared\Diagnostics\ActivityCreator.cs (3)
20IEnumerable<KeyValuePair<string, object?>>? tags, 77foreach (var tag in tags) 115foreach (var baggageItem in baggage)
Microsoft.AspNetCore.Diagnostics.Middleware (8)
Logging\HeaderNormalizer.cs (1)
10public static string[] PrepareNormalizedHeaderNames(KeyValuePair<string, DataClassification>[] headers, string prefix)
Logging\HeaderReader.cs (3)
18private readonly KeyValuePair<string, DataClassification>[] _headers; 29public void Read(IHeaderDictionary headers, IList<KeyValuePair<string, object?>> logContext) 38var header = _headers[i];
Logging\HttpLoggingRedactionInterceptor.cs (1)
175foreach (var pair in loggerMessageState)
Logging\IncomingHttpRouteUtility.cs (1)
37foreach (var defaultParameter in defaultSensitiveParameters)
Logging\RequestHeadersLogEnricher.cs (2)
21private readonly KeyValuePair<string, DataClassification>[] _headersDataClasses; 67var header = _headersDataClasses[i];
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (18)
Logging\HeaderReaderTests.cs (4)
21var listToFill = new List<KeyValuePair<string, object?>>(); 31var listToFill = new List<KeyValuePair<string, object?>>(); 56var listToFill = new List<KeyValuePair<string, object?>>(); 61var redacted = listToFill[0];
Logging\TestLogEnrichmentTagCollector.cs (2)
13public TestLogEnrichmentTagCollector(IEnumerable<KeyValuePair<string, object>>? input = null) 17foreach (var kvp in input)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.AspNetCore.Diagnostics.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Grpc.JsonTranscoding (5)
Internal\Json\MessageTypeInfoResolver.cs (1)
55foreach (var mapping in mappings)
Internal\JsonRequestHelpers.cs (2)
280foreach (var parameterDescriptor in serverCallContext.DescriptorInfo.RouteParameterDescriptors) 289foreach (var item in serverCallContext.HttpContext.Request.Query)
Internal\JsonTranscodingServerCallContext.cs (1)
147foreach (var header in HttpContext.Request.Headers)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
482foreach (var routeParameter in routeParameters)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
JsonTranscodingServiceMethodProviderTests.cs (1)
123var values = (IReadOnlyList<KeyValuePair<string, object?>>)w.State;
Microsoft.AspNetCore.Grpc.Swagger (6)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (2)
104foreach (var routeParameter in routeParameters) 147foreach (var queryDescription in queryParameters)
Internal\GrpcModelMetadata.cs (1)
29public override IEnumerable<KeyValuePair<EnumGroupAndName, string>> EnumGroupedDisplayNamesAndValues { get; }
Internal\XmlComments\GrpcXmlCommentsDocumentFilter.cs (2)
35foreach (var nameAndType in nameAndServiceDescriptor) 53private bool TryAdd(OpenApiDocument swaggerDoc, KeyValuePair<string, ActionDescriptor> nameAndType, Type type)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (1)
482foreach (var routeParameter in routeParameters)
Microsoft.AspNetCore.HeaderParsing (1)
HeaderParsingOptionsManualValidator.cs (1)
14foreach (var item in options.MaxCachedValuesPerHeader)
Microsoft.AspNetCore.Hosting (27)
Internal\HostingApplicationDiagnostics.cs (3)
490private sealed class HostingLogScope : IReadOnlyList<KeyValuePair<string, object>> 499public KeyValuePair<string, object> this[int index] 538public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Internal\HostingMetrics.cs (1)
45public void RequestEnd(string protocol, string scheme, string method, string? route, int statusCode, bool unhandledRequest, Exception? exception, List<KeyValuePair<string, object?>>? customTags, long startTimestamp, long currentTimestamp, bool disableHttpRequestDurationMetric)
Internal\HostingRequestFinishedLog.cs (3)
12internal sealed class HostingRequestFinishedLog : IReadOnlyList<KeyValuePair<string, object?>> 24public KeyValuePair<string, object?> this[int index] 72public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
Internal\HostingRequestStartingLog.cs (3)
10internal sealed class HostingRequestStartingLog : IReadOnlyList<KeyValuePair<string, object?>> 23public KeyValuePair<string, object?> this[int index] => index switch 54public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
Internal\HostingRequestUnhandledLog.cs (3)
9internal sealed class HostingRequestUnhandledLog : IReadOnlyList<KeyValuePair<string, object?>> 21public KeyValuePair<string, object?> this[int index] => index switch 50public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
Internal\HttpMetricsTagsFeature.cs (3)
10ICollection<KeyValuePair<string, object?>> IHttpMetricsTagsFeature.Tags => TagsList; 13public List<KeyValuePair<string, object?>> TagsList { get; } = new List<KeyValuePair<string, object?>>();
src\Shared\Diagnostics\ActivityCreator.cs (3)
20IEnumerable<KeyValuePair<string, object?>>? tags, 77foreach (var tag in tags) 115foreach (var baggageItem in baggage)
src\Shared\Metrics\MetricsExtensions.cs (7)
33private static void SetTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags) 37if (tags is List<KeyValuePair<string, object?>> list) 50foreach (var tag in tags) 62private static bool TryAddTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags) 66if (tags is List<KeyValuePair<string, object?>> list) 68foreach (var tag in list) 78foreach (var tag in tags)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
121foreach (var child in candidate.Children!)
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingAbstractionsWebHostBuilderExtensions.cs (1)
26foreach (var setting in configuration.AsEnumerable(makePathsRelative: true))
Microsoft.AspNetCore.Hosting.Tests (18)
HostingApplicationDiagnosticsTests.cs (4)
1184private class CallbackDiagnosticListener : IObserver<KeyValuePair<string, object>> 1186private readonly Action<KeyValuePair<string, object>> _callback; 1188public CallbackDiagnosticListener(Action<KeyValuePair<string, object>> callback) 1193public void OnNext(KeyValuePair<string, object> value)
HostingApplicationTests.cs (1)
224public IEnumerator<KeyValuePair<Type, object>> GetEnumerator() => Features.GetEnumerator();
HostingMetricsTests.cs (2)
182public ICollection<KeyValuePair<string, object>> Tags { get; } = new Collection<KeyValuePair<string, object>>();
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
70foreach (var item in _counters)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
WebHostBuilderTests.cs (3)
325new KeyValuePair<string, string>[] 345new KeyValuePair<string, string>[] 399new KeyValuePair<string, string>[]
WebHostTests.cs (6)
1331public IEnumerator<KeyValuePair<Type, object>> GetEnumerator() 1416public void Add(KeyValuePair<string, StringValues> item) { } 1422public bool Contains(KeyValuePair<string, StringValues> item) => false; 1426public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) { } 1428public IEnumerator<KeyValuePair<string, StringValues>> GetEnumerator() => null; 1434public bool Remove(KeyValuePair<string, StringValues> item) => false;
Microsoft.AspNetCore.Http (98)
Features\QueryFeature.cs (1)
208foreach (var entry in _expandingAccumulator)
Features\RequestCookiesFeature.cs (1)
84foreach (var pair in _parsedValues)
FormCollection.cs (5)
25private static readonly IEnumerator<KeyValuePair<string, StringValues>> EmptyIEnumeratorType = default(Enumerator); 146IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator() 175public struct Enumerator : IEnumerator<KeyValuePair<string, StringValues>> 204public KeyValuePair<string, StringValues> Current
HeaderDictionary.cs (11)
23private static readonly IEnumerator<KeyValuePair<string, StringValues>> EmptyIEnumeratorType = default(Enumerator); 194public void Add(KeyValuePair<string, StringValues> item) 232public bool Contains(KeyValuePair<string, StringValues> item) 262public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 269foreach (var item in Store) 281public bool Remove(KeyValuePair<string, StringValues> item) 345IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator() 396public struct Enumerator : IEnumerator<KeyValuePair<string, StringValues>> 425public KeyValuePair<string, StringValues> Current 433return default(KeyValuePair<string, StringValues>);
Internal\ItemsDictionary.cs (17)
89void ICollection<KeyValuePair<object, object?>>.Add(KeyValuePair<object, object?> item) 95void ICollection<KeyValuePair<object, object?>>.Clear() => _items?.Clear(); 97bool ICollection<KeyValuePair<object, object?>>.Contains(KeyValuePair<object, object?> item) 100void ICollection<KeyValuePair<object, object?>>.CopyTo(KeyValuePair<object, object?>[] array, int arrayIndex) 111int ICollection<KeyValuePair<object, object?>>.Count => _items?.Count ?? 0; 113bool ICollection<KeyValuePair<object, object?>>.IsReadOnly => _items?.IsReadOnly ?? false; 115bool ICollection<KeyValuePair<object, object?>>.Remove(KeyValuePair<object, object?> item) 138IEnumerator<KeyValuePair<object, object?>> IEnumerable<KeyValuePair<object, object?>>.GetEnumerator() 143private sealed class EmptyEnumerator : IEnumerator<KeyValuePair<object, object?>> 146public static readonly IEnumerator<KeyValuePair<object, object?>> Instance = new EmptyEnumerator(); 147public KeyValuePair<object, object?> Current => default; 164public static ICollection<KeyValuePair<object, object?>> Collection => Dictionary;
Internal\RequestCookieCollection.cs (7)
23private static readonly IEnumerator<KeyValuePair<string, string>> EmptyIEnumeratorType = default(Enumerator); 149IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator() 175public struct Enumerator : IEnumerator<KeyValuePair<string, string>> 196public KeyValuePair<string, string> Current 202var current = _dictionaryEnumerator.Current; 205return default(KeyValuePair<string, string>);
Internal\ResponseCookies.cs (3)
68public void Append(ReadOnlySpan<KeyValuePair<string, string>> keyValuePairs, CookieOptions options) 83foreach (var keyValuePair in keyValuePairs) 94foreach (var keyValuePair in keyValuePairs)
QueryCollection.cs (6)
24private static readonly IEnumerator<KeyValuePair<string, StringValues>> EmptyIEnumeratorType = default(Enumerator); 164IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator() 191public struct Enumerator : IEnumerator<KeyValuePair<string, StringValues>> 220public KeyValuePair<string, StringValues> Current 228return default(KeyValuePair<string, StringValues>);
QueryCollectionInternal.cs (4)
73IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator() 85public struct Enumerator : IEnumerator<KeyValuePair<string, StringValues>> 114public KeyValuePair<string, StringValues> Current => _notEmpty ? _dictionaryEnumerator.Current : default;
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (5)
119public void Add(KeyValuePair<TKey, TValue> item) 129public bool Contains(KeyValuePair<TKey, TValue> item) 134public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 139public bool Remove(KeyValuePair<TKey, TValue> item) 144public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (8)
136public void Add(KeyValuePair<TKey, TValue> item) 138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item); 146public bool Contains(KeyValuePair<TKey, TValue> item) 148return ((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).Contains(item); 151public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 153((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).CopyTo(array, arrayIndex); 156public bool Remove(KeyValuePair<TKey, TValue> item) 158return ((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Remove(item);
src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
src\Shared\Debugger\StringValuesDictionaryDebugView.cs (3)
13private readonly IEnumerable<KeyValuePair<string, StringValues>> _enumerable; 15public StringValuesDictionaryDebugView(IEnumerable<KeyValuePair<string, StringValues>> enumerable) 26foreach (var kvp in _enumerable)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (25)
25internal KeyValuePair<TKey, TValue>[]? _arrayStorage; 74_arrayStorage = Array.Empty<KeyValuePair<TKey, TValue>>(); 78_arrayStorage = new KeyValuePair<TKey, TValue>[capacity]; 150bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 203void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 211((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Add(item); 264bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 268return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage).Contains(item); 291void ICollection<KeyValuePair<TKey, TValue>>.CopyTo( 292KeyValuePair<TKey, TValue>[] array, 314((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).CopyTo(array, arrayIndex); 324IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 346bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 368return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Remove(item); 520foreach (var item in _arrayStorage) 531var array = new KeyValuePair<TKey, TValue>[capacity]; 540private Span<KeyValuePair<TKey, TValue>> ArrayStorageSpan 548ref var r = ref MemoryMarshal.GetArrayDataReference(_arrayStorage); 581foreach (ref var item in ArrayStorageSpan) 599public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>> 630public KeyValuePair<TKey, TValue> Current { get; private set; }
Microsoft.AspNetCore.Http.Abstractions (52)
ProblemDetails\HttpValidationProblemDetails.cs (2)
27: this((IEnumerable<KeyValuePair<string, string[]>>)errors) 35public HttpValidationProblemDetails(IEnumerable<KeyValuePair<string, string[]>> errors)
QueryString.cs (4)
125public static QueryString Create(IEnumerable<KeyValuePair<string, string?>> parameters) 129foreach (var pair in parameters) 143public static QueryString Create(IEnumerable<KeyValuePair<string, StringValues>> parameters) 148foreach (var pair in parameters)
Routing\RouteValueDictionary.cs (38)
47internal KeyValuePair<string, object?>[] _arrayStorage; 60public static RouteValueDictionary FromArray(KeyValuePair<string, object?>[] items) 108_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 120/// If the value is a dictionary or other <see cref="IEnumerable{T}"/> of <see cref="KeyValuePair{String, Object}"/>, 135if (values is IEnumerable<KeyValuePair<string, object?>> keyValueEnumerable) 142if (values is IEnumerable<KeyValuePair<string, string?>> stringValueEnumerable) 154_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 158_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 167public RouteValueDictionary(IEnumerable<KeyValuePair<string, object?>>? values) 175_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 184public RouteValueDictionary(IEnumerable<KeyValuePair<string, string?>>? values) 192_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 208_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 213private void Initialize(IEnumerable<KeyValuePair<string, string?>> stringValueEnumerable) 215_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 217foreach (var kvp in stringValueEnumerable) 231_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 239var storage = new KeyValuePair<string, object?>[count]; 246_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 252private void Initialize(IEnumerable<KeyValuePair<string, object?>> keyValueEnumerable) 254_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 256foreach (var kvp in keyValueEnumerable) 315bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => false; 358void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) 398_arrayStorage = Array.Empty<KeyValuePair<string, object?>>(); 409bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) 441void ICollection<KeyValuePair<string, object?>>.CopyTo( 442KeyValuePair<string, object?>[] array, 470IEnumerator<KeyValuePair<string, object?>> IEnumerable<KeyValuePair<string, object?>>.GetEnumerator() 482bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item) 679var array = new KeyValuePair<string, object?>[capacity]; 695var array = new KeyValuePair<string, object?>[capacity]; 788public struct Enumerator : IEnumerator<KeyValuePair<string, object?>> 808public KeyValuePair<string, object?> Current { get; private set; }
src\Shared\Debugger\DebuggerHelpers.cs (6)
15return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1) }, includeNullValues, prefix); 20return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1), Create(key2, value2) }, includeNullValues, prefix); 25return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1), Create(key2, value2), Create(key3, value3) }, includeNullValues, prefix); 28public static string GetDebugText(ReadOnlySpan<KeyValuePair<string, object?>> values, bool includeNullValues = true, string? prefix = null) 44var kvp = values[i]; 114private static KeyValuePair<string, object?> Create(string key, object? value) => new KeyValuePair<string, object?>(key, value);
src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
Microsoft.AspNetCore.Http.Abstractions.Tests (99)
RouteValueDictionaryTests.cs (99)
53var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 54var otherStorage = Assert.IsType<KeyValuePair<string, object?>[]>(other._arrayStorage); 122Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 144Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 156var values = new List<KeyValuePair<string, object?>>() 173var values = new List<KeyValuePair<string, string?>>() 432var result = ((ICollection<KeyValuePair<string, object?>>)dict).IsReadOnly; 520Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 537Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 554Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 581Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 598Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 612Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 626Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 646Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 663Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 680Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 724Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 738Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 752Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 769Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 783Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 797Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 814Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 828Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 858Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 886Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 907Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 928Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 941((ICollection<KeyValuePair<string, object?>>)dict).Add(new KeyValuePair<string, object?>("key", "value")); 948Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1008Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1021var input = new KeyValuePair<string, object?>("key", "value"); 1024var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1028Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1040var input = new KeyValuePair<string, object?>("KEY", "value"); 1043var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1047Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1059var input = new KeyValuePair<string, object?>("other", "value"); 1062var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1066Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1079var input = new KeyValuePair<string, object?>("key", "valUE"); 1082var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1086Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1095var input = new KeyValuePair<string, object?>("key", "value"); 1098var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1115var input = new KeyValuePair<string, object?>("KEY", "value"); 1118var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1135var input = new KeyValuePair<string, object?>("other", "value"); 1138var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1156var input = new KeyValuePair<string, object?>("key", "valUE"); 1159var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 1255Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1272Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1289Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1301var array = new KeyValuePair<string, object?>[2]; 1304((ICollection<KeyValuePair<string, object?>>)dict).CopyTo(array, 1); 1308new KeyValuePair<string, object?>[] 1310default(KeyValuePair<string, object?>), 1314Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1326var input = new KeyValuePair<string, object?>("key", "value"); 1329var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 1334Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1346var input = new KeyValuePair<string, object?>("KEY", "value"); 1349var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 1354Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1366var input = new KeyValuePair<string, object?>("other", "value"); 1369var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 1374Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1387var input = new KeyValuePair<string, object?>("key", "valUE"); 1390var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 1395Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1451Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1466Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1481Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1499Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1517Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1535Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1595Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1612Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1629Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1648Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1668Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1688Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1713Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1738Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1763Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1997Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2015Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2033Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2046var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2056storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2070var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2077storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 2089var array = new KeyValuePair<string, object?>[] 2110var array = Array.Empty<KeyValuePair<string, object?>>(); 2123var array = new KeyValuePair<string, object?>[] 2141new KeyValuePair<string, object?>[] 2157Assert.Same(Array.Empty<KeyValuePair<string, object?>>(), value._arrayStorage);
Microsoft.AspNetCore.Http.Connections (6)
Internal\ConnectionLogScope.cs (3)
9internal sealed class ConnectionLogScope : IReadOnlyList<KeyValuePair<string, object?>> 20public KeyValuePair<string, object?> this[int index] 35public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
Internal\HttpConnectionDispatcher.cs (1)
727foreach (var header in existingRequestFeature.Headers)
Internal\HttpConnectionManager.cs (2)
147foreach (var c in _connections) 194foreach (var c in _connections)
Microsoft.AspNetCore.Http.Connections.Client (5)
HttpConnection.cs (1)
641foreach (var header in _httpConnectionOptions.Headers)
Internal\ConnectionLogScope.cs (3)
10internal sealed class ConnectionLogScope : IReadOnlyList<KeyValuePair<string, object?>> 28public KeyValuePair<string, object?> this[int index] 43public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
Internal\WebSocketsTransport.cs (1)
122foreach (var header in context.Options.Headers)
Microsoft.AspNetCore.Http.Connections.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Http.Extensions (9)
QueryBuilder.cs (8)
16public class QueryBuilder : IEnumerable<KeyValuePair<string, string>> 18private readonly IList<KeyValuePair<string, string>> _params; 25_params = new List<KeyValuePair<string, string>>(); 32public QueryBuilder(IEnumerable<KeyValuePair<string, string>> parameters) 34_params = new List<KeyValuePair<string, string>>(parameters); 41public QueryBuilder(IEnumerable<KeyValuePair<string, StringValues>> parameters) 76var pair = _params[i]; 109public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
RequestDelegateFactory.cs (1)
2880foreach (var kv in factoryContext.TrackedParameters)
Microsoft.AspNetCore.Http.Extensions.Tests (15)
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (14)
52var log1Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logs[0].State); 60var log2Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logs[1].State); 68var log3Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logs[2].State); 76var log4Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logs[3].State); 115var log1Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logs[0].State); 123var log2Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logs[1].State); 235var log1Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logs[0].State); 243var log2Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logs[1].State); 315var log1Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logs[0].State); 323var log2Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logs[1].State); 405var logValues = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logMessage.State); 454var logValues = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logMessage.State); 534var logValues = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logMessage.State); 614var logValues = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(logMessage.State);
RequestDelegateGenerator\RuntimeCreationTests.ComplexFormBinding.cs (1)
186var log1Values = Assert.IsAssignableFrom<IReadOnlyList<KeyValuePair<string, object>>>(log.State);
Microsoft.AspNetCore.Http.Features (6)
IFormCollection.cs (1)
11public interface IFormCollection : IEnumerable<KeyValuePair<string, StringValues>>
IHttpMetricsTagsFeature.cs (1)
14ICollection<KeyValuePair<string, object?>> Tags { get; }
IQueryCollection.cs (1)
11public interface IQueryCollection : IEnumerable<KeyValuePair<string, StringValues>>
IRequestCookieCollection.cs (1)
11public interface IRequestCookieCollection : IEnumerable<KeyValuePair<string, string>>
IResponseCookies.cs (2)
31void Append(ReadOnlySpan<KeyValuePair<string, string>> keyValuePairs, CookieOptions options) 33foreach (var keyValuePair in keyValuePairs)
Microsoft.AspNetCore.Http.Microbenchmarks (21)
AdaptiveCapacityDictionaryBenchmark.cs (19)
17private KeyValuePair<string, string> _oneValue; 18private List<KeyValuePair<string, string>> _tenValues; 25_tenValues = new List<KeyValuePair<string, string>>() 42foreach (var a in _tenValues) 51foreach (var a in _tenValues) 100var val = _tenValues[i]; 111var val = _tenValues[i]; 122var val = _tenValues[i]; 133var val = _tenValues[i]; 144var val = _tenValues[i]; 155var val = _tenValues[i]; 166var val = _tenValues[i]; 177var val = _tenValues[i]; 188var val = _tenValues[i]; 198var val = _tenValues[i]; 208var val = _tenValues[i]; 218var val = _tenValues[i]; 228var val = _tenValues[i]; 239var val = _tenValues[i];
RouteValueDictionaryBenchmark.cs (2)
230foreach (var kvp in dictionary) 241foreach (var kvp in dictionary)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
31foreach (var entry in map)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
206foreach (var namedArgument in attribute.NamedArguments)
Microsoft.AspNetCore.Http.Results (13)
Results.cs (6)
742IEnumerable<KeyValuePair<string, object?>>? extensions = null) 774return ValidationProblem(errors, detail, instance, statusCode, title, type, (IEnumerable<KeyValuePair<string, object?>>?)extensions); 792IEnumerable<KeyValuePair<string, string[]>> errors, 798IEnumerable<KeyValuePair<string, object?>>? extensions = null) 818private static void CopyExtensions(IEnumerable<KeyValuePair<string, object?>>? extensions, HttpValidationProblemDetails problemDetails) 822foreach (var extension in extensions)
TypedResults.cs (7)
766return Problem(detail, instance, statusCode, title, type, (IEnumerable<KeyValuePair<string, object?>>?)extensions); 787IEnumerable<KeyValuePair<string, object?>>? extensions = null) 833return ValidationProblem(errors, detail, instance, title, type, (IEnumerable<KeyValuePair<string, object?>>?)extensions); 849IEnumerable<KeyValuePair<string, string[]>> errors, 854IEnumerable<KeyValuePair<string, object?>>? extensions = null) 872private static void CopyExtensions(IEnumerable<KeyValuePair<string, object?>>? extensions, ProblemDetails problemDetails) 876foreach (var extension in extensions)
Microsoft.AspNetCore.Http.Results.Tests (7)
ProblemResultTests.cs (1)
165var error = Assert.Single(responseDetails.Errors);
ResultsTests.cs (3)
1280var extensions = new List<KeyValuePair<string, object>> { new("test", "value") }; 1430var errors = new List<KeyValuePair<string, string[]>> { new("testField", new[] { "test error" }) }; 1436var extensions = new List<KeyValuePair<string, object>> { new("testField", "test value") };
TypedResultsTests.cs (3)
1096var extensions = new List<KeyValuePair<string, object>> { new("test", "value") }; 1217var errors = new List<KeyValuePair<string, string[]>> { new("testField", new[] { "test error" }) }; 1222var extensions = new List<KeyValuePair<string, object>> { new("testField", "test value") };
Microsoft.AspNetCore.Http.Tests (3)
Internal\ItemsDictionaryTests.cs (3)
26var pairs = new KeyValuePair<object, object>[] { new KeyValuePair<object, object>("first", "value") }; 29ICollection<KeyValuePair<object, object>> cl = (ICollection<KeyValuePair<object, object>>)dict;
Microsoft.AspNetCore.HttpLogging (9)
HttpLog.cs (7)
9internal sealed class HttpLog : IReadOnlyList<KeyValuePair<string, object?>> 11private readonly List<KeyValuePair<string, object?>> _keyValues; 17public HttpLog(List<KeyValuePair<string, object?>> keyValues, string title) 23public KeyValuePair<string, object?> this[int index] => _keyValues[index]; 27public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 49var kvp = _keyValues[i]; 58var kvp = _keyValues[count - 1];
HttpLoggingInterceptorContext.cs (2)
71internal List<KeyValuePair<string, object?>> InternalParameters { get; set; } = new(); 81public IList<KeyValuePair<string, object?>> Parameters => InternalParameters;
Microsoft.AspNetCore.Identity.FunctionalTests (7)
Extensions\HttpClientExtensions.cs (4)
22IEnumerable<KeyValuePair<string, string>> formValues) 34IEnumerable<KeyValuePair<string, string>> formValues) 36foreach (var kvp in formValues) 54foreach (var header in submit.Headers)
Extensions\ResponseAssert.cs (1)
43foreach (var header in headers)
Infrastructure\ServerFactory.cs (1)
109foreach (var kvp in relatedParts)
MapIdentityApiTests.cs (1)
1462var errorEntry = Assert.Single(problem.Errors);
Microsoft.AspNetCore.InternalTesting (12)
Logging\LogValuesAssert.cs (9)
23IEnumerable<KeyValuePair<string, object>> actualValues) 35IEnumerable<KeyValuePair<string, object>> expectedValues, 36IEnumerable<KeyValuePair<string, object>> actualValues) 43foreach (var expectedPair in expectedValues) 54private static string GetString(IEnumerable<KeyValuePair<string, object>> logValues) 59private sealed class LogValueComparer : IEqualityComparer<KeyValuePair<string, object>> 61public bool Equals(KeyValuePair<string, object> x, KeyValuePair<string, object> y) 66public int GetHashCode(KeyValuePair<string, object> obj)
xunit\AspNetTestCollectionRunner.cs (2)
42foreach (var mapping in _assemblyFixtureMappings) 51foreach (var mapping in _assemblyFixtureMappings)
xunit\QuarantinedTestTraitDiscoverer.cs (1)
14public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute)
Microsoft.AspNetCore.InternalTesting.Tests (23)
LogValuesAssertTest.cs (23)
14IEnumerable<KeyValuePair<string, object>>, 15IEnumerable<KeyValuePair<string, object>>> ExpectedValues_SubsetOf_ActualValuesData 20IEnumerable<KeyValuePair<string, object>>, 21IEnumerable<KeyValuePair<string, object>>>() 24new KeyValuePair<string,object>[] { }, 25new KeyValuePair<string,object>[] { } 29new KeyValuePair<string,object>[] { }, 70IEnumerable<KeyValuePair<string, object>> expectedValues, 71IEnumerable<KeyValuePair<string, object>> actualValues) 78IEnumerable<KeyValuePair<string, object>>, 79IEnumerable<KeyValuePair<string, object>>> ExpectedValues_MoreThan_ActualValuesData 84IEnumerable<KeyValuePair<string, object>>, 85IEnumerable<KeyValuePair<string, object>>>() 93new KeyValuePair<string,object>[] { } 115IEnumerable<KeyValuePair<string, object>> expectedValues, 116IEnumerable<KeyValuePair<string, object>> actualValues) 163IEnumerable<KeyValuePair<string, object>>, 164IEnumerable<KeyValuePair<string, object>>> CaseSensitivityComparisionData 169IEnumerable<KeyValuePair<string, object>>, 170IEnumerable<KeyValuePair<string, object>>>() 203IEnumerable<KeyValuePair<string, object>> expectedValues, 204IEnumerable<KeyValuePair<string, object>> actualValues) 214private string GetString(IEnumerable<KeyValuePair<string, object>> logValues)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (10)
TestObjectModels\DynamicTestObject.cs (5)
28public void Add(KeyValuePair<string, object> item) 38public bool Contains(KeyValuePair<string, object> item) 48public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 53public IEnumerator<KeyValuePair<string, object>> GetEnumerator() 63public bool Remove(KeyValuePair<string, object> item)
WriteOnceDynamicTestObject.cs (5)
42public void Add(KeyValuePair<string, object> item) 52public bool Contains(KeyValuePair<string, object> item) 62public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 67public IEnumerator<KeyValuePair<string, object>> GetEnumerator() 77public bool Remove(KeyValuePair<string, object> item)
Microsoft.AspNetCore.JsonPatch.Tests (10)
TestObjectModels\DynamicTestObject.cs (5)
28public void Add(KeyValuePair<string, object> item) 38public bool Contains(KeyValuePair<string, object> item) 48public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 53public IEnumerator<KeyValuePair<string, object>> GetEnumerator() 63public bool Remove(KeyValuePair<string, object> item)
WriteOnceDynamicTestObject.cs (5)
42public void Add(KeyValuePair<string, object> item) 52public bool Contains(KeyValuePair<string, object> item) 62public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 67public IEnumerator<KeyValuePair<string, object>> GetEnumerator() 77public bool Remove(KeyValuePair<string, object> item)
Microsoft.AspNetCore.Mvc.Abstractions (21)
ModelBinding\Metadata\ModelBindingMessageProvider.cs (1)
22/// <see cref="System.Collections.Generic.KeyValuePair{TKey, TValue}"/> is bound but not both.
ModelBinding\ModelMetadata.cs (2)
267/// An <see cref="IEnumerable{T}"/> of <see cref="KeyValuePair{EnumGroupAndName, String}"/> of mappings between 270public abstract IEnumerable<KeyValuePair<EnumGroupAndName, string>>? EnumGroupedDisplayNamesAndValues { get; }
ModelBinding\ModelStateDictionary.cs (11)
452foreach (var source in dictionary) 520foreach (var entry in entries) 753IEnumerator<KeyValuePair<string, ModelStateEntry?>> 754IEnumerable<KeyValuePair<string, ModelStateEntry?>>.GetEnumerator() => GetEnumerator(); 972public readonly struct PrefixEnumerable : IEnumerable<KeyValuePair<string, ModelStateEntry>> 994IEnumerator<KeyValuePair<string, ModelStateEntry>> 995IEnumerable<KeyValuePair<string, ModelStateEntry>>.GetEnumerator() => GetEnumerator(); 1003public struct Enumerator : IEnumerator<KeyValuePair<string, ModelStateEntry>> 1029public KeyValuePair<string, ModelStateEntry> Current => 1165var current = _prefixEnumerator.Current; 1240var current = _prefixEnumerator.Current;
ModelBinding\Validation\ValidationStateDictionary.cs (5)
75public void Add(KeyValuePair<object, ValidationStateEntry> item) 93public bool Contains(KeyValuePair<object, ValidationStateEntry> item) 105public void CopyTo(KeyValuePair<object, ValidationStateEntry>[] array, int arrayIndex) 111public IEnumerator<KeyValuePair<object, ValidationStateEntry>> GetEnumerator() 117public bool Remove(KeyValuePair<object, ValidationStateEntry> item)
src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
Microsoft.AspNetCore.Mvc.Abstractions.Test (16)
ModelBinding\ModelMetadataTest.cs (3)
228[InlineData(typeof(Dictionary<object, object>), typeof(KeyValuePair<object, object>))] 229[InlineData(typeof(DerivedDictionary), typeof(KeyValuePair<string, int>))] 556public override IEnumerable<KeyValuePair<EnumGroupAndName, string>> EnumGroupedDisplayNamesAndValues
ModelBinding\ModelStateDictionaryTest.cs (13)
296var kvp = Assert.Single(dictionary); 313var kvp = Assert.Single(dictionary); 334var kvp = Assert.Single(dictionary); 1010var entry = Assert.Single(dictionary); 1038var entry = Assert.Single(dictionary); 1064var entry = Assert.Single(dictionary); 1125var entry = Assert.Single(dictionary); 1154var entry = Assert.Single(dictionary); 1181var entry = Assert.Single(dictionary); 1216var entry = Assert.Single(dictionary); 1234var entry = Assert.Single(dictionary); 1254var entry = Assert.Single(dictionary); 1274var entry = Assert.Single(dictionary);
Microsoft.AspNetCore.Mvc.Analyzers (2)
TopLevelParameterNameAnalyzer.cs (2)
161var namedArgument = attribute.NamedArguments[i]; 184var namedArgument = attribute.NamedArguments[i];
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
SymbolApiResponseMetadataProvider.cs (1)
191var namedArgument = attribute.NamedArguments[i];
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
ApiResponseTypeProvider.cs (1)
101foreach (var responseType in responseTypesFromProvider)
DefaultApiDescriptionProvider.cs (1)
286foreach (var routeParameter in routeParameters)
EndpointModelMetadata.cs (1)
29public override IEnumerable<KeyValuePair<EnumGroupAndName, string>>? EnumGroupedDisplayNamesAndValues { get; }
Microsoft.AspNetCore.Mvc.Core (101)
ApplicationModels\ApplicationModelFactory.cs (2)
137foreach (var kvp in action.RouteValues) 142foreach (var kvp in controller.RouteValues)
ApplicationModels\ControllerActionDescriptorBuilder.cs (5)
151foreach (var item in application.Properties) 156foreach (var item in controller.Properties) 161foreach (var item in action.Properties) 222foreach (var kvp in action.RouteValues) 231foreach (var kvp in controller.RouteValues)
ControllerBase.cs (2)
1892foreach (var extension in extensions) 2015foreach (var extension in extensions)
Diagnostics\EventData.cs (9)
11public abstract class EventData : IReadOnlyList<KeyValuePair<string, object>> 24protected abstract KeyValuePair<string, object> this[int index] { get; } 26int IReadOnlyCollection<KeyValuePair<string, object>>.Count => Count; 27KeyValuePair<string, object> IReadOnlyList<KeyValuePair<string, object>>.this[int index] => this[index]; 31IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator() 40public struct Enumerator : IEnumerator<KeyValuePair<string, object>> 50public KeyValuePair<string, object> Current { get; private set; }
Diagnostics\MvcDiagnostics.cs (28)
53protected override KeyValuePair<string, object> this[int index] => index switch 104protected override KeyValuePair<string, object> this[int index] => index switch 155protected override KeyValuePair<string, object> this[int index] => index switch 206protected override KeyValuePair<string, object> this[int index] => index switch 257protected override KeyValuePair<string, object> this[int index] => index switch 308protected override KeyValuePair<string, object> this[int index] => index switch 359protected override KeyValuePair<string, object> this[int index] => index switch 410protected override KeyValuePair<string, object> this[int index] => index switch 461protected override KeyValuePair<string, object> this[int index] => index switch 512protected override KeyValuePair<string, object> this[int index] => index switch 563protected override KeyValuePair<string, object> this[int index] => index switch 614protected override KeyValuePair<string, object> this[int index] => index switch 665protected override KeyValuePair<string, object> this[int index] => index switch 716protected override KeyValuePair<string, object> this[int index] => index switch 767protected override KeyValuePair<string, object> this[int index] => index switch 818protected override KeyValuePair<string, object> this[int index] => index switch 869protected override KeyValuePair<string, object> this[int index] => index switch 920protected override KeyValuePair<string, object> this[int index] => index switch 971protected sealed override KeyValuePair<string, object> this[int index] => index switch 1029protected override KeyValuePair<string, object> this[int index] => index switch 1081protected override KeyValuePair<string, object> this[int index] => index switch 1132protected override KeyValuePair<string, object> this[int index] => index switch 1183protected override KeyValuePair<string, object> this[int index] => index switch 1234protected override KeyValuePair<string, object> this[int index] => index switch 1285protected override KeyValuePair<string, object> this[int index] => index switch 1336protected override KeyValuePair<string, object> this[int index] => index switch 1380protected override KeyValuePair<string, object> this[int index] => index switch 1423protected override KeyValuePair<string, object> this[int index] => index switch
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
66foreach (var extension in context.ProblemDetails.Extensions)
ModelBinding\Binders\CollectionModelBinder.cs (1)
505if (elementType.IsGenericType && elementType.GetGenericTypeDefinition() == typeof(KeyValuePair<,>))
ModelBinding\Binders\DictionaryModelBinder.cs (4)
18public partial class DictionaryModelBinder<TKey, TValue> : CollectionModelBinder<KeyValuePair<TKey, TValue?>> where TKey : notnull 159var valueMetadata = elementMetadata.Properties[nameof(KeyValuePair<TKey, TValue>.Value)]!; 162foreach (var kvp in keys) 223IEnumerable<KeyValuePair<TKey, TValue?>> collection)
ModelBinding\Binders\FormCollectionModelBinder.cs (2)
71public IEnumerator<KeyValuePair<string, StringValues>> GetEnumerator() 73return Enumerable.Empty<KeyValuePair<string, StringValues>>().GetEnumerator();
ModelBinding\Binders\KeyValuePairModelBinder.cs (4)
11/// An <see cref="IModelBinder"/> for <see cref="KeyValuePair{TKey, TValue}"/>. 22/// Creates a new <see cref="KeyValuePair{TKey, TValue}"/>. 53var model = new KeyValuePair<TKey?, TValue?>( 84var model = new KeyValuePair<TKey?, TValue?>();
ModelBinding\Binders\KeyValuePairModelBinderProvider.cs (2)
12/// An <see cref="IModelBinderProvider"/> for <see cref="KeyValuePair{TKey, TValue}"/>. 23modelType.GetGenericTypeDefinition() == typeof(KeyValuePair<,>))
ModelBinding\JQueryKeyValuePairNormalizer.cs (2)
16IEnumerable<KeyValuePair<string, StringValues>> originalValues, 23foreach (var originalValue in originalValues)
ModelBinding\Metadata\DefaultModelMetadata.cs (1)
230public override IEnumerable<KeyValuePair<EnumGroupAndName, string>>? EnumGroupedDisplayNamesAndValues
ModelBinding\Metadata\DisplayMetadata.cs (1)
145public IEnumerable<KeyValuePair<EnumGroupAndName, string>>? EnumGroupedDisplayNamesAndValues { get; set; }
ModelBinding\ModelBindingHelper.cs (1)
403foreach (var kvp in modelState)
ModelBinding\UnsupportedContentTypeFilter.cs (1)
43foreach (var kvp in modelState)
ModelBinding\Validation\ShortFormDictionaryValidationStrategy.cs (4)
44IEnumerable<KeyValuePair<string, TKey>> keyMappings, 54public IEnumerable<KeyValuePair<string, TKey>> KeyMappings { get; } 70private readonly IEnumerator<KeyValuePair<string, TKey>> _keyMappingEnumerator; 76IEnumerable<KeyValuePair<string, TKey>> keyMappings,
ModelBinding\Validation\ValidationVisitor.cs (2)
341foreach (var item in entries) 459foreach (var entry in entries)
MvcCoreLoggerExtensions.cs (3)
280private sealed class ActionLogScope : IReadOnlyList<KeyValuePair<string, object>> 291public KeyValuePair<string, object> this[int index] 309public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Routing\ActionEndpointFactory.cs (1)
281foreach (var routeValue in action.RouteValues)
Routing\AttributeRoute.cs (2)
82foreach (var kvp in routeInfo.ActionDescriptor.RouteValues) 207foreach (var kvp in action.RouteValues)
Routing\ControllerActionEndpointDataSource.cs (1)
106foreach (var kvp in action.RouteValues)
Routing\DynamicControllerEndpointMatcherPolicy.cs (1)
138foreach (var kvp in originalValues)
Routing\MvcAttributeRouteHandler.cs (1)
61foreach (var kvp in actionDescriptor.RouteValues)
Routing\UrlHelperBase.cs (2)
83foreach (var kvp in routeValuesDictionary) 94foreach (var kvp in dictionaryValues)
SerializableError.cs (1)
38foreach (var keyModelStatePair in modelState)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (3)
199var keyValuePairs = new KeyValuePair<string, string>[cookieChunkCount + 1]; 296var keyValuePairs = new KeyValuePair<string, string>[chunks + 1]; 315var keyValuePairs = new List<KeyValuePair<string, string>>();
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (5)
119public void Add(KeyValuePair<TKey, TValue> item) 129public bool Contains(KeyValuePair<TKey, TValue> item) 134public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 139public bool Remove(KeyValuePair<TKey, TValue> item) 144public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (8)
136public void Add(KeyValuePair<TKey, TValue> item) 138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item); 146public bool Contains(KeyValuePair<TKey, TValue> item) 148return ((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).Contains(item); 151public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 153((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).CopyTo(array, arrayIndex); 156public bool Remove(KeyValuePair<TKey, TValue> item) 158return ((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Remove(item);
ValidationProblemDetails.cs (1)
39foreach (var keyModelStatePair in modelState)
Microsoft.AspNetCore.Mvc.Core.Test (122)
AcceptedAtActionResultTests.cs (1)
209var header = context.HttpContext.Response.Headers.Last();
ApplicationModels\ControllerActionDescriptorProviderTests.cs (7)
244var controller = Assert.Single(action.RouteValues, kvp => kvp.Key.Equals("controller")); 247var actionConstraint = Assert.Single(action.RouteValues, kvp => kvp.Key.Equals("action")); 345var controller = Assert.Single(action.RouteValues, kvp => kvp.Key.Equals("controller")); 348var actionConstraint = Assert.Single(action.RouteValues, kvp => kvp.Key.Equals("action")); 905var controllerDefault = Assert.Single(indexAction.RouteValues, rd => rd.Key.Equals("controller", StringComparison.OrdinalIgnoreCase)); 908var actionDefault = Assert.Single(indexAction.RouteValues, rd => rd.Key.Equals("action", StringComparison.OrdinalIgnoreCase)); 911var areaDefault = Assert.Single(indexAction.RouteValues, rd => rd.Key.Equals("area", StringComparison.OrdinalIgnoreCase));
ConsumesAttributeTests.cs (1)
410foreach (var kvp in new RouteValueDictionary(routeValues))
ControllerBaseTest.cs (27)
429IEnumerable<KeyValuePair<string, object>> expected) 450IEnumerable<KeyValuePair<string, object>> expected) 474IEnumerable<KeyValuePair<string, object>> expected) 498IEnumerable<KeyValuePair<string, object>> expected) 522IEnumerable<KeyValuePair<string, object>> expected) 542IEnumerable<KeyValuePair<string, object>> expected) 562IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 587IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 612IEnumerable<KeyValuePair<string, object>> expected) 632IEnumerable<KeyValuePair<string, object>> expected) 652IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 677IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 706IEnumerable<KeyValuePair<string, object>> expected) 725IEnumerable<KeyValuePair<string, object>> expected) 744IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 767IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 790IEnumerable<KeyValuePair<string, object>> expected) 809IEnumerable<KeyValuePair<string, object>> expected) 828IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 851IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 942IEnumerable<KeyValuePair<string, object>> expected) 963IEnumerable<KeyValuePair<string, object>> expected) 984IEnumerable<KeyValuePair<string, object>> expected) 1229IEnumerable<KeyValuePair<string, object>> expected) 1250IEnumerable<KeyValuePair<string, object>> expected) 1271IEnumerable<KeyValuePair<string, object>> expected) 2709var modelState = Assert.Single(controller.ModelState);
Controllers\ControllerBinderDelegateProviderTest.cs (2)
1008foreach (var keyValuePair in boundPropertyTypes) 1242var entry = Assert.Single(modelState);
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (4)
35var kvp = Assert.Single(parameterModel.Properties); 75var kvp = Assert.Single(controllerModel1.Actions[0].Properties); 134var kvp = Assert.Single(controllerModel1.ControllerProperties[0].Properties); 163var kvp = Assert.Single(controller.Properties);
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (2)
37foreach (var serviceType in MultiRegistrationServiceTypes) 47foreach (var serviceType in MultiRegistrationServiceTypes)
Formatters\SystemTextJsonInputFormatterTest.cs (2)
104var kvp = Assert.Single(formatterContext.ModelState); 125var kvp = Assert.Single(formatterContext.ModelState);
Infrastructure\ControllerActionInvokerTest.cs (2)
1659foreach (var kvp in arguments) 1752foreach (var item in arguments)
ModelBinding\Binders\ArrayModelBinderTest.cs (1)
118var keyValuePair = Assert.Single(bindingContext.ModelState);
ModelBinding\Binders\BodyModelBinderTests.cs (10)
70var entry = Assert.Single(bindingContext.ModelState); 95var entry = Assert.Single(bindingContext.ModelState); 153var entry = Assert.Single(bindingContext.ModelState); 275var entry = Assert.Single(bindingContext.ModelState); 318var entry = Assert.Single(bindingContext.ModelState); 349var entry = Assert.Single(bindingContext.ModelState); 389var entry = Assert.Single(bindingContext.ModelState); 420var entry = Assert.Single(bindingContext.ModelState); 500var entry = Assert.Single(bindingContext.ModelState); 556var entry = Assert.Single(bindingContext.ModelState);
ModelBinding\Binders\ByteArrayModelBinderTests.cs (1)
31var modelState = Assert.Single(bindingContext.ModelState);
ModelBinding\Binders\CollectionModelBinderTest.cs (1)
304var keyValuePair = Assert.Single(bindingContext.ModelState);
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (3)
316var keyValuePair = Assert.Single(bindingContext.ModelState); 360var keyValuePair = Assert.Single(bindingContext.ModelState); 404var keyValuePair = Assert.Single(bindingContext.ModelState);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (3)
376var keyValuePair = Assert.Single(bindingContext.ModelState); 420var keyValuePair = Assert.Single(bindingContext.ModelState); 464var keyValuePair = Assert.Single(bindingContext.ModelState);
ModelBinding\Binders\DateTimeModelBinderTest.cs (1)
150var entry = Assert.Single(bindingContext.ModelState);
ModelBinding\Binders\DictionaryModelBinderProviderTest.cs (2)
13[InlineData(typeof(IEnumerable<KeyValuePair<string, int>>))] 40if (m.ModelType == typeof(KeyValuePair<string, int>) ||
ModelBinding\Binders\DictionaryModelBinderTest.cs (7)
369new KeyValuePair<string, int>[] 490var keyValuePair = Assert.Single(bindingContext.ModelState); 592{ typeof(IEnumerable<KeyValuePair<int, int>>), true }, 593{ typeof(ICollection<KeyValuePair<int, int>>), true }, 597{ typeof(IList<KeyValuePair<int, int>>), true }, 598{ typeof(ISet<KeyValuePair<int, int>>), false }, 677foreach (var kvp in values)
ModelBinding\Binders\FloatingPointTypeModelBinderTestOfT.cs (1)
231var entry = Assert.Single(bindingContext.ModelState);
ModelBinding\Binders\KeyValuePairModelBinderProviderTest.cs (3)
13[InlineData(typeof(KeyValuePair<string, int>?))] 14[InlineData(typeof(KeyValuePair<string, int>[]))] 35var context = new TestModelBinderProviderContext(typeof(KeyValuePair<string, int>));
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (10)
18var bindingContext = GetBindingContext(valueProvider, typeof(KeyValuePair<int, string>)); 43var bindingContext = GetBindingContext(valueProvider, typeof(KeyValuePair<int, string>)); 69var bindingContext = GetBindingContext(valueProvider, typeof(KeyValuePair<int, string>)); 90var bindingContext = GetBindingContext(valueProvider, typeof(KeyValuePair<int, string>)); 131var bindingContext = GetBindingContext(valueProvider, typeof(KeyValuePair<int, string>)); 158bindingContext.ModelMetadata = metadataProvider.GetMetadataForType(typeof(KeyValuePair<string, string>)); 166var model = Assert.IsType<KeyValuePair<string, string>>(bindingContext.Result.Model); 167Assert.Equal(default(KeyValuePair<string, string>), model); 257public KeyValuePair<string, string> KeyValuePairProperty { get; set; }
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (1)
325var entry = Assert.Single(bindingContext.ModelState);
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (1)
251var entry = Assert.Single(bindingContext.ModelState);
ModelBinding\CompositeValueProviderTest.cs (2)
61var entry = Assert.Single(modelState); 84var result = Assert.Single(values);
ModelBinding\Metadata\DefaultModelMetadataTest.cs (13)
255[InlineData(typeof(Dictionary<object, object>), typeof(KeyValuePair<object, object>))] 256[InlineData(typeof(DerivedDictionary), typeof(KeyValuePair<string, int>))] 572public static TheoryData<IEnumerable<KeyValuePair<string, int>>, IEnumerable<string>> 577return new TheoryData<IEnumerable<KeyValuePair<string, int>>, IEnumerable<string>> 580new List<KeyValuePair<string, int>> 591new List<KeyValuePair<string, int>> 602new List<KeyValuePair<string, int>> 612new List<KeyValuePair<string, int>> 623new List<KeyValuePair<string, int>> 639IEnumerable<KeyValuePair<string, int>> originalNamesAndOrders, 647foreach (var kvp in originalNamesAndOrders) 836[InlineData(typeof(KeyValuePair<string, string>))] 837[InlineData(typeof(KeyValuePair<string, string>?))]
ModelBinding\ParameterBinderTest.cs (2)
217var modelState = Assert.Single(actionContext.ModelState); 699var keyValuePair = Assert.Single(modelState);
ModelBinding\Validation\DefaultObjectValidatorTests.cs (1)
1214var entry = Assert.Single(modelState);
MvcCoreLoggerExtensionsTest.cs (6)
36public void ExecutingAction_ForControllerAction_WithGivenRouteValues_LogsActionAndRouteData(string expectedRouteValuesLogMessage, params KeyValuePair<string, string>[] routeValues) 50foreach (var routeValue in routeValues) 68public void ExecutingAction_ForAction_WithGivenRouteValues_LogsActionAndRouteData(string expectedRouteValuesLogMessage, params KeyValuePair<string, string>[] routeValues) 80foreach (var routeValue in routeValues) 97public void ExecutingAction_ForPage_WithGivenRouteValues_LogsPageAndRouteData(string expectedRouteValuesLogMessage, params KeyValuePair<string, string>[] routeValues) 109foreach (var routeValue in routeValues)
ResponseCacheAttributeTest.cs (1)
329foreach (var p in cacheProfiles)
Routing\ActionEndpointFactoryTest.cs (2)
463foreach (var kvp in routeValues) 485foreach (var subsetPair in subset)
Routing\AttributeRouteTest.cs (1)
822foreach (var kvp in values)
Routing\ControllerActionEndpointDataSourceTest.cs (1)
567foreach (var kvp in new RouteValueDictionary(values))
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
LinkBuilder.cs (1)
27foreach (var kvp in dictionary)
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
175var groupedDisplayNamesAndValues = new List<KeyValuePair<EnumGroupAndName, string>>();
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (29)
DataAnnotationsMetadataProviderTest.cs (29)
818var expectedKeyValuePairs = new List<KeyValuePair<EnumGroupAndName, string>> 859public static TheoryData<Type, IEnumerable<KeyValuePair<EnumGroupAndName, string>>> EnumDisplayNamesData 863return new TheoryData<Type, IEnumerable<KeyValuePair<EnumGroupAndName, string>>> 867{ typeof(EmptyEnum), new List<KeyValuePair<EnumGroupAndName, string>>() }, 868{ typeof(EmptyEnum?), new List<KeyValuePair<EnumGroupAndName, string>>() }, 871new List<KeyValuePair<EnumGroupAndName, string>> 883new List<KeyValuePair<EnumGroupAndName, string>> 897new List<KeyValuePair<EnumGroupAndName, string>> 910new List<KeyValuePair<EnumGroupAndName, string>> 923new List<KeyValuePair<EnumGroupAndName, string>> 934new List<KeyValuePair<EnumGroupAndName, string>> 945new List<KeyValuePair<EnumGroupAndName, string>> 957new List<KeyValuePair<EnumGroupAndName, string>> 975IEnumerable<KeyValuePair<EnumGroupAndName, string>> expectedKeyValuePairs) 998var expectedKeyValuePairs = new List<KeyValuePair<EnumGroupAndName, string>> 1029var groupTwo = Assert.Single(enumNameAndGroup, e => e.Value.Equals("2", StringComparison.Ordinal)); 1049var groupTwo = Assert.Single(enumNameAndGroup, e => e.Value.Equals("2", StringComparison.Ordinal)); 1069var groupThree = Assert.Single(enumNameAndGroup, e => e.Value.Equals("3", StringComparison.Ordinal)); 1088var groupThree = Assert.Single(enumNameAndGroup, e => e.Value.Equals("3", StringComparison.Ordinal)); 1599var type = typeof(KeyValuePair<string, object>); 1600var property = type.GetProperty(nameof(KeyValuePair<string, object>.Key)); 1616var type = typeof(KeyValuePair<string, object>); 1617var property = type.GetProperty(nameof(KeyValuePair<string, object>.Key))!; 1681private IEnumerable<KeyValuePair<EnumGroupAndName, string>> GetLocalizedEnumGroupedDisplayNamesAndValues( 1735private class KVPEnumGroupAndNameComparer : IEqualityComparer<KeyValuePair<EnumGroupAndName, string>> 1737public static readonly IEqualityComparer<KeyValuePair<EnumGroupAndName, string>> Instance = new KVPEnumGroupAndNameComparer(); 1743public bool Equals(KeyValuePair<EnumGroupAndName, string> x, KeyValuePair<EnumGroupAndName, string> y) 1752public int GetHashCode(KeyValuePair<EnumGroupAndName, string> obj)
Microsoft.AspNetCore.Mvc.Formatters.Xml (3)
ProblemDetailsWrapper.cs (1)
152foreach (var keyValuePair in ProblemDetails.Extensions)
SerializableErrorWrapper.cs (1)
87foreach (var keyValuePair in SerializableError)
ValidationProblemDetailsWrapper.cs (1)
89foreach (var keyValuePair in ProblemDetails.Errors)
Microsoft.AspNetCore.Mvc.FunctionalTests (52)
AntiforgeryMiddlewareTest.cs (5)
42var nameValueCollection = new List<KeyValuePair<string, string>> 84var nameValueCollection = new List<KeyValuePair<string, string>> 126var nameValueCollection = new List<KeyValuePair<string, string>> 158var nameValueCollection = new List<KeyValuePair<string, string>> 190var nameValueCollection = new List<KeyValuePair<string, string>>
AntiforgeryTests.cs (3)
69var nameValueCollection = new List<KeyValuePair<string, string>> 119var nameValueCollection = new List<KeyValuePair<string, string>> 148var nameValueCollection = new List<KeyValuePair<string, string>>
CorsTestsBase.cs (1)
55var header = Assert.Single(response.Headers);
HtmlGenerationTest.cs (3)
205foreach (var attribute in expectedAttributes) 325var nameValueCollection = new List<KeyValuePair<string, string>> 377var nameValueCollection = new List<KeyValuePair<string, string>>
InputObjectValidationTests.cs (3)
148var errorKeyValuePair = Assert.Single(responseObject, keyValuePair => keyValuePair.Value.Length > 0); 176var errorKeyValuePair = Assert.Single(responseObject, keyValuePair => keyValuePair.Value.Length > 0); 185var kvps = new List<KeyValuePair<string, string>>
RazorPageModelTest.cs (6)
41Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 66Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 91Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 117Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 142Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 167Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[]
RazorPagesTest.cs (7)
673Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 702Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 728Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 759Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 844Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 869Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[] 985Content = new FormUrlEncodedContent(new KeyValuePair<string, string>[]
ReadFromDisconnectedClientTest.cs (1)
67var error = Assert.Single(problem.Errors);
RequestFormLimitsTest.cs (6)
40var kvps = new List<KeyValuePair<string, string>>(); 62var kvps = new List<KeyValuePair<string, string>>(); 85var kvps = new List<KeyValuePair<string, string>>(); 109var kvps = new List<KeyValuePair<string, string>>(); 134var kvps = new List<KeyValuePair<string, string>>(); 157var kvps = new List<KeyValuePair<string, string>>();
RequestSizeLimitTest.cs (2)
41var kvps = new List<KeyValuePair<string, string>>(); 63var kvps = new List<KeyValuePair<string, string>>();
TempDataInCookiesTest.cs (2)
117var nameValueCollection = new List<KeyValuePair<string, string>> 170var nameValueCollection = new List<KeyValuePair<string, string>>
TempDataInCookiesUsingCookieConsentTest.cs (2)
40var nameValueCollection = new List<KeyValuePair<string, string>> 73var nameValueCollection = new List<KeyValuePair<string, string>>
TempDataPropertyTest.cs (4)
36var nameValueCollection = new List<KeyValuePair<string, string>> 64var nameValueCollection = new List<KeyValuePair<string, string>> 92var nameValueCollection = new List<KeyValuePair<string, string>> 129var nameValueCollection = new List<KeyValuePair<string, string>>
TempDataTestBase.cs (7)
39var nameValueCollection = new List<KeyValuePair<string, string>> 70var nameValueCollection = new List<KeyValuePair<string, string>> 89var nameValueCollection = new List<KeyValuePair<string, string>> 120var nameValueCollection = new List<KeyValuePair<string, string>> 154var nameValueCollection = new List<KeyValuePair<string, string>> 185var nameValueCollection = new List<KeyValuePair<string, string>> 199var nameValueCollection = new List<KeyValuePair<string, string>>
Microsoft.AspNetCore.Mvc.IntegrationTests (170)
ActionParametersIntegrationTest.cs (2)
112var entry = Assert.Single(modelState); 292var entry = Assert.Single(modelState);
BinderTypeBasedModelBinderIntegrationTest.cs (2)
181var kvp = Assert.Single(modelState); 233var kvp = Assert.Single(modelState);
BodyValidationIntegrationTests.cs (4)
477var entry = Assert.Single(modelState); 637var entry = Assert.Single(modelState); 734var entry = Assert.Single(modelState); 896foreach (var item in modelState)
ByteArrayModelBinderIntegrationTest.cs (2)
61var entry = Assert.Single(modelState); 142var entry = Assert.Single(modelState);
CollectionModelBinderIntegrationTest.cs (1)
676var kvp = Assert.Single(modelState);
ComplexRecordIntegrationTest.cs (23)
640var kvp = Assert.Single(modelState); 752var entry = Assert.Single(modelState); 1371private record Car3(string Name, IEnumerable<KeyValuePair<string, IEnumerable<SpecDoc>>> Specs); 1696private record Order8(KeyValuePair<string, int> ProductId, string Name = default!); 1809private record Car4(string Name, KeyValuePair<string, Dictionary<string, string>> Specs); 2615var entry = Assert.Single(modelState); 2674var kvp = Assert.Single(modelState); 2722var kvp = Assert.Single(modelState); 2782var kvp = Assert.Single(modelState); 2835var kvp = Assert.Single(modelState); 2894private record Photo(string Id, KeyValuePair<string, LocationInfo> Info); 3012var state = Assert.Single(modelState); 3148var state = Assert.Single(modelState); 3518var entry = Assert.Single(modelState); 3561var entry = Assert.Single(modelState); 3605var entry = Assert.Single(modelState, m => m.Key == "Age"); 3655var entry = Assert.Single(modelState); 3701var entry = Assert.Single(modelState); 3796var entry = Assert.Single(modelState); 3884var entry = Assert.Single(modelState, e => e.Key == "Id"); 4060var entry = Assert.Single(modelState); 4103var entry = Assert.Single(modelState); 4195var entry = Assert.Single(modelState, m => m.Key == "Age");
ComplexTypeIntegrationTestBase.cs (13)
643var kvp = Assert.Single(modelState); 755var entry = Assert.Single(modelState); 1403public IEnumerable<KeyValuePair<string, IEnumerable<SpecDoc>>> Specs { get; set; } 1736public KeyValuePair<string, int> ProductId { get; set; } 1948public KeyValuePair<string, Dictionary<string, string>> Specs { get; set; } 2788var entry = Assert.Single(modelState); 2853var kvp = Assert.Single(modelState); 2901var kvp = Assert.Single(modelState); 2973var kvp = Assert.Single(modelState); 3026var kvp = Assert.Single(modelState); 3091public KeyValuePair<string, LocationInfo> Info { get; set; } 3220var state = Assert.Single(modelState); 3370var state = Assert.Single(modelState);
DictionaryModelBinderIntegrationTest.cs (29)
87var kvp = Assert.Single(modelState); 814var entry = Assert.Single(modelState, kvp => kvp.Value.ValidationState == ModelValidationState.Invalid); 1203$"'{typeof(KeyValuePair<SuccessfulModel, SuccessfulModel>)}'. For example, this type may have a " + 1533int ICollection<KeyValuePair<string, string>>.Count 1541bool ICollection<KeyValuePair<string, string>>.IsReadOnly 1565void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> item) 1575void ICollection<KeyValuePair<string, string>>.Clear() 1580bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> item) 1590void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] array, int arrayIndex) 1600IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator() 1605bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> item) 1638int ICollection<KeyValuePair<TKey, TValue>>.Count 1646bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 1670void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 1680void ICollection<KeyValuePair<TKey, TValue>>.Clear() 1685bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 1695void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 1705IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 1710bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
FormCollectionModelBindingIntegrationTest.cs (1)
67var entry = Assert.Single(modelState);
FormFileModelBindingIntegrationTest.cs (4)
507var kvp = Assert.Single(modelState); 596var kvp = Assert.Single(modelState); 647var entry = Assert.Single(modelState); 977var kvp = Assert.Single(modelState);
GenericModelBinderIntegrationTest.cs (12)
284var kvp = Assert.Single(dictionary); 329var kvp = Assert.Single(dictionary); 391ParameterType = typeof(ICollection<KeyValuePair<string, int>>) 407var model = Assert.IsType<List<KeyValuePair<string, int>>>(modelBindingResult.Model); 408var kvp = Assert.Single(model); 435ParameterType = typeof(ICollection<KeyValuePair<string, int>>) 451var model = Assert.IsType<List<KeyValuePair<string, int>>>(modelBindingResult.Model); 452var kvp = Assert.Single(model); 479ParameterType = typeof(ICollection<KeyValuePair<string, int>>) 495var model = Assert.IsType<List<KeyValuePair<string, int>>>(modelBindingResult.Model); 532var kvp = Assert.Single(model); 580var kvp = Assert.Single(model);
HeaderModelBinderIntegrationTest.cs (5)
101var entry = Assert.Single(modelState); 143var entry = Assert.Single(modelState); 188var kvp = Assert.Single(modelState); 235var kvp = Assert.Single(modelState); 297var entry = Assert.Single(modelState);
KeyValuePairModelBinderIntegrationTest.cs (29)
21ParameterType = typeof(KeyValuePair<string, int>) 37var model = Assert.IsType<KeyValuePair<string, int>>(modelBindingResult.Model); 61ParameterType = typeof(KeyValuePair<string, int>) 96.ForType(typeof(KeyValuePair<string, int>)) 116ParameterType = typeof(KeyValuePair<string, int>) 148ParameterType = typeof(KeyValuePair<string, int>) 183.ForType(typeof(KeyValuePair<string, int>)) 203ParameterType = typeof(KeyValuePair<string, int>) 239ParameterType = typeof(KeyValuePair<string, int>) 255var model = Assert.IsType<KeyValuePair<string, int>>(modelBindingResult.Model); 279ParameterType = typeof(KeyValuePair<string, int>) 295var model = Assert.IsType<KeyValuePair<string, int>>(modelBindingResult.Model); 319ParameterType = typeof(KeyValuePair<string, int>) 357ParameterType = typeof(KeyValuePair<string, Person>) 373var model = Assert.IsType<KeyValuePair<string, Person>>(modelBindingResult.Model); 402ParameterType = typeof(KeyValuePair<string, Person>) 418var model = Assert.IsType<KeyValuePair<string, Person>>(modelBindingResult.Model); 443ParameterType = typeof(KeyValuePair<string, Person>) 459var model = Assert.IsType<KeyValuePair<string, Person>>(modelBindingResult.Model); 484ParameterType = typeof(KeyValuePair<string, Person>) 520ParameterType = typeof(KeyValuePair<string, string[]>) 535var model = Assert.IsType<KeyValuePair<string, string[]>>(modelBindingResult.Model);
TryUpdateModelIntegrationTest.cs (21)
51var entry = Assert.Single(modelState); 85var entry = Assert.Single(modelState); 195var entry = Assert.Single(modelState); 236var entry = Assert.Single(modelState); 277var entry = Assert.Single(modelState); 338var entry = Assert.Single(modelState); 372var entry = Assert.Single(modelState); 401var entry = Assert.Single(modelState); 442var entry = Assert.Single(modelState); 490var entry = Assert.Single(modelState); 658var entry = Assert.Single(modelState); 692var entry = Assert.Single(modelState); 795var entry = Assert.Single(modelState); 831var entry = Assert.Single(modelState); 872var entry = Assert.Single(modelState); 923var entry = Assert.Single(modelState); 959var entry = Assert.Single(modelState); 1007var entry = Assert.Single(modelState); 1076var kvp = Assert.Single(modelState); 1128var entry = Assert.Single(modelState); 1200var entry = Assert.Single(modelState, k => k.Key == "Address.ZipCode");
TryValidateModelIntegrationTest.cs (1)
227foreach (var item in modelState)
ValidationIntegrationTests.cs (11)
1243var state = Assert.Single(modelState); 1283var state = Assert.Single(modelState); 1422var kvp = Assert.Single(modelState); 1460var kvp = Assert.Single(modelState); 1522var kvp = Assert.Single(modelState); 1599var kvp = Assert.Single(modelState); 1689var kvp = Assert.Single(modelState); 1815var entry = Assert.Single(modelState, kvp => kvp.Key == "CustomParameter.message"); 1857var entry = Assert.Single(modelState, kvp => kvp.Key == "message"); 1903var entry = Assert.Single(modelState, kvp => kvp.Key == "other.key"); 1950var entry = Assert.Single(modelState, kvp => kvp.Key == "Message");
ValidationWithRecordIntegrationTests.cs (10)
1095var state = Assert.Single(modelState); 1135var state = Assert.Single(modelState); 1266var kvp = Assert.Single(modelState); 1304var kvp = Assert.Single(modelState); 1407var kvp = Assert.Single(modelState); 1495var kvp = Assert.Single(modelState); 1618var entry = Assert.Single(modelState, kvp => kvp.Key == "CustomParameter.message"); 1660var entry = Assert.Single(modelState, kvp => kvp.Key == "message"); 1706var entry = Assert.Single(modelState, kvp => kvp.Key == "other.key"); 1753var entry = Assert.Single(modelState, kvp => kvp.Key == "Message");
Microsoft.AspNetCore.Mvc.NewtonsoftJson (6)
AnnotatedProblemDetails.cs (2)
23foreach (var kvp in problemDetails.Extensions) 55foreach (var kvp in Extensions)
BsonTempDataSerializer.cs (2)
60foreach (var item in tempDataDictionary) 230foreach (var item in jObject)
ValidationProblemDetailsConverter.cs (2)
59foreach (var kvp in problemDetails.Errors) 72foreach (var kvp in Errors)
Microsoft.AspNetCore.Mvc.Razor (4)
Diagnostics\MvcDiagnostics.cs (2)
62protected override KeyValuePair<string, object> this[int index] => index switch 123protected override KeyValuePair<string, object> this[int index] => index switch
ViewLocationCacheKey.cs (2)
108foreach (var item in ViewLocationExpanderValues) 138foreach (var item in ViewLocationExpanderValues)
Microsoft.AspNetCore.Mvc.Razor.Test (3)
RazorViewEngineTest.cs (3)
2122foreach (var kvp in routeValues) 2137foreach (var kvp in routeValues) 2144foreach (var kvp in actionRouteValues)
Microsoft.AspNetCore.Mvc.RazorPages (14)
Diagnostics\MvcDiagnostics.cs (12)
59protected override KeyValuePair<string, object> this[int index] => index switch 125protected override KeyValuePair<string, object> this[int index] => index switch 178protected override KeyValuePair<string, object> this[int index] => index switch 229protected override KeyValuePair<string, object> this[int index] => index switch 280protected override KeyValuePair<string, object> this[int index] => index switch 331protected override KeyValuePair<string, object> this[int index] => index switch 382protected override KeyValuePair<string, object> this[int index] => index switch 433protected override KeyValuePair<string, object> this[int index] => index switch 484protected override KeyValuePair<string, object> this[int index] => index switch 535protected override KeyValuePair<string, object> this[int index] => index switch 586protected override KeyValuePair<string, object> this[int index] => index switch 637protected override KeyValuePair<string, object> this[int index] => index switch
Infrastructure\DynamicPageEndpointMatcherPolicy.cs (1)
137foreach (var kvp in originalValues)
Infrastructure\PageActionDescriptorProvider.cs (1)
110foreach (var kvp in model.RouteValues)
Microsoft.AspNetCore.Mvc.RazorPages.Test (57)
Filters\PageViewDataAttributeFilterTest.cs (1)
32var feature = Assert.Single(httpContext.Features, f => f.Key == typeof(IViewDataValuesProviderFeature));
Infrastructure\PageActionEndpointDataSourceTest.cs (1)
275foreach (var kvp in new RouteValueDictionary(values))
Infrastructure\PageBinderFactoryTest.cs (1)
747var entry = Assert.Single(modelState);
PageModelTest.cs (27)
420IEnumerable<KeyValuePair<string, object>> expected) 441IEnumerable<KeyValuePair<string, object>> expected) 465IEnumerable<KeyValuePair<string, object>> expected) 489IEnumerable<KeyValuePair<string, object>> expected) 513IEnumerable<KeyValuePair<string, object>> expected) 533IEnumerable<KeyValuePair<string, object>> expected) 553IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 578IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 603IEnumerable<KeyValuePair<string, object>> expected) 623IEnumerable<KeyValuePair<string, object>> expected) 643IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 668IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 697IEnumerable<KeyValuePair<string, object>> expected) 716IEnumerable<KeyValuePair<string, object>> expected) 735IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 758IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 781IEnumerable<KeyValuePair<string, object>> expected) 800IEnumerable<KeyValuePair<string, object>> expected) 819IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 842IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 1249IEnumerable<KeyValuePair<string, object>> expected) 1270IEnumerable<KeyValuePair<string, object>> expected) 1291IEnumerable<KeyValuePair<string, object>> expected) 1312IEnumerable<KeyValuePair<string, object>> expected) 1333IEnumerable<KeyValuePair<string, object>> expected) 1354IEnumerable<KeyValuePair<string, object>> expected) 1774var modelState = Assert.Single(pageModel.ModelState);
PageTest.cs (27)
440IEnumerable<KeyValuePair<string, object>> expected) 461IEnumerable<KeyValuePair<string, object>> expected) 485IEnumerable<KeyValuePair<string, object>> expected) 509IEnumerable<KeyValuePair<string, object>> expected) 533IEnumerable<KeyValuePair<string, object>> expected) 553IEnumerable<KeyValuePair<string, object>> expected) 573IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 598IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 623IEnumerable<KeyValuePair<string, object>> expected) 643IEnumerable<KeyValuePair<string, object>> expected) 663IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 688IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 717IEnumerable<KeyValuePair<string, object>> expected) 736IEnumerable<KeyValuePair<string, object>> expected) 755IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 778IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 801IEnumerable<KeyValuePair<string, object>> expected) 820IEnumerable<KeyValuePair<string, object>> expected) 839IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 862IEnumerable<KeyValuePair<string, object>> expectedRouteValues) 953IEnumerable<KeyValuePair<string, object>> expected) 974IEnumerable<KeyValuePair<string, object>> expected) 995IEnumerable<KeyValuePair<string, object>> expected) 1016IEnumerable<KeyValuePair<string, object>> expected) 1323IEnumerable<KeyValuePair<string, object>> expected) 1344IEnumerable<KeyValuePair<string, object>> expected) 1852var modelState = Assert.Single(pageModel.ModelState);
Microsoft.AspNetCore.Mvc.TagHelpers (13)
Cache\CacheTagKey.cs (12)
41private readonly IList<KeyValuePair<string, string>> _headers; 42private readonly IList<KeyValuePair<string, string>> _queries; 43private readonly IList<KeyValuePair<string, string>> _routeValues; 44private readonly IList<KeyValuePair<string, string>> _cookies; 265private static IList<KeyValuePair<string, string>> ExtractCollection<TSourceCollection>( 277var result = new List<KeyValuePair<string, string>>(); 296IList<KeyValuePair<string, string>> values) 311var item = values[i]; 330IList<KeyValuePair<string, string>> values) 338var item = values[i]; 345private static bool AreSame(IList<KeyValuePair<string, string>> values1, IList<KeyValuePair<string, string>> values2)
TagHelperOutputExtensions.cs (1)
90foreach (var attribute in tagBuilder.Attributes)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
FormActionTagHelperTest.cs (2)
224Assert.Equal<KeyValuePair<string, object>>(expectedRouteValues, param.Values as RouteValueDictionary); 283Assert.Equal<KeyValuePair<string, object>>(expectedRouteValues, param.Values as RouteValueDictionary);
FormTagHelperTest.cs (1)
472var routeValue = Assert.Single(routeValueDictionary, attr => attr.Key.Equals("val"));
SelectTagHelperTest.cs (4)
132foreach (var attribute in attributeData) 426var kvp = Assert.Single(tagHelperContext.Items); 619var keyValuePair = Assert.Single( 695var keyValuePair = Assert.Single(
TagHelperOutputExtensionsTest.cs (1)
780foreach (var attr in tagBuilderAttributes)
Microsoft.AspNetCore.Mvc.Test (2)
MvcServiceCollectionExtensionsTest.cs (2)
62foreach (var serviceType in MultiRegistrationServiceTypes) 71foreach (var serviceType in MultiRegistrationServiceTypes)
Microsoft.AspNetCore.Mvc.Testing (6)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.7.25327.102\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
196private sealed class HostingListener : IObserver<DiagnosticListener>, IObserver<KeyValuePair<string, object?>> 323public void OnNext(KeyValuePair<string, object?> value)
DeferredHostBuilder.cs (1)
30foreach (var pair in Properties)
Handlers\RedirectHandler.cs (3)
88foreach (var header in originalRequestContent.Headers) 99foreach (var header in originalRequestHeaders) 160foreach (var property in response.RequestMessage.Options)
Microsoft.AspNetCore.Mvc.ViewFeatures (69)
AttributeDictionary.cs (21)
19private List<KeyValuePair<string, string?>>? _items; 43var item = new KeyValuePair<string, string?>(key, value); 74private KeyValuePair<string, string?> Get(int index) 80private void Set(int index, KeyValuePair<string, string?> value) 87_items = new List<KeyValuePair<string, string?>>(); 93private void Insert(int index, KeyValuePair<string, string?> value) 100_items = new List<KeyValuePair<string, string?>>(); 158public void Add(KeyValuePair<string, string?> item) 164nameof(KeyValuePair<string, string?>.Key), 165nameof(KeyValuePair<string, string?>)), 189public bool Contains(KeyValuePair<string, string?> item) 195nameof(KeyValuePair<string, string?>.Key), 196nameof(KeyValuePair<string, string?>)), 225public void CopyTo(KeyValuePair<string, string?>[] array, int arrayIndex) 247public bool Remove(KeyValuePair<string, string?> item) 253nameof(KeyValuePair<string, string?>.Key), 254nameof(KeyValuePair<string, string?>)), 316IEnumerator<KeyValuePair<string, string?>> IEnumerable<KeyValuePair<string, string?>>.GetEnumerator() 324public struct Enumerator : IEnumerator<KeyValuePair<string, string?>> 342public KeyValuePair<string, string?> Current => _attributes.Get(_index);
Diagnostics\MvcDiagnostics.cs (8)
53protected override KeyValuePair<string, object> this[int index] => index switch 111protected override KeyValuePair<string, object> this[int index] => index switch 162protected override KeyValuePair<string, object> this[int index] => index switch 213protected override KeyValuePair<string, object> this[int index] => index switch 257protected override KeyValuePair<string, object> this[int index] => index switch 300protected override KeyValuePair<string, object> this[int index] => index switch 368protected override KeyValuePair<string, object> this[int index] => index switch 439protected override KeyValuePair<string, object> this[int index] => index switch
HtmlHelper.cs (1)
1383foreach (var keyValuePair in metadata.EnumGroupedDisplayNamesAndValues)
Infrastructure\DefaultTempDataSerializer.cs (1)
202foreach (var element in dictionary)
ModelExplorerExtensions.cs (1)
55foreach (var kvp in enumGroupedDisplayNamesAndValues)
ModelStateDictionaryExtensions.cs (2)
130foreach (var entry in entries) 139foreach (var entry in entries)
Rendering\TagBuilder.cs (3)
55foreach (var tag in tagBuilder._attributes) 239foreach (var attribute in Attributes) 310foreach (var entry in attributes)
TempDataDictionary.cs (20)
75bool ICollection<KeyValuePair<string, object?>>.IsReadOnly 80return ((ICollection<KeyValuePair<string, object?>>)_data).IsReadOnly; 167foreach (var entry in _data) 218public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 242void ICollection<KeyValuePair<string, object?>>.CopyTo(KeyValuePair<string, object?>[] array, int index) 245((ICollection<KeyValuePair<string, object?>>)_data).CopyTo(array, index); 248void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> keyValuePair) 252((ICollection<KeyValuePair<string, object?>>)_data).Add(keyValuePair); 255bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> keyValuePair) 258return ((ICollection<KeyValuePair<string, object?>>)_data).Contains(keyValuePair); 261bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> keyValuePair) 265return ((ICollection<KeyValuePair<string, object?>>)_data).Remove(keyValuePair); 274private sealed class TempDataDictionaryEnumerator : IEnumerator<KeyValuePair<string, object?>> 287public KeyValuePair<string, object?> Current 291var kvp = _enumerator.Current; 308((IEnumerator<KeyValuePair<string, object?>>)_enumerator).Reset();
TemplateBuilder.cs (2)
108foreach (var kvp in enumGrouped) 124foreach (var kvp in HtmlHelper.ObjectToDictionary(_additionalViewData))
ValidationHelpers.cs (1)
67foreach (var entry in modelStateDictionary)
ViewComponents\DefaultViewComponentInvoker.cs (3)
284private sealed class ViewComponentLogScope : IReadOnlyList<KeyValuePair<string, object>> 293public KeyValuePair<string, object> this[int index] 311public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
ViewDataDictionary.cs (6)
554public void Add(KeyValuePair<string, object?> item) 566public bool Contains(KeyValuePair<string, object?> item) 572public void CopyTo(KeyValuePair<string, object?>[] array, int arrayIndex) 580public bool Remove(KeyValuePair<string, object?> item) 586IEnumerator<KeyValuePair<string, object?>> IEnumerable<KeyValuePair<string, object?>>.GetEnumerator()
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (39)
AttributeDictionaryTest.cs (2)
158var array = new KeyValuePair<string, string>[attributes.Count + 1]; 166kvp => Assert.Equal(default(KeyValuePair<string, string>), kvp),
ControllerUnitTestabilityTests.cs (1)
713var error = Assert.Single(validationProblemDetails.Errors);
DefaultHtmlGeneratorTest.cs (8)
132var attribute = Assert.Single(tagBuilder.Attributes, a => a.Key == "name"); 186var attribute = Assert.Single(tagBuilder.Attributes, a => a.Key == "name"); 210var attribute = Assert.Single(tagBuilder.Attributes, a => a.Key == "maxlength"); 234var attribute = Assert.Single(tagBuilder.Attributes, a => a.Key == "maxlength"); 258var attribute = Assert.Single(tagBuilder.Attributes, a => a.Key == "maxlength"); 280var attribute = Assert.Single(tagBuilder.Attributes, a => a.Key == "maxlength"); 326var attribute = Assert.Single(tagBuilder.Attributes, a => a.Key == "maxlength"); 486var attribute = Assert.Single(tagBuilder.Attributes, a => a.Key == "data-valmsg-for");
Filters\ControllerViewDataAttributeFilterTest.cs (1)
28var feature = Assert.Single(httpContext.Features, f => f.Key == typeof(IViewDataValuesProviderFeature));
ModelStateDictionaryExtensionsTest.cs (17)
18var modelState = Assert.Single(dictionary); 35var modelState = Assert.Single(dictionary); 52var modelState = Assert.Single(dictionary); 70var modelState = Assert.Single(dictionary); 88var modelState = Assert.Single(dictionary); 108var modelState = Assert.Single(dictionary); 126var modelState = Assert.Single(dictionary); 146var modelState = Assert.Single(dictionary); 164var modelState = Assert.Single(dictionary); 184var modelState = Assert.Single(dictionary); 203var modelState = Assert.Single(dictionary); 224var modelState = Assert.Single(dictionary); 303var modelState = Assert.Single(dictionary); 323var modelState = Assert.Single(dictionary); 342var modelState = Assert.Single(dictionary); 365var modelState = Assert.Single(dictionary); 387var modelState = Assert.Single(dictionary);
RemoteAttributeTest.cs (2)
56var keyValuePair = Assert.Single(attribute.RouteData); 67var keyValuePair = Assert.Single(attribute.RouteData);
Rendering\HtmlHelperTest.cs (4)
10public static TheoryData<object, KeyValuePair<string, object>> IgnoreCaseTestData 14return new TheoryData<object, KeyValuePair<string, object>> 139KeyValuePair<string, object> expectedEntry) 145var entry = Assert.Single(result);
Rendering\TagBuilderTest.cs (3)
37var attribute = Assert.Single(tagBuilder.Attributes); 52var attribute = Assert.Single(tagBuilder.Attributes); 67var attribute = Assert.Single(tagBuilder.Attributes);
TempDataDictionaryTest.cs (1)
52var value = enumerator.Current;
Microsoft.AspNetCore.OpenApi (3)
Schemas\OpenApiJsonSchema.Helpers.cs (1)
308foreach (var kvp in mappings)
Services\OpenApiGenerator.cs (1)
194foreach (var annotation in eligibileAnnotations)
Services\Schemas\OpenApiSchemaService.cs (1)
172foreach (var property in schema.Properties)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
31foreach (var entry in map)
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (3)
SnapshotTestHelper.cs (3)
58foreach (var classLibrary in classLibrarySources) 386private sealed class HostingListener : IObserver<DiagnosticListener>, IObserver<KeyValuePair<string, object>> 513public void OnNext(KeyValuePair<string, object> value)
Microsoft.AspNetCore.OpenApi.Tests (86)
Services\CreateSchemaReferenceIdTests.cs (6)
77var content = Assert.Single(requestBody.Content); 126var content = Assert.Single(requestBody.Content); 185var content = Assert.Single(requestBody.Content); 193var responseContent = Assert.Single(response.Content); 228var content = Assert.Single(requestBody.Content); 236var responseContent = Assert.Single(response.Content);
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.RequestBody.cs (13)
39var content = Assert.Single(operation.RequestBody.Content); 116var content = Assert.Single(operation.RequestBody.Content); 184var content = Assert.Single(operation.RequestBody.Content); 224var content = Assert.Single(operation.RequestBody.Content); 251var content = Assert.Single(operation.RequestBody.Content); 279var content = Assert.Single(operation.RequestBody.Content); 332var content = Assert.Single(operation.RequestBody.Content); 353var content = Assert.Single(operation.RequestBody.Content); 374var content = Assert.Single(operation.RequestBody.Content); 1093foreach (var path in document.Paths) 1097var content = Assert.Single(operation.RequestBody.Content); 1119var path = Assert.Single(document.Paths); 1122var content = Assert.Single(operation.RequestBody.Content);
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Responses.cs (12)
55var response = Assert.Single(operation.Responses); 79var response = Assert.Single(operation.Responses); 82var content = Assert.Single(response.Value.Content); 104var response = Assert.Single(operation.Responses); 107var content = Assert.Single(response.Value.Content); 127var response = Assert.Single(operation.Responses); 157var response = Assert.Single(operation.Responses); 181var response = Assert.Single(operation.Responses); 200var response = Assert.Single(operation.Responses); 228var response = Assert.Single(operation.Responses); 231var mediaTypeEntry = Assert.Single(response.Value.Content); 282var okContent = Assert.Single(okResponse.Content);
Services\OpenApiGeneratorTests.cs (31)
153var response = Assert.Single(operation.Responses); 155var formats = Assert.Single(response.Value.Content); 175var response = Assert.Single(operation.Responses); 177var formats = Assert.Single(response.Value.Content); 186var response = Assert.Single(operation.Responses); 212var content = Assert.Single(createdResponseType.Content); 220var badRequestContent = Assert.Single(badRequestResponseType.Content); 235var createdResponseContent = Assert.Single(createdResponseType.Content); 432var content = Assert.Single(requestBody.Content!); 465var fromBodyContent = Assert.Single(fromBodyParam.Content!); 551var responses = Assert.Single(operation.Responses); 552var content = Assert.Single(responses.Value.Content); 568var responses = Assert.Single(operation.Responses); 569var content = Assert.Single(responses.Value.Content); 606var content = Assert.Single(responseType.Value.Content); 612var content = Assert.Single(responseType.Value.Content); 618var content = Assert.Single(responseType.Value.Content); 624var content = Assert.Single(responseType.Value.Content); 648var content = Assert.Single(responseType.Value.Content); 654var content = Assert.Single(responseType.Value.Content); 701var content = Assert.Single(requestBody.Content!); 718var content = Assert.Single(requestBody.Content!); 734var content = Assert.Single(requestBody.Content!); 750var content = Assert.Single(requestBody.Content!); 766var content = Assert.Single(requestBody.Content!); 782var content = Assert.Single(requestBody.Content!); 798var content = Assert.Single(requestBody.Content!); 853var content = Assert.Single(requestBody.Content!); 877var content = Assert.Single(requestBody.Content!); 911var response = Assert.Single(operation.Responses); 912var content = Assert.Single(response.Value.Content);
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (1)
143var path = Assert.Single(document.Paths);
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (8)
32var content = Assert.Single(requestBody.Content); 184var content = Assert.Single(requestBody.Content); 434var content = Assert.Single(requestBody.Content); 481var content = Assert.Single(requestBody.Content); 526var content = Assert.Single(requestBody.Content); 623var content = Assert.Single(requestBody.Content); 649var content = Assert.Single(requestBody.Content); 687var content = Assert.Single(requestBody.Content);
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (14)
46var responses = Assert.Single(operation.Responses); 67var responses = Assert.Single(operation.Responses); 114var content = Assert.Single(response.Content); 181var responses = Assert.Single(operation.Responses); 226var content = Assert.Single(response.Content); 247var responses = Assert.Single(operation.Responses); 301var responses = Assert.Single(operation.Responses); 369var responses = Assert.Single(operation.Responses); 409var responses = Assert.Single(operation.Responses); 471var responses = Assert.Single(operation.Responses); 520var responses = Assert.Single(operation.Responses); 600var responses = Assert.Single(operation.Responses); 658var responses = Assert.Single(operation.Responses); 688var responses = Assert.Single(operation.Responses);
Transformers\CustomSchemaTransformerTests.cs (1)
47var schema = Assert.Single(document.Components.Schemas);
Microsoft.AspNetCore.OutputCaching (11)
OutputCacheEntry.cs (1)
91foreach (var header in headers)
OutputCacheEntryFormatter.cs (1)
510var pairs = new List<KeyValuePair<string, int>>(arr.Length);
OutputCacheKeyProvider.cs (3)
354private sealed class QueryKeyComparer : IComparer<KeyValuePair<string, StringValues>> 365public int Compare(KeyValuePair<string, StringValues> x, KeyValuePair<string, StringValues> y) => _stringComparer.Compare(x.Key, y.Key);
OutputCachePolicyBuilder.cs (4)
215ValueTask<KeyValuePair<string, string>> varyByFunc(HttpContext context, CancellationToken cancellationToken) 227public OutputCachePolicyBuilder VaryByValue(Func<HttpContext, KeyValuePair<string, string>> varyBy) 231ValueTask<KeyValuePair<string, string>> varyByFunc(HttpContext context, CancellationToken cancellationToken) 243public OutputCachePolicyBuilder VaryByValue(Func<HttpContext, CancellationToken, ValueTask<KeyValuePair<string, string>>> varyBy)
Policies\VaryByValuePolicy.cs (2)
18public VaryByValuePolicy(Func<HttpContext, CancellationToken, ValueTask<KeyValuePair<string, string>>> varyBy) 22var result = await varyBy(context, cancellationToken);
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
EndToEndBenchmarks.cs (1)
221foreach (var header in _headers)
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheTests.cs (1)
1054foreach (var header in initialResponse.Headers)
Microsoft.AspNetCore.Owin (66)
DictionaryStringArrayWrapper.cs (22)
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); 32int ICollection<KeyValuePair<string, string[]>>.Count => Inner.Count; 34bool ICollection<KeyValuePair<string, string[]>>.IsReadOnly => Inner.IsReadOnly; 40void ICollection<KeyValuePair<string, string[]>>.Add(KeyValuePair<string, string[]> item) => Inner.Add(Convert(item)); 44void ICollection<KeyValuePair<string, string[]>>.Clear() => Inner.Clear(); 46bool ICollection<KeyValuePair<string, string[]>>.Contains(KeyValuePair<string, string[]> item) => Inner.Contains(Convert(item)); 50void ICollection<KeyValuePair<string, string[]>>.CopyTo(KeyValuePair<string, string[]>[] array, int arrayIndex) 52foreach (var kv in Inner) 60IEnumerator<KeyValuePair<string, string[]>> IEnumerable<KeyValuePair<string, string[]>>.GetEnumerator() => new ConvertingEnumerator(Inner); 64bool ICollection<KeyValuePair<string, string[]>>.Remove(KeyValuePair<string, string[]> item) => Inner.Remove(Convert(item)); 80public struct ConvertingEnumerator : IEnumerator<KeyValuePair<string, string[]>>, IEnumerator 82private IEnumerator<KeyValuePair<string, StringValues>> _inner; 83private KeyValuePair<string, string[]> _current; 109public KeyValuePair<string, string[]> Current => _current;
DictionaryStringValuesWrapper.cs (22)
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); 77int ICollection<KeyValuePair<string, StringValues>>.Count => Inner.Count; 79bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly => Inner.IsReadOnly; 85void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) => Inner.Add(Convert(item)); 89void ICollection<KeyValuePair<string, StringValues>>.Clear() => Inner.Clear(); 91bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) => Inner.Contains(Convert(item)); 95void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 97foreach (var kv in Inner) 105IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator() => new ConvertingEnumerator(Inner); 109bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item) => Inner.Remove(Convert(item)); 125public struct ConvertingEnumerator : IEnumerator<KeyValuePair<string, StringValues>>, IEnumerator 127private IEnumerator<KeyValuePair<string, string[]>> _inner; 128private KeyValuePair<string, StringValues> _current; 154public KeyValuePair<string, StringValues> Current => _current;
OwinEnvironment.cs (21)
161void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item) 166void ICollection<KeyValuePair<string, object>>.Clear() 172bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item) 177void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 187foreach (var entryPair in this) 193int ICollection<KeyValuePair<string, object>>.Count 198bool ICollection<KeyValuePair<string, object>>.IsReadOnly 203bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item) 209public IEnumerator<KeyValuePair<string, object>> GetEnumerator() 211foreach (var entryPair in _owinEntries) 219foreach (var entryPair in _context.Items) 404private sealed class OwinEntries : IEnumerable<KeyValuePair<string, FeatureMap>> 565public IEnumerator<KeyValuePair<string, FeatureMap>> GetEnumerator() 569foreach (var entry in _contextEntries) 576foreach (var entry in _entries) 586foreach (var entry in _contextDependentEntries) 614foreach (var entry in _contextDependentEntries)
OwinFeatureCollection.cs (1)
398public IEnumerator<KeyValuePair<Type, object>> GetEnumerator()
Microsoft.AspNetCore.Owin.Tests (2)
OwinEnvironmentTests.cs (2)
142var collection = (ICollection<KeyValuePair<string, object>>)owinEnvironment; 145var kvp = new KeyValuePair<string, object>[length];
Microsoft.AspNetCore.RateLimiting (1)
RateLimitingMiddleware.cs (1)
50foreach (var unactivatedPolicy in options.Value.UnactivatedPolicyMap)
Microsoft.AspNetCore.RateLimiting.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Razor.Runtime (15)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (5)
119public void Add(KeyValuePair<TKey, TValue> item) 129public bool Contains(KeyValuePair<TKey, TValue> item) 134public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 139public bool Remove(KeyValuePair<TKey, TValue> item) 144public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (8)
136public void Add(KeyValuePair<TKey, TValue> item) 138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item); 146public bool Contains(KeyValuePair<TKey, TValue> item) 148return ((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).Contains(item); 151public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 153((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).CopyTo(array, arrayIndex); 156public bool Remove(KeyValuePair<TKey, TValue> item) 158return ((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Remove(item);
src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
Microsoft.AspNetCore.Razor.Runtime.Test (8)
Runtime\TagHelpers\TagHelperScopeManagerTest.cs (8)
22var executionContextItem = Assert.Single(executionContext.Items); 39var executionContextItem = Assert.Single(executionContext.Items); 58var executionContextItem = Assert.Single(executionContext.Items); 61var parentEntry = Assert.Single(parentComplexObject); 79var executionContextItem = Assert.Single(executionContext.Items); 82var parentExecutionContextItem = Assert.Single(parentExecutionContext.Items); 99var executionContextItem = Assert.Single(executionContext.Items); 119var parentExecutionContextItem = Assert.Single(parentExecutionContext.Items);
Microsoft.AspNetCore.Razor.Test (2)
TagHelpers\TagHelperContextTest.cs (2)
63var item = Assert.Single(context.Items); 86var item = Assert.Single(context.Items);
Microsoft.AspNetCore.ResponseCaching (6)
CacheEntry\CacheEntryHelpers.cs (1)
25foreach (var item in cachedResponse.Headers)
ResponseCachingKeyProvider.cs (3)
193private sealed class QueryKeyComparer : IComparer<KeyValuePair<string, StringValues>> 204public int Compare(KeyValuePair<string, StringValues> x, KeyValuePair<string, StringValues> y) => _stringComparer.Compare(x.Key, y.Key);
ResponseCachingMiddleware.cs (2)
173foreach (var header in context.CachedResponse.Headers) 312foreach (var header in headers)
Microsoft.AspNetCore.ResponseCaching.Tests (1)
ResponseCachingTests.cs (1)
958foreach (var header in initialResponse.Headers)
Microsoft.AspNetCore.Routing (81)
DecisionTree\DecisionTreeBuilder.cs (3)
115foreach (var kvp in item.Criteria) 151foreach (var criterion in criteria.OrderByDescending(c => c.Value.Count)) 155foreach (var branch in criterion.Value)
DefaultLinkGenerator.cs (1)
450foreach (var kvp in values.OrderBy(kvp => kvp.Key))
DefaultLinkParser.cs (2)
92foreach (var kvp in policies) 130foreach (var kvp in constraints)
EndpointDataSource.cs (1)
143static void FormatValues(StringBuilder sb, IEnumerable<KeyValuePair<string, object?>> values)
EndpointNameAddressScheme.cs (1)
78foreach (var group in entries)
Internal\DfaGraphWriter.cs (2)
75foreach (var literal in node.Literals) 93foreach (var policy in node.PolicyEdges)
Matching\AcceptsMatcherPolicy.cs (3)
181foreach (var kvp in edges) 192foreach (var kvp in edges) 241foreach (var kvp in edges)
Matching\Candidate.cs (6)
21public readonly KeyValuePair<string, object>[] Slots; 34public readonly KeyValuePair<string, IRouteConstraint>[] Constraints; 54Slots = Array.Empty<KeyValuePair<string, object>>(); 58Constraints = Array.Empty<KeyValuePair<string, IRouteConstraint>>(); 67KeyValuePair<string, object>[] slots, 71KeyValuePair<string, IRouteConstraint>[] constraints)
Matching\DfaMatcher.cs (5)
134var slots = new KeyValuePair<string, object?>[prototype.Length]; 235KeyValuePair<string, object?>[] slots, 258KeyValuePair<string, object?>[] slots, 299KeyValuePair<string, IRouteConstraint>[] constraints, 305var constraint = constraints[i];
Matching\DfaMatcherBuilder.cs (10)
29private readonly List<KeyValuePair<string, object>> _slots; 32private readonly List<KeyValuePair<string, IRouteConstraint>> _constraints; 53_slots = new List<KeyValuePair<string, object>>(); 56_constraints = new List<KeyValuePair<string, IRouteConstraint>>(); 601foreach (var kvp in node.Literals) 639foreach (var kvp in node.PolicyEdges) 747foreach (var kvp in routeEndpoint.RoutePattern.Defaults) 811foreach (var kvp in routeEndpoint.RoutePattern.ParameterPolicies) 840Array.Empty<KeyValuePair<string, object>>(), 844Array.Empty<KeyValuePair<string, IRouteConstraint>>());
Matching\DfaNode.cs (2)
84foreach (var kvp in Literals) 104foreach (var kvp in PolicyEdges)
Matching\HostMatcherPolicy.cs (3)
229foreach (var kvp in edges) 237foreach (var kvp in edges) 264foreach (var kvp in edges)
Matching\HttpMethodDestinationsLookup.cs (1)
23public HttpMethodDestinationsLookup(List<KeyValuePair<string, int>> destinations, int exitDestination)
Matching\HttpMethodMatcherPolicy.cs (6)
235foreach (var kvp in edges) 291foreach (var kvp in edges) 313List<KeyValuePair<string, int>>? destinations = null; 314List<KeyValuePair<string, int>>? corsPreflightDestinations = null; 337var httpMethodDestination = destinations[0]; 364static void ProcessEdge(string httpMethod, int destination, ref int exitDestination, ref List<KeyValuePair<string, int>>? destinations)
Matching\NegotiationMatcherPolicy.cs (2)
254foreach (var edge in edges) 284foreach (var kvp in edges)
Patterns\DefaultRoutePatternTransformer.cs (3)
41foreach (var kvp in requiredValues) 157foreach (var kvp in requiredValues) 183foreach (var kvp in original.RequiredValues)
Patterns\RoutePatternFactory.cs (3)
463foreach (var kvp in defaults) 496foreach (var kvp in requiredValues) 655foreach (var kvp in parameterPolicies)
Patterns\RoutePatternMatcher.cs (2)
187foreach (var kvp in Defaults) 493foreach (var item in outValues)
RouteBase.cs (3)
189foreach (var dataToken in DataTokens) 213foreach (var kvp in constraints) 279foreach (var kvp in values)
RouteConstraintBuilder.cs (1)
55foreach (var kvp in _constraints)
RouteConstraintMatcher.cs (1)
61foreach (var kvp in constraints)
src\Shared\Debugger\DebuggerHelpers.cs (6)
15return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1) }, includeNullValues, prefix); 20return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1), Create(key2, value2) }, includeNullValues, prefix); 25return GetDebugText(new KeyValuePair<string, object?>[] { Create(key1, value1), Create(key2, value2), Create(key3, value3) }, includeNullValues, prefix); 28public static string GetDebugText(ReadOnlySpan<KeyValuePair<string, object?>> values, bool includeNullValues = true, string? prefix = null) 44var kvp = values[i]; 114private static KeyValuePair<string, object?> Create(string key, object? value) => new KeyValuePair<string, object?>(key, value);
Template\DefaultTemplateBinderFactory.cs (1)
40foreach (var kvp in pattern.ParameterPolicies)
Template\TemplateBinder.cs (9)
26private readonly KeyValuePair<string, object?>[] _filters; 34private readonly KeyValuePair<string, object?>[] _slots; 164var slots = new KeyValuePair<string, object?>[_slots.Length]; 389foreach (var kvp in values) 594foreach (var kvp in acceptedValues) 707foreach (var kvp in ambientValues) 720private static KeyValuePair<string, object?>[] AssignSlots(RoutePattern pattern, KeyValuePair<string, object?>[] filters) 722var slots = new KeyValuePair<string, object?>[pattern.Parameters.Count + filters.Length];
Tree\LinkGenerationDecisionTree.cs (3)
43foreach (var kvp in entry.Entry.RequiredLinkValues) 177foreach (var kvp in item.Entry.RequiredLinkValues) 254foreach (var branch in criterion.Branches)
Tree\TreeRouter.cs (1)
297foreach (var kvp in context.Values)
Microsoft.AspNetCore.Routing.Abstractions (5)
RouteData.cs (4)
168foreach (var kvp in values) 179foreach (var kvp in dataTokens) 244foreach (var kvp in _dataTokens) 306foreach (var kvp in _values)
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
Microsoft.AspNetCore.Routing.FunctionalTests (12)
MinimalFormTests.cs (12)
55var nameValueCollection = new List<KeyValuePair<string, string>> 115var nameValueCollection = new List<KeyValuePair<string, string>> 161var nameValueCollection = new List<KeyValuePair<string, string>> 200var nameValueCollection = new List<KeyValuePair<string, string>> 277var nameValueCollection = new List<KeyValuePair<string, string>> 324var nameValueCollection = new List<KeyValuePair<string, string>> 420var nameValueCollection = new List<KeyValuePair<string, string>> 476var nameValueCollection = new List<KeyValuePair<string, string>> 535var nameValueCollection = new List<KeyValuePair<string, string>> 587var nameValueCollection = new List<KeyValuePair<string, string>> 639var nameValueCollection = new List<KeyValuePair<string, string>> 688var nameValueCollection = new List<KeyValuePair<string, string>>
Microsoft.AspNetCore.Routing.Microbenchmarks (3)
Matching\HttpMethodPolicyJumpTableBenchmark.cs (2)
33var destinations = new List<KeyValuePair<string, int>> 46foreach (var item in extra)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Routing.Tests (108)
DecisionTreeBuilderTest.cs (4)
60var admin = Assert.Single(area.Branches); 67var users = Assert.Single(controller.Branches); 74var addUser = Assert.Single(action.Branches); 111var store = Assert.Single(controller.Branches);
EndpointNameAddressSchemeTest.cs (1)
80var match = Assert.Single(addressScheme.Entries);
EndpointRoutingMiddlewareTest.cs (4)
489private class DelegateObserver : IObserver<KeyValuePair<string, object>> 491private readonly Action<KeyValuePair<string, object>> _onNext; 493public DelegateObserver(Action<KeyValuePair<string, object>> onNext) 507public void OnNext(KeyValuePair<string, object> value)
Matching\DfaMatcherBuilderTest.cs (74)
51var next = Assert.Single(root.Literals); 179var next = Assert.Single(root.Literals); 231var next = Assert.Single(root.Literals); 283var next = Assert.Single(root.Literals); 339var next = Assert.Single(root.Literals); 381var next = Assert.Single(root.Literals); 430var next = Assert.Single(root.Literals); 477var aNodeKvp = Assert.Single(root.Literals); 481var cNodeKvp = Assert.Single(aNodeValue.Literals); 489var bNodeKvp = Assert.Single(root.Parameters.Literals); 494var paramCNodeKvp = Assert.Single(bNode.Literals); 524var aNodeKvp = Assert.Single(root.Literals); 528var cNodeKvp = Assert.Single(aNodeValue.Literals); 536var bNodeKvp = Assert.Single(root.Parameters.Literals); 541var paramCNodeKvp = Assert.Single(bNode.Literals); 571var aNodeKvp = Assert.Single(root.Literals); 586var paramBCNodeKvp = Assert.Single(bNode.Literals); 596var bParamNodeKvp = Assert.Single(root.Parameters.Literals); 601var paramCNodeKvp = Assert.Single(bParamNode.Literals); 634var aNodeKvp = Assert.Single(root.Literals); 649var paramBCNodeKvp = Assert.Single(bNode.Literals); 659var bParamNodeKvp = Assert.Single(root.Parameters.Literals); 664var paramCNodeKvp = Assert.Single(bParamNode.Literals); 692var aNodeKvp = Assert.Single(root.Literals); 696var cNodeKvp = Assert.Single(aNodeValue.Literals); 704var bNodeKvp = Assert.Single(root.Parameters.Literals); 709var paramCNodeKvp = Assert.Single(bNode.Literals); 739var aNodeKvp = Assert.Single(root.Literals); 754var paramBCNodeKvp = Assert.Single(bNode.Literals); 764var bParamNodeKvp = Assert.Single(root.Parameters.Literals); 769var paramCNodeKvp = Assert.Single(bParamNode.Literals); 797var aNodeKvp = Assert.Single(root.Literals); 801var cNodeKvp = Assert.Single(aNodeValue.Literals); 809var bNodeKvp = Assert.Single(root.Parameters.Literals); 814var paramCNodeKvp = Assert.Single(bNode.Literals); 844var aNodeKvp = Assert.Single(root.Literals); 859var paramBCNodeKvp = Assert.Single(bNode.Literals); 869var bParamNodeKvp = Assert.Single(root.Parameters.Literals); 874var paramCNodeKvp = Assert.Single(bParamNode.Literals); 904var aNodeKvp = Assert.Single(root.Literals); 919var paramBCNodeKvp = Assert.Single(bNode.Literals); 929var bParamNodeKvp = Assert.Single(root.Parameters.Literals); 934var paramCNodeKvp = Assert.Single(bParamNode.Literals); 967var aNodeKvp = Assert.Single(root.Literals); 971var cNodeKvp = aNodeValue.Literals.Single(); 981var bParamNodeKvp = Assert.Single(root.Parameters.Literals); 986var paramCNodeKvp = Assert.Single(bParamNode.Literals); 1019var aNodeKvp = Assert.Single(root.Literals); 1034var paramBCNodeKvp = Assert.Single(bNode.Literals); 1044var bParamNodeKvp = Assert.Single(root.Parameters.Literals); 1049var paramCNodeKvp = Assert.Single(bParamNode.Literals); 2412var next = Assert.Single(root.Literals); 2455var next = Assert.Single(root.Literals); 2497var next = Assert.Single(root.Literals); 2551var next = Assert.Single(root.Literals); 2601var next = Assert.Single(root.Literals); 2643var next = Assert.Single(root.Literals); 2688var next = Assert.Single(root.Literals); 2752var next = Assert.Single(root.Literals); 2796var next = Assert.Single(root.Literals); 2840var next = Assert.Single(root.Literals); 2888var next = Assert.Single(root.Literals); 2957var next = Assert.Single(root.Literals); 2991var next = Assert.Single(root.Literals); 3025var next = Assert.Single(root.Literals); 3078var next = Assert.Single(home.Literals); 3131var next = Assert.Single(root.Literals); 3164var next = Assert.Single(root.Literals); 3391var constraint1 = Assert.Single(candidate1.Constraints); 3394var constraint2 = Assert.Single(candidate2.Constraints); 3414var constraint1 = Assert.Single(candidate1.Constraints); 3417var constraint2 = Assert.Single(candidate2.Constraints); 3437var constraint1 = Assert.Single(candidate1.Constraints); 3440var constraint2 = Assert.Single(candidate2.Constraints);
RouteCollectionTest.cs (1)
153foreach (var dataToken in expectedDataTokens)
RouteConstraintBuilderTest.cs (2)
47var kvp = Assert.Single(result); 66var kvp = Assert.Single(result);
RouteTest.cs (3)
478var value = Assert.Single(context.RouteData.Values); 789foreach (var dataToken in expectedDataTokens) 828foreach (var dataToken in expectedDataTokens)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Template\TemplateBinderTests.cs (1)
1181foreach (var kvp in expectedParts.Parameters)
Tree\TreeRouteBuilderTest.cs (11)
89var firstSegment = Assert.Single(matchingTree.Root.Literals); 96var thirdSegment = Assert.Single(secondSegment.Literals); 121var firstSegment = Assert.Single(matchingTree.Root.Literals); 128var thirdSegment = Assert.Single(secondSegment.Literals); 136var fifthSegment = Assert.Single(fourthSegment.Literals); 165var firstSegment = Assert.Single(matchingTree.Root.Literals); 172var thirdSegment = Assert.Single(secondSegment.Literals); 197var firstSegment = Assert.Single(matchingTree.Root.Literals); 204var thirdSegment = Assert.Single(secondSegment.Literals); 229var firstSegment = Assert.Single(matchingTree.Root.Literals); 236var thirdSegment = Assert.Single(secondSegment.Literals);
Tree\TreeRouterTest.cs (6)
165foreach (var entry in expectedRouteValues) 167var data = Assert.Single(context.RouteData.Values, v => v.Key == entry.Key); 217foreach (var entry in expectedRouteValues) 219var data = Assert.Single(context.RouteData.Values, v => v.Key == entry.Key); 260foreach (var entry in expectedRouteValues) 262var data = Assert.Single(context.RouteData.Values, v => v.Key == entry.Key);
Microsoft.AspNetCore.Server.HttpSys (32)
RequestProcessing\Response.cs (2)
611foreach (var trailerPair in Trailers) 627foreach (var headerPair in Trailers)
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
src\Shared\Debugger\StringValuesDictionaryDebugView.cs (3)
13private readonly IEnumerable<KeyValuePair<string, StringValues>> _enumerable; 15public StringValuesDictionaryDebugView(IEnumerable<KeyValuePair<string, StringValues>> enumerable) 26foreach (var kvp in _enumerable)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (6)
165public void Add(KeyValuePair<string, StringValues> item) 200public bool Contains(KeyValuePair<string, StringValues> item) 210public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 215public IEnumerator<KeyValuePair<string, StringValues>> GetEnumerator() 230public bool Remove(KeyValuePair<string, StringValues> item) 300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (13)
97foreach (var item in _extra) 145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) 150void ICollection<KeyValuePair<string, StringValues>>.Clear() 159bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) 164void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 169bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly 239bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item) 245IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator()
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (1)
2535private IEnumerable<KeyValuePair<string, StringValues>> PropertiesEnumerable()
StandardFeatureCollection.cs (4)
92return ((IEnumerable<KeyValuePair<Type, object>>)this).GetEnumerator(); 95IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() 97foreach (var featureFunc in _featureFuncLookup)
UrlPrefixCollection.cs (2)
151foreach (var pair in _prefixes) 191foreach (var pair in _prefixes.ToList())
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (29)
Listener\ResponseHeaderTests.cs (3)
322var kvp = new KeyValuePair<string, StringValues>(key, value); 323((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp); 328var kvp = new KeyValuePair<string, StringValues>(key, value);
RequestBodyTests.cs (2)
219foreach (var header in httpContext.Request.Headers) 247foreach (var header in request.Headers)
RequestHeaderTests.cs (3)
90var header = KeyValuePair.Create("Custom-Header", new StringValues("custom")); 236foreach (var header in headers) 260foreach (var header in headers)
src\Shared\Http2cat\HPackHeaderWriter.cs (4)
16public static bool BeginEncodeHeaders(int statusCode, IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 40public static bool BeginEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 54public static bool ContinueEncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, out int length) 59private static bool EncodeHeaders(IEnumerator<KeyValuePair<string, string>> headersEnumerator, Span<byte> buffer, bool throwIfNoneEncoded, out int length)
src\Shared\Http2cat\Http2Utilities.cs (17)
36public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeaders = new[] 49public static readonly IEnumerable<KeyValuePair<string, string>> BrowserRequestHeadersHttp = new[] 62public static readonly IEnumerable<KeyValuePair<string, string>> PostRequestHeaders = new[] 70public static readonly IEnumerable<KeyValuePair<string, string>> ExpectContinueRequestHeaders = new[] 79public static readonly IEnumerable<KeyValuePair<string, string>> RequestTrailers = new[] 85public static readonly IEnumerable<KeyValuePair<string, string>> OneContinuationRequestHeaders = new[] 97public static readonly IEnumerable<KeyValuePair<string, string>> TwoContinuationsRequestHeaders = new[] 112public static IEnumerable<KeyValuePair<string, string>> ReadRateRequestHeaders(int expectedBytes) => new[] 181public Task StartStreamAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, bool endStream) 225private static IEnumerator<KeyValuePair<string, string>> GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers) 279public Task SendHeadersWithPaddingAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, bool endStream) 319public Task SendHeadersWithPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte priority, int streamDependency, bool endStream) 362public Task SendHeadersWithPaddingAndPriorityAsync(int streamId, IEnumerable<KeyValuePair<string, string>> headers, byte padLength, byte priority, int streamDependency, bool endStream) 499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers)
Microsoft.AspNetCore.Server.IIS (41)
Core\IISHttpContext.cs (10)
48protected Stack<KeyValuePair<Func<object, Task>, object>>? _onStarting; 49protected Stack<KeyValuePair<Func<object, Task>, object>>? _onCompleted; 594foreach (var headerPair in HttpResponseHeaders) 638foreach (var headerPair in HttpResponseTrailers) 684_onStarting = new Stack<KeyValuePair<Func<object, Task>, object>>(); 696_onCompleted = new Stack<KeyValuePair<Func<object, Task>, object>>(); 704Stack<KeyValuePair<Func<object, Task>, object>>? onStarting = null; 714foreach (var entry in onStarting) 728Stack<KeyValuePair<Func<object, Task>, object>>? onCompleted = null; 736foreach (var entry in onCompleted)
Core\IISHttpContext.FeatureCollection.cs (5)
47private List<KeyValuePair<Type, object>>? MaybeExtra; 64var kv = MaybeExtra[i]; 94MaybeExtra = new List<KeyValuePair<Type, object>>(2); 431IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
Core\IISHttpContext.Features.cs (2)
353private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 454foreach (var item in MaybeExtra)
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
src\Shared\Debugger\StringValuesDictionaryDebugView.cs (3)
13private readonly IEnumerable<KeyValuePair<string, StringValues>> _enumerable; 15public StringValuesDictionaryDebugView(IEnumerable<KeyValuePair<string, StringValues>> enumerable) 26foreach (var kvp in _enumerable)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (6)
165public void Add(KeyValuePair<string, StringValues> item) 200public bool Contains(KeyValuePair<string, StringValues> item) 210public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 215public IEnumerator<KeyValuePair<string, StringValues>> GetEnumerator() 230public bool Remove(KeyValuePair<string, StringValues> item) 300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (13)
97foreach (var item in _extra) 145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) 150void ICollection<KeyValuePair<string, StringValues>>.Clear() 159bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) 164void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 169bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly 239bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item) 245IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator()
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (1)
2535private IEnumerable<KeyValuePair<string, StringValues>> PropertiesEnumerable()
Microsoft.AspNetCore.Server.IntegrationTesting (5)
Common\DeploymentParameters.cs (2)
85foreach (var kvp in parameters.EnvironmentVariables) 90foreach (var kvp in parameters.PublishEnvironmentVariables)
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
173foreach (var envVariablePair in _deploymentParameters.EnvironmentVariables)
ProcessHelpers.cs (1)
15foreach (var environmentVariable in environmentVariables)
src\Shared\Process\ProcessEx.cs (1)
116foreach (var envVar in envVars)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (3)
IISDeployer.cs (1)
365foreach (var tuple in DeploymentParameters.EnvironmentVariables)
IISDeployerBase.cs (2)
117foreach (var envVar in IISDeploymentParameters.WebConfigBasedEnvironmentVariables) 132foreach (var handlerSetting in IISDeploymentParameters.HandlerSettings)
Microsoft.AspNetCore.Server.Kestrel.Core (92)
Internal\ConfigSectionClone.cs (1)
38foreach (var kvp in Children)
Internal\ConnectionLogScope.cs (3)
9internal sealed class ConnectionLogScope : IReadOnlyList<KeyValuePair<string, object>> 20public KeyValuePair<string, object> this[int index] 35public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Internal\Http\HttpHeaders.cs (14)
117bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly => _isReadOnly; 178protected virtual bool CopyToFast(KeyValuePair<string, StringValues>[] array, int arrayIndex) 181protected virtual IEnumerator<KeyValuePair<string, StringValues>> GetEnumeratorFast() 184void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) 206void ICollection<KeyValuePair<string, StringValues>>.Clear() 215bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) 227void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 240IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator() 245bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item)
Internal\Http\HttpHeaders.Generated.cs (9)
7015protected override bool CopyToFast(KeyValuePair<string, StringValues>[] array, int arrayIndex) 7472((ICollection<KeyValuePair<string, StringValues>>?)MaybeUnknown)?.CopyTo(array, arrayIndex); 8655_current = default(KeyValuePair<string, StringValues>); 14441protected override bool CopyToFast(KeyValuePair<string, StringValues>[] array, int arrayIndex) 14799((ICollection<KeyValuePair<string, StringValues>>?)MaybeUnknown)?.CopyTo(array, arrayIndex); 15489_current = default(KeyValuePair<string, StringValues>); 17524protected override bool CopyToFast(KeyValuePair<string, StringValues>[] array, int arrayIndex) 17567((ICollection<KeyValuePair<string, StringValues>>?)MaybeUnknown)?.CopyTo(array, arrayIndex); 17610_current = default(KeyValuePair<string, StringValues>);
Internal\Http\HttpProtocol.cs (8)
43private Stack<KeyValuePair<Func<object, Task>, object>>? _onStarting; 44private Stack<KeyValuePair<Func<object, Task>, object>>? _onCompleted; 797_onStarting = new Stack<KeyValuePair<Func<object, Task>, object>>(); 806_onCompleted = new Stack<KeyValuePair<Func<object, Task>, object>>(); 821static async Task ProcessEvents(HttpProtocol protocol, Stack<KeyValuePair<Func<object, Task>, object>> events) 827while (events.TryPop(out var entry)) 849static async Task ProcessEvents(HttpProtocol protocol, Stack<KeyValuePair<Func<object, Task>, object>> events) 853while (events.TryPop(out var entry))
Internal\Http\HttpProtocol.Generated.cs (7)
81private List<KeyValuePair<Type, object>>? MaybeExtra; 139var kv = MaybeExtra[i]; 169MaybeExtra = new List<KeyValuePair<Type, object>>(2); 804private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 949foreach (var item in MaybeExtra) 956IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
Internal\Http\HttpRequestHeaders.cs (6)
162protected override IEnumerator<KeyValuePair<string, StringValues>> GetEnumeratorFast() 218private sealed class EnumeratorBox : IEnumerator<KeyValuePair<string, StringValues>> 222public KeyValuePair<string, StringValues> Current => Enumerator.Current; 233public partial struct Enumerator : IEnumerator<KeyValuePair<string, StringValues>> 238private KeyValuePair<string, StringValues> _current; 254public readonly KeyValuePair<string, StringValues> Current => _current;
Internal\Http\HttpResponseHeaders.cs (6)
33protected override IEnumerator<KeyValuePair<string, StringValues>> GetEnumeratorFast() 59foreach (var kv in headers) 77foreach (var kv in headers) 140public partial struct Enumerator : IEnumerator<KeyValuePair<string, StringValues>> 145private KeyValuePair<string, StringValues> _current; 163public readonly KeyValuePair<string, StringValues> Current => _current;
Internal\Http\HttpResponseTrailers.cs (4)
26protected override IEnumerator<KeyValuePair<string, StringValues>> GetEnumeratorFast() 49public partial struct Enumerator : IEnumerator<KeyValuePair<string, StringValues>> 54private KeyValuePair<string, StringValues> _current; 72public readonly KeyValuePair<string, StringValues> Current => _current;
Internal\Http3\Http3Connection.cs (1)
174foreach (var session in _webtransportSessions)
Internal\Http3\Http3HeadersEnumerator.cs (3)
11internal sealed class Http3HeadersEnumerator : IEnumerator<KeyValuePair<string, string>> 22private IEnumerator<KeyValuePair<string, StringValues>>? _genericEnumerator; 30public KeyValuePair<string, string> Current { get; private set; }
Internal\Infrastructure\ConnectionManager.cs (1)
69foreach (var kvp in _connectionReferences)
Internal\Infrastructure\KestrelConnection.cs (6)
15private Stack<KeyValuePair<Func<object, Task>, object>>? _onCompleted; 84_onCompleted = new Stack<KeyValuePair<Func<object, Task>, object>>(); 107private Task CompleteAsyncMayAwait(Stack<KeyValuePair<Func<object, Task>, object>> onCompleted) 109while (onCompleted.TryPop(out var entry)) 128private async Task CompleteAsyncAwaited(Task currentTask, Stack<KeyValuePair<Func<object, Task>, object>> onCompleted) 139while (onCompleted.TryPop(out var entry))
Internal\Infrastructure\KestrelConnectionOfT.cs (3)
103ICollection<KeyValuePair<string, object?>> IConnectionMetricsTagsFeature.Tags => TagsList; 105public List<KeyValuePair<string, object?>> TagsList { get; } = new List<KeyValuePair<string, object?>>();
Internal\Infrastructure\KestrelMetrics.cs (2)
101public void ConnectionStop(ConnectionMetricsContext metricsContext, Exception? exception, List<KeyValuePair<string, object?>>? customTags, long startTimestamp, long currentTimestamp) 110private void ConnectionStopCore(ConnectionMetricsContext metricsContext, Exception? exception, List<KeyValuePair<string, object?>>? customTags, long startTimestamp, long currentTimestamp)
Internal\Infrastructure\TransportConnectionManager.cs (2)
59foreach (var kvp in _connectionReferences) 76foreach (var kvp in _connectionReferences)
Internal\PinnedBlockMemoryPoolFactory.cs (1)
45foreach (var pool in _pools)
Internal\WebTransport\WebTransportSession.cs (2)
80foreach (var stream in _openStreams) 105foreach (var stream in _openStreams)
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (2)
20internal sealed class Http2HeadersEnumerator : IEnumerator<KeyValuePair<string, string>> 43public KeyValuePair<string, string> Current { get; private set; }
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
src\Shared\Debugger\StringValuesDictionaryDebugView.cs (3)
13private readonly IEnumerable<KeyValuePair<string, StringValues>> _enumerable; 15public StringValuesDictionaryDebugView(IEnumerable<KeyValuePair<string, StringValues>> enumerable) 26foreach (var kvp in _enumerable)
src\Shared\Metrics\MetricsExtensions.cs (7)
33private static void SetTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags) 37if (tags is List<KeyValuePair<string, object?>> list) 50foreach (var tag in tags) 62private static bool TryAddTagCore(string name, object? value, ICollection<KeyValuePair<string, object?>> tags) 66if (tags is List<KeyValuePair<string, object?>> list) 68foreach (var tag in list) 78foreach (var tag in tags)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (46)
CertificatePathWatcherTests.cs (1)
475var pairs = (IReadOnlyList<KeyValuePair<string, object>>)writeContext.State;
ConnectionDispatcherTests.cs (1)
42var scopeObjects = testLogger.Scopes.OfType<IReadOnlyList<KeyValuePair<string, object>>>().ToList();
Http1\Http1ConnectionTests.cs (5)
1205public void Add(KeyValuePair<string, StringValues> item) => _innerHeaders.Add(item); 1207public bool Contains(KeyValuePair<string, StringValues> item) => _innerHeaders.Contains(item); 1209public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) => _innerHeaders.CopyTo(array, arrayIndex); 1210public IEnumerator<KeyValuePair<string, StringValues>> GetEnumerator() => _innerHeaders.GetEnumerator(); 1212public bool Remove(KeyValuePair<string, StringValues> item) => _innerHeaders.Remove(item);
Http1\Http1HttpProtocolFeatureCollectionTests.cs (4)
64foreach (var feature in _collection) 199foreach (var item in _collection) 226foreach (var featureIter in _collection) 243foreach (var feature in _collection)
Http2\Http2HPackEncoderTests.cs (4)
392public static TheoryData<KeyValuePair<string, string>[], byte[], int?> SinglePayloadData 396var data = new TheoryData<KeyValuePair<string, string>[], byte[], int?>(); 469public void EncodesHeadersInSinglePayloadWhenSpaceAvailable(KeyValuePair<string, string>[] headers, byte[] expectedPayload, int? statusCode) 660private static Http2HeadersEnumerator GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers)
HttpRequestHeadersTests.cs (9)
153IEnumerable<KeyValuePair<string, StringValues>> enumerable = headers; 165IEnumerable<KeyValuePair<string, StringValues>> enumerable = headers; 234var kv1 = new KeyValuePair<string, StringValues>("host", new[] { "localhost" }); 235var kv2 = new KeyValuePair<string, StringValues>("custom", new[] { "value" }); 236var kv3 = new KeyValuePair<string, StringValues>("Content-Length", new[] { "0" }); 237var kv1b = new KeyValuePair<string, StringValues>("host", new[] { "not-localhost" }); 238var kv2b = new KeyValuePair<string, StringValues>("custom", new[] { "not-value" }); 239var kv3b = new KeyValuePair<string, StringValues>("Content-Length", new[] { "1" }); 375var entries = new KeyValuePair<string, StringValues>[5];
HttpResponseHeadersTests.cs (8)
127var kvp = new KeyValuePair<string, StringValues>(key, value); 128((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp); 133var kvp = new KeyValuePair<string, StringValues>(key, value); 221var kvp = new KeyValuePair<string, StringValues>("Unknown", value); 222((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp); 227var kvp = new KeyValuePair<string, StringValues>("Unknown", value); 253var kvp = new KeyValuePair<string, StringValues>("Unknown", value); 254((ICollection<KeyValuePair<string, StringValues>>)responseHeaders).Add(kvp);
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (3)
20internal sealed class Http2HeadersEnumerator : IEnumerator<KeyValuePair<string, string>> 34private IEnumerator<KeyValuePair<string, StringValues>>? _genericEnumerator; 43public KeyValuePair<string, string> Current { get; private set; }
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (2)
963public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (8)
113KeyValuePair<string, string>[] expectedValues = new[] 130KeyValuePair<string, string>[] expectedValues = new[] 302KeyValuePair<string, string>[] expectedValues = new[] { new KeyValuePair<string, string>(expectedHeaderName, expectedHeaderValue) }; 307private static void TestDecodeWithoutIndexing(byte[] encoded, KeyValuePair<string, string>[] expectedValues) 324private static void TestDecode(byte[] encoded, KeyValuePair<string, string>[] expectedValues, bool expectDynamicTableEntry, int? bytesAtATime) 353foreach (KeyValuePair<string, string> expectedValue in expectedValues) 370public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (26)
Http2\Http2ConnectionBenchmarkBase.cs (1)
200public ICollection<KeyValuePair<string, object>> Tags { get; }
src\Servers\Kestrel\shared\ConnectionCompletion.cs (5)
12public static Task FireOnCompletedAsync(ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>>? onCompleted) 22private static Task CompleteAsyncMayAwait(ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>> onCompleted) 24while (onCompleted.TryPop(out var entry)) 43private static async Task CompleteAsyncAwaited(Task currentTask, ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>> onCompleted) 54while (onCompleted.TryPop(out var entry))
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (3)
20internal sealed class Http2HeadersEnumerator : IEnumerator<KeyValuePair<string, string>> 34private IEnumerator<KeyValuePair<string, StringValues>>? _genericEnumerator; 43public KeyValuePair<string, string> Current { get; private set; }
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (9)
45_serverReceivedSettings = Channel.CreateUnbounded<KeyValuePair<Http3SettingType, long>>(); 82internal readonly Channel<KeyValuePair<Http3SettingType, long>> _serverReceivedSettings; 91internal ChannelReader<KeyValuePair<Http3SettingType, long>> ServerReceivedSettingsReader => _serverReceivedSettings.Reader; 267internal async ValueTask<Http3RequestStream> InitializeConnectionAndStreamsAsync(RequestDelegate application, IEnumerable<KeyValuePair<string, string>> headers, bool endStream = false) 418internal async ValueTask<Http3RequestStream> CreateRequestStream(IEnumerable<KeyValuePair<string, string>> headers, 694public Task SendHeadersAsync(IEnumerable<KeyValuePair<string, string>> headers, bool endStream = false) 712internal Http3HeadersEnumerator GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers) 1040public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>();
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (7)
42private List<KeyValuePair<Type, object>>? MaybeExtra; 78var kv = MaybeExtra[i]; 108MaybeExtra = new List<KeyValuePair<Type, object>>(2); 391private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 448foreach (var item in MaybeExtra) 455IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
KestrelConfigurationLoaderTests.cs (1)
711.Concat(password != null ? new[] { new KeyValuePair<string, string>("Certificates:Default:Password", password) } : Array.Empty<KeyValuePair<string, string>>()))
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (7)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (7)
42private List<KeyValuePair<Type, object>>? MaybeExtra; 78var kv = MaybeExtra[i]; 108MaybeExtra = new List<KeyValuePair<Type, object>>(2); 391private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 448foreach (var item in MaybeExtra) 455IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (19)
src\Servers\Kestrel\shared\ConnectionCompletion.cs (5)
12public static Task FireOnCompletedAsync(ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>>? onCompleted) 22private static Task CompleteAsyncMayAwait(ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>> onCompleted) 24while (onCompleted.TryPop(out var entry)) 43private static async Task CompleteAsyncAwaited(Task currentTask, ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>> onCompleted) 54while (onCompleted.TryPop(out var entry))
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (7)
42private List<KeyValuePair<Type, object>>? MaybeExtra; 78var kv = MaybeExtra[i]; 108MaybeExtra = new List<KeyValuePair<Type, object>>(2); 391private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 448foreach (var item in MaybeExtra) 455IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (7)
35private List<KeyValuePair<Type, object>>? MaybeExtra; 65var kv = MaybeExtra[i]; 95MaybeExtra = new List<KeyValuePair<Type, object>>(2); 277private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 310foreach (var item in MaybeExtra) 317IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (7)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (7)
42private List<KeyValuePair<Type, object>>? MaybeExtra; 78var kv = MaybeExtra[i]; 108MaybeExtra = new List<KeyValuePair<Type, object>>(2); 391private IEnumerable<KeyValuePair<Type, object>> FastEnumerable() 448foreach (var item in MaybeExtra) 455IEnumerator<KeyValuePair<Type, object>> IEnumerable<KeyValuePair<Type, object>>.GetEnumerator() => FastEnumerable().GetEnumerator();
Microsoft.AspNetCore.Session (5)
DefaultDistributedSessionStore.cs (1)
28public IEnumerator<KeyValuePair<EncodedKey, byte[]>> GetEnumerator()
DistributedSession.cs (1)
323foreach (var entry in _store)
IDistributedSessionStore.cs (1)
8internal interface IDistributedSessionStore : IEnumerable<KeyValuePair<EncodedKey, byte[]>>
NoOpSessionStore.cs (2)
26public IEnumerator<KeyValuePair<EncodedKey, byte[]>> GetEnumerator() => Enumerable.Empty<KeyValuePair<EncodedKey, byte[]>>().GetEnumerator();
Microsoft.AspNetCore.Shared.Tests (171)
AdaptiveCapacityDictionaryTests.cs (70)
94var result = ((ICollection<KeyValuePair<string, object?>>)dict).IsReadOnly; 138Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 155Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 172Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 199Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 219Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 236Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 253Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 283Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 297Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 314Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 328Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 345Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 359Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 392Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 413Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 434Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 447((ICollection<KeyValuePair<string, object?>>)dict).Add(new KeyValuePair<string, object?>("key", "value")); 454Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 484Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 497var input = new KeyValuePair<string, object?>("key", "value"); 500var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 504Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 516var input = new KeyValuePair<string, object?>("KEY", "value"); 519var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 523Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 535var input = new KeyValuePair<string, object?>("other", "value"); 538var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 542Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 555var input = new KeyValuePair<string, object?>("key", "valUE"); 558var result = ((ICollection<KeyValuePair<string, object?>>)dict).Contains(input); 562Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 605Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 622Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 639Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 651var array = new KeyValuePair<string, object?>[2]; 654((ICollection<KeyValuePair<string, object?>>)dict).CopyTo(array, 1); 658new KeyValuePair<string, object?>[] 660default(KeyValuePair<string, object?>), 664Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 676var input = new KeyValuePair<string, object?>("key", "value"); 679var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 684Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 696var input = new KeyValuePair<string, object?>("KEY", "value"); 699var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 704Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 716var input = new KeyValuePair<string, object?>("other", "value"); 719var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 724Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 737var input = new KeyValuePair<string, object?>("key", "valUE"); 740var result = ((ICollection<KeyValuePair<string, object?>>)dict).Remove(input); 745Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 789Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 807Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 825Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 872Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 892Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 912Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 937Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 962Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 987Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1127Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1145Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1163Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1176var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1206var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1236var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1266var storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1273storage = Assert.IsType<KeyValuePair<string, object?>[]>(dict._arrayStorage); 1319Assert.Same(Array.Empty<KeyValuePair<string, object?>>(), value._arrayStorage);
ClosedGenericMatcherTest.cs (23)
33typeof(KeyValuePair<string, object>), 34typeof(KeyValuePair<,>), 35typeof(KeyValuePair<string, object>) 51typeof(IEnumerable<KeyValuePair<string, object>>) 67typeof(ICollection<KeyValuePair<string, object>>) 83typeof(ICollection<KeyValuePair<string, object>>) 99typeof(ICollection<KeyValuePair<string, object>>) 139typeof(KeyValuePair<,>), 140typeof(KeyValuePair<string, object>), 156typeof(KeyValuePair<,>), 251int ICollection<KeyValuePair<string, object>>.Count 259bool ICollection<KeyValuePair<string, object>>.IsReadOnly 288void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item) 298void ICollection<KeyValuePair<string, object>>.Clear() 303bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item) 313void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 323IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator() 328bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
CopyOnWriteDictionaryTest.cs (1)
18var enumerator = Mock.Of<IEnumerator<KeyValuePair<string, object>>>();
PropertyHelperTest.cs (4)
581public static TheoryData<object, KeyValuePair<string, object>> IgnoreCaseTestData 585return new TheoryData<object, KeyValuePair<string, object>> 618KeyValuePair<string, object> expectedEntry) 624var entry = Assert.Single(result);
runtime\Http2\HPackDecoderTest.cs (2)
963public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
runtime\Http3\QPackDecoderTest.cs (8)
113KeyValuePair<string, string>[] expectedValues = new[] 130KeyValuePair<string, string>[] expectedValues = new[] 302KeyValuePair<string, string>[] expectedValues = new[] { new KeyValuePair<string, string>(expectedHeaderName, expectedHeaderValue) }; 307private static void TestDecodeWithoutIndexing(byte[] encoded, KeyValuePair<string, string>[] expectedValues) 324private static void TestDecode(byte[] encoded, KeyValuePair<string, string>[] expectedValues, bool expectDynamicTableEntry, int? bytesAtATime) 353foreach (KeyValuePair<string, string> expectedValue in expectedValues) 370public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (5)
119public void Add(KeyValuePair<TKey, TValue> item) 129public bool Contains(KeyValuePair<TKey, TValue> item) 134public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 139public bool Remove(KeyValuePair<TKey, TValue> item) 144public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (8)
136public void Add(KeyValuePair<TKey, TValue> item) 138((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Add(item); 146public bool Contains(KeyValuePair<TKey, TValue> item) 148return ((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).Contains(item); 151public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 153((ICollection<KeyValuePair<TKey, TValue>>)ReadDictionary).CopyTo(array, arrayIndex); 156public bool Remove(KeyValuePair<TKey, TValue> item) 158return ((ICollection<KeyValuePair<TKey, TValue>>)WriteDictionary).Remove(item);
src\Shared\Debugger\DictionaryDebugView.cs (1)
23var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
src\Shared\Debugger\StringValuesDictionaryDebugView.cs (3)
13private readonly IEnumerable<KeyValuePair<string, StringValues>> _enumerable; 15public StringValuesDictionaryDebugView(IEnumerable<KeyValuePair<string, StringValues>> enumerable) 26foreach (var kvp in _enumerable)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (25)
25internal KeyValuePair<TKey, TValue>[]? _arrayStorage; 74_arrayStorage = Array.Empty<KeyValuePair<TKey, TValue>>(); 78_arrayStorage = new KeyValuePair<TKey, TValue>[capacity]; 150bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 203void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 211((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Add(item); 264bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 268return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage).Contains(item); 291void ICollection<KeyValuePair<TKey, TValue>>.CopyTo( 292KeyValuePair<TKey, TValue>[] array, 314((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).CopyTo(array, arrayIndex); 324IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 346bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 368return ((ICollection<KeyValuePair<TKey, TValue>>)_dictionaryStorage!).Remove(item); 520foreach (var item in _arrayStorage) 531var array = new KeyValuePair<TKey, TValue>[capacity]; 540private Span<KeyValuePair<TKey, TValue>> ArrayStorageSpan 548ref var r = ref MemoryMarshal.GetArrayDataReference(_arrayStorage); 581foreach (ref var item in ArrayStorageSpan) 599public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>> 630public KeyValuePair<TKey, TValue> Current { get; private set; }
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (6)
165public void Add(KeyValuePair<string, StringValues> item) 200public bool Contains(KeyValuePair<string, StringValues> item) 210public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 215public IEnumerator<KeyValuePair<string, StringValues>> GetEnumerator() 230public bool Remove(KeyValuePair<string, StringValues> item) 300public KeyValuePair<string, string>[] Items => _collection.Select(pair => new KeyValuePair<string, string>(pair.Key, pair.Value.ToString())).ToArray();
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (13)
97foreach (var item in _extra) 145void ICollection<KeyValuePair<string, StringValues>>.Add(KeyValuePair<string, StringValues> item) 150void ICollection<KeyValuePair<string, StringValues>>.Clear() 159bool ICollection<KeyValuePair<string, StringValues>>.Contains(KeyValuePair<string, StringValues> item) 164void ICollection<KeyValuePair<string, StringValues>>.CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) 169bool ICollection<KeyValuePair<string, StringValues>>.IsReadOnly 239bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item) 245IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator()
src\Shared\HttpSys\RequestProcessing\RequestHeaders.Generated.cs (1)
2535private IEnumerable<KeyValuePair<string, StringValues>> PropertiesEnumerable()
Microsoft.AspNetCore.SignalR.Client.Core (4)
HubConnection.cs (1)
836foreach (var kvp in readers)
Internal\ConnectionLogScope.cs (3)
11internal sealed class ConnectionLogScope : IReadOnlyList<KeyValuePair<string, object?>> 29public KeyValuePair<string, object?> this[int index] 44public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (2)
2994foreach (var protocol in HubProtocols) 3025foreach (var protocol in HubProtocols)
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\HubMessageHelpers.cs (1)
14foreach (var header in headers)
Microsoft.AspNetCore.SignalR.Core (9)
DefaultHubLifetimeManager.cs (1)
150foreach (var connection in connections)
HubConnectionStore.cs (1)
71private readonly IEnumerator<KeyValuePair<string, HubConnectionContext>> _enumerator;
Internal\DefaultHubDispatcher.cs (1)
846IEnumerable<KeyValuePair<string, object?>> tags =
Internal\HubGroupList.cs (2)
39var groupToRemove = new KeyValuePair<string, GroupConnectionList>(groupName, EmptyGroupConnectionList); 40((ICollection<KeyValuePair<string, GroupConnectionList>>)(_groups)).Remove(groupToRemove);
src\Shared\Diagnostics\ActivityCreator.cs (3)
20IEnumerable<KeyValuePair<string, object?>>? tags, 77foreach (var tag in tags) 115foreach (var baggageItem in baggage)
StreamTracker.cs (1)
87foreach (var converter in _lookup)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
584foreach (var value in message.Headers)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Protocol\MessagePackHubProtocolWorker.cs (1)
599foreach (var header in headers)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Protocol\NewtonsoftJsonHubProtocol.cs (1)
582foreach (var value in message.Headers)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
Internal\AckHandler.cs (2)
53foreach (var pair in _acks) 74foreach (var pair in _acks)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\WrappingLoggerFactory.cs (1)
105if (scope is IReadOnlyList<KeyValuePair<string, object>> logScope)
Microsoft.AspNetCore.SpaServices.Extensions (5)
Npm\NodeScriptRunner.cs (1)
54foreach (var keyValuePair in envVars)
Proxying\SpaProxy.cs (4)
145foreach (var header in request.Headers) 168foreach (var header in responseMessage.Headers) 178foreach (var header in responseMessage.Content.Headers) 220foreach (var headerEntry in context.Request.Headers)
Microsoft.AspNetCore.TestHost (7)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.7.25327.102\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
196private sealed class HostingListener : IObserver<DiagnosticListener>, IObserver<KeyValuePair<string, object?>> 323public void OnNext(KeyValuePair<string, object?> value)
ClientHandler.cs (4)
145foreach (var header in requestContent.Headers) 157foreach (var header in request.Headers) 202foreach (var trailer in responseTrailersFeature.Trailers) 219foreach (var header in httpContext.Response.Headers)
HttpContextBuilder.cs (1)
233foreach (var pair in _httpContext.Features)
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
2969private sealed class HostingListener : IObserver<DiagnosticListener>, IObserver<KeyValuePair<string, object>>, IDisposable 3009public void OnNext(KeyValuePair<string, object> value)
Microsoft.AspNetCore.WebUtilities (7)
FormReader.cs (2)
125public KeyValuePair<string, string>? ReadNextPair() 158public async Task<KeyValuePair<string, string>?> ReadNextPairAsync(CancellationToken cancellationToken = new CancellationToken())
KeyValueAccumulator.cs (1)
99foreach (var entry in _expandingAccumulator)
QueryHelpers.cs (4)
49return AddQueryString(uri, (IEnumerable<KeyValuePair<string, string?>>)queryString); 60public static string AddQueryString(string uri, IEnumerable<KeyValuePair<string, StringValues>> queryString) 78IEnumerable<KeyValuePair<string, string?>> queryString) 98foreach (var parameter in queryString)
Microsoft.AspNetCore.WebUtilities.Tests (5)
FormReaderAsyncTest.cs (1)
15protected override async Task<KeyValuePair<string, string>?> ReadPair(FormReader reader)
FormReaderTests.cs (4)
163var pair = (KeyValuePair<string, string>)await ReadPair(reader); 168pair = (KeyValuePair<string, string>)await ReadPair(reader); 210protected virtual Task<KeyValuePair<string, string>?> ReadPair(FormReader reader)
Microsoft.Build (408)
BackEnd\BuildManager\BuildManager.cs (3)
1047foreach (KeyValuePair<int, BuildEventArgs> projectStartedEvent in _projectStartedEvents) 2382foreach (var cacheResultInner in cacheResult.BuildResult?.ResultsByTarget ?? Enumerable.Empty<KeyValuePair<string, TargetResult>>())
BackEnd\BuildManager\BuildParameters.cs (1)
489foreach (KeyValuePair<string, string> property in value)
BackEnd\BuildManager\BuildRequestData.cs (1)
144foreach (KeyValuePair<string, string?> propertyPair in globalProperties)
BackEnd\BuildManager\GlobalPropertiesLookup.cs (1)
32public IEnumerator<KeyValuePair<string, string?>> GetEnumerator()
BackEnd\BuildManager\RequestedProjectState.cs (1)
95foreach (KeyValuePair<string, List<string>> kvp in ItemFilters)
BackEnd\Client\MSBuildClient.cs (1)
510foreach (var pair in _serverEnvironmentVariables)
BackEnd\Components\BuildComponentFactoryCollection.cs (1)
103foreach (KeyValuePair<BuildComponentType, BuildComponentEntry> componentEntry in _componentEntriesByType)
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (1)
432foreach (KeyValuePair<int, BuildRequest> requestEntry in _outstandingRequests)
BackEnd\Components\Caching\ConfigCache.cs (1)
232foreach (KeyValuePair<ConfigurationMetadata, int> metadata in _configurationIdsByMetadata)
BackEnd\Components\Caching\ResultsCache.cs (1)
99foreach (KeyValuePair<int, BuildResult> result in _resultsByConfiguration)
BackEnd\Components\Communications\LogMessagePacket.cs (1)
25internal LogMessagePacket(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent)
BackEnd\Components\Logging\LoggingService.cs (7)
811foreach (KeyValuePair<int, IBuildEventSink> kvp in _eventSinkDictionary) 1163foreach (KeyValuePair<int, IBuildEventSink> sinkPair in _eventSinkDictionary) 1534BuildEventArgs buildEventArgs = loggingEvent as BuildEventArgs ?? (loggingEvent as KeyValuePair<int, BuildEventArgs>?)?.Value; 1669else if (loggingEvent is KeyValuePair<int, BuildEventArgs> loggingEventKeyValuePair) 1684private void RouteBuildEvent(KeyValuePair<int, BuildEventArgs> nodeEvent) 1722foreach (KeyValuePair<int, IBuildEventSink> pair in _eventSinkDictionary) 1739foreach (KeyValuePair<int, IBuildEventSink> pair in _eventSinkDictionary)
BackEnd\Components\ProjectCache\ProjectCacheDescriptorEqualityComparer.cs (1)
52foreach (KeyValuePair<string, string> pluginSetting in obj.PluginSettings)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
823foreach (KeyValuePair<ProjectCacheDescriptor, Lazy<Task<ProjectCachePlugin>>> kvp in _projectCachePlugins)
BackEnd\Components\RequestBuilder\BatchingEngine.cs (2)
313foreach (KeyValuePair<string, ICollection<ProjectItemInstance>> entry in itemListsToBeBatched) 394foreach (KeyValuePair<string, MetadataReference> consumedMetadataReference in consumedMetadataReferences)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (4)
179private static List<KeyValuePair<string, string>> keyValuePairList; 206keyValuePairList = new List<KeyValuePair<string, string>>(count); 211foreach (KeyValuePair<string, string> kvp in customMetadataDictionary) 231var kvp = keyValuePairList[i];
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (2)
616foreach (KeyValuePair<string, string> entry in projectProperties[i]) 625foreach (KeyValuePair<string, string> entry in additionalProjectPropertiesTable)
BackEnd\Components\RequestBuilder\Lookup.cs (13)
335foreach (KeyValuePair<string, Dictionary<ProjectItemInstance, MetadataModifications>> entry in PrimaryModifyTable) 341foreach (KeyValuePair<ProjectItemInstance, MetadataModifications> modify in entry.Value) 390foreach (KeyValuePair<string, Dictionary<ProjectItemInstance, MetadataModifications>> entry in PrimaryModifyTable) 523foreach (KeyValuePair<ProjectItemInstance, MetadataModifications> modify in modifies) 809var modify = new KeyValuePair<ProjectItemInstance, MetadataModifications>(actualItem, metadataChangeCopy); 831foreach (var modify in allModifies) 868foreach (var m in copyOnWritePropertyMetadata) 895foreach (var modificationPair in modificationsToApply.ExplicitModifications) 935foreach (var kvPair in modify) 954KeyValuePair<ProjectItemInstance, MetadataModifications> modify, 969foreach (var metadataChange in modify.Value.ExplicitModifications) 1142foreach (var modificationPair in other.ExplicitModifications) 1184public IEnumerable<KeyValuePair<string, MetadataModification>> ExplicitModifications
BackEnd\Components\RequestBuilder\RequestBuilder.cs (4)
1230foreach (var proxyMapping in proxyTargetMapping.Where(kvp => kvp.Value != null)) 1268foreach (var projectTargetInstance in _requestEntry.RequestConfiguration.Project.Targets) 1417foreach (KeyValuePair<string, string> entry in currentEnvironment) 1431foreach (KeyValuePair<string, string> entry in savedEnvironment)
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (3)
627foreach (KeyValuePair<string, IList<ProjectItemInstance>> outputEntry in outputItemVectors) 866foreach (KeyValuePair<string, ItemVectorPartition> item in itemVectors) 886foreach (KeyValuePair<string, ItemVectorPartition> item in itemVectors)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
249foreach (KeyValuePair<string, (string, ElementLocation)> taskParameter in _taskNode.ParametersForBuild)
BackEnd\Components\RequestBuilder\TaskHost.cs (2)
306foreach (KeyValuePair<string, ITaskItem[]> output in result.TargetOutputsPerProject[i]) 1229foreach (KeyValuePair<string, TargetResult> resultEntry in results[i].ResultsByTarget)
BackEnd\Components\Scheduler\SchedulingPlan.cs (6)
113List<KeyValuePair<int, double>> configurationsInOrder = new(accumulatedTimeByConfiguration); 115foreach (KeyValuePair<int, double> configuration in configurationsInOrder) 236List<KeyValuePair<int, PlanConfigData>> projectsInOrderOfTotalPlanTime = new(_configIdToData); 238foreach (KeyValuePair<int, PlanConfigData> configuration in projectsInOrderOfTotalPlanTime) 259List<KeyValuePair<int, PlanConfigData>> projectsInOrderOfImmediateChildCount = new(_configIdToData); 261foreach (KeyValuePair<int, PlanConfigData> configuration in projectsInOrderOfImmediateChildCount)
BackEnd\Components\SdkResolution\SdkResult.cs (4)
128foreach (var propertyToAdd in _propertiesToAdd) 139foreach (var itemToAdd in _itemsToAdd) 172foreach (var propertyToAdd in _propertiesToAdd) 180foreach (var itemToAdd in _itemsToAdd)
BackEnd\Node\OutOfProcNode.cs (1)
731foreach (KeyValuePair<string, string> environmentPair in _buildParameters.BuildProcessEnvironment)
BackEnd\Shared\BuildResult.cs (3)
385foreach (KeyValuePair<string, TargetResult> result in _resultsByTarget ?? []) 579foreach (KeyValuePair<string, TargetResult> targetResult in results._resultsByTarget ?? []) 713foreach (KeyValuePair<string, TargetResult> targetResultPair in _resultsByTarget ?? [])
BackEnd\Shared\ConfigurationMetadata.cs (1)
40foreach (KeyValuePair<string, string> entry in project.GlobalPropertiesEnumerable)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (6)
370foreach (KeyValuePair<string, (string, ElementLocation)> parameter in parameters) 411foreach (KeyValuePair<string, string> requiredParameter in requiredParameters) 1416newItem.SetMetadataOnTaskOutput(outputAsITaskItem2.CloneCustomMetadataEscaped().Cast<KeyValuePair<string, string>>()); 1426static IEnumerable<KeyValuePair<string, string>> EnumerateMetadata(IDictionary customMetadata) 1430foreach (KeyValuePair<string, string> kvp in copyOnWriteDictionary) 1437foreach (KeyValuePair<string, string> kvp in dictionary)
BuildCheck\Checks\CopyAlwaysCheck.cs (1)
73foreach (KeyValuePair<string, string> keyValuePair in itemData.EnumerateMetadata())
BuildCheck\Checks\EmbeddedResourceCheck.cs (1)
57foreach (KeyValuePair<string, string> keyValuePair in itemData.EnumerateMetadata())
BuildCheck\Checks\PropertiesUsageCheck.cs (2)
217foreach (var propWithLocation in _writenProperties) 230foreach (var uninitializedRead in _uninitializedReadsInScope)
BuildCheck\Infrastructure\ConfigurationProvider.cs (1)
166foreach (var kv in originalConfiguration)
BuildCheck\Infrastructure\CustomConfigurationData.cs (1)
74foreach (var keyVal in customConfigObj.ConfigurationData)
BuildCheck\Infrastructure\EditorConfig\EditorConfigParser.cs (1)
91foreach (var property in section.Properties)
CollectionHelpers.cs (1)
65foreach (var aKvp in a)
Collections\ArrayDictionary.cs (7)
108public void Add(KeyValuePair<TKey, TValue> item) 118public bool Contains(KeyValuePair<TKey, TValue> item) 147public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 160public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() 177public bool Remove(KeyValuePair<TKey, TValue> item) 223private struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 236public KeyValuePair<TKey, TValue> Current =>
Collections\CopyOnWritePropertyDictionary.cs (14)
78bool ICollection<KeyValuePair<string, T>>.IsReadOnly => false; 279void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item) 287bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> item) 300void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int arrayIndex) 308bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> item) 321IEnumerator<KeyValuePair<string, T>> IEnumerable<KeyValuePair<string, T>>.GetEnumerator() 366static IEnumerable<KeyValuePair<string, T>> DictionaryItems(CopyOnWritePropertyDictionary<T> copyOnWriteDictionary) 368foreach (KeyValuePair<string, T> kvp in copyOnWriteDictionary) 374static IEnumerable<KeyValuePair<string, T>> Items(IEnumerable<T> other)
Collections\HashTableUtility.cs (1)
48foreach (KeyValuePair<string, string> h1Entry in h1)
Collections\ItemDictionary.cs (1)
179foreach (var itemTypeBucket in _itemLists)
Collections\PropertyDictionary.cs (14)
139int ICollection<KeyValuePair<string, T>>.Count => Count; 145bool ICollection<KeyValuePair<string, T>>.IsReadOnly => false; 395void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item) 403void ICollection<KeyValuePair<string, T>>.Clear() 411bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> item) 427void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int arrayIndex) 435bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> item) 450IEnumerator<KeyValuePair<string, T>> IEnumerable<KeyValuePair<string, T>>.GetEnumerator() 452return ((IEnumerable<KeyValuePair<string, T>>)_properties).GetEnumerator();
Collections\ReadOnlyConvertingDictionary.cs (11)
131public void Add(KeyValuePair<K, N> item) 147public bool Contains(KeyValuePair<K, N> item) 156public void CopyTo(KeyValuePair<K, N>[] array, int arrayIndex) 160foreach (KeyValuePair<K, V> pair in _backing) 169public bool Remove(KeyValuePair<K, N> item) 182public IEnumerator<KeyValuePair<K, N>> GetEnumerator() 184return new ConvertingEnumerable<KeyValuePair<K, V>, KeyValuePair<K, N>>(_backing, KeyValueConverter).GetEnumerator(); 196return ((IEnumerable<KeyValuePair<K, N>>)this).GetEnumerator(); 204private KeyValuePair<K, N> KeyValueConverter(KeyValuePair<K, V> original)
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (11)
140public RetrievableEntryHashSet(IEnumerable<KeyValuePair<string, T>> collection, IEqualityComparer<string> comparer, bool readOnly = false) 285bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> entry) 399bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> entry) 492IEnumerator<KeyValuePair<string, T>> IEnumerable<KeyValuePair<string, T>>.GetEnumerator() 605void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> entry) 636void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int index)
Collections\WeakValueDictionary.cs (5)
19internal class WeakValueDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 66foreach (KeyValuePair<K, WeakReference<V>> pair in _dictionary) 201foreach (KeyValuePair<K, WeakReference<V>> entry in _dictionary) 238public IEnumerator<KeyValuePair<K, V>> GetEnumerator() 240foreach (KeyValuePair<K, WeakReference<V>> kvp in _dictionary)
CommunicationsUtilities.cs (2)
539foreach (KeyValuePair<string, string> entry in currentEnvironment) 548foreach (KeyValuePair<string, string> entry in newEnvironment)
Construction\ProjectItemGroupElement.cs (2)
100public ProjectItemElement AddItem(string itemType, string include, IEnumerable<KeyValuePair<string, string>> metadata) 142foreach (KeyValuePair<string, string> metadatum in metadata)
Construction\ProjectRootElement.cs (1)
1015public ProjectItemElement AddItem(string itemType, string include, IEnumerable<KeyValuePair<string, string>> metadata)
Construction\ProjectTaskElement.cs (4)
151foreach (KeyValuePair<string, (string, ElementLocation)> entry in _parameters) 166public IEnumerable<KeyValuePair<string, ElementLocation>> ParameterLocations 178var parameterLocations = new List<KeyValuePair<string, ElementLocation>>(); 180foreach (KeyValuePair<string, (string, ElementLocation)> entry in _parameters)
Construction\Solution\SolutionFile.cs (1)
452foreach (var property in websiteProperties)
CopyOnWriteDictionary.cs (14)
76object v = info.GetValue(nameof(_backing), typeof(KeyValuePair<string, V>[]))!; 82_backing = b.AddRange((KeyValuePair<string, V>[])v); 214public void SetItems(IEnumerable<KeyValuePair<string, V>> items) 219public IEnumerable<KeyValuePair<string, V>> Where(Func<KeyValuePair<string, V>, bool> predicate) 256public void Add(KeyValuePair<string, V> item) 272public bool Contains(KeyValuePair<string, V> item) 280public void CopyTo(KeyValuePair<string, V>[] array, int arrayIndex) 288public bool Remove(KeyValuePair<string, V> item) 306IEnumerator<KeyValuePair<string, V>> IEnumerable<KeyValuePair<string, V>>.GetEnumerator() 323return ((IEnumerable<KeyValuePair<string, V>>)this).GetEnumerator(); 374foreach (KeyValuePair<string, V> entry in this) 400KeyValuePair<string, V>[] array = snapshot.ToArray();
Definition\Project.cs (18)
96/// - <see cref="AddItem(string,string, IEnumerable&lt;KeyValuePair&lt;string, string&gt;&gt;)"/> 97/// - <see cref="AddItemFast(string,string, IEnumerable&lt;KeyValuePair&lt;string, string&gt;&gt;)"/> 625internal IEnumerable<KeyValuePair<string, string>> GlobalPropertiesEnumerable => implementation.GlobalPropertiesEnumerable(); 1210public IList<ProjectItem> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 1241public IList<ProjectItem> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 1721internal bool IsSuitableExistingItemXml(ProjectItemElement candidateExistingItemXml, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 1988/// - <see cref="AddItem(string,string, IEnumerable&lt;KeyValuePair&lt;string, string&gt;&gt;)"/> 1989/// - <see cref="AddItemFast(string,string, IEnumerable&lt;KeyValuePair&lt;string, string&gt;&gt;)"/> 2130public override IEnumerable<KeyValuePair<string, string>> GlobalPropertiesEnumerable() 3010public override IList<ProjectItem> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 3059public override IList<ProjectItem> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 3442public bool IsSuitableExistingItemXml(ProjectItemElement candidateExistingItemXml, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 3597private List<ProjectItem> AddItemHelper(ProjectItemElement itemElement, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 3621foreach (KeyValuePair<string, string> metadatum in metadata) 3786foreach (KeyValuePair<string, string> pair in globalProperties) 3845private ProjectElement GetAnySuitableExistingItemXml(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata, out ProjectItemElement suitableExistingItemXml) 3971bool IsSuitableExistingItemXml(ProjectItemElement candidateExistingItemXml, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata); 3996public bool IsSuitableExistingItemXml(ProjectItemElement candidateExistingItemXml, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) { throw new NotImplementedException(); }
Definition\ProjectCollection.cs (3)
344foreach (KeyValuePair<string, string> pair in globalProperties) 1180foreach (KeyValuePair<string, string> globalProperty in GlobalProperties) 2630foreach (KeyValuePair<string, string> leftProperty in project.GlobalPropertiesEnumerable)
Definition\ProjectItem.cs (3)
148IEnumerable<KeyValuePair<string, string>> IItemData.EnumerateMetadata() => Metadata.Select(m => new KeyValuePair<string, string>(m.Name, m.EvaluatedValue)); 1028public void SetMetadata(IEnumerable<KeyValuePair<ProjectMetadataElement, string>> metadata, IEnumerable<ProjectItem> destinationItems) 1032foreach (KeyValuePair<ProjectMetadataElement, string> metadatum in metadata)
Definition\Toolset.cs (1)
256foreach (KeyValuePair<string, string> keyValuePair in buildProperties)
Evaluation\Evaluator.cs (7)
95private readonly List<KeyValuePair<string, ProjectUsingTaskElement>> _usingTaskElements; 252_usingTaskElements = new List<KeyValuePair<string, ProjectUsingTaskElement>>(); 1902foreach (var property in sdkResult.PropertiesToAdd) 1915foreach (var item in sdkResult.ItemsToAdd) 1948foreach (var propertyNameAndValue in sdkResult.PropertiesToAdd) 1957foreach (var item in sdkResult.ItemsToAdd) 1964foreach (var metadata in item.Value.Metadata)
Evaluation\Expander.cs (63)
667out List<KeyValuePair<string, I>> itemsFromCapture) 1873internal static List<KeyValuePair<string, S>> Transform<S>( 1885List<KeyValuePair<string, S>> sourceItems = IntrinsicItemFunctions<S>.GetItemPairs(itemsOfType); 1886List<KeyValuePair<string, S>> transformedItems = new(itemsOfType.Count); 1978foreach (KeyValuePair<string, S> itemTuple in transformedItems) 2125List<KeyValuePair<string, S>> itemsFromCapture; 2140foreach (var itemTuple in itemsFromCapture) 2196out List<KeyValuePair<string, S>> itemsFromCapture) 2241itemsFromCapture ??= new List<KeyValuePair<string, S>>(itemsOfType.Count); 2337List<KeyValuePair<string, S>> itemsFromCapture; 2358var item = itemsFromCapture[i]; 2444internal static List<KeyValuePair<string, S>> GetItemPairs(ICollection<S> itemsOfType) 2446List<KeyValuePair<string, S>> itemsFromCapture = new(itemsOfType.Count); 2474internal static void Count(List<KeyValuePair<string, S>> itemsOfType, List<KeyValuePair<string, S>> transformedItems) 2483internal static void ItemSpecModifierFunction(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 2487foreach (KeyValuePair<string, S> item in itemsOfType) 2531internal static void Exists(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 2535foreach (KeyValuePair<string, S> item in itemsOfType) 2578internal static void Combine(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 2584foreach (KeyValuePair<string, S> item in itemsOfType) 2602internal static void GetPathsOfAllDirectoriesAbove(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 2610foreach (KeyValuePair<string, S> item in itemsOfType) 2678internal static void DirectoryName(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 2684foreach (KeyValuePair<string, S> item in itemsOfType) 2745internal static void Metadata(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 2751foreach (KeyValuePair<string, S> item in itemsOfType) 2799internal static void DistinctWithCase(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 2808internal static void Distinct(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 2817internal static void DistinctWithComparer(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, StringComparer comparer, List<KeyValuePair<string, S>> transformedItems) 2824foreach (KeyValuePair<string, S> item in itemsOfType) 2836internal static void Reverse(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 2849internal static void ExpandQuotedExpressionFunction(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 2860foreach (KeyValuePair<string, S> item in itemsOfType) 3043List<KeyValuePair<string, S>> itemsOfType, 3045List<KeyValuePair<string, S>> transformedItems) 3049foreach (KeyValuePair<string, S> item in itemsOfType) 3082internal static void ClearMetadata(IElementLocation elementLocation, bool includeNullEntries, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 3086foreach (KeyValuePair<string, S> item in itemsOfType) 3099internal static void HasMetadata(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 3105foreach (KeyValuePair<string, S> item in itemsOfType) 3133internal static void WithMetadataValue(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 3140foreach (KeyValuePair<string, S> item in itemsOfType) 3166internal static void WithoutMetadataValue(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 3173foreach (KeyValuePair<string, S> item in itemsOfType) 3199internal static void AnyHaveMetadataValue(IElementLocation elementLocation, string functionName, List<KeyValuePair<string, S>> itemsOfType, string[] arguments, List<KeyValuePair<string, S>> transformedItems) 3207foreach (KeyValuePair<string, S> item in itemsOfType)
Evaluation\IItemFactory.cs (1)
70void SetMetadata(IEnumerable<KeyValuePair<ProjectMetadataElement, string>> metadata, IEnumerable<T> destinationItems);
Evaluation\ItemSpec.cs (1)
360foreach (var kvp in itemsByNormalizedValue)
Evaluation\LazyItemEvaluator.ItemFactoryWrapper.cs (1)
77public void SetMetadata(IEnumerable<KeyValuePair<ProjectMetadataElement, string>> metadata, IEnumerable<I> destinationItems)
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (1)
233List<KeyValuePair<ProjectMetadataElement, string>> metadataList = new(metadata.Length);
Evaluation\LazyItemEvaluator.UpdateOperation.cs (1)
159foreach (var metadataReference in itemsAndMetadataFound.Metadata)
Evaluation\Profiler\ProfilerResultPrettyPrinter.cs (2)
57foreach (var pair in evaluationPasses) 73foreach (var pair in orderedLocations)
Evaluation\ProjectRootElementCache.cs (1)
481foreach (KeyValuePair<string, ProjectRootElement> kvp in oldWeakCache)
Graph\GraphBuilder.cs (4)
138foreach (var parsedProject in allParsedProjects) 204foreach (var project in allParsedProjects) 218foreach (var solutionDependency in solutionDependencies) 636foreach (var entry in properties)
Graph\GraphBuildResult.cs (1)
64foreach (KeyValuePair<ProjectGraphNode, BuildResult> result in ResultsByNode)
Graph\ParallelWorkSet.cs (1)
51foreach (KeyValuePair<TKey, Lazy<TResult>> kvp in _inProgressOrCompletedWork)
Graph\ProjectGraph.cs (3)
752var entriesToUpdate = new List<KeyValuePair<ProjectGraphNode, ImmutableList<string>>>(); 753foreach (var pair in targetLists) 779foreach (var pair in entriesToUpdate)
Graph\ProjectInterpretation.cs (2)
248foreach (KeyValuePair<ConfigurationMetadata, ParsedProject> node in allNodes) 416foreach (var pair in source)
Instance\HostServices.cs (4)
344foreach (var pair in _hostObjectMap) 346foreach (var hostObjectMapPair in pair.Value._hostObjects) 357foreach (var pair in _hostObjectMap) 359foreach (var hostObjectMapPair in pair.Value._hostObjects)
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (9)
51public void Add(KeyValuePair<string, T> item) => throw new NotSupportedException(); 62public bool Contains(KeyValuePair<string, T> item) => _projectElements.ContainsKey(item.Key); 72public void CopyTo(KeyValuePair<string, T>[] array, int arrayIndex) => _values.CopyTo(array, arrayIndex); 88public bool Remove(KeyValuePair<string, T> item) => throw new NotSupportedException(); 98IEnumerator<KeyValuePair<string, T>> IEnumerable<KeyValuePair<string, T>>.GetEnumerator() => _values.GetKvpEnumerator(); 166public void CopyTo(KeyValuePair<string, T>[] array, int arrayIndex) 187public IEnumerator<KeyValuePair<string, T>> GetKvpEnumerator() 189foreach (var kvp in _projectElements)
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (6)
68public void Add(KeyValuePair<string, ProjectPropertyInstance> item) => throw new NotSupportedException(); 74public bool Contains(KeyValuePair<string, ProjectPropertyInstance> itemKvp) => _values.Contains(itemKvp.Value); 84public void CopyTo(KeyValuePair<string, ProjectPropertyInstance>[] array, int arrayIndex) 129public bool Remove(KeyValuePair<string, ProjectPropertyInstance> item) => throw new NotSupportedException(); 144IEnumerator<KeyValuePair<string, ProjectPropertyInstance>> IEnumerable<KeyValuePair<string, ProjectPropertyInstance>>.GetEnumerator()
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (1)
96foreach (var kvp in _itemsByType)
Instance\ImmutableProjectCollections\ImmutablePropertyCollectionConverter.cs (1)
48foreach (var propKvp in _projectElements)
Instance\ProjectInstance.cs (5)
390foreach (var property in project.GlobalPropertiesEnumerable) 564foreach (KeyValuePair<string, string> property in globalProperties) 813foreach (var itemFilter in filter.ItemFilters) 1972public ProjectItemInstance AddItem(string itemType, string evaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 3151foreach (KeyValuePair<string, string> globalProperty in globalProperties)
Instance\ProjectItemDefinitionInstance.cs (1)
213foreach (var kvp in _metadata)
Instance\ProjectItemInstance.cs (18)
122internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, IEnumerable<KeyValuePair<string, string>> directMetadata, string definingFileEscaped) 309IEnumerable<KeyValuePair<string, string>> IItemData.EnumerateMetadata() => ((IMetadataContainer)this).EnumerateMetadata(); 413public void SetMetadata(IEnumerable<KeyValuePair<string, string>> metadataDictionary) 540IEnumerable<KeyValuePair<string, string>> IMetadataContainer.EnumerateMetadata() => _taskItem.EnumerateMetadata(); 542void IMetadataContainer.ImportMetadata(IEnumerable<KeyValuePair<string, string>> metadata) => _taskItem.ImportMetadata(metadata); 605internal static void SetMetadata(IEnumerable<KeyValuePair<string, string>> metadataList, IEnumerable<ProjectItemInstance> items) 649internal void SetMetadataOnTaskOutput(IEnumerable<KeyValuePair<string, string>> items) 1054public IEnumerable<KeyValuePair<string, string>> EnumerateMetadata() 1084public void ImportMetadata(IEnumerable<KeyValuePair<string, string>> metadata) 1099private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager(ICopyOnWritePropertyDictionary<ProjectMetadataInstance> list) 1101var result = new List<KeyValuePair<string, string>>(list.Count); 1116private IEnumerable<KeyValuePair<string, string>> EnumerateMetadata(ICopyOnWritePropertyDictionary<ProjectMetadataInstance> list) 1486IEnumerable<KeyValuePair<string, string>> metadataToImport = metadataEnumerable 1720public void SetMetadata(IEnumerable<KeyValuePair<string, string>> metadataDictionary) 1724foreach (KeyValuePair<string, string> metadataEntry in metadataDictionary) 1900internal void SetMetadataOnTaskOutput(IEnumerable<KeyValuePair<string, string>> items) 2123public void SetMetadata(IEnumerable<KeyValuePair<ProjectMetadataElement, string>> metadataList, IEnumerable<ProjectItemInstance> destinationItems) 2288public void SetMetadata(IEnumerable<KeyValuePair<ProjectMetadataElement, string>> metadata, IEnumerable<TaskItem> destinationItems)
Instance\ProjectTargetInstance.cs (1)
487foreach (KeyValuePair<string, string> taskParameterEntry in taskInstance.Parameters)
Instance\ProjectTaskInstance.cs (1)
239foreach (KeyValuePair<string, (string, ElementLocation)> parameter in _parameters)
Instance\TaskFactories\TaskHostTask.cs (1)
507foreach (KeyValuePair<string, TaskParameter> outputParam in taskHostTaskComplete.TaskOutputParameters)
Instance\TaskRegistry.cs (1)
1005foreach (KeyValuePair<string, string> param in x)
Logging\BaseConsoleLogger.cs (2)
518foreach (KeyValuePair<string, string> entry in environment) 640foreach (var metadatum in metadata)
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
1453foreach (var property in properties)
Logging\BinaryLogger\BuildEventArgsWriter.cs (11)
108private readonly List<KeyValuePair<string, string>> nameValueListBuffer = new List<KeyValuePair<string, string>>(1024); 114private readonly List<KeyValuePair<int, int>> nameValueIndexListBuffer = new List<KeyValuePair<int, int>>(1024); 364foreach (var item in result.Value.ProfiledLocations) 1040foreach (var kvp in item.EnumerateMetadata()) 1083private void Write(IEnumerable<KeyValuePair<string, string>> keyValuePairs) 1087foreach (var kvp in keyValuePairs) 1154var kvp = nameValueIndexListBuffer[i]; 1170private HashKey HashAllStrings(List<KeyValuePair<string, string>> nameValueList) 1178var kvp = nameValueList[i];
Logging\ParallelLogger\ParallelConsoleLogger.cs (2)
465foreach (KeyValuePair<ErrorWarningSummaryDictionaryKey, List<BuildEventArgs>> valuePair in groupByProjectEntryPoint) 781foreach (KeyValuePair<string, string> entry in environment)
Logging\ProfilerLogger.cs (5)
148foreach (var pair in profiledResult.ProfiledLocations.OrderBy(p => p.Key.Id)) 177KeyValuePair<EvaluationLocation, ProfiledLocation> pairToMerge) 225foreach (var prunedPair in aggregatedLocations.Where(pair => 240private static long? FindBigEnoughParentId(IDictionary<long, KeyValuePair<EvaluationLocation, ProfiledLocation>> idTable, 249var pair = idTable[parentId.Value];
LogMessagePacketBase.cs (9)
311internal LogMessagePacketBase(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent, TargetFinishedTranslator targetFinishedTranslator) 363internal KeyValuePair<int, BuildEventArgs>? NodeBuildEvent 976foreach (var item in value.ProfiledLocations) 1031private static List<KeyValuePair<string, string>> reusablePropertyList; 1047reusablePropertyList = new List<KeyValuePair<string, string>>(); 1057foreach (var item in list) 1115reusablePropertyList = new List<KeyValuePair<string, string>>(); 1121foreach (var item in metadata) 1127foreach (var kvp in list)
ObjectModelRemoting\ConstructionObjectLinks\ProjectTaskElementLink.cs (1)
25public abstract IEnumerable<KeyValuePair<string, ElementLocation>> ParameterLocations { get; }
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (5)
184/// Facilitate remoting the <see cref="Project.AddItem(string, string, IEnumerable{KeyValuePair{string, string}})"/>. 186public abstract IList<ProjectItem> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata); 189/// Facilitate remoting the <see cref="Project.AddItemFast(string, string, IEnumerable{KeyValuePair{string, string}})"/>. 191public abstract IList<ProjectItem> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata); 283public virtual IEnumerable<KeyValuePair<string, string>> GlobalPropertiesEnumerable() => GlobalProperties;
ReadOnlyEmptyDictionary.cs (6)
217public void Add(KeyValuePair<K, V> item) 233public bool Contains(KeyValuePair<K, V> item) 241public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) 248public bool Remove(KeyValuePair<K, V> item) 257public IEnumerator<KeyValuePair<K, V>> GetEnumerator() 259return Enumerable.Empty<KeyValuePair<K, V>>().GetEnumerator();
TaskHostConfiguration.cs (1)
201foreach (KeyValuePair<string, object> parameter in taskParameters)
TaskHostTaskComplete.cs (1)
121foreach (KeyValuePair<string, object> parameter in result.FinalParameterValues)
TaskParameter.cs (13)
445foreach (KeyValuePair<string, string> entry in escapedGenericWrappedMetadata) 894foreach (KeyValuePair<string, string> entry in _customEscapedMetadata) 926foreach (KeyValuePair<string, string> metadatum in _customEscapedMetadata) 988public IEnumerable<KeyValuePair<string, string>> EnumerateMetadata() 1001private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager() 1008var result = new KeyValuePair<string, string>[_customEscapedMetadata.Count]; 1010foreach (var kvp in _customEscapedMetadata) 1012var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 1020private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataLazy() 1027foreach (var kvp in _customEscapedMetadata) 1029var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 1034public void ImportMetadata(IEnumerable<KeyValuePair<string, string>> metadata) 1036foreach (KeyValuePair<string, string> kvp in metadata)
TelemetryInfra\InternalTelemetryConsumingLogger.cs (5)
50foreach (var target in _workerNodeTelemetryData.TargetsExecutionData) 57foreach (var task in _workerNodeTelemetryData.TasksExecutionData.Where(t => t.Key.IsCustom)) 63foreach (var task in _workerNodeTelemetryData.TasksExecutionData.OrderByDescending(t => t.Value.CumulativeExecutionTime)) 69foreach (var task in _workerNodeTelemetryData.TasksExecutionData.OrderByDescending(t => t.Value.TotalMemoryBytes)) 75foreach (var task in _workerNodeTelemetryData.TasksExecutionData.OrderByDescending(t => t.Value.ExecutionsCount))
TelemetryInfra\TelemetryDataUtils.cs (4)
94foreach (KeyValuePair<TaskOrTargetTelemetryKey, bool> valuePair in value) 136foreach (KeyValuePair<TaskOrTargetTelemetryKey, TaskExecutionStats> valuePair in value) 162foreach (KeyValuePair<TaskOrTargetTelemetryKey, bool> targetPair in targetsExecutionData) 259foreach (KeyValuePair<TaskOrTargetTelemetryKey, TaskExecutionStats> taskInfo in tasksExecutionData)
Tracing.cs (2)
96internal static void Slot<K, V>(string tag, KeyValuePair<K, V> value) 149foreach (KeyValuePair<string, int> count in s_counts)
TypeLoader.cs (1)
362foreach (KeyValuePair<string, Type> desiredTypeInAssembly in _publicTypeNameToType)
Utilities\Utilities.cs (6)
571foreach (KeyValuePair<string, string> environmentVariable in environmentVariablesBag) 616public static IEnumerable<T> Values<T>(this IEnumerable<KeyValuePair<string, T>> source) where T : class, IKeyed 618foreach (var entry in source) 659else if (item is KeyValuePair<string, string> kvp) 663else if (item is KeyValuePair<string, TimeSpan> keyTimeSpanValue) 685public static void EnumerateProperties<TArg>(IEnumerable properties, TArg arg, Action<TArg, KeyValuePair<string, string>> callback)
Microsoft.Build.BuildCheck.UnitTests (3)
EditorConfig_Tests.cs (1)
759public static KeyValuePair<K, V> Create<K, V>(K key, V value)
EndToEndTests.cs (2)
138KeyValuePair<string, JsonNode?> resource = output.DepsJsonResources.FirstOrDefault( 141resource.Equals(default(KeyValuePair<string, JsonNode?>)).ShouldBe(!isResourceExpected,
Microsoft.Build.CommandLine.UnitTests (3)
CommandLineSwitches_Tests.cs (1)
1544foreach (KeyValuePair<string, string> item in resourceManager.GetResourceSet(CultureInfo.CurrentUICulture, createIfNotExists: true, tryParents: true)
XMake_Tests.cs (2)
2929foreach (var item in filesToCreate) 2937foreach (var env in envsToCreate)
Microsoft.Build.Engine.OM.UnitTests (37)
Construction\ElementLocationPublic_Tests.cs (2)
131var values = new List<KeyValuePair<string, ElementLocation>>((ICollection<KeyValuePair<string, ElementLocation>>)property.GetValue(element, null));
Definition\DefinitionEditing_Tests.cs (6)
204List<KeyValuePair<string, string>> metadata = new List<KeyValuePair<string, string>>(); 1969List<KeyValuePair<string, string>> metadata = new List<KeyValuePair<string, string>>(); 2128List<KeyValuePair<string, string>> metadata = new List<KeyValuePair<string, string>>();
Instance\ProjectInstance_Tests.cs (3)
127var metadata = new List<KeyValuePair<string, string>>(); 714Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.AddItem("a", "b", new List<KeyValuePair<string, string>>()); }); 780Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Items).SetMetadata(new List<KeyValuePair<string, string>>()); });
Instance\ProjectItemInstance_Tests.cs (2)
368foreach (KeyValuePair<string, string> pair in taskItem2Metadata) 389foreach (KeyValuePair<string, string> pair in taskItem2MetadataEscaped)
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (2)
687var rkvp = realPLocList[li]; 688var vkvp = viewPLocList[li];
ObjectModelRemoting\Helpers\ViewValidation.cs (2)
278public static void VerifyMetadata(IEnumerable<KeyValuePair<string, string>> expected, Func<string, string> getMetadata, Func<string, bool> hasMetadata = null) 285foreach (var md in expected)
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (4)
27private ProjectItem VerifyAfterAddSingleItem(ObjectType where, ICollection<ProjectItem> added, IEnumerable<KeyValuePair<string, string>> metadata) 40foreach (var m in metadata) 52public ProjectItem AddSingleItemWithVerify(ObjectType where, string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata = null) 59public ProjectItem AddSingleItemFastWithVerify(ObjectType where, string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata = null)
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (4)
71List<KeyValuePair<string, string>> itemMetadata = new List<KeyValuePair<string, string>>() 700List<KeyValuePair<string, string>> itemMetadata = new List<KeyValuePair<string, string>>()
ObjectModelRemoting\LinkedEvaluationModify_Tests.cs (2)
120List<KeyValuePair<string, string>> testMedatada = new List<KeyValuePair<string, string>>()
ObjectModelRemoting\RemoteProjectsProviderMock\CollectionsHelpers.cs (2)
113foreach (var sRemoter in source) 132foreach (var s in source)
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectTaskElementLink.cs (2)
35public IEnumerable<KeyValuePair<string, ElementLocation>> ParameterLocations => this.TaskXml.ParameterLocations; 59public override IEnumerable<KeyValuePair<string, ElementLocation>> ParameterLocations => this.Proxy.ParameterLocations;
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (4)
72public IList<MockProjectItemLinkRemoter> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 74public IList<MockProjectItemLinkRemoter> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 176public override IList<ProjectItem> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) 179public override IList<ProjectItem> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (2)
226foreach (var r in imported) 441foreach (var i in imported)
Microsoft.Build.Engine.UnitTests (47)
BackEnd\BuildResult_Tests.cs (2)
266foreach (KeyValuePair<string, TargetResult> resultPair in result.ResultsByTarget) 286foreach (KeyValuePair<string, TargetResult> resultPair in result.ResultsByTarget)
BackEnd\LoggingServicesLogMethod_Tests.cs (1)
1861else if (buildEvent is KeyValuePair<int, BuildEventArgs> kvp)
BackEnd\Lookup_Tests.cs (5)
205table1.Add(new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("m1", "m1") }, project.FullPath)); 206table1.Add(new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("m1", "m2") }, project.FullPath)); 215new ProjectItemInstance(project, "i1", "a2", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should get added 216new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should not get added 217new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m3") }, project.FullPath), // Should get added
BackEnd\ResultsCache_Tests.cs (2)
481foreach (KeyValuePair<string, TargetResult> targetResult in a.ResultsByTarget) 489foreach (KeyValuePair<string, TargetResult> targetResult in b.ResultsByTarget)
BackEnd\SdkResolverService_Tests.cs (1)
653var result = resolver.ResolvedCalls.ShouldHaveSingleItem();
BackEnd\TaskHost_Tests.cs (1)
729foreach (var item in globalProperties)
BuildEventArgsDataEnumeration.cs (2)
75List<KeyValuePair<string, string>> metadata = results[1].EnumerateMetadata().ToList(); 117List<KeyValuePair<string, string>> metadata = results[1].EnumerateMetadata().ToList();
BuildEventArgsSerialization_Tests.cs (1)
1217foreach (var item in items)
Collections\OMcollections_tests.cs (1)
282foreach (KeyValuePair<string, int> value in convertingCollection)
ConsoleLogger_Tests.cs (1)
1632foreach (KeyValuePair<string, string> kvp in _environment)
Evaluation\ItemSpec_Tests.cs (1)
105foreach (var itemType in itemTypes)
Evaluation\ToolsetConfigurationNet5_Tests.cs (2)
34foreach (KeyValuePair<string, ProjectPropertyInstance> properties in toolset.Properties) 61foreach (KeyValuePair<string, ProjectPropertyInstance> properties in toolset.Properties)
ExpressionTree_Tests.cs (1)
393foreach (KeyValuePair<string, List<String>> entry in propertyDictionary)
Graph\GraphLoadedFromSolution_tests.cs (1)
561foreach (var graphEdge in graphEdges)
Graph\GraphTestingUtilities.cs (1)
234foreach (var kvp in expectedReferencesForNode)
Graph\ParallelWorkSet_Tests.cs (1)
273_workSet.CompletedWork.ShouldBeSameIgnoringOrder((IReadOnlyCollection<KeyValuePair<string, string>>)tt.ExpectedCompletedWork);
Graph\ProjectGraph_Tests.cs (2)
1563foreach (KeyValuePair<string, (BuildResult Result, MockLogger Logger)> result in results) 1860foreach (var globalProperty in node.ProjectInstance.GlobalProperties)
Instance\ProjectTaskInstance_Internal_Tests.cs (1)
73foreach (var param in parameters)
Instance\TaskItem_Tests.cs (2)
200item.EnumerateMetadata().ShouldBeSetEquivalentTo(new KeyValuePair<string, string>[] { new("a", "override"), new("b", "base") }); 202((Dictionary<string, string>)item.CloneCustomMetadata()).ShouldBeSetEquivalentTo(new KeyValuePair<string, string>[] { new("a", "override"), new("b", "base") });
InternalEngineHelpers.cs (1)
111foreach (var item in sdkResult.ItemsToAdd)
SolutionFileBuilder.cs (2)
190foreach (var project in projectInfos) 192foreach (var configurationMapping in ProjectConfigurations[project.Key])
TerminalLoggerConfiguration_Tests.cs (6)
69foreach (KeyValuePair<string, string> pair in expectedTelemetry.GetProperties()) 99foreach (KeyValuePair<string, string> pair in expectedTelemetry.GetProperties()) 126foreach (KeyValuePair<string, string> pair in expectedTelemetry.GetProperties()) 155foreach (KeyValuePair<string, string> pair in expectedTelemetry.GetProperties()) 183foreach (KeyValuePair<string, string> pair in expectedTelemetry.GetProperties()) 213foreach (KeyValuePair<string, string> pair in expectedTelemetry.GetProperties())
TestComparers\ProjectInstanceModelTestComparers.cs (4)
68private void AssertTargetSpecificationPairsEqual(KeyValuePair<string, List<TargetSpecification>> xPair, KeyValuePair<string, List<TargetSpecification>> yPair) 347var xPair = x.ElementAt(i); 348var yPair = y.ElementAt(i);
WarningsAsMessagesAndErrors_Tests.cs (5)
99customProperties: new List<KeyValuePair<string, string>> 115customProperties: new List<KeyValuePair<string, string>> 185customProperties: new List<KeyValuePair<string, string>> 201customProperties: new List<KeyValuePair<string, string>> 257private string GetTestProject(bool? treatAllWarningsAsErrors = null, string warningsAsErrors = null, string warningsAsMessages = null, ICollection<KeyValuePair<string, string>> customProperties = null)
Microsoft.Build.Framework (100)
BinaryTranslator.cs (8)
1419foreach (KeyValuePair<string, string> pair in additionalEntries) 1431foreach (KeyValuePair<string, string> pair in dictionary) 1451foreach (KeyValuePair<string, string> pair in dictionary) 1474foreach (KeyValuePair<K, V> pair in dictionary) 1501foreach (KeyValuePair<string, T> pair in dictionary) 1529foreach (KeyValuePair<string, T> pair in dictionary) 1558foreach (KeyValuePair<string, T> pair in dictionary) 1581foreach (KeyValuePair<string, DateTime> kvp in dictionary)
BinaryWriterExtensions.cs (2)
125foreach (KeyValuePair<string, string?> kvp in data.ExtendedMetadata) 136foreach (KeyValuePair<string, TimeSpan> kvp in durations)
BuildCheck\EnumerableExtensions.cs (1)
89foreach (var pair in another)
BuildException\BuildExceptionBase.cs (1)
105foreach (var pair in customKeyedSerializedData)
BuildSubmissionStartedEventArgs.cs (1)
57foreach (var entry in GlobalProperties)
IDictionaryDebugView`2.cs (2)
28public KeyValuePair<K, V>[] Items 32var items = new KeyValuePair<K, V>[_dict.Count];
IItemData.cs (2)
24IEnumerable<KeyValuePair<string, string>> EnumerateMetadata(); 86public IEnumerable<KeyValuePair<string, string>> EnumerateMetadata()
IMetadataContainer.cs (2)
22IEnumerable<KeyValuePair<string, string>> EnumerateMetadata(); 34void ImportMetadata(IEnumerable<KeyValuePair<string, string>> metadata);
ImmutableSegmentedDictionary.cs (4)
33public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 37public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 41public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 54public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
ImmutableSegmentedDictionary`2.cs (20)
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 155public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 166foreach (var pair in pairs) 168ICollection<KeyValuePair<TKey, TValue>> collectionToCheck = dictionary ?? self._dictionary; 193public bool Contains(KeyValuePair<TKey, TValue> pair) 242public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 248foreach (var item in items) 325IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 331IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 339IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 348void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 349=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 363void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 366void ICollection<KeyValuePair<TKey, TValue>>.Clear() 369bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 381private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
ImmutableSegmentedDictionary`2+Builder.cs (11)
70bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 109public void Add(KeyValuePair<TKey, TValue> item) 112public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 117foreach (var pair in items) 132public bool Contains(KeyValuePair<TKey, TValue> item) 173public bool Remove(KeyValuePair<TKey, TValue> item) 222void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 223=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 225IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
ImmutableSegmentedDictionary`2+Enumerator.cs (3)
12public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 29/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 43public KeyValuePair<TKey, TValue> Current => _enumerator.Current;
ITaskItemExtensions.cs (3)
22public static IEnumerable<KeyValuePair<string, string>> EnumerateMetadata(this ITaskItem taskItem) 33if (customMetadata is IEnumerable<KeyValuePair<string, string>> enumerableMetadata) 41var list = new KeyValuePair<string, string>[customMetadata.Count];
NativeMethods.cs (6)
1351List<KeyValuePair<int, SafeProcessHandle>> children = GetChildProcessIds(processIdToKill, myStartTime); 1355foreach (KeyValuePair<int, SafeProcessHandle> childProcessInfo in children) 1362foreach (KeyValuePair<int, SafeProcessHandle> childProcessInfo in children) 1445internal static List<KeyValuePair<int, SafeProcessHandle>> GetChildProcessIds(int parentProcessId, DateTime parentStartTime) 1447List<KeyValuePair<int, SafeProcessHandle>> myChildren = new List<KeyValuePair<int, SafeProcessHandle>>();
Sdk\SdkResultItem.cs (1)
57foreach (var kvp in Metadata)
SegmentedDictionary`2.cs (21)
132foreach (var pair in dictionary) 138public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 143public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 144: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 151foreach (var pair in collection) 205void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 208bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 219bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 293private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 324IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 840bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 842void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 872if (array is KeyValuePair<TKey, TValue>[] pairs) 1136public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1141private KeyValuePair<TKey, TValue> _current; 1181public KeyValuePair<TKey, TValue> Current => _current;
TaskItemData.cs (3)
42foreach (var item in metadata) 50IEnumerable<KeyValuePair<string, string>> IMetadataContainer.EnumerateMetadata() => Metadata; 52void IMetadataContainer.ImportMetadata(IEnumerable<KeyValuePair<string, string>> metadata)
TaskParameterEventArgs.cs (4)
232private static List<KeyValuePair<string, string>> reusableMetadataList; 238reusableMetadataList = new List<KeyValuePair<string, string>>(); 245foreach (var kvp in taskItem.EnumerateMetadata()) 256foreach (var kvp in reusableMetadataList)
Telemetry\WorkerNodeTelemetryData.cs (2)
19foreach (var task in other.TasksExecutionData) 24foreach (var target in other.TargetsExecutionData)
Telemetry\WorkerNodeTelemetryEventArgs.cs (2)
24foreach (KeyValuePair<TaskOrTargetTelemetryKey, TaskExecutionStats> entry in WorkerNodeTelemetryData.TasksExecutionData) 33foreach (KeyValuePair<TaskOrTargetTelemetryKey, bool> entry in WorkerNodeTelemetryData.TargetsExecutionData)
TelemetryEventArgs.cs (1)
40foreach (var kvp in Properties)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (9)
IntegrationTests.cs (7)
44private IEnumerable<KeyValuePair<string, string>> AddForLoggingEnvironmentVars(IEnumerable<KeyValuePair<string, string>>? vars) 46vars = vars ?? new KeyValuePair<string, string>[] { }; 62IEnumerable<KeyValuePair<string, string>>? additionalEnvironmentVars = null) 75IEnumerable<KeyValuePair<string, string>> filesInDirectory, 76IEnumerable<KeyValuePair<string, string>>? additionalEnvironmentVars = null) 78foreach (var pair in filesInDirectory)
TargetTests.cs (1)
962foreach (var kvp in parameters)
TestUtilities\DotNetSdkTestBase.cs (1)
205IEnumerable<KeyValuePair<string, string>>? additionalEnvironmentVars = null)
Microsoft.Build.Tasks.Core (60)
AssemblyDependency\GenerateBindingRedirects.cs (1)
279foreach (var entry in redirects)
AssemblyDependency\ReferenceTable.cs (12)
1114List<KeyValuePair<AssemblyNameExtension, Reference>> newEntries) 1161var newEntry = new KeyValuePair<AssemblyNameExtension, Reference>(unifiedDependency.PostUnified, newReference); 1393foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in References) 1558foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in References) 1697var newEntries = new List<KeyValuePair<AssemblyNameExtension, Reference>>(); 1780foreach (KeyValuePair<AssemblyNameExtension, Reference> newEntry in newEntries) 1794foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in References) 2190foreach (KeyValuePair<AssemblyNameExtension, Reference> assemblyNameWithReference in References) 2217foreach (KeyValuePair<string, List<AssemblyNameReference>> kvp in baseNameToReferences) 2600foreach (KeyValuePair<AssemblyNameExtension, Reference> kvp in References) 2861IEnumerable<KeyValuePair<string, string>> EnumerateCommonMetadata() 3157foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in References)
AssemblyDependency\ResolveAssemblyReference.cs (3)
1108foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in dependencyTable.References) 1121foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in dependencyTable.References) 1134foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in dependencyTable.References)
AssemblyFoldersEx.cs (1)
428foreach (KeyValuePair<Version, List<string>> entry in targetFrameworkVersionToRegistryVersions)
BootstrapperUtil\BootstrapperBuilder.cs (6)
207var eulas = new Dictionary<string, KeyValuePair<string, string>>(StringComparer.Ordinal); 222foreach (KeyValuePair<string, string> de in eulas.Values) 1361private bool BuildPackages(BuildSettings settings, XmlElement configElement, ResourceUpdater resourceUpdater, List<string> filesCopied, Dictionary<string, KeyValuePair<string, string>> eulas) 1527if (eulas.TryGetValue(key, out KeyValuePair<string, string> eulaInfo)) 1534var de = new KeyValuePair<string, string>(configFileKey, eulaAttribute.Value); 1864KeyValuePair<string, XmlNode> altCulturePair = _cultures.FirstOrDefault();
CommunicationsUtilities.cs (2)
539foreach (KeyValuePair<string, string> entry in currentEnvironment) 548foreach (KeyValuePair<string, string> entry in newEnvironment)
CopyOnWriteDictionary.cs (13)
76object v = info.GetValue(nameof(_backing), typeof(KeyValuePair<string, V>[]))!; 82_backing = b.AddRange((KeyValuePair<string, V>[])v); 214public void SetItems(IEnumerable<KeyValuePair<string, V>> items) 219public IEnumerable<KeyValuePair<string, V>> Where(Func<KeyValuePair<string, V>, bool> predicate) 256public void Add(KeyValuePair<string, V> item) 272public bool Contains(KeyValuePair<string, V> item) 280public void CopyTo(KeyValuePair<string, V>[] array, int arrayIndex) 288public bool Remove(KeyValuePair<string, V> item) 312public IEnumerator<KeyValuePair<string, V>> GetEnumerator() 323return ((IEnumerable<KeyValuePair<string, V>>)this).GetEnumerator(); 374foreach (KeyValuePair<string, V> entry in this) 400KeyValuePair<string, V>[] array = snapshot.ToArray();
CreateItem.cs (1)
114foreach (KeyValuePair<string, string> nameAndValue in metadataTable)
GetInstalledSDKLocations.cs (1)
162foreach (KeyValuePair<string, Tuple<string, string>> sdk in installedSDKs)
GetSDKReferenceFiles.cs (1)
619foreach (KeyValuePair<string, List<string>> directoryToFileList in info.DirectoryToFileList)
MSBuild.cs (2)
565foreach (KeyValuePair<string, string> entry in projectProperties[i]) 574foreach (KeyValuePair<string, string> entry in additionalProjectPropertiesTable)
ReadOnlyEmptyDictionary.cs (6)
217public void Add(KeyValuePair<K, V> item) 233public bool Contains(KeyValuePair<K, V> item) 241public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) 248public bool Remove(KeyValuePair<K, V> item) 257public IEnumerator<KeyValuePair<K, V>> GetEnumerator() 259return Enumerable.Empty<KeyValuePair<K, V>>().GetEnumerator();
ResolveSDKReference.cs (4)
1044foreach (KeyValuePair<string, string> kvp in _sdkManifest.FrameworkIdentities) 1061foreach (KeyValuePair<string, string> kvp in _sdkManifest.AppxLocations) 1350foreach (var appxLocation in AppxLocationsFromManifest) 1408foreach (var location in architectureLocations)
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
484foreach (KeyValuePair<string, ISet<string>> validLanguage in ValidCodeLanguages)
system.design\stronglytypedresourcebuilder.cs (3)
122foreach (KeyValuePair<string, IResource> resource in resourceList) 238foreach (KeyValuePair<string, ResourceData> entry in cleanedResourceList) 727foreach (KeyValuePair<String, ResourceData> entry in resourceList)
SystemState.cs (1)
579foreach (KeyValuePair<string, FileState> kvp in sysState.instanceLocalFileStateCache)
Tracing.cs (2)
96internal static void Slot<K, V>(string tag, KeyValuePair<K, V> value) 149foreach (KeyValuePair<string, int> count in s_counts)
Microsoft.Build.Tasks.UnitTests (31)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (3)
320foreach (var entry in uniqueFileExists) 341foreach (var entry in uniqueFileExists) 353foreach (var entry in uniqueGetAssemblyName)
Copy_Tests.cs (2)
1994var filesActuallyCopied = new List<KeyValuePair<FileState, FileState>>(); 2061var filesActuallyCopied = new List<KeyValuePair<FileState, FileState>>();
XslTransformation_Tests.cs (26)
102List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 103List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 167List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 168List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 213List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 214List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 263List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 264List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 293List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 294List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 327List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 328List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 361List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 362List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 398List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 399List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 434List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 435List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 488List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 489List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 613List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs; 614List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs; 1106private void Prepare(out string dir, out TaskItem[] xmlPaths, out TaskItem xslPath, out TaskItem xslCompiledPath, out TaskItem[] outputPaths, out List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>> xmlInputs, out List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>> xslInputs, out MockEngine engine) 1128xmlInputs = new List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>>(); 1129xslInputs = new List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>>();
Microsoft.Build.UnitTests.Shared (14)
MockEngine.cs (2)
273foreach (KeyValuePair<string, ITaskItem[]> output in result.TargetOutputsPerProject[i]) 322foreach (KeyValuePair<string, TargetResult> resultEntry in targetOutputs)
MockLogger.cs (1)
428foreach (KeyValuePair<string, string> pair in telemetryEventArgs.Properties)
ObjectModelHelpers.cs (11)
1031foreach (KeyValuePair<string, string> globalProperty in globalProperties) 1228public static Dictionary<string, V> MakeDictionary<V>(IEnumerable<KeyValuePair<string, V>> enumerable) 1231foreach (KeyValuePair<string, V> item in enumerable) 1269public static void AssertDictionariesEqual<K, V>(IDictionary<K, V> x, IDictionary<K, V> y, Action<KeyValuePair<K, V>, KeyValuePair<K, V>> assertPairsEqual) 1281var xPair = x.ElementAt(i); 1282var yPair = y.ElementAt(i); 1718foreach (KeyValuePair<string, string[]> pair in projectReferenceTargets) 1757foreach (var nodeDependencies in dependencyEdges) 1775foreach (var nodeDependencies in dependencyEdges) 1820foreach (var nodeDependencies in dependencyEdges)
Microsoft.Build.Utilities.Core (51)
AssemblyFoldersEx.cs (1)
428foreach (KeyValuePair<Version, List<string>> entry in targetFrameworkVersionToRegistryVersions)
CopyOnWriteDictionary.cs (14)
76object v = info.GetValue(nameof(_backing), typeof(KeyValuePair<string, V>[]))!; 82_backing = b.AddRange((KeyValuePair<string, V>[])v); 214public void SetItems(IEnumerable<KeyValuePair<string, V>> items) 219public IEnumerable<KeyValuePair<string, V>> Where(Func<KeyValuePair<string, V>, bool> predicate) 256public void Add(KeyValuePair<string, V> item) 272public bool Contains(KeyValuePair<string, V> item) 280public void CopyTo(KeyValuePair<string, V>[] array, int arrayIndex) 288public bool Remove(KeyValuePair<string, V> item) 306IEnumerator<KeyValuePair<string, V>> IEnumerable<KeyValuePair<string, V>>.GetEnumerator() 323return ((IEnumerable<KeyValuePair<string, V>>)this).GetEnumerator(); 374foreach (KeyValuePair<string, V> entry in this) 400KeyValuePair<string, V>[] array = snapshot.ToArray();
ReadOnlyEmptyDictionary.cs (6)
217public void Add(KeyValuePair<K, V> item) 233public bool Contains(KeyValuePair<K, V> item) 241public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) 248public bool Remove(KeyValuePair<K, V> item) 257public IEnumerator<KeyValuePair<K, V>> GetEnumerator() 259return Enumerable.Empty<KeyValuePair<K, V>>().GetEnumerator();
TaskItem.cs (11)
347foreach (KeyValuePair<string, string> entry in _metadata) 404foreach (KeyValuePair<string, string> entry in _metadata) 489IEnumerable<KeyValuePair<string, string>> IMetadataContainer.EnumerateMetadata() 505void IMetadataContainer.ImportMetadata(IEnumerable<KeyValuePair<string, string>> metadata) 512private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager() 521var result = new KeyValuePair<string, string>[count]; 522foreach (var kvp in _metadata) 524var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 532private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataLazy() 539foreach (var kvp in _metadata) 541var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value));
ToolLocationHelper.cs (5)
407foreach (KeyValuePair<string, string> extension in moniker.ExtensionSDKs) 454foreach (KeyValuePair<string, string> extension in moniker.ExtensionSDKs) 624foreach (KeyValuePair<string, string> sdk in extensionSdks) 2610foreach (KeyValuePair<Version, List<string>> directoryUnderRoot in versionsInRoot) 2716foreach (KeyValuePair<Version, List<string>> registryVersions in sortedVersions)
ToolTask.cs (6)
675foreach (KeyValuePair<string, string> entry in envOverrides) 685foreach (KeyValuePair<string, string> variable in _environmentVariablePairs) 1361_environmentVariablePairs = new List<KeyValuePair<string, string>>(EnvironmentVariables.Length); 1524foreach (KeyValuePair<string, string> entry in envOverrides) 1534foreach (KeyValuePair<string, string> variable in _environmentVariablePairs) 1761private List<KeyValuePair<string, string>> _environmentVariablePairs;
Tracing.cs (2)
96internal static void Slot<K, V>(string tag, KeyValuePair<K, V> value) 149foreach (KeyValuePair<string, int> count in s_counts)
TrackedDependencies\CanonicalTrackedInputFiles.cs (3)
887foreach (KeyValuePair<string, Dictionary<string, string>> dependency in DependencyTable) 910foreach (KeyValuePair<string, Dictionary<string, string>> dependency in DependencyTable) 1064foreach (KeyValuePair<string, string> kvp in dependencies)
TrackedDependencies\CanonicalTrackedOutputFiles.cs (3)
285foreach (KeyValuePair<string, Dictionary<string, DateTime>> root in DependencyTable) 597foreach (KeyValuePair<string, Dictionary<string, DateTime>> kvp in DependencyTable) 758foreach (KeyValuePair<string, DateTime> kvp in dependencies)
Microsoft.CodeAnalysis (272)
CodeGen\CompilationTestData.cs (1)
69foreach (var pair in Methods)
CodeGen\ILBuilderEmit.cs (2)
224KeyValuePair<ConstantValue, object>[] caseLabels, 257KeyValuePair<ConstantValue, object>[] caseLabels,
CodeGen\PrivateImplementationDetails.cs (1)
445internal IOrderedEnumerable<KeyValuePair<int, InstrumentationPayloadRootField>> GetInstrumentationPayloadRoots()
CodeGen\SwitchIntegralJumpTableEmitter.cs (5)
45private readonly ImmutableArray<KeyValuePair<ConstantValue, object>> _sortedCaseLabels; 57KeyValuePair<ConstantValue, object>[] caseLabels, 146private static int CompareIntegralSwitchLabels(KeyValuePair<ConstantValue, object> first, KeyValuePair<ConstantValue, object> second) 331var c = switchBucket[0];
CodeGen\SwitchIntegralJumpTableEmitter.SwitchBucket.cs (6)
18private readonly ImmutableArray<KeyValuePair<ConstantValue, object>> _allLabels; 54internal SwitchBucket(ImmutableArray<KeyValuePair<ConstantValue, object>> allLabels, int index) 62private SwitchBucket(ImmutableArray<KeyValuePair<ConstantValue, object>> allLabels, int startIndex, int endIndex) 72internal SwitchBucket(ImmutableArray<KeyValuePair<ConstantValue, object>> allLabels, int startIndex, int endIndex, bool isDegenerate) 91internal KeyValuePair<ConstantValue, object> this[int i] 149var switchLabel = allLabels[idx];
CodeGen\SwitchStringJumpTableEmitter.cs (9)
16using HashBucket = List<KeyValuePair<ConstantValue, object>>; 35private readonly KeyValuePair<ConstantValue, object>[] _caseLabels; 75KeyValuePair<ConstantValue, object>[] caseLabels, 124foreach (var kvPair in stringHashMap) 141var jumpTableLabels = new KeyValuePair<ConstantValue, object>[count]; 169private void EmitNonHashTableSwitch(KeyValuePair<ConstantValue, object>[] labels) 172foreach (var kvPair in labels) 192KeyValuePair<ConstantValue, object>[] caseLabels, 198foreach (var kvPair in caseLabels)
Collections\CachingDictionary.cs (1)
118foreach (var kvp in this.EnsureFullyPopulated())
Collections\Grouping.cs (1)
27public Grouping(KeyValuePair<TKey, IEnumerable<TElement>> pair)
Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
Collections\SmallDictionary.cs (8)
35internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 55foreach (var kv in other) 763public KeyValuePair<K, V> Current => new KeyValuePair<K, V>(_current!.Key, _current!.Value); 803public class EnumerableImpl : IEnumerator<KeyValuePair<K, V>> 812KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 831IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
CommandLine\CommandLineArguments.cs (1)
53public ImmutableArray<KeyValuePair<string, string>> PathMap { get; internal set; }
CommandLine\CommandLineParser.cs (5)
349protected ImmutableArray<KeyValuePair<string, string>> ParsePathMap(string pathMap, IList<Diagnostic> errors) 353return ImmutableArray<KeyValuePair<string, string>>.Empty; 356var pathMapBuilder = ArrayBuilder<KeyValuePair<string, string>>.GetInstance(); 1437internal static ImmutableArray<KeyValuePair<string, string>> SortPathMap(ImmutableArray<KeyValuePair<string, string>> pathMap)
CommandLine\CommonCompiler.cs (1)
1749ImmutableArray<KeyValuePair<string, string>> pathMap,
CommandLine\CommonCompiler.LoggingSourceFileResolver.cs (1)
19ImmutableArray<KeyValuePair<string, string>> pathMap,
CommandLine\ReportAnalyzerUtil.cs (1)
91foreach (var kvp in analyzerGroup.OrderByDescending(kvp => kvp.Value))
CommandLine\SarifErrorLogger.cs (1)
106foreach (var pair in diagnostic.Properties.OrderBy(x => x.Key, StringComparer.Ordinal))
CommandLine\SarifV1ErrorLogger.cs (4)
156foreach (var pair in _descriptors.ToSortedList()) 284public List<KeyValuePair<string, DiagnosticDescriptor>> ToSortedList() 288var list = new List<KeyValuePair<string, DiagnosticDescriptor>>(Count); 290foreach (var pair in _keys)
CommandLine\SarifV2ErrorLogger.cs (1)
502foreach (var pair in _distinctDescriptors)
Compilation\Compilation.cs (2)
203ImmutableArray<KeyValuePair<string, string>> pathMap = default, 215ImmutableArray<KeyValuePair<string, string>> pathMap = default,
Compilation\CompilationOptions.cs (2)
398public CompilationOptions WithSpecificDiagnosticOptions(IEnumerable<KeyValuePair<string, ReportDiagnostic>> value) 542protected abstract CompilationOptions CommonWithSpecificDiagnosticOptions(IEnumerable<KeyValuePair<string, ReportDiagnostic>> specificDiagnosticOptions);
Compilation\DeterministicKey.cs (2)
58ImmutableArray<KeyValuePair<string, string>> pathMap = default, 85ImmutableArray<KeyValuePair<string, string>> pathMap = default,
Compilation\DeterministicKeyBuilder.cs (6)
47ImmutableArray<KeyValuePair<string, string>> pathMap, 129ImmutableArray<KeyValuePair<string, string>> pathMap, 204ImmutableArray<KeyValuePair<string, string>> pathMap, 257ImmutableArray<KeyValuePair<string, string>> pathMap, 288ImmutableArray<KeyValuePair<string, string>> pathMap, 386ImmutableArray<KeyValuePair<string, string>> pathMap,
Compilation\ParseOptions.cs (3)
112public ParseOptions WithFeatures(IEnumerable<KeyValuePair<string, string>> features) 117protected abstract ParseOptions CommonWithFeatures(IEnumerable<KeyValuePair<string, string>> features); 162foreach (var kv in features)
CvtRes.cs (4)
619private IEnumerable<KeyValuePair<string, string>> GetVerStrings() 701private static void WriteVersionString(KeyValuePair<string, string> keyValuePair, BinaryWriter writer) 745foreach (var verString in GetVerStrings()) 846foreach (var entry in GetVerStrings())
DiagnosticAnalyzer\AnalysisResult.cs (3)
118foreach (var diagnosticsByTree in localDiagnostics) 120foreach (var diagnosticsByAnalyzer in diagnosticsByTree.Value) 137foreach (var diagnosticsByAnalyzer in nonLocalDiagnostics)
DiagnosticAnalyzer\AnalysisResultBuilder.cs (3)
538foreach (var diagnosticsByTree in localDiagnosticsOpt) 541foreach (var diagnosticsByAnalyzer in diagnosticsByTree.Value) 571foreach (var diagnosticsByAnalyzer in nonLocalDiagnosticsOpt)
DocumentationComments\DocumentationCommentIncludeCache.cs (3)
16internal sealed class DocumentationCommentIncludeCache : CachingFactory<string, KeyValuePair<string, XDocument>> 49private static KeyValuePair<string, XDocument> MakeValue(XmlReferenceResolver resolver, string resolvedPath) 68private static bool KeyValueEquality(string resolvedPath, KeyValuePair<string, XDocument> pathAndDocument)
Emit\CommonPEModuleBuilder.cs (2)
1051foreach (var entry in _synthesizedTypeMembers) 1059foreach (var entry in namespaceMembers)
Emit\EditAndContinue\DeltaMetadataWriter.cs (3)
183foreach (var pair in _addedOrChangedMethods) 253foreach (var pair in dictionary) 275foreach (var pair in current)
Emit\EditAndContinue\SymbolMatcher.cs (2)
80foreach (var pair in items) 100foreach (var pair in addedOrChangedMethods)
Emit\NoPia\CommonEmbeddedParameter.cs (1)
94ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments;
Emit\NoPia\CommonEmbeddedType.cs (1)
113ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments;
Emit\NoPia\EmbeddedTypesManager.cs (2)
158internal abstract TAttributeData CreateSynthesizedAttribute(WellKnownMember constructor, ImmutableArray<TypedConstant> constructorArguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics); 159internal abstract bool TryGetAttributeArguments(TAttributeData attrData, out ImmutableArray<TypedConstant> constructorArguments, out ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics);
FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
InternalUtilities\ConcurrentLruCache.cs (4)
50public ConcurrentLruCache(KeyValuePair<K, V>[] array) 53foreach (var kvp in array) 62internal IEnumerable<KeyValuePair<K, V>> TestingEnumerable 68var copy = new KeyValuePair<K, V>[_cache.Count];
InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
InternalUtilities\Hash.cs (1)
81foreach (var value in values)
InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
MetadataReader\MetadataDecoder.cs (7)
108(KeyValuePair<string, TypedConstant> nameValuePair, bool isProperty, SerializationTypeCode typeCode, SerializationTypeCode elementTypeCode) DecodeCustomAttributeNamedArgumentOrThrow(ref BlobReader argReader); 402var argumentsBuilder = ArrayBuilder<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>>.GetInstance(argumentCount); 1554public (KeyValuePair<string, TypedConstant> nameValuePair, bool isProperty, SerializationTypeCode typeCode, SerializationTypeCode elementTypeCode) DecodeCustomAttributeNamedArgumentOrThrow(ref BlobReader argReader) 1623out KeyValuePair<string, TypedConstant>[] namedArgs) 1628namedArgs = Array.Empty<KeyValuePair<string, TypedConstant>>(); 1662namedArgs = new KeyValuePair<string, TypedConstant>[namedParamCount]; 1675namedArgs = Array.Empty<KeyValuePair<String, TypedConstant>>();
MetadataReader\MetadataHelpers.cs (5)
780[NotNull] out IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>>? namespaces) 794var nestedNamespaces = new List<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>>(); 910var pair = nestedNamespaces[i]; 915var primaryPair = nestedNamespaces[keyIndex]; 917nestedNamespaces[i] = default(KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>);
MetadataReader\PEModule.cs (5)
685foreach (var pair in namespaces) 775foreach (var kvp in namespaceHandles) 1386(KeyValuePair<string, TypedConstant> nameValuePair, bool isProperty, SerializationTypeCode typeCode, SerializationTypeCode elementTypeCode) namedArgValues = 1545(KeyValuePair<string, TypedConstant> nameValuePair, bool isProperty, SerializationTypeCode typeCode, SerializationTypeCode elementTypeCode) namedArgValues = 3832internal IEnumerable<KeyValuePair<string, (int FirstIndex, int SecondIndex)>> GetForwardedTypes()
MetadataReader\SymbolFactory.cs (1)
40internal abstract TypeSymbol SubstituteTypeParameters(ModuleSymbol moduleSymbol, TypeSymbol generic, ImmutableArray<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>> arguments, ImmutableArray<bool> refersToNoPiaLocalType);
MetadataReader\TypeNameDecoder.cs (3)
110protected TypeSymbol SubstituteTypeParameters(TypeSymbol genericType, ImmutableArray<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>> arguments, ImmutableArray<bool> refersToNoPiaLocalType) 221private ImmutableArray<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>> ResolveTypeArguments(MetadataHelpers.AssemblyQualifiedTypeName[] arguments, out ImmutableArray<bool> refersToNoPiaLocalType) 224var typeArgumentsBuilder = ArrayBuilder<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>>.GetInstance(count);
MetadataReference\AssemblyIdentityMap.cs (6)
21private readonly Dictionary<string, OneOrMany<KeyValuePair<AssemblyIdentity, TValue>>> _map; 25_map = new Dictionary<string, OneOrMany<KeyValuePair<AssemblyIdentity, TValue>>>(AssemblyIdentityComparer.SimpleNameComparer); 36OneOrMany<KeyValuePair<AssemblyIdentity, TValue>> sameName; 79OneOrMany<KeyValuePair<AssemblyIdentity, TValue>> sameName; 101var pair = KeyValuePair.Create(identity, value); 103OneOrMany<KeyValuePair<AssemblyIdentity, TValue>> sameName;
NativePdbWriter\PdbWriter.cs (3)
703foreach (var kvp in file2definitions) 719foreach (var kvp in file2definitions) 780foreach (var kvp in documents
Operations\ControlFlowGraphBuilder.Context.cs (3)
22public readonly ImmutableArray<KeyValuePair<IPropertySymbol, IOperation>> AnonymousTypePropertyValues; 24internal Context(IOperation? implicitInstance, INamedTypeSymbol? anonymousType, ImmutableArray<KeyValuePair<IPropertySymbol, IOperation>> anonymousTypePropertyValues) 38ImmutableArray<KeyValuePair<IPropertySymbol, IOperation>>.Empty);
Operations\ControlFlowGraphBuilder.ImplicitInstanceInfo.cs (1)
68foreach (KeyValuePair<IPropertySymbol, IOperation> pair in context.AnonymousTypePropertyValues)
PEWriter\MetadataWriter.cs (4)
113_signatureIndex = new SegmentedDictionary<ISignature, KeyValuePair<BlobHandle, ImmutableArray<byte>>>(module.HintNumberOfMethodDefinitions, ReferenceEqualityComparer.Instance); //ignores field signatures 445private readonly SegmentedDictionary<ISignature, KeyValuePair<BlobHandle, ImmutableArray<byte>>> _signatureIndex; 1123KeyValuePair<BlobHandle, ImmutableArray<byte>> existing; 1273KeyValuePair<BlobHandle, ImmutableArray<byte>> existing;
PEWriter\MetadataWriter.DynamicAnalysis.cs (1)
309foreach (var entry in _blobs)
PEWriter\MetadataWriter.PortablePdb.cs (1)
794foreach (var kvp in documents
ReferenceManager\CommonReferenceManager.State.cs (4)
39internal abstract IEnumerable<KeyValuePair<MetadataReference, IAssemblySymbolInternal>> GetReferencedAssemblies(); 520foreach (var assemblyReference in assemblyReferencesBySimpleName) 680internal sealed override IEnumerable<KeyValuePair<MetadataReference, IAssemblySymbolInternal>> GetReferencedAssemblies() 702foreach (var entry in ReferencedAssembliesMap)
RuleSet\RuleSet.cs (4)
89foreach (var item in _specificDiagnosticOptions) 155foreach (var item in effectiveRuleset.SpecificDiagnosticOptions) 173foreach (var item in _specificDiagnosticOptions) 308foreach (var rule in ruleSet.SpecificDiagnosticOptions)
RuleSet\RuleSetProcessor.cs (4)
111foreach (var rule in rules) 149private static List<KeyValuePair<string, ReportDiagnostic>> ReadRules(XElement rulesNode) 154var rules = new List<KeyValuePair<string, ReportDiagnostic>>(); 178private static KeyValuePair<string, ReportDiagnostic> ReadRule(XElement ruleNode)
SourceFileResolver.cs (6)
25private readonly ImmutableArray<KeyValuePair<string, string>> _pathMap; 33: this(searchPaths, baseDirectory, ImmutableArray<KeyValuePair<string, string>>.Empty) 40ImmutableArray<KeyValuePair<string, string>> pathMap) 62var pathMapBuilder = ArrayBuilder<KeyValuePair<string, string>>.GetInstance(pathMap.Length); 86_pathMap = ImmutableArray<KeyValuePair<string, string>>.Empty; 94public ImmutableArray<KeyValuePair<string, string>> PathMap => _pathMap;
SourceGeneration\Nodes\GeneratorRunStateTable.cs (1)
66foreach (var stepsByName in builder)
SourceGeneration\Nodes\StateTableStore.cs (1)
50foreach (var kvp in _tableBuilder)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
12public static void Deconstruct<TKey, TValue>(KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (29)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 200else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>)) 202span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable); 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
Symbols\Attributes\CommonAttributeData.cs (7)
48public ImmutableArray<KeyValuePair<string, TypedConstant>> NamedArguments { get { return CommonNamedArguments; } } 49protected internal abstract ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments { get; } 170private static T? DecodeNamedArgument<T>(ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, string name, SpecialType specialType, T? defaultValue = default) 176private static int IndexOfNamedArgument(ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, string name) 436foreach (var namedArg in attribute.CommonNamedArguments) 492foreach (var namedArg in attribute.CommonNamedArguments) 562internal static AttributeUsageInfo DecodeAttributeUsageAttribute(TypedConstant positionalArg, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArgs)
Symbols\Attributes\CommonAttributeDataComparer.cs (2)
64private static int GetHashCodeForNamedArguments(ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) 68foreach (var arg in namedArguments)
Symbols\Attributes\MarshalAsAttributeDecoder.cs (5)
126foreach (var namedArg in arguments.Attribute.NamedArguments) 182foreach (var namedArg in arguments.Attribute.NamedArguments) 217foreach (var namedArg in arguments.Attribute.NamedArguments) 306foreach (var namedArg in arguments.Attribute.NamedArguments) 374foreach (var namedArg in arguments.Attribute.NamedArguments)
TreeDumper.cs (3)
259public IEnumerable<KeyValuePair<TreeDumperNode?, TreeDumperNode>> PreorderTraversal() 261var stack = new Stack<KeyValuePair<TreeDumperNode?, TreeDumperNode>>(); 265var currentEdge = stack.Pop();
Microsoft.CodeAnalysis.Analyzers (158)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (1)
462foreach (var kvp in idToAnalyzerMap)
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.FixAllProvider.cs (4)
27var diagnosticsToFix = new List<KeyValuePair<Project, ImmutableArray<Diagnostic>>>(); 75private readonly List<KeyValuePair<Project, ImmutableArray<Diagnostic>>> _diagnosticsToFix; 78public FixAllAdditionalDocumentChangeAction(FixAllScope fixAllScope, Solution solution, List<KeyValuePair<Project, ImmutableArray<Diagnostic>>> diagnosticsToFix, string? equivalenceKey) 93foreach (KeyValuePair<Project, ImmutableArray<Diagnostic>> pair in _diagnosticsToFix)
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (5)
41var diagnosticsToFix = new List<KeyValuePair<Project, ImmutableArray<Diagnostic>>>(); 83private readonly List<KeyValuePair<Project, ImmutableArray<Diagnostic>>> _diagnosticsToFix; 86public FixAllAdditionalDocumentChangeAction(FixAllScope fixAllScope, Solution solution, List<KeyValuePair<Project, ImmutableArray<Diagnostic>>> diagnosticsToFix, string equivalenceKey) 101foreach (var kvp in _diagnosticsToFix) 126foreach (var kvp in fixInfoMap)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (1)
192foreach (var kvp in bannedApis)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
406ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments = default)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
37public static readonly IEnumerable<KeyValuePair<byte, string>> ByteSpecialValues = []; 39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAttributeData.cs (3)
15ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) : AttributeData 18private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments = namedArguments.NullToEmpty(); 23protected override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _namedArguments;
Microsoft.CodeAnalysis.AnalyzerUtilities (169)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysis.CopyDataFlowOperationVisitor.cs (1)
525foreach (var kvp in CurrentAnalysisData.CoreAnalysisData)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysis.CoreCopyAnalysisDataDomain.cs (2)
35foreach (var kvp in map1) 55foreach (var kvp in map2)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisData.cs (2)
131foreach (var kvp in predicatedData) 209foreach (var kvp in map)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (1)
368foreach (var kvp in hazardousParameterUsagesInInvokedMethod)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisData.cs (1)
129foreach (var kvp in map)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\HazardousUsageEvaluatorCollection.cs (1)
107foreach (KeyValuePair<(HazardousUsageEvaluatorKind Kind, string? InstanceTypeName, string? MethodName, string? ParameterName, bool derivedClasses), HazardousUsageEvaluator> kvp
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.cs (1)
266foreach (KeyValuePair<(Location Location, IMethodSymbol? Method), HazardousUsageEvaluationResult> kvp
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (2)
357foreach (KeyValuePair<AnalysisEntity, TrackedAssignmentData> kvp 675foreach (KeyValuePair<(Location Location, IMethodSymbol? Method), HazardousUsageEvaluationResult> kvp in subResult.HazardousUsages)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (1)
47foreach (KeyValuePair<SymbolAccess, (ImmutableHashSet<SinkKind>.Builder SinkKinds, ImmutableHashSet<SymbolAccess>.Builder SourceOrigins)> kvp in this.TaintedSourcesBySink)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataConfig.cs (1)
149foreach (KeyValuePair<(ImmutableHashSet<SourceInfo> SourceInfos, ImmutableHashSet<SanitizerInfo> SanitizerInfos), (ImmutableHashSet<SinkKind>.Builder SinkKinds, ImmutableHashSet<SinkInfo>.Builder SinkInfos)> kvp in sourceSanitizersToSinks)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (1)
674foreach (var kvp in resultToApply)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityMapAbstractDomain.cs (3)
68foreach (var kvp in map) 88foreach (var entry1 in map1) 199foreach (var kvp in map2)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResult.cs (1)
128foreach (var kvp in _operationStateMap)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResultBuilder.cs (1)
63foreach (var kvp in _info)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (2)
539foreach (var kvp in parameterEntities) 590foreach (var kvp in _lazyParameterEntities)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DictionaryAnalysisData.cs (5)
91public void Add(KeyValuePair<TKey, TValue> item) 103public bool Contains(KeyValuePair<TKey, TValue> item) 115public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 121public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() 133public bool Remove(KeyValuePair<TKey, TValue> item)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\MapAbstractDomain.cs (3)
56foreach (var kvp in oldValue) 101foreach (var entry in value2) 131foreach (var kvp in map1)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\PredicatedAnalysisData.cs (8)
166foreach (var kvp in predicatedData) 178foreach (var kvp in _lazyPredicateDataMap) 208foreach (var kvp in fromData) 248foreach (var kvp in predicatedData) 281foreach (var kvp in predicatedData1) 305foreach (var kvp in predicatedData2) 395foreach (var kvp in _lazyPredicateDataMap) 449foreach (var kvp in _lazyPredicateDataMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
Microsoft.CodeAnalysis.BannedApiAnalyzers (148)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
406ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments = default)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
37public static readonly IEnumerable<KeyValuePair<byte, string>> ByteSpecialValues = []; 39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAttributeData.cs (3)
15ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) : AttributeData 18private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments = namedArguments.NullToEmpty(); 23protected override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _namedArguments;
SymbolIsBannedAnalyzerBase.cs (1)
192foreach (var kvp in bannedApis)
Microsoft.CodeAnalysis.CodeStyle (109)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
Microsoft.CodeAnalysis.CodeStyle.Fixes (15)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
406ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments = default)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
37public static readonly IEnumerable<KeyValuePair<byte, string>> ByteSpecialValues = []; 39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAttributeData.cs (3)
15ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) : AttributeData 18private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments = namedArguments.NullToEmpty(); 23protected override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _namedArguments;
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (3)
src\Workspaces\CoreTestUtilities\OptionsCollection.cs (3)
28internal sealed class OptionsCollection(string languageName) : IReadOnlyCollection<KeyValuePair<OptionKey2, object?>>, IOptionsReader 69public void AddRange(IEnumerable<KeyValuePair<OptionKey2, object?>>? options) 78public IEnumerator<KeyValuePair<OptionKey2, object?>> GetEnumerator()
Microsoft.CodeAnalysis.Collections.Package (88)
Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
Extensions\KeyValuePairExtensions.cs (1)
12public static void Deconstruct<TKey, TValue>(KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
Segmented\SegmentedDictionary`2.cs (29)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 200else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>)) 202span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable); 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
Microsoft.CodeAnalysis.CSharp (110)
Binder\Binder_Attributes.cs (6)
782public ImmutableArray<KeyValuePair<string, TypedConstant>> VisitNamedArguments(ImmutableArray<BoundAssignmentOperator> arguments, BindingDiagnosticBag diagnostics, ref bool attrHasErrors) 784ArrayBuilder<KeyValuePair<string, TypedConstant>>? builder = null; 793builder = ArrayBuilder<KeyValuePair<string, TypedConstant>>.GetInstance(); 802return ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty; 808private KeyValuePair<String, TypedConstant>? VisitNamedArgument(BoundAssignmentOperator assignment, BindingDiagnosticBag diagnostics, ref bool attrHasErrors) 810KeyValuePair<String, TypedConstant>? visitedArgument = null;
Binder\Binder_Lambda.cs (1)
437foreach (var pair in bindings)
Binder\Binder_Lookup.cs (1)
2016foreach (var pair in usingAliases)
Binder\DecisionDagBuilder.cs (1)
759foreach (var kvp in uniqueState)
Binder\Imports.cs (1)
74foreach (var pair in previousSubmissionImports.UsingAliases)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1128foreach (var pair in containingTypeMapOpt)
BoundTree\UnboundLambda.cs (1)
1271IEnumerable<KeyValuePair<T, BoundLambda>> minDiagnosticsGroup = candidates.GroupBy(lambda => lambda.Value.Diagnostics.Diagnostics.Length).OrderBy(group => group.Key).First();
CodeGen\EmitStatement.cs (2)
1250KeyValuePair<ConstantValue, object>[] switchCaseLabels, 1486KeyValuePair<ConstantValue, object>[] switchCaseLabels,
CommandLine\CSharpCommandLineParser.cs (4)
77ImmutableArray<KeyValuePair<string, string>> pathMap = ImmutableArray<KeyValuePair<string, string>>.Empty; 1376foreach (var o in warnAsErrors) 1382foreach (var o in noWarns)
Compilation\CSharpCompilation.cs (1)
2679foreach (var pair in _lazyImportInfos)
Compiler\ClsComplianceChecker.cs (1)
618foreach (var pair in attribute.NamedArguments)
CSharpCompilationOptions.cs (9)
65IEnumerable<KeyValuePair<string, ReportDiagnostic>>? specificDiagnosticOptions = null, 115IEnumerable<KeyValuePair<string, ReportDiagnostic>>? specificDiagnosticOptions, 160IEnumerable<KeyValuePair<string, ReportDiagnostic>>? specificDiagnosticOptions, 202IEnumerable<KeyValuePair<string, ReportDiagnostic>>? specificDiagnosticOptions, 448protected override CompilationOptions CommonWithSpecificDiagnosticOptions(IEnumerable<KeyValuePair<string, ReportDiagnostic>>? specificDiagnosticOptions) => 479public new CSharpCompilationOptions WithSpecificDiagnosticOptions(IEnumerable<KeyValuePair<string, ReportDiagnostic>>? values) => 831IEnumerable<KeyValuePair<string, ReportDiagnostic>>? specificDiagnosticOptions, 870IEnumerable<KeyValuePair<string, ReportDiagnostic>>? specificDiagnosticOptions, 914IEnumerable<KeyValuePair<string, ReportDiagnostic>>? specificDiagnosticOptions,
CSharpParseOptions.cs (2)
155protected override ParseOptions CommonWithFeatures(IEnumerable<KeyValuePair<string, string>>? features) 163public new CSharpParseOptions WithFeatures(IEnumerable<KeyValuePair<string, string>>? features)
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
174foreach (var pair in map)
Emitter\Model\AttributeDataAdapter.cs (1)
65foreach (var namedArgument in commonArgs)
Emitter\Model\PEAssemblyBuilder.cs (12)
209ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 221ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 235ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 249ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 264ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 278ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 292ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 306ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 320ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 334ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 348ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 362ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty);
Emitter\Model\SynthesizedPrivateImplementationDetailsStaticConstructor.cs (1)
47foreach (KeyValuePair<int, InstrumentationPayloadRootField> payloadRoot in ContainingPrivateImplementationDetailsType.GetInstrumentationPayloadRoots())
Emitter\NoPia\EmbeddedType.cs (2)
262return SynthesizedAttributeData.Create(TypeManager.ModuleBeingBuilt.Compilation, ctor, ImmutableArray<TypedConstant>.Empty, ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 282ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty);
Emitter\NoPia\EmbeddedTypesManager.cs (4)
123internal override CSharpAttributeData CreateSynthesizedAttribute(WellKnownMember constructor, ImmutableArray<TypedConstant> constructorArguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) 139ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 148ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty); 155internal override bool TryGetAttributeArguments(CSharpAttributeData attrData, out ImmutableArray<TypedConstant> constructorArguments, out ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics)
FlowAnalysis\AbstractFlowPass.PendingBranchesCollection.cs (1)
105foreach (var pair in collection._labeledBranches)
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
175var snapshotsArray = EnumerableExtensions.SelectAsArray<KeyValuePair<int, Snapshot>, (int, Snapshot)>(_incrementalSnapshots, (kvp) => (kvp.Key, kvp.Value));
FlowAnalysis\NullableWalker.Variables.cs (4)
43internal readonly ImmutableArray<KeyValuePair<VariableIdentifier, int>> VariableSlot; 50internal VariablesSnapshot(int id, VariablesSnapshot? container, Symbol? symbol, ImmutableArray<KeyValuePair<VariableIdentifier, int>> variableSlot, ImmutableDictionary<Symbol, TypeWithAnnotations> variableTypes) 169foreach (var pair in snapshot.VariableSlot) 177foreach (var pair in snapshot.VariableTypes)
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (1)
447foreach (var p in frame.proxyLabels)
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
80foreach (var kv in _map)
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
133foreach (var proxy in nonReusableLocalProxies)
Symbols\Attributes\AttributeData.cs (3)
61public new IEnumerable<KeyValuePair<string, TypedConstant>> NamedArguments 163foreach (var namedArgument in this.CommonNamedArguments) 515var namedArg = namedArgs[0];
Symbols\Attributes\PEAttributeData.cs (4)
25private ImmutableArray<KeyValuePair<string, TypedConstant>> _lazyNamedArguments; 66protected internal override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments 104KeyValuePair<string, TypedConstant>[]? lazyNamedArguments = null; 117ImmutableArray.Create<KeyValuePair<string, TypedConstant>>(lazyNamedArguments));
Symbols\Attributes\RetargetingAttributeData.cs (3)
21private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments; 28ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) 43protected internal override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _namedArguments;
Symbols\Attributes\SourceAttributeData.cs (5)
25private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments; 37ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, 69namedArguments: ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty, 82ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, 207protected internal sealed override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments
Symbols\Compilation_WellKnownMembers.cs (6)
391ImmutableArray<KeyValuePair<WellKnownMember, TypedConstant>> namedArguments = default, 408ImmutableArray<KeyValuePair<string, TypedConstant>> namedStringArguments; 411namedStringArguments = ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty; 415var builder = new ArrayBuilder<KeyValuePair<string, TypedConstant>>(namedArguments.Length); 416foreach (var arg in namedArguments) 453namedArguments: ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty);
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
766foreach (KeyValuePair<string, (int FirstIndex, int SecondIndex)> forwarder in Module.GetForwardedTypes())
Symbols\Metadata\PE\PENamespaceSymbol.cs (4)
86foreach (var pair in lazyNamespaces) 223IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>>? nestedNamespaces = null; 258IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>> childNamespaces) 264foreach (var child in childNamespaces)
Symbols\Metadata\PE\SymbolFactory.cs (2)
82ImmutableArray<KeyValuePair<TypeSymbol, ImmutableArray<ModifierInfo<TypeSymbol>>>> arguments, 91foreach (var arg in arguments)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (6)
1181ImmutableArray<KeyValuePair<string, TypedConstant>> oldAttributeNamedArguments = oldAttributeData.CommonNamedArguments; 1182ImmutableArray<KeyValuePair<string, TypedConstant>> newAttributeNamedArguments = RetargetAttributeNamedArguments(oldAttributeNamedArguments); 1264private ImmutableArray<KeyValuePair<string, TypedConstant>> RetargetAttributeNamedArguments(ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) 1271var newArguments = ArrayBuilder<KeyValuePair<string, TypedConstant>>.GetInstance(namedArguments.Length); 1273foreach (KeyValuePair<string, TypedConstant> oldArgument in namedArguments)
Symbols\Source\ConstantEvaluationHelpers.cs (1)
334foreach (var pair in graph)
Symbols\Source\SourceAssemblySymbol.cs (2)
740foreach (var oneKey in keys) 2542foreach (var namedArg in attribute.CommonNamedArguments)
Symbols\Source\SourceMemberContainerSymbol.cs (4)
2015foreach (var pair in membersByName) 2438foreach (var pair in membersByNameToMerge) 4002foreach (var pair in membersByName) 4113foreach (var pair in membersByName)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
873foreach (var namedArg in attribute.CommonNamedArguments)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (1)
296foreach (var pair in aliases)
Symbols\Source\SynthesizedAttributeData.cs (5)
17public static SynthesizedAttributeData Create(CSharpCompilation compilation, MethodSymbol wellKnownMember, ImmutableArray<TypedConstant> arguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) 32private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments; 34internal FromMethodAndArguments(CSharpCompilation compilation, MethodSymbol wellKnownMember, ImmutableArray<TypedConstant> arguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) 50protected internal override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _namedArguments; 80protected internal override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _original.CommonNamedArguments;
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
209namedArguments: ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty));
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (2)
50foreach (var pair in map) 69KeyValuePair<ValueTuple<SyntaxToken, SyntaxToken>,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
90foreach (var argument in attribute.NamedArguments)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (4)
231ITypeSymbol? type, T value, IEnumerable<KeyValuePair<T, string>> constants, 242ITypeSymbol? type, T value, IEnumerable<KeyValuePair<T, string>> constants, 278private static ExpressionSyntax? GenerateFieldReference<T>(ITypeSymbol? type, T value, IEnumerable<KeyValuePair<T, string>> constants) 281foreach (var constant in constants)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
11505Assert.Equal(ImmutableArray.Create<KeyValuePair<string, string>>(), parsedArgs.PathMap); 11522Assert.Equal(ImmutableArray.Create<KeyValuePair<string, string>>(), parsedArgs.PathMap);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
RawStringLiteral\RawStringLiteralCommandHandlerTests.cs (1)
67var virtualSpaces = spans.SingleOrDefault(kvp => kvp.Key.StartsWith("VirtualSpaces#"));
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (1)
74var virtualSpaces = spans.SingleOrDefault(kvp => kvp.Key.StartsWith("VirtualSpaces#"));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\CollectionExpressionTests.cs (1)
26private static readonly IEnumerable<KeyValuePair<string, ReportDiagnostic>> WithSpanAllocWarning = new[]
Microsoft.CodeAnalysis.CSharp.Features (21)
Completion\CompletionProviders\CrefCompletionProvider.cs (4)
237SemanticModel semanticModel, ImmutableArray<ISymbol> symbols, SyntaxToken token, int position, ImmutableArray<KeyValuePair<string, string>> options) 260ImmutableArray<KeyValuePair<string, string>> options, [NotNullWhen(true)] out CompletionItem? item) 283ImmutableArray<KeyValuePair<string, string>> options, 329ISymbol symbol, int position, StringBuilder builder, string sortText, ImmutableArray<KeyValuePair<string, string>> options)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (3)
33private static readonly ImmutableArray<KeyValuePair<string, string>> s_conversionProperties = 59private static (ImmutableArray<ISymbol> symbols, ImmutableArray<KeyValuePair<string, string>> properties) GetConversionSymbolsAndProperties( 67using var _ = ArrayBuilder<KeyValuePair<string, string>>.GetInstance(out var builder);
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Indexers.cs (1)
18private readonly ImmutableArray<KeyValuePair<string, string>> IndexerProperties =
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (1)
35private readonly ImmutableArray<KeyValuePair<string, string>> OperatorProperties =
Completion\CompletionProviders\PartialTypeCompletionProvider.cs (1)
78protected override ImmutableArray<KeyValuePair<string, string>> GetProperties(INamedTypeSymbol symbol, CSharpSyntaxContext context)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
414internal static Match<SyntaxNode> ComputeBodyMatch(SyntaxNode oldBody, SyntaxNode newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches)
EditAndContinue\DeclarationBody\CSharpLambdaBody.cs (2)
39public override Match<SyntaxNode>? ComputeSingleRootMatch(DeclarationBody newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches) 42public override DeclarationBodyMap ComputeMap(DeclarationBody newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches)
EditAndContinue\DeclarationBody\FieldWithInitializerDeclarationBody.cs (1)
65public override Match<SyntaxNode>? ComputeSingleRootMatch(DeclarationBody newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches)
EditAndContinue\DeclarationBody\InstanceConstructorDeclarationBody.cs (2)
102public sealed override Match<SyntaxNode>? ComputeSingleRootMatch(DeclarationBody newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches) 107public override DeclarationBodyMap ComputeMap(DeclarationBody newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches)
EditAndContinue\DeclarationBody\PropertyOrIndexerAccessorDeclarationBody.cs (1)
150public sealed override Match<SyntaxNode>? ComputeSingleRootMatch(DeclarationBody newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches)
EditAndContinue\DeclarationBody\SimpleMemberBody.cs (1)
30public override Match<SyntaxNode>? ComputeSingleRootMatch(DeclarationBody newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches)
EditAndContinue\DeclarationBody\TopLevelCodeDeclarationBody.cs (1)
55public override Match<SyntaxNode>? ComputeSingleRootMatch(DeclarationBody newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches)
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
131foreach (var keyValuePair in map)
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
45static IEnumerable<KeyValuePair<(UseExpressionBodyHelper helper, bool useExpressionBody), string>> GetKeyValuePairs(
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (7)
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.CodeBlockSuggestions.cs (1)
18foreach (var kvp in s_codeBlockSuggestions)
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.cs (2)
544foreach (var memberReference in memberReferences) 695foreach (var methodOrProperty in methodOrProperties)
EditAndContinue\Helpers\EditingTestBase.cs (2)
189internal static IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>> GetMethodMatches(string src1, string src2, MethodKind kind = MethodKind.Regular) 199public static MatchingPairs ToMatchingPairs(IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>> matches)
EditAndContinue\StatementMatchingTests.cs (1)
38var knownMatches = new KeyValuePair<SyntaxNode, SyntaxNode>[]
SimplifyTypeNames\SimplifyTypeNamesTests.cs (1)
1180foreach (var pair in builtInTypeMap)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
ObjectFormatterTests.cs (1)
602var obj = new KeyValuePair<int, string>(1, "x");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\OperatorTests.cs (1)
3195private static void TestBoundTree(string source, System.Func<IEnumerable<KeyValuePair<TreeDumperNode, TreeDumperNode>>, IEnumerable<string>> query)
SourceGeneration\GeneratorDriverTests.cs (4)
4729(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen1", result.Key); Assert.Equal("value1", result.Value); }, 4730(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen2", result.Key); Assert.Equal("value2", result.Value); } 4747(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen", result.Key); Assert.Equal("value1", result.Value); }, 4748(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen", result.Key); Assert.Equal("value2", result.Value); }
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Compilation\CSharpCompilationOptionsTests.cs (1)
399IEnumerable<KeyValuePair<string, ReportDiagnostic>> specificDiagnosticOptions = null;
Symbols\IndexerTests.cs (1)
171private static KeyValuePair<string, string> GetPairForSynthesizedExplicitImplementation(SynthesizedExplicitImplementationForwardingMethod bridge)
Symbols\Metadata\PE\LoadingAttributes.cs (5)
518public KeyValuePair<string, string>[] Named; 519public AttributeArgs(string[] p, KeyValuePair<string, string>[] n) 537new AttributeArgs(null, new KeyValuePair<string, string>[]{ new KeyValuePair<string, string>("WrapNonExceptionThrows", "True")} ) 570private static void CheckNamedArg(KeyValuePair<string, string> expected, KeyValuePair<string, TypedConstant> actual)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Diagnostics\DiagnosticTest.cs (1)
2911var expected = new KeyValuePair<string, string>(expectedFrom, expectedTo);
Parsing\CSharpParseOptionsTests.cs (1)
34var kvp = new KeyValuePair<string, string>("IOperation", "true");
Syntax\SyntaxNodeTests.cs (1)
4028foreach (var test in tests)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Extensions.cs (1)
412var namedArg = attr.CommonNamedArguments[i];
TestOptions.cs (1)
158var list = new List<KeyValuePair<string, string>>();
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (2)
50foreach (var pair in map) 69KeyValuePair<ValueTuple<SyntaxToken, SyntaxToken>,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
90foreach (var argument in attribute.NamedArguments)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (4)
231ITypeSymbol? type, T value, IEnumerable<KeyValuePair<T, string>> constants, 242ITypeSymbol? type, T value, IEnumerable<KeyValuePair<T, string>> constants, 278private static ExpressionSyntax? GenerateFieldReference<T>(ITypeSymbol? type, T value, IEnumerable<KeyValuePair<T, string>> constants) 281foreach (var constant in constants)
Microsoft.CodeAnalysis.Debugging.Package (1)
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
Microsoft.CodeAnalysis.EditorFeatures (5)
CommentSelection\ToggleLineCommentCommandHandler.cs (2)
94foreach (var selection in linesInSelections) 103foreach (var selection in linesInSelections)
Interactive\InteractiveWindowResetCommand.cs (1)
58public IEnumerable<KeyValuePair<string, string>> ParametersDescription
Tagging\AbstractAsynchronousTaggerProvider.TagSource_TagsChanged.cs (2)
24ICollection<KeyValuePair<ITextBuffer, DiffResult>> changes, bool highPriority) 29foreach (var change in changes)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
Classification\FormattedClassification.cs (1)
48foreach (var kvp in s_classificationPrefixToTestHelperMap)
CodeLens\AbstractCodeLensTest.cs (4)
27foreach (var annotatedSpan in annotatedDocument.AnnotatedSpans) 55foreach (var annotatedSpan in annotatedDocument.AnnotatedSpans) 81foreach (var annotatedSpan in annotatedDocument.AnnotatedSpans) 107foreach (var annotatedSpan in annotatedDocument.AnnotatedSpans)
Workspaces\EditorTestWorkspace.cs (1)
357foreach (var spanNameToListMap in sortedAndNamedSpans)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
Collections\Immutable\Maps\MapTests.cs (3)
22foreach (var v in map) 30Assert.Equal("1", ((KeyValuePair<string, int>)v).Key); 31Assert.Equal(1, ((KeyValuePair<string, int>)v).Value);
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (2)
162foreach (var kvp in expectedMap.OrderBy(kvp => kvp.Key)) 744foreach (var entry in expectedMap.OrderBy(kvp => kvp.Key))
Options\GlobalOptionsTests.cs (1)
89public bool SetGlobalOptions(ImmutableArray<KeyValuePair<OptionKey2, object?>> options)
Snippets\RoslynLSPSnippetConvertTests.cs (1)
504foreach (var kvp in placeholderDictionary)
Microsoft.CodeAnalysis.Extensions.Package (89)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
Microsoft.CodeAnalysis.ExternalAccess.Copilot (1)
Internal\Analyzer\CSharp\CSharpCopilotCodeAnalysisService.cs (1)
168foreach (var nodeToWrapper in nodeToWrappers)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
RazorGlobalOptions.cs (1)
63public bool SetGlobalOptions(ImmutableArray<KeyValuePair<OptionKey2, object?>> options) => throw new NotImplementedException();
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (1)
RazorPredefinedProviderNameTests.cs (1)
33foreach (var roslynKvp in roslynProviderNames)
Microsoft.CodeAnalysis.Features (53)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (7)
28private readonly IEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>> _diagnosticsBySymbol; 33IEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>> diagnosticsBySymbol, 152private static async Task<IEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>>> CreateDiagnosticsBySymbolAsync(AbstractSuppressionCodeFixProvider fixer, IEnumerable<KeyValuePair<Document, ImmutableArray<Diagnostic>>> diagnosticsByDocument, CancellationToken cancellationToken) 173private static async Task<IEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>>> CreateDiagnosticsBySymbolAsync(Project project, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken) 206private static IEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>> CreateDiagnosticsBySymbol(ImmutableDictionary<ISymbol, List<Diagnostic>>.Builder diagnosticsMapBuilder) 211var builder = new List<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>>();
Completion\CommonCompletionItem.cs (1)
26ImmutableArray<KeyValuePair<string, string>> properties = default,
Completion\CompletionItem.cs (6)
25private readonly ImmutableArray<KeyValuePair<string, string>> _properties; 106internal ImmutableArray<KeyValuePair<string, string>> GetProperties() 182ImmutableArray<KeyValuePair<string, string>> properties, 282ImmutableArray<KeyValuePair<string, string>> properties = default, 348Optional<ImmutableArray<KeyValuePair<string, string>>> properties = default, 456internal CompletionItem WithProperties(ImmutableArray<KeyValuePair<string, string>> properties)
Completion\Providers\AbstractAwaitCompletionProvider.cs (2)
98using var builder = TemporaryArray<KeyValuePair<string, string>>.Empty; 146ImmutableArray<KeyValuePair<string, string>> completionProperties, string displayText, string filterText, string tooltip, bool isComplexTextEdit, bool appendConfigureAwait)
Completion\Providers\AbstractPartialTypeCompletionProvider.cs (1)
75protected abstract ImmutableArray<KeyValuePair<string, string>> GetProperties(INamedTypeSymbol symbol, TSyntaxContext context);
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (4)
42ImmutableArray<KeyValuePair<string, string>> properties = default; 46using var _ = ArrayBuilder<KeyValuePair<string, string>>.GetInstance(out var builder); 101var builder = new FixedSizeArrayBuilder<KeyValuePair<string, string>>(attributeItems.Length + 1); 221ImmutableArray<KeyValuePair<string, string>> properties = [.. itemProperties, KeyValuePair.Create(AlwaysFullyQualifyKey, AlwaysFullyQualifyKey)];
Completion\Providers\SymbolCompletionItem.cs (10)
25private static readonly Action<ImmutableArray<ISymbol>, ArrayBuilder<KeyValuePair<string, string>>> s_addSymbolEncoding = AddSymbolEncoding; 26private static readonly Action<ImmutableArray<ISymbol>, ArrayBuilder<KeyValuePair<string, string>>> s_addSymbolInfo = AddSymbolInfo; 35Action<ImmutableArray<ISymbol>, ArrayBuilder<KeyValuePair<string, string>>> symbolEncoder, 40ImmutableArray<KeyValuePair<string, string>> properties = default, 47using var _ = ArrayBuilder<KeyValuePair<string, string>>.GetInstance(out var builder); 81private static void AddSymbolEncoding(ImmutableArray<ISymbol> symbols, ArrayBuilder<KeyValuePair<string, string>> properties) 84private static void AddSymbolInfo(ImmutableArray<ISymbol> symbols, ArrayBuilder<KeyValuePair<string, string>> properties) 223private static void AddSupportedPlatforms(ArrayBuilder<KeyValuePair<string, string>> properties, SupportedPlatformData? supportedPlatforms) 345ImmutableArray<KeyValuePair<string, string>> properties = default, 369ImmutableArray<KeyValuePair<string, string>> properties = default,
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (6)
1616private static List<KeyValuePair<SyntaxNode, SyntaxNode>>? GetMatchingActiveNodes(IEnumerable<ActiveNode> activeNodes) 1619List<KeyValuePair<SyntaxNode, SyntaxNode>>? lazyKnownMatches = null; 6743private sealed class NamedArgumentComparer : IEqualityComparer<KeyValuePair<string, TypedConstant>> 6747public bool Equals(KeyValuePair<string, TypedConstant> x, KeyValuePair<string, TypedConstant> y) 6751public int GetHashCode(KeyValuePair<string, TypedConstant> obj)
EditAndContinue\CommittedSolution.cs (2)
111public CommittedSolution(DebuggingSession debuggingSession, Solution solution, IEnumerable<KeyValuePair<DocumentId, DocumentState>> initialDocumentStates) 379internal static async Task<IEnumerable<KeyValuePair<DocumentId, DocumentState>>> GetMatchingDocumentsAsync(
EditAndContinue\DebuggingSession.cs (1)
134IEnumerable<KeyValuePair<DocumentId, CommittedSolution.DocumentState>> initialDocumentStates,
EditAndContinue\DeclarationBody.cs (2)
69public virtual DeclarationBodyMap ComputeMap(DeclarationBody newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches) 79public abstract Match<SyntaxNode>? ComputeSingleRootMatch(DeclarationBody newBody, IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>>? knownMatches);
EditAndContinue\EditAndContinueService.cs (1)
147IEnumerable<KeyValuePair<DocumentId, CommittedSolution.DocumentState>> initialDocumentStates;
EditAndContinue\Utilities\BidirectionalMap.cs (3)
31foreach (var entry in Forward) 53foreach (var entry in Forward) 59foreach (var entry in map.Forward)
EmbeddedLanguages\DateAndTime\DateAndTimeEmbeddedCompletionProvider.cs (1)
106using var _2 = ArrayBuilder<KeyValuePair<string, string>>.GetInstance(out var properties);
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (1)
92using var _ = ArrayBuilder<KeyValuePair<string, string>>.GetInstance(out var properties);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (1)
218foreach (var kv in analyzerProviders)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingAsyncWorkItemQueue.cs (1)
253foreach (var pair in workQueue)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (3)
271var first = default(KeyValuePair<TKey, TValue>); 272foreach (var kv in map)
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
EditAndContinue\EditAndContinueTestVerifier.cs (3)
512internal static IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>> GetMethodMatches(AbstractEditAndContinueAnalyzer analyzer, Match<SyntaxNode> bodyMatch) 518foreach (var pair in map.Forward) 535public static MatchingPairs ToMatchingPairs(IEnumerable<KeyValuePair<SyntaxNode, SyntaxNode>> matches)
Snippets\AbstractSnippetProviderTests.cs (1)
82foreach (var placeholderLocationPair in placeholderLocations)
Microsoft.CodeAnalysis.InteractiveHost (90)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
Microsoft.CodeAnalysis.LanguageServer (6)
Contracts\ITelemetryReporter.cs (2)
10void Log(string name, List<KeyValuePair<string, object?>> properties); 12void LogBlockEnd(int blockId, List<KeyValuePair<string, object?>> properties, CancellationToken cancellationToken);
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (1)
52var firstInfo = projectFileInfos.First();
LanguageServer\Handler\CopilotCompletion\ContextResolveParam.cs (1)
36foreach (var kvp in this.ActiveExperiments)
Logging\RoslynLogger.cs (2)
24private static readonly ObjectPool<List<KeyValuePair<string, object?>>> s_propertyPool = new(() => []); 241private static void AddProperties(List<KeyValuePair<string, object?>> properties, FunctionId id, LogMessage logMessage, int? delta)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (1)
96using var _ = ArrayBuilder<KeyValuePair<OptionKey2, object?>>.GetInstance(out var optionsToUpdate);
Protocol\Converters\FormattingOptionsConverter.cs (1)
138foreach (var item in value.OtherOptions)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (148)
AbstractAllocationAnalyzer.cs (1)
110foreach (var namedArgument in data.NamedArguments)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
406ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments = default)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
37public static readonly IEnumerable<KeyValuePair<byte, string>> ByteSpecialValues = []; 39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAttributeData.cs (3)
15ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) : AttributeData 18private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments = namedArguments.NullToEmpty(); 23protected override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _namedArguments;
Microsoft.CodeAnalysis.PooledObjects.Package (1)
ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
Microsoft.CodeAnalysis.PublicApiAnalyzers (133)
DeclarePublicApiAnalyzer.Impl.cs (1)
753foreach (KeyValuePair<string, ApiLine> pair in apiMap)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (12)
AnnotatePublicApiFix.cs (3)
105private readonly List<KeyValuePair<Project, ImmutableArray<Diagnostic>>> _diagnosticsToFix; 108public FixAllAdditionalDocumentChangeAction(string title, Solution solution, List<KeyValuePair<Project, ImmutableArray<Diagnostic>>> diagnosticsToFix) 203var diagnosticsToFix = new List<KeyValuePair<Project, ImmutableArray<Diagnostic>>>();
DeclarePublicApiFix.cs (8)
223private readonly List<KeyValuePair<Project, ImmutableArray<Diagnostic>>> _diagnosticsToFix; 228public FixAllAdditionalDocumentChangeAction(string title, DocumentId? apiDocId, Solution solution, List<KeyValuePair<Project, ImmutableArray<Diagnostic>>> diagnosticsToFix, bool isPublic) 241var updatedPublicSurfaceAreaText = new List<KeyValuePair<DocumentId, SourceText>>(); 242var addedPublicSurfaceAreaText = new List<KeyValuePair<ProjectId, SourceText>>(); 244foreach (KeyValuePair<Project, ImmutableArray<Diagnostic>> pair in _diagnosticsToFix) 325foreach (KeyValuePair<DocumentId, SourceText> pair in updatedPublicSurfaceAreaText) 332foreach (KeyValuePair<ProjectId, SourceText> pair in addedPublicSurfaceAreaText) 354var diagnosticsToFix = new List<KeyValuePair<Project, ImmutableArray<Diagnostic>>>();
PublicApiFixHelpers.cs (1)
17internal static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> kv, out TKey key, out TValue value)
Microsoft.CodeAnalysis.Rebuild.UnitTests (5)
DeterministicKeyBuilderTests.cs (5)
215protected static JArray GetSyntaxTreeValues(Compilation compilation, ImmutableArray<KeyValuePair<string, string>> pathMap = default) 221protected static JArray GetAdditionalTextValues(Compilation compilation, ImmutableArray<AdditionalText> additionalTexts, ImmutableArray<KeyValuePair<string, string>> pathMap = default) 241ImmutableArray<KeyValuePair<string, string>> pathMap = default, 579(null, null) => ImmutableArray<KeyValuePair<string, string>>.Empty, 727(null, null) => ImmutableArray<KeyValuePair<string, string>>.Empty,
Microsoft.CodeAnalysis.Remote.ServiceHub (5)
Host\TestUtils.cs (4)
85static void AppendMismatch(List<KeyValuePair<Checksum, object>> items, string title, StringBuilder stringBuilder) 93foreach (var kv in items) 101async Task<List<KeyValuePair<Checksum, object>>> GetAssetFromAssetServiceAsync(IEnumerable<Checksum> checksums) 103var items = new List<KeyValuePair<Checksum, object>>();
Services\DiagnosticAnalyzer\PerformanceQueue.cs (1)
230foreach (var kv in _idMap)
Microsoft.CodeAnalysis.ResxSourceGenerator (132)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
Microsoft.CodeAnalysis.Scripting (2)
Hosting\CommandLine\CommandLineRunner.cs (1)
197return new CommonCompiler.LoggingSourceFileResolver(arguments.SourcePaths, arguments.BaseDirectory, ImmutableArray<KeyValuePair<string, string>>.Empty, loggerOpt);
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (1)
106if (typeInfo.IsGenericType && typeInfo.GetGenericTypeDefinition() == typeof(KeyValuePair<,>))
Microsoft.CodeAnalysis.Test.Utilities (12)
Assert\DiffUtil.cs (2)
127protected IEnumerable<KeyValuePair<int, int>> GetMatchingPairs(TSequence sequenceA, int lengthA, TSequence sequenceB, int lengthB) 209foreach (var pair in GetMatchingPairs(sequenceA, lengthA, sequenceB, lengthB))
Compilation\CompilationTestDataExtensions.cs (1)
43internal static ImmutableArray<KeyValuePair<IMethodSymbolInternal, CompilationTestData.MethodData>> GetExplicitlyDeclaredMethods(this CompilationTestData data)
Compilation\ControlFlowGraphVerifier.cs (1)
338foreach (KeyValuePair<IFlowAnonymousFunctionOperation, ControlFlowGraph> pair in anonymousFunctionsMap)
Diagnostics\CommonDiagnosticAnalyzers.cs (2)
86foreach (var kvp in s_properties.OrderBy(kvp => kvp.Key)) 2141foreach (var kvp in seenOperationContainers)
FX\ProcessUtilities.cs (2)
24IEnumerable<KeyValuePair<string, string>> additionalEnvironmentVars = null, 52foreach (var entry in additionalEnvironmentVars)
Mocks\TestSourceReferenceResolver.cs (2)
20public static SourceReferenceResolver Create(params KeyValuePair<string, string>[] sources) 25public static SourceReferenceResolver Create(params KeyValuePair<string, object>[] sources)
Traits\CompilerTraitDiscoverer.cs (1)
19public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute)
Traits\WorkItemTraitDiscoverer.cs (1)
14public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute)
Microsoft.CodeAnalysis.Threading.Package (87)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
Microsoft.CodeAnalysis.UnitTests (27)
Collections\ImmutableDictionaryBuilderTestBase.cs (3)
111var array = new KeyValuePair<string, int>[2]; // intentionally larger than source. 168Assert.Equal(default(KeyValuePair<string, int>), manualEnum.Current); 171Assert.Equal(default(KeyValuePair<string, int>), manualEnum.Current);
Collections\ImmutableDictionaryTestBase.cs (1)
130var dictionary = (ICollection<KeyValuePair<string, int>>)Empty<string, int>();
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (7)
199Assert.True(IsSame(empty, empty.AddRange(Enumerable.Empty<KeyValuePair<int, int>>()))); 200var list = new List<KeyValuePair<int, int>> { new KeyValuePair<int, int>(3, 5), new KeyValuePair<int, int>(8, 10) }; 238foreach (KeyValuePair<int, GenericParameterHelper> pair in map) 246Assert.Equal<KeyValuePair<int, GenericParameterHelper>>(list, ToListNonGeneric<KeyValuePair<int, GenericParameterHelper>>(map)); 264Assert.Equal(default(KeyValuePair<int, GenericParameterHelper>), manualEnum.Current); 267Assert.Equal(default(KeyValuePair<int, GenericParameterHelper>), manualEnum.Current);
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (2)
254KeyValuePair<int, string>[]? items = itemProperty.GetValue(info.Instance) as KeyValuePair<int, string>[];
Collections\ImmutableSegmentedDictionaryTest.cs (5)
59CollectionAssertAreEquivalent<KeyValuePair<string, string>>(sortedMap.ToList(), map.ToList()); 92IEnumerable<KeyValuePair<string, string>> pairs = new Dictionary<string, string> { { "a", "b" } }; 115IEnumerable<KeyValuePair<string, string>> pairs = new Dictionary<string, string> { { "a", "B" } }; 254KeyValuePair<string, int>[]? items = itemProperty.GetValue(info.Instance) as KeyValuePair<string, int>[];
Diagnostics\DiagnosticLocalizationTests.cs (1)
168foreach (var kvp in resourceSetMap)
InternalUtilities\ConcurrentLruCacheTests.cs (5)
23: IEnumerable<KeyValuePair<K, V>> 25private readonly KeyValuePair<K, V>[] _store; 29_store = new KeyValuePair<K, V>[capacity]; 32public IEnumerator<KeyValuePair<K, V>> GetEnumerator() 34return ((IEnumerable<KeyValuePair<K, V>>)_store).GetEnumerator();
MetadataReferences\MetadataHelpersTests.cs (3)
441IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>> nestedNamespaces = null; 481IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>> nestedNamespaces = null; 490var nestedNS = nestedNamespaces.Single();
Microsoft.CodeAnalysis.VisualBasic (63)
Binding\BackstopBinder.vb (1)
252Friend Overrides Sub GetInScopeXmlNamespaces(builder As ArrayBuilder(Of KeyValuePair(Of String, String)))
Binding\Binder.vb (1)
1061Friend Overridable Sub GetInScopeXmlNamespaces(builder As ArrayBuilder(Of KeyValuePair(Of String, String)))
Binding\Binder_Attributes.vb (6)
80Dim namedArgs As ImmutableArray(Of KeyValuePair(Of String, TypedConstant)) = visitor.VisitNamedArguments(boundAttribute.NamedArguments, diagnostics) 704Public Function VisitNamedArguments(arguments As ImmutableArray(Of BoundExpression), diag As BindingDiagnosticBag) As ImmutableArray(Of KeyValuePair(Of String, TypedConstant)) 705Dim builder As ArrayBuilder(Of KeyValuePair(Of String, TypedConstant)) = Nothing 712builder = ArrayBuilder(Of KeyValuePair(Of String, TypedConstant)).GetInstance() 720Return ImmutableArray(Of KeyValuePair(Of String, TypedConstant)).Empty 726Private Function VisitNamedArgument(argument As BoundExpression, diag As BindingDiagnosticBag) As Nullable(Of KeyValuePair(Of String, TypedConstant))
Binding\Binder_XmlLiterals.vb (15)
118Dim importedNamespaces = ArrayBuilder(Of KeyValuePair(Of String, String)).GetInstance() 237Dim inScopeXmlNamespaces As ImmutableArray(Of KeyValuePair(Of String, String)) = Nothing 286Dim builder = ArrayBuilder(Of KeyValuePair(Of String, String)).GetInstance() 825importedNamespaces As ArrayBuilder(Of KeyValuePair(Of String, String)), 1078importedNamespaces As ArrayBuilder(Of KeyValuePair(Of String, String)), 1318Private ReadOnly _importedNamespaces As ArrayBuilder(Of KeyValuePair(Of String, String)) 1322Public Sub New(binder As Binder, syntax As XmlNodeSyntax, importedNamespaces As ArrayBuilder(Of KeyValuePair(Of String, String))) 1334Public ReadOnly Property ImportedNamespaces As ArrayBuilder(Of KeyValuePair(Of String, String)) 1383importedNamespaces As ImmutableArray(Of KeyValuePair(Of String, String)), 1384inScopeXmlNamespaces As ImmutableArray(Of KeyValuePair(Of String, String)), 1414Public ReadOnly ImportedNamespaces As ImmutableArray(Of KeyValuePair(Of String, String)) 1415Public ReadOnly InScopeXmlNamespaces As ImmutableArray(Of KeyValuePair(Of String, String)) 1468Friend Overrides Sub GetInScopeXmlNamespaces(builder As ArrayBuilder(Of KeyValuePair(Of String, String))) 1496Friend Overrides Sub GetInScopeXmlNamespaces(builder As ArrayBuilder(Of KeyValuePair(Of String, String))) 1516Friend Overrides Sub GetInScopeXmlNamespaces(builder As ArrayBuilder(Of KeyValuePair(Of String, String)))
Emit\SynthesizedPrivateImplementationDetailsSharedConstructor.vb (1)
78For Each payloadRoot As KeyValuePair(Of Integer, InstrumentationPayloadRootField) In _privateImplementationType.GetInstrumentationPayloadRoots()
Symbols\Attributes\AttributeData.vb (1)
55Public Shadows ReadOnly Property NamedArguments As IEnumerable(Of KeyValuePair(Of String, TypedConstant))
Symbols\Attributes\RetargetingAttributeData.vb (3)
23Private ReadOnly _namedArguments As ImmutableArray(Of KeyValuePair(Of String, TypedConstant)) 29ByVal namedArguments As ImmutableArray(Of KeyValuePair(Of String, TypedConstant))) 64Protected Overrides ReadOnly Property CommonNamedArguments As ImmutableArray(Of KeyValuePair(Of String, TypedConstant))
Symbols\Attributes\SourceAttributeData.vb (4)
26Private ReadOnly _namedArguments As ImmutableArray(Of KeyValuePair(Of String, TypedConstant)) 36ByVal namedArgs As ImmutableArray(Of KeyValuePair(Of String, TypedConstant)), 48Me._namedArguments = If(namedArgs.IsDefault, ImmutableArray.Create(Of KeyValuePair(Of String, TypedConstant))(), namedArgs) 77Protected Overrides ReadOnly Property CommonNamedArguments As ImmutableArray(Of KeyValuePair(Of String, TypedConstant))
Symbols\Metadata\PE\PENamespaceSymbol.vb (2)
176Dim nestedNamespaces As IEnumerable(Of KeyValuePair(Of String, IEnumerable(Of IGrouping(Of String, TypeDefinitionHandle)))) = Nothing 197childNamespaces As IEnumerable(Of KeyValuePair(Of String, IEnumerable(Of IGrouping(Of String, TypeDefinitionHandle))))
Symbols\NamespaceOrTypeSymbol.vb (2)
192membersByName As IEnumerable(Of KeyValuePair(Of String, ImmutableArray(Of Symbol))) 196For Each pair As KeyValuePair(Of String, ImmutableArray(Of Symbol)) In membersByName
Symbols\NamespaceSymbol.vb (2)
490membersByName As IEnumerable(Of KeyValuePair(Of String, ImmutableArray(Of Symbol))) 494For Each pair As KeyValuePair(Of String, ImmutableArray(Of Symbol)) In membersByName
Symbols\ReducedExtensionMethodSymbol.vb (8)
24Private ReadOnly _fixedTypeParameters As ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeSymbol)) 189Dim fixedTypeParameters = ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeSymbol)).Empty 192Dim fixed = ArrayBuilder(Of KeyValuePair(Of TypeParameterSymbol, TypeSymbol)).GetInstance(typeParametersToFixArray.Length) 209fixedTypeParameters As ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeSymbol)), 236Dim fixed As KeyValuePair(Of TypeParameterSymbol, TypeSymbol) = fixedTypeParameters(i) 270Friend Overrides ReadOnly Property FixedTypeParameters As ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeSymbol)) 285For Each pair As KeyValuePair(Of TypeParameterSymbol, TypeSymbol) In _fixedTypeParameters 312For Each pair As KeyValuePair(Of TypeParameterSymbol, TypeSymbol) In _fixedTypeParameters
Symbols\Source\SourceNamedTypeSymbol.vb (1)
2630namedArgs:=ImmutableArray(Of KeyValuePair(Of String, TypedConstant)).Empty))
Symbols\TypeSubstitution.vb (16)
73Private ReadOnly _pairs As ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)) 85Public ReadOnly Property Pairs As ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)) 95Public ReadOnly Property PairsIncludingParent As ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)) 100Dim pairBuilder = ArrayBuilder(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)).GetInstance() 108Private Sub AddPairsIncludingParentToBuilder(pairBuilder As ArrayBuilder(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers))) 342Return Concat(sub1, targetGenericDefinition, ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)).Empty) 413Dim pairs = ArrayBuilder(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)).GetInstance() 463currentParent = Concat(currentParent, targetGenericDefinition, ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)).Empty) 513pairs As ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)) 526Concat(parent, containingType, ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)).Empty)) 556Private Sub New(targetGenericDefinition As Symbol, pairs As ImmutableArray(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)), parent As TypeSubstitution) 606Dim pairs(typeParametersDefinitions.Length - 1) As KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers) 666Dim pairs(countOfMeaningfulPairs - 1) As KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers) 710Dim pairs = ArrayBuilder(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)).GetInstance() 744pairs As ArrayBuilder(Of KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)), 848Dim pairs(significantMaps - 1) As KeyValuePair(Of TypeParameterSymbol, TypeWithModifiers)
Microsoft.CodeAnalysis.Workspaces (164)
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (1)
110IEnumerable<KeyValuePair<Document, ImmutableArray<TextSpan>>> documentsAndSpans)
Diagnostics\HostDiagnosticAnalyzers.cs (3)
225foreach (var reference in Shuffle(analyzerReferencesMap)) 239static IEnumerable<KeyValuePair<object, AnalyzerReference>> Shuffle(IDictionary<object, AnalyzerReference> source) 248using var _ = ArrayBuilder<KeyValuePair<object, AnalyzerReference>>.GetInstance(source.Count, out var builder);
Differencing\LongestCommonSubsequence.cs (2)
248protected IEnumerable<KeyValuePair<int, int>> GetMatchingPairs(TSequence oldSequence, int oldLength, TSequence newSequence, int newLength) 391foreach (var pair in GetMatchingPairs(oldSequence, oldLength, newSequence, newLength))
Differencing\Match.cs (2)
26internal Match(TNode root1, TNode root2, TreeComparer<TNode> comparer, IEnumerable<KeyValuePair<TNode, TNode>> knownMatches) 41foreach (var knownMatch in knownMatches)
Differencing\Match.LongestCommonSubsequence.cs (1)
31foreach (var pair in GetMatchingPairs(oldNodes, oldNodes.Count, newNodes, newNodes.Count))
Differencing\TreeComparer.cs (1)
37public Match<TNode> ComputeMatch(TNode oldRoot, TNode newRoot, IEnumerable<KeyValuePair<TNode, TNode>>? knownMatches = null)
FindSymbols\SymbolFinder.FindReferencesServerCallback.cs (1)
59foreach (var pair in map)
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (1)
120foreach (var kvp in _inheritanceMap)
Log\AbstractLogAggregator.cs (2)
18internal abstract class AbstractLogAggregator<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 41public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
Log\KeyValueLogMessage.cs (1)
180foreach (var entry in _lazyMap)
Options\GlobalOptionService.cs (2)
145public bool SetGlobalOptions(ImmutableArray<KeyValuePair<OptionKey2, object?>> options) 148private bool SetGlobalOptions(OneOrMany<KeyValuePair<OptionKey2, object?>> options)
Options\IGlobalOptionService.cs (1)
56bool SetGlobalOptions(ImmutableArray<KeyValuePair<OptionKey2, object?>> options);
Options\ILegacyWorkspaceOptionService.cs (2)
31ImmutableArray<KeyValuePair<OptionKey2, object?>> internallyDefinedOptions, 32ImmutableArray<KeyValuePair<OptionKey, object?>> externallyDefinedOptions);
Options\LegacyWorkspaceOptionService.cs (2)
52ImmutableArray<KeyValuePair<OptionKey2, object?>> internallyDefinedOptions, 53ImmutableArray<KeyValuePair<OptionKey, object?>> externallyDefinedOptions)
Options\SolutionOptionSet.cs (2)
79internal (ImmutableArray<KeyValuePair<OptionKey2, object?>> internallyDefined, ImmutableArray<KeyValuePair<OptionKey, object?>> externallyDefined) GetChangedOptions()
Serialization\AbstractOptionsSerializationService.cs (8)
55foreach (var kv in options.SpecificDiagnosticOptions.OrderBy(o => o.Key)) 92IEnumerable<KeyValuePair<string, ReportDiagnostic>> specificDiagnosticOptions, 134List<KeyValuePair<string, ReportDiagnostic>> specificDiagnosticOptionsList = null; 138specificDiagnosticOptionsList = new List<KeyValuePair<string, ReportDiagnostic>>(count); 199foreach (var kv in options.Features.OrderBy(o => o.Key)) 206protected static (SourceCodeKind kind, DocumentationMode documentationMode, IEnumerable<KeyValuePair<string, string>> features) ReadParseOptionsPieces( 220List<KeyValuePair<string, string>> featuresList = null; 224featuresList = new List<KeyValuePair<string, string>>(count);
Shared\Utilities\DocumentationComment.cs (1)
153foreach (var typeAndBuilderPair in _exceptionTextBuilders)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
12public static void Deconstruct<TKey, TValue>(KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (29)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 200else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>)) 202span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable); 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (3)
18internal readonly struct EnumerableConditionalWeakTable<TKey, TValue>() : IEnumerable<KeyValuePair<TKey, TValue>> 38public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() 39=> ((IEnumerable<KeyValuePair<TKey, TValue>>)_table).GetEnumerator();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
237foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
406ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments = default)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
37public static readonly IEnumerable<KeyValuePair<byte, string>> ByteSpecialValues = []; 39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAttributeData.cs (3)
15ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) : AttributeData 18private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments = namedArguments.NullToEmpty(); 23protected override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _namedArguments;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
43foreach (var kv in _logAggregator)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
339var entry = _documentPathsToDocumentIds.Where(kv => kv.Value == documentId).FirstOrDefault();
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (2)
969foreach (var documentInProjectState in projectState.DocumentStates.States) 978foreach (var generatedDocument in generatorInfo.Value.Documents.States)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
257foreach (var documentState in ProjectState.DocumentStates.States)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\BuildHostProcessManager.cs (1)
259foreach (var globalMSBuildProperty in _globalMSBuildProperties)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (103)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (4)
50public ConcurrentLruCache(KeyValuePair<K, V>[] array) 53foreach (var kvp in array) 62internal IEnumerable<KeyValuePair<K, V>> TestingEnumerable 68var copy = new KeyValuePair<K, V>[_cache.Count];
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
12public static void Deconstruct<TKey, TValue>(KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (29)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 200else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>)) 202span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable); 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
BuildHostProcessManagerTests.cs (2)
150foreach (var kvp in globalMSBuildProperties) 157static string GetPropertyArgument(KeyValuePair<string, string> property)
VisualStudioMSBuildWorkspaceTests.cs (1)
1847var defines = new List<KeyValuePair<string, object>>(options.PreprocessorSymbols);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (4)
OptionsCollection.cs (3)
28internal sealed class OptionsCollection(string languageName) : IReadOnlyCollection<KeyValuePair<OptionKey2, object?>>, IOptionsReader 69public void AddRange(IEnumerable<KeyValuePair<OptionKey2, object?>>? options) 78public IEnumerator<KeyValuePair<OptionKey2, object?>> GetEnumerator()
Workspaces\TestHostDocument.cs (1)
122foreach (var namedSpanList in spans.Where(s => s.Key != string.Empty))
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
Differencing\LongestCommonSubsequenceTests.cs (3)
21public IEnumerable<KeyValuePair<int, int>> GetMatchingPairs(string oldSequence, string newSequence) 31private static void VerifyMatchingPairs(IEnumerable<KeyValuePair<int, int>> actualPairs, string expectedPairsStr) 34foreach (var actPair in actualPairs)
SolutionTests\SourceGeneratorExecutionVersionMapTests.cs (2)
23var project1Kvp = new KeyValuePair<ProjectId, SourceGeneratorExecutionVersion>(projectId1, new(MajorVersion: 1, MinorVersion: 1)); 24var project2Kvp = new KeyValuePair<ProjectId, SourceGeneratorExecutionVersion>(projectId2, new(MajorVersion: 2, MinorVersion: 2));
Microsoft.CSharp (4)
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (4)
77private IList<KeyValuePair<string, object>> results = null; 449private static IList<KeyValuePair<string, object>> QueryDynamicObject(object obj) 458var result = new List<KeyValuePair<string, object>>(); 477return Array.Empty<KeyValuePair<string, object>>();
Microsoft.Data.Analysis (9)
DataFrame.cs (3)
611public DataFrame Append(IEnumerable<KeyValuePair<string, object>> row, bool inPlace = false, CultureInfo cultureInfo = null) 625foreach (KeyValuePair<string, object> columnAndValue in row) 648foreach (KeyValuePair<string, object> columnAndValue in row)
DataFrame.Join.cs (1)
257foreach (var newOccurrence in newOccurrences)
DataFrameColumn.cs (1)
485KeyValuePair<T, List<ValueTuple<int, int>>> minElement = heapOfValueAndListOfTupleOfSortAndBufferIndex.ElementAt(0);
DataFrameColumns\StringDataFrameColumn.cs (1)
388foreach (KeyValuePair<string, ICollection<long>> keyValuePair in groupedValues)
DataFrameRow.cs (1)
40public IEnumerable<KeyValuePair<string, object>> GetValues()
GroupBy.cs (1)
123foreach (KeyValuePair<TKey, ICollection<long>> pairs in _keyToRowIndicesMap)
PrimitiveDataFrameColumn.cs (1)
386foreach (KeyValuePair<T, ICollection<long>> keyValuePair in groupedValues)
Microsoft.DotNet.Arcade.Sdk (6)
src\InstallDotNetCore.cs (5)
65var runtimeItems = new Dictionary<string, IEnumerable<KeyValuePair<string, string>>>(); 96foreach (var runtimeItem in runtimeItems) 98foreach (var item in runtimeItem.Value) 213private IEnumerable<KeyValuePair<string, string>> GetItemsFromJsonElementArray(JsonProperty token, out string runtime) 215var items = new List<KeyValuePair<string, string>>();
src\SaveItems.cs (1)
37if (!(metadata is IEnumerable<KeyValuePair<string, string>> metadataPairs))
Microsoft.DotNet.Build.Manifest (5)
ArtifactModel.cs (2)
107foreach (var localAttr in Attributes) 133foreach (var item in Attributes)
BuildModelFactory.cs (1)
207foreach(var attribute in attributes.ToList())
PdbArtifactModel.cs (1)
21foreach (var item in Attributes)
VersionIdentifier.cs (1)
242foreach (var sequence in _sequencesToReplace)
Microsoft.DotNet.Build.Manifest.Tests (1)
BuildModelFactoryTests.cs (1)
814foreach (var kvp in buildIdentityA.Attributes)
Microsoft.DotNet.Build.Tasks.Feed (3)
src\PublishArtifactsInManifestBase.cs (3)
372foreach (var packagesPerCategory in PackagesByCategory) 818foreach (var packagesPerCategory in PackagesByCategory) 1038foreach (var blobsPerCategory in BlobsByCategory)
Microsoft.DotNet.Build.Tasks.Installers (1)
src\RpmBuilder.cs (1)
222foreach (var script in _scripts)
Microsoft.DotNet.Build.Tasks.Packaging (23)
GeneratePackageReport.cs (2)
92foreach (var framework in _frameworks.OrderBy(f => f.Key.ToString())) 321foreach (var packageSpecificItems in packageItems)
GetApplicableAssetsFromPackages.cs (1)
177foreach (var packageFiles in _packageToPackageItems)
GetLayoutFiles.cs (1)
60foreach(var targetInfo in packageReport.Targets)
HarvestPackage.cs (1)
163foreach (var packageFolder in _packageFolders)
NuGetPack.cs (1)
281foreach (var pathPair in pathHasMatches.Where(pathMatchPair => !pathMatchPair.Value))
PackageIndex.cs (12)
156foreach(var otherPackage in other.Packages) 177foreach(var otherModuleToPackage in other.ModulesToPackages) 408foreach(var inboxOnPair in other.InboxOn.GetInboxVersions()) 413foreach (var assemblyVersionInPackage in other.AssemblyVersionInPackageVersion) 516foreach(var mapping in mappings) 555foreach (var framework in inboxVersions) 566public IEnumerable<KeyValuePair<NuGetFramework, Version>> GetInboxVersions() 568foreach (var framework in inboxVersions) 570foreach (var frameworkInboxVersionPair in framework.Value) 630var compatibleMapping = mappings.LastOrDefault(m => m.Key < normalizedFramework.Version); 726foreach(var frameworkPair in ((InboxFrameworks)value).GetInboxVersions()) 776foreach(var metaPackage in other.packageToMetaPackage)
ValidateFrameworkPackage.cs (2)
46foreach (var testAssetByName in testAssetsByName) 73foreach(var missingInboxAssembly in missingInboxAssemblies)
ValidateHarvestVersionIsLatestForRelease.cs (1)
73foreach (KeyValuePair<string, Target> packageTarget in report.Targets.NullAsEmpty())
ValidatePackage.cs (2)
590foreach (var inboxPair in packageInfo.InboxOn.GetInboxVersions()) 614foreach (var supportedFramework in _report.SupportedFrameworks)
Microsoft.DotNet.Build.Tasks.Workloads (3)
CreateVisualStudioWorkload.wix.cs (1)
284foreach (var kvp in packsInWorkloadByPlatform)
Msi\MsiPayloadPackageProject.wix.cs (1)
59foreach (var packageFile in PackageContents)
Msi\WorkloadPackGroupMsi.wix.cs (1)
133foreach (var kvp in sourceDirectoryNamesAndValues)
Microsoft.DotNet.Helix.Client (3)
generated-code\HelixApi.cs (3)
402public partial class QueryBuilder : List<KeyValuePair<string, string>> 408public QueryBuilder(IEnumerable<KeyValuePair<string, string>> parameters) 429KeyValuePair<string, string> keyValuePair = this[index];
Microsoft.DotNet.Helix.Sdk (2)
GetHelixWorkItems.cs (1)
70foreach(KeyValuePair<string, string> entry in metadata)
ProvisioningProfileProvider.cs (1)
83foreach (var pair in s_targetNames)
Microsoft.DotNet.NuGetRepack.Tests (2)
TestHelpers\DiffUtil.cs (2)
124protected IEnumerable<KeyValuePair<int, int>> GetMatchingPairs(TSequence sequenceA, int lengthA, TSequence sequenceB, int lengthB) 206foreach (var pair in GetMatchingPairs(sequenceA, lengthA, sequenceB, lengthB))
Microsoft.DotNet.Open.Api.Tools.Tests (2)
ProcessEx.cs (1)
70foreach (var envVar in envVars)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
90foreach (var file in _files)
Microsoft.DotNet.PackageTesting (1)
VerifyClosure.cs (1)
268foreach(var suspectCycle in suspectCycles)
Microsoft.DotNet.SharedFramework.Sdk (1)
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (1)
268foreach(var suspectCycle in suspectCycles)
Microsoft.DotNet.SignTool (8)
src\BatchSignInput.cs (2)
31internal ImmutableArray<KeyValuePair<string, string>> FilesToCopy; 33internal BatchSignInput(ImmutableArray<FileSignInfo> filesToSign, ImmutableDictionary<SignedFileContentKey, ZipData> zipDataMap, ImmutableArray<KeyValuePair<string, string>> filesToCopy)
src\BatchSignUtil.cs (2)
198foreach (var engine in engines) 445foreach (var entry in _batchData.FilesToCopy)
src\Configuration.cs (3)
91internal List<KeyValuePair<string, string>> _filesToCopy; 138_filesToCopy = new List<KeyValuePair<string, string>>(); 184foreach (var errorGroup in _errors)
src\SignTool.cs (1)
106foreach (var item in zippedOSXFiles)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Modeler\KeyValuePairExtensions.cs (1)
11this KeyValuePair<TKey, TValue> pair,
Microsoft.DotNet.XUnitAssert.Tests (45)
EqualityAssertsTests.cs (32)
1568 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42); 1569 var actual = new KeyValuePair<IEnumerable<string>, int>(new string[] { "Key1", "Key2" }, 42); 1578 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42); 1579 var actual = new KeyValuePair<IEnumerable<string>, int>(new string[] { "Key1", "Key3" }, 42); 1596 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" }); 1597 var actual = new KeyValuePair<string, IEnumerable<string>>("Key1", new string[] { "Value1a", "Value1b" }); 1606 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" }); 1607 var actual = new KeyValuePair<string, IEnumerable<string>>("Key1", new string[] { "Value1a", "Value2a" }); 1627 var expected = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 1628 var actual = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 1636 var expected = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 1637 var actual = new KeyValuePair<EquatableObject, int>(new() { Char = 'b' }, 42); 1657 var expected = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 1658 var actual = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 1666 var expected = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 1667 var actual = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'b' }); 3796 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42); 3797 var actual = new KeyValuePair<IEnumerable<string>, int>(new string[] { "Key1", "Key2" }, 42); 3814 var expected = new KeyValuePair<IEnumerable<string>, int>(new List<string> { "Key1", "Key2" }, 42); 3815 var actual = new KeyValuePair<IEnumerable<string>, int>(new string[] { "Key1", "Key3" }, 42); 3824 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" }); 3825 var actual = new KeyValuePair<string, IEnumerable<string>>("Key1", new string[] { "Value1a", "Value1b" }); 3842 var expected = new KeyValuePair<string, IEnumerable<string>>("Key1", new List<string> { "Value1a", "Value1b" }); 3843 var actual = new KeyValuePair<string, IEnumerable<string>>("Key1", new string[] { "Value1a", "Value2a" }); 3855 var expected = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 3856 var actual = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 3872 var expected = new KeyValuePair<EquatableObject, int>(new() { Char = 'a' }, 42); 3873 var actual = new KeyValuePair<EquatableObject, int>(new() { Char = 'b' }, 42); 3885 var expected = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 3886 var actual = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 3902 var expected = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'a' }); 3903 var actual = new KeyValuePair<string, EquatableObject>("Key1", new() { Char = 'b' });
EquivalenceAssertsTests.cs (12)
1354 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 4 }); 1355 var actual = new KeyValuePair<int, int[]>(42, new[] { 9, 4, 1 }); 1363 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 4 }); 1364 var actual = new KeyValuePair<int, int[]>(41, new[] { 9, 4, 1 }); 1380 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 6 }); 1381 var actual = new KeyValuePair<int, int[]>(42, new[] { 9, 4, 1 }); 1400 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 4 }); 1401 var actual = new KeyValuePair<int, int[]>(42, new[] { 4, 1 }); 1409 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 4 }); 1410 var actual = new KeyValuePair<int, int[]>(41, new[] { 4, 1 }); 1426 var expected = new KeyValuePair<int, int[]>(42, new[] { 1, 6 }); 1427 var actual = new KeyValuePair<int, int[]>(42, new[] { 4, 1 });
Sdk\ArgumentFormatterTests.cs (1)
293 var kvp = new KeyValuePair<object, List<object>>(42, new() { 21.12M, "2600" });
Microsoft.DotNet.XUnitExtensions (16)
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (1)
65internal static IEnumerable<KeyValuePair<string, string>> EvaluateArguments(IEnumerable<object> ctorArgs,string category, int skipFirst=1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ActiveIssueDiscoverer.cs (1)
23public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalClassDiscoverer.cs (1)
26public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\OuterLoopTestsDiscoverer.cs (1)
23public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\PlatformSpecificDiscoverer.cs (2)
26public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute) 31Array.Empty<KeyValuePair<string, string>>() :
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnCIDiscoverer.cs (1)
19public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnCoreClrDiscoverer.cs (2)
29public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute) 58return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnMonoDiscoverer.cs (2)
16public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute) 34return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnPlatformDiscoverer.cs (2)
16public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute) 31return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnTargetFrameworkDiscoverer.cs (2)
25public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute) 31Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\TestCategoryDiscoverer.cs (1)
25public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute)
Microsoft.DotNet.XUnitV3Extensions (16)
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\ActiveIssueAttribute.cs (1)
66public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\ConditionalClassAttribute.cs (1)
34public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\OuterLoopAttribute.cs (1)
80public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\PlatformSpecificAttribute.cs (2)
33public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits() 36Array.Empty<KeyValuePair<string, string>>() :
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnCIAttribute.cs (1)
25public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnCoreClrAttribute.cs (2)
34public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits() 44return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnMonoAttribute.cs (2)
30public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits() 40return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnPlatformAttribute.cs (2)
30public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits() 37return Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnTargetFrameworkAttribute.cs (2)
32public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits() 36Array.Empty<KeyValuePair<string, string>>();
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\TestCategoryAttribute.cs (1)
31public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits()
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (1)
65internal static IEnumerable<KeyValuePair<string, string>> EvaluateArguments(IEnumerable<object> ctorArgs,string category, int skipFirst=1)
Microsoft.Extensions.AI (17)
ChatCompletion\OpenTelemetryChatClient.cs (3)
316foreach (KeyValuePair<string, object?> prop in props) 419foreach (KeyValuePair<string, object?> prop in props) 516KeyValuePair<string, object?>[] tags =
Embeddings\OpenTelemetryEmbeddingGenerator.cs (2)
188foreach (KeyValuePair<string, object?> prop in props) 267foreach (KeyValuePair<string, object?> prop in props)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.Extensions.AI.Abstractions (53)
AdditionalPropertiesDictionary.cs (1)
27public AdditionalPropertiesDictionary(IEnumerable<KeyValuePair<string, object?>> collection)
AdditionalPropertiesDictionary{TValue}.cs (20)
43public AdditionalPropertiesDictionary(IEnumerable<KeyValuePair<string, TValue>> collection) 80bool ICollection<KeyValuePair<string, TValue>>.IsReadOnly => false; 111void ICollection<KeyValuePair<string, TValue>>.Add(KeyValuePair<string, TValue> item) => ((ICollection<KeyValuePair<string, TValue>>)_dictionary).Add(item); 117bool ICollection<KeyValuePair<string, TValue>>.Contains(KeyValuePair<string, TValue> item) => 118((ICollection<KeyValuePair<string, TValue>>)_dictionary).Contains(item); 124void ICollection<KeyValuePair<string, TValue>>.CopyTo(KeyValuePair<string, TValue>[] array, int arrayIndex) => 125((ICollection<KeyValuePair<string, TValue>>)_dictionary).CopyTo(array, arrayIndex); 134IEnumerator<KeyValuePair<string, TValue>> IEnumerable<KeyValuePair<string, TValue>>.GetEnumerator() => GetEnumerator(); 143bool ICollection<KeyValuePair<string, TValue>>.Remove(KeyValuePair<string, TValue> item) => ((ICollection<KeyValuePair<string, TValue>>)_dictionary).Remove(item); 206internal void SetAll(IEnumerable<KeyValuePair<string, TValue>> items) 210foreach (var item in items) 217public struct Enumerator : IEnumerator<KeyValuePair<string, TValue>> 230public KeyValuePair<string, TValue> Current => _dictionaryEnumerator.Current;
AITool.cs (1)
47foreach (var entry in AdditionalProperties)
Functions\AIFunctionArguments.cs (13)
120bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => false; 132void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) => 133((ICollection<KeyValuePair<string, object?>>)_arguments).Add(item); 139bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) => 140((ICollection<KeyValuePair<string, object?>>)_arguments).Contains(item); 146public void CopyTo(KeyValuePair<string, object?>[] array, int arrayIndex) => 147((ICollection<KeyValuePair<string, object?>>)_arguments).CopyTo(array, arrayIndex); 150public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() => _arguments.GetEnumerator(); 156bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item) => 157((ICollection<KeyValuePair<string, object?>>)_arguments).Remove(item);
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (1)
119foreach (var entry in update.AdditionalProperties)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
UsageDetails.cs (2)
50foreach (var kvp in countsToAdd) 85foreach (var entry in additionalCounts)
Utilities\AIJsonUtilities.cs (1)
181foreach (var entry in entries)
Utilities\AIJsonUtilities.Schema.Transform.cs (2)
72foreach (var prop in properties.ToArray()) 136foreach (var prop in properties)
Microsoft.Extensions.AI.Abstractions.Tests (6)
AdditionalPropertiesDictionaryTests.cs (2)
21d = new((IEnumerable<KeyValuePair<string, object?>>)new Dictionary<string, object?> { ["key1"] = "value1", ["key2"] = "value2" }); 125foreach (KeyValuePair<string, object?> item in d)
AssertExtensions.cs (1)
29foreach (var expectedEntry in expected)
test\Shared\JsonSchemaExporter\TestTypes.cs (3)
1119public IEnumerator<KeyValuePair<string, int>> GetEnumerator() => Enumerable.Repeat(new KeyValuePair<string, int>(nameof(BaseValue), BaseValue), 1).GetEnumerator(); 1156public readonly struct StructDictionary<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> values) 1166public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => _dictionary.GetEnumerator();
Microsoft.Extensions.AI.AzureAIInference (16)
AzureAIInferenceChatClient.cs (2)
237foreach (var entry in functionCallInfos) 334foreach (var prop in props)
AzureAIInferenceEmbeddingGenerator.cs (1)
187foreach (var prop in props)
AzureAIInferenceImageEmbeddingGenerator.cs (1)
141foreach (var prop in props)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
29foreach (var expectedEntry in expected)
Microsoft.Extensions.AI.Evaluation (1)
EvaluationMetricExtensions.cs (1)
132foreach (KeyValuePair<string, string> item in metadata)
Microsoft.Extensions.AI.Evaluation.NLP (4)
Common\BLEUAlgorithm.cs (2)
80foreach (var ct in refCounts) 94foreach (var h in hypCounts)
Common\MatchCounter.cs (2)
14internal readonly struct MatchCounter<T> : IEnumerable<KeyValuePair<T, int>> 58public IEnumerator<KeyValuePair<T, int>> GetEnumerator() => _counts.GetEnumerator();
Microsoft.Extensions.AI.Integration.Tests (3)
PromptBasedFunctionCallingChatClient.cs (1)
151foreach (var kvp in arguments.ToArray())
VerbatimHttpHandler.cs (1)
39foreach (var header in request.Content.Headers)
VerbatimMultiPartHttpHandler.cs (1)
204foreach (var kvp in expectedFrequencies)
Microsoft.Extensions.AI.Ollama (12)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.Extensions.AI.Ollama.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
29foreach (var expectedEntry in expected)
Microsoft.Extensions.AI.OpenAI (13)
OpenAIChatClient.cs (1)
381foreach (var entry in functionCallInfos)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.Extensions.AI.OpenAI.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
29foreach (var expectedEntry in expected)
Microsoft.Extensions.AI.Tests (9)
ChatCompletion\OpenTelemetryChatClientTests.cs (8)
206log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.system.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 207log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.user.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 208log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.assistant.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 209log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.tool.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 210log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.assistant.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 211log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.user.message"), ((IList<KeyValuePair<string, string?>>)log.State!)[0]), 212log => Assert.Equal(new KeyValuePair<string, string?>("event.name", "gen_ai.choice"), ((IList<KeyValuePair<string, string?>>)log.State!)[0])); 216Assert.Equal(new KeyValuePair<string, string?>("gen_ai.system", "testservice"), ((IList<KeyValuePair<string, string?>>)log.State!)[1]);
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
29foreach (var expectedEntry in expected)
Microsoft.Extensions.ApiDescription.Client.Tests (2)
src\Shared\Process\ProcessEx.cs (1)
116foreach (var envVar in envVars)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
90foreach (var file in _files)
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
90foreach (var file in _files)
Microsoft.Extensions.Caching.Hybrid.Tests (3)
StampedeTests.cs (1)
474foreach (var pair in counts)
TestEventListener.cs (2)
77foreach (var pair in map) 166foreach (var pair in _counters)
Microsoft.Extensions.Caching.Memory (4)
MemoryCache.cs (4)
758foreach (KeyValuePair<string, CacheEntry> entry in _stringEntries) 762foreach (KeyValuePair<object, CacheEntry> entry in _nonStringEntries) 770foreach (KeyValuePair<string, CacheEntry> pairs in _stringEntries) 774foreach (KeyValuePair<object, CacheEntry> pairs in _nonStringEntries)
Microsoft.Extensions.Compliance.Redaction (1)
RedactorProvider.cs (1)
47foreach (var m in map)
Microsoft.Extensions.Configuration (12)
ConfigurationManager.cs (5)
297public void Add(KeyValuePair<string, object> item) 309public bool Contains(KeyValuePair<string, object> item) 319public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 324public IEnumerator<KeyValuePair<string, object>> GetEnumerator() 336public bool Remove(KeyValuePair<string, object> item)
ConfigurationProvider.cs (2)
69foreach (KeyValuePair<string, string?> kv in Data) 78foreach (KeyValuePair<string, string?> kv in Data)
MemoryConfigurationBuilderExtensions.cs (1)
36IEnumerable<KeyValuePair<string, string?>>? initialData)
MemoryConfigurationProvider.cs (3)
13public class MemoryConfigurationProvider : ConfigurationProvider, IEnumerable<KeyValuePair<string, string?>> 29foreach (KeyValuePair<string, string?> pair in _source.InitialData) 50public IEnumerator<KeyValuePair<string, string?>> GetEnumerator()
MemoryConfigurationSource.cs (1)
16public IEnumerable<KeyValuePair<string, string?>>? InitialData { get; set; }
Microsoft.Extensions.Configuration.Abstractions (2)
ConfigurationExtensions.cs (2)
46public static IEnumerable<KeyValuePair<string, string?>> AsEnumerable(this IConfiguration configuration) => configuration.AsEnumerable(makePathsRelative: false); 54public static IEnumerable<KeyValuePair<string, string?>> AsEnumerable(this IConfiguration configuration, bool makePathsRelative)
Microsoft.Extensions.Configuration.Binder (1)
ConfigurationBinder.cs (1)
702Type kvpType = typeof(KeyValuePair<,>).MakeGenericType(keyType, valueType);
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationProvider.cs (1)
141foreach (KeyValuePair<string, string> mapping in switchMappings)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (2)
ConfigurationProviderTestBase.cs (2)
343var values = new List<KeyValuePair<string, string>>(); 358IList<KeyValuePair<string, string>> values)
Microsoft.Extensions.DependencyInjection (3)
ServiceLookup\CallSiteChain.cs (2)
51var ordered = new List<KeyValuePair<ServiceIdentifier, ChainItemInfo>>(_callSiteChain); 54foreach (KeyValuePair<ServiceIdentifier, ChainItemInfo> pair in ordered)
ServiceLookup\CallSiteFactory.cs (1)
316List<KeyValuePair<int, ServiceCallSite>> callSitesByIndex = new();
Microsoft.Extensions.Diagnostics (12)
Metrics\Configuration\MetricsConfigureOptions.cs (1)
97foreach (var instrumentPair in meterSection.AsEnumerable(makePathsRelative: true))
Metrics\DebugConsoleMetricListener.cs (1)
61private void MeasurementHandler<T>(Instrument instrument, T measurement, ReadOnlySpan<KeyValuePair<string, object?>> tags, object? state) where T : struct
Metrics\DefaultMeterFactory.cs (1)
41if (meter.Version == options.Version && DiagnosticsHelper.CompareTags(meter.Tags as IList<KeyValuePair<string, object?>>, options.Tags))
src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (9)
22internal static bool CompareTags(IList<KeyValuePair<string, object?>>? sortedTags, IEnumerable<KeyValuePair<string, object?>>? tags2) 38if (tags2 is ICollection<KeyValuePair<string, object?>> tagsCol) 45if (tagsCol is IList<KeyValuePair<string, object?>> secondList) 49KeyValuePair<string, object?> pair = secondList[i]; 58KeyValuePair<string, object?> pair1 = sortedTags[j]; 79using (IEnumerator<KeyValuePair<string, object?>> enumerator = tags2.GetEnumerator()) 89KeyValuePair<string, object?> pair = enumerator.Current; 97KeyValuePair<string, object?> pair1 = sortedTags[j];
Microsoft.Extensions.Diagnostics.HealthChecks (12)
DefaultHealthCheckService.cs (5)
271internal sealed class HealthCheckDataLogValue : IReadOnlyList<KeyValuePair<string, object>> 274private readonly List<KeyValuePair<string, object>> _values; 288public KeyValuePair<string, object> this[int index] 303public IEnumerator<KeyValuePair<string, object>> GetEnumerator() 323var kvp = values[i];
HealthCheckLogScope.cs (7)
10internal sealed class HealthCheckLogScope : IReadOnlyList<KeyValuePair<string, object>> 14int IReadOnlyCollection<KeyValuePair<string, object>>.Count { get; } = 1; 16KeyValuePair<string, object> IReadOnlyList<KeyValuePair<string, object>>.this[int index] 38IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator() 45return ((IEnumerable<KeyValuePair<string, object>>)this).GetEnumerator();
Microsoft.Extensions.Diagnostics.HealthChecks.Common (2)
ManualHealthCheckTracker.cs (1)
35foreach (var checkPair in _checks)
TelemetryHealthCheckPublisher.cs (1)
59foreach (var entry in report.Entries)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
DefaultHealthCheckServiceTest.cs (1)
327Assert.Collection((IEnumerable<KeyValuePair<string, object>>)actual.Scope,
Microsoft.Extensions.Diagnostics.ResourceMonitoring (10)
Windows\Disk\WindowsDiskMetrics.cs (7)
23private static readonly KeyValuePair<string, object?> _directionReadTag = new(DirectionKey, "read"); 24private static readonly KeyValuePair<string, object?> _directionWriteTag = new(DirectionKey, "write"); 141foreach (KeyValuePair<string, long> pair in perSecondWriteCounter.TotalCountDict) 150foreach (KeyValuePair<string, long> pair in perSecondReadCounter.TotalCountDict) 166foreach (KeyValuePair<string, long> pair in writeCounter.TotalCountDict) 175foreach (KeyValuePair<string, long> pair in readCounter.TotalCountDict) 190foreach (KeyValuePair<string, double> pair in _diskIoTimePerfCounter.TotalSeconds)
Windows\Network\WindowsNetworkMetrics.cs (3)
26KeyValuePair<string, object?> tcpTag = new("network.transport", "tcp"); 45KeyValuePair<string, object?> tcpVersionFourTag = new(NetworkTypeKey, "ipv4"); 46KeyValuePair<string, object?> tcpVersionSixTag = new(NetworkTypeKey, "ipv6");
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (9)
Helpers\TestMeterFactory.cs (1)
16var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object?>>(), scope: this);
Windows\Disk\WindowsDiskMetricsTests.cs (8)
75var readTag = new KeyValuePair<string, object?>("disk.io.direction", "read"); 76var writeTag = new KeyValuePair<string, object?>("disk.io.direction", "write"); 77var deviceTagC = new KeyValuePair<string, object?>("system.device", "C:"); 78var deviceTagD = new KeyValuePair<string, object?>("system.device", "D:"); 149var readTag = new KeyValuePair<string, object?>("disk.io.direction", "read"); 150var writeTag = new KeyValuePair<string, object?>("disk.io.direction", "write"); 151var deviceTagC = new KeyValuePair<string, object?>("system.device", "C:"); 152var deviceTagD = new KeyValuePair<string, object?>("system.device", "D:");
Microsoft.Extensions.Diagnostics.Testing (16)
Logging\FakeLogger.cs (4)
142if (state is IEnumerable<KeyValuePair<string, object?>> e) 144var l = new List<KeyValuePair<string, string?>>(); 145foreach (var pair in e) 168static string? ConvertToString(KeyValuePair<string, object?> pair)
Logging\FakeLoggerProvider.cs (1)
51foreach (var entry in _loggers)
Logging\FakeLogRecord.cs (3)
68public IReadOnlyList<KeyValuePair<string, string?>>? StructuredState => (IReadOnlyList<KeyValuePair<string, string?>>?)State; 82foreach (var kvp in StructuredState)
Metrics\CollectedMeasurement.cs (5)
26internal CollectedMeasurement(T value, ReadOnlySpan<KeyValuePair<string, object?>> tags, DateTimeOffset timestamp) 29foreach (var tag in tags) 59public bool ContainsTags(params KeyValuePair<string, object?>[] tags) 61foreach (var kvp in Throw.IfNull(tags)) 100public bool MatchesTags(params KeyValuePair<string, object?>[] tags) => ContainsTags(tags) && (Tags.Count == tags.Length);
Metrics\MeasurementExtensions.cs (2)
22public static IEnumerable<CollectedMeasurement<T>> ContainsTags<T>(this IEnumerable<CollectedMeasurement<T>> measurements, params KeyValuePair<string, object?>[] tags) 44public static IEnumerable<CollectedMeasurement<T>> MatchesTags<T>(this IEnumerable<CollectedMeasurement<T>> measurements, params KeyValuePair<string, object?>[] tags)
Metrics\MetricCollector.cs (1)
296private void OnMeasurementRecorded(Instrument instrument, T measurement, ReadOnlySpan<KeyValuePair<string, object?>> tags, object? state)
Microsoft.Extensions.Diagnostics.Testing.Tests (2)
Logging\FakeLoggerTests.cs (2)
76var l = new List<KeyValuePair<string, object?>> 132var l = new List<KeyValuePair<string, object?>>
Microsoft.Extensions.Features (9)
FeatureCollection.cs (7)
100public IEnumerator<KeyValuePair<Type, object>> GetEnumerator() 104foreach (var pair in _features) 113foreach (var pair in _features == null ? _defaults : _defaults.Except(_features, FeatureKeyComparer)) 146private sealed class KeyComparer : IEqualityComparer<KeyValuePair<Type, object>> 148public bool Equals(KeyValuePair<Type, object> x, KeyValuePair<Type, object> y) 153public int GetHashCode(KeyValuePair<Type, object> obj)
IFeatureCollection.cs (1)
12public interface IFeatureCollection : IEnumerable<KeyValuePair<Type, object>>
src\Shared\Debugger\DictionaryItemDebugView.cs (1)
21public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue)
Microsoft.Extensions.FileProviders.Physical (2)
PhysicalFilesWatcher.cs (2)
384foreach (System.Collections.Generic.KeyValuePair<string, ChangeTokenInfo> wildCardEntry in _wildcardTokenLookup) 475foreach (System.Collections.Generic.KeyValuePair<IPollingChangeToken, IPollingChangeToken> item in changeTokens)
Microsoft.Extensions.FileSystemGlobbing (1)
InMemoryDirectoryInfo.cs (1)
114foreach (KeyValuePair<string, List<string>> item in dict)
Microsoft.Extensions.Hosting (4)
HostApplicationBuilder.cs (4)
145List<KeyValuePair<string, string?>>? optionList = null; 148optionList ??= new List<KeyValuePair<string, string?>>(); 153optionList ??= new List<KeyValuePair<string, string?>>(); 158optionList ??= new List<KeyValuePair<string, string?>>();
Microsoft.Extensions.Hosting.Testing (1)
FakeConfigurationSource.cs (1)
11public FakeConfigurationSource(params KeyValuePair<string, string?>[] initialData)
Microsoft.Extensions.Http (9)
Logging\HttpHeadersLogValue.cs (9)
12internal sealed class HttpHeadersLogValue : IReadOnlyList<KeyValuePair<string, object>> 18private List<KeyValuePair<string, object>>? _values; 33private List<KeyValuePair<string, object>> Values 39var values = new List<KeyValuePair<string, object>>(); 41foreach (KeyValuePair<string, IEnumerable<string>> kvp in Headers) 48foreach (KeyValuePair<string, IEnumerable<string>> kvp in ContentHeaders) 61public KeyValuePair<string, object> this[int index] 76public IEnumerator<KeyValuePair<string, object>> GetEnumerator() 95KeyValuePair<string, object> kvp = Values[i];
Microsoft.Extensions.Http.Diagnostics (35)
Http\DownstreamDependencyMetadataManager.cs (1)
174foreach (var dep in dependencyTrieMap)
Latency\Internal\HttpRequestLatencyListener.cs (1)
45foreach (var eventSource in _eventSources)
Logging\Internal\HttpClientLogger.cs (4)
25private readonly ObjectPool<List<KeyValuePair<string, string>>> _headersPool = 26PoolFactory.CreateListPool<KeyValuePair<string, string>>(); 73List<KeyValuePair<string, string>>? requestHeadersBuffer = null; 172List<KeyValuePair<string, string>>? responseHeadersBuffer = null;
Logging\Internal\HttpHeadersReader.cs (5)
41public void ReadRequestHeaders(HttpRequestMessage request, List<KeyValuePair<string, string>>? destination) 55public void ReadResponseHeaders(HttpResponseMessage response, List<KeyValuePair<string, string>>? destination) 73private void ReadHeaders(HttpHeaders headers, FrozenDictionary<string, DataClassification> headersToLog, List<KeyValuePair<string, string>> destination) 85foreach (var header in headers) 97foreach (var kvp in headersToLog)
Logging\Internal\HttpRequestReader.cs (2)
97List<KeyValuePair<string, string>>? requestHeadersBuffer, CancellationToken cancellationToken) 117List<KeyValuePair<string, string>>? responseHeadersBuffer,
Logging\Internal\HttpResponseBodyReader.cs (1)
122foreach (KeyValuePair<string, IEnumerable<string>> header in response.Content.Headers)
Logging\Internal\IHttpHeadersReader.cs (2)
19void ReadRequestHeaders(HttpRequestMessage request, List<KeyValuePair<string, string>>? destination); 26void ReadResponseHeaders(HttpResponseMessage response, List<KeyValuePair<string, string>>? destination);
Logging\Internal\IHttpRequestReader.cs (2)
25List<KeyValuePair<string, string>>? responseHeadersBuffer, 37List<KeyValuePair<string, string>>? requestHeadersBuffer,
Logging\Internal\Log.cs (1)
169foreach (var kvp in request)
Logging\Internal\LoggerMessageStateExtensions.cs (2)
24public static void AddRequestHeaders(this LoggerMessageState state, List<KeyValuePair<string, string>> items, ref int index) 43public static void AddResponseHeaders(this LoggerMessageState state, List<KeyValuePair<string, string>> items, ref int index)
Logging\Internal\LogRecord.cs (2)
46public List<KeyValuePair<string, string>>? RequestHeaders { get; set; } 51public List<KeyValuePair<string, string>>? ResponseHeaders { get; set; }
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
Benchmarks\HeadersReaderBenchmark.cs (1)
16private List<KeyValuePair<string, string>> _outputBuffer = null!;
Microsoft.Extensions.Http.Diagnostics.Tests (53)
Logging\HttpClientLoggerTest.cs (5)
132It.IsAny<List<KeyValuePair<string, string>>>(), 529It.IsAny<List<KeyValuePair<string, string>>>(), 531.Returns((LogRecord a, HttpRequestMessage b, List<KeyValuePair<string, string>> c, CancellationToken d) => 538It.IsAny<List<KeyValuePair<string, string>>>(), 976.Setup(r => r.ReadResponseAsync(It.IsAny<LogRecord>(), It.IsAny<HttpResponseMessage>(), It.IsAny<List<KeyValuePair<string, string>>?>(), It.IsAny<CancellationToken>()))
Logging\HttpClientLoggingExtensionsTest.cs (2)
157var paramToRedact = new KeyValuePair<string, DataClassification>("userId", FakeTaxonomy.PrivateData); 266var paramToRedact = new KeyValuePair<string, DataClassification>("userId", FakeTaxonomy.PrivateData);
Logging\HttpHeadersReaderTest.cs (9)
28var buffer = new List<KeyValuePair<string, string>>(); 66var buffer = new List<KeyValuePair<string, string>>(); 82var requestBuffer = new List<KeyValuePair<string, string>>(); 83var responseBuffer = new List<KeyValuePair<string, string>>(); 149List<KeyValuePair<string, string>> expectedRequest = [new KeyValuePair<string, string>("Header1", "Value.1")]; 150List<KeyValuePair<string, string>> expectedResponse = [new KeyValuePair<string, string>("Header3", "Value.3")]; 160List<KeyValuePair<string, string>> requestBuffer = []; 164List<KeyValuePair<string, string>> responseBuffer = []; 175List<KeyValuePair<string, string>>? responseBuffer = null;
Logging\HttpRequestReaderTest.cs (31)
44var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 45var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 46var header3 = new KeyValuePair<string, string>("Header3", "Value3"); 100var requestHeadersBuffer = new List<KeyValuePair<string, string>>(); 101var responseHeadersBuffer = new List<KeyValuePair<string, string>>(); 157var requestHeadersBuffer = new List<KeyValuePair<string, string>>(); 158var responseHeadersBuffer = new List<KeyValuePair<string, string>>(); 170var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 171var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 227var requestHeadersBuffer = new List<KeyValuePair<string, string>>(); 228var responseHeadersBuffer = new List<KeyValuePair<string, string>>(); 241var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 242var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 302var requestHeadersBuffer = new List<KeyValuePair<string, string>>(); 303var responseHeadersBuffer = new List<KeyValuePair<string, string>>(); 318var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 319var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 362var requestHeadersBuffer = new List<KeyValuePair<string, string>>(); 363var responseHeadersBuffer = new List<KeyValuePair<string, string>>(); 375var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 376var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 432var requestHeadersBuffer = new List<KeyValuePair<string, string>>(); 433var responseHeadersBuffer = new List<KeyValuePair<string, string>>(); 446var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 447var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 499var requestHeadersBuffer = new List<KeyValuePair<string, string>>(); 500var responseHeadersBuffer = new List<KeyValuePair<string, string>>(); 513var header1 = new KeyValuePair<string, string>("Header1", "Value1"); 514var header2 = new KeyValuePair<string, string>("Header2", "Value2"); 567var requestHeadersBuffer = new List<KeyValuePair<string, string>>(); 568var responseHeadersBuffer = new List<KeyValuePair<string, string>>();
Logging\Internal\MockedRequestReader.cs (2)
24List<KeyValuePair<string, string>>? buffer, 29List<KeyValuePair<string, string>>? buffer,
Logging\Internal\TestEnricher.cs (2)
14internal readonly KeyValuePair<string, object?> KvpRequest = new("test key request", "test value"); 15internal readonly KeyValuePair<string, object?> KvpResponse = new("test key response", "test value");
Logging\LoggerMessageStateExtensionsTests.cs (2)
37List<KeyValuePair<string, string>> headers = [new(Header1, "v1"), new(Header2, "v2")]; 52private delegate void AddHeadersDelegate(LoggerMessageState state, List<KeyValuePair<string, string>> items, ref int index);
Microsoft.Extensions.Http.Resilience (4)
Internal\RequestMessageSnapshot.cs (4)
17private readonly List<KeyValuePair<string, IEnumerable<string>>> _headers = []; 18private readonly List<KeyValuePair<string, object?>> _properties = []; 41foreach (var prop in _properties) 51foreach (KeyValuePair<string, IEnumerable<string>> header in _headers)
Microsoft.Extensions.Http.Resilience.Tests (5)
Helpers\OptionsUtilities.cs (1)
34foreach (var propertyDefinition1 in propertiesValuesByName1)
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (1)
369foreach (var tag in context.Tags)
Resilience\HttpResilienceMetricsEnricherTests.cs (3)
19var tags = new List<KeyValuePair<string, object?>>(); 32var tags = new List<KeyValuePair<string, object?>>(); 45var tags = new List<KeyValuePair<string, object?>>();
Microsoft.Extensions.Identity.Core (1)
UserManager.cs (1)
1634foreach (var f in _tokenProviders)
Microsoft.Extensions.Logging (18)
LoggerFactory.cs (2)
126foreach (KeyValuePair<string, Logger> registeredLogger in _loggers) 181foreach (KeyValuePair<string, Logger> existingLogger in _loggers)
LoggerFactoryScopeProvider.cs (16)
63IEnumerable<KeyValuePair<string, string?>> baggage = activity.Baggage; 78private static ActivityBaggageLogScopeWrapper GetOrCreateActivityBaggageLogScopeWrapper(Activity activity, IEnumerable<KeyValuePair<string, string?>> items) 131private sealed class ActivityLogScope : IReadOnlyList<KeyValuePair<string, object?>> 135private readonly KeyValuePair<string, object?>[] _items = new KeyValuePair<string, object?>[MaxItems]; 173public KeyValuePair<string, object?> this[int index] 209public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 223private sealed class ActivityBaggageLogScopeWrapper : IEnumerable<KeyValuePair<string, object?>> 225private readonly IEnumerable<KeyValuePair<string, string?>> _items; 229public ActivityBaggageLogScopeWrapper(IEnumerable<KeyValuePair<string, string?>> items) 234public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() => new BaggageEnumerator(_items.GetEnumerator()); 242IEnumerator<KeyValuePair<string, string?>> enumerator = _items.GetEnumerator(); 267private struct BaggageEnumerator : IEnumerator<KeyValuePair<string, object?>> 269private readonly IEnumerator<KeyValuePair<string, string?>> _enumerator; 271public BaggageEnumerator(IEnumerator<KeyValuePair<string, string?>> enumerator) 276public KeyValuePair<string, object?> Current => new KeyValuePair<string, object?>(_enumerator.Current.Key, _enumerator.Current.Value);
Microsoft.Extensions.Logging.Abstractions (28)
BufferedLogRecord.cs (1)
68public virtual IReadOnlyList<KeyValuePair<string, object?>> Attributes => [];
FormattedLogValues.cs (3)
16internal readonly struct FormattedLogValues : IReadOnlyList<KeyValuePair<string, object?>> 60public KeyValuePair<string, object?> this[int index] 91public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
LoggerMessage.cs (21)
466private readonly struct LogValues : IReadOnlyList<KeyValuePair<string, object?>> 477public KeyValuePair<string, object?> this[int index] 491public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 504private readonly struct LogValues<T0> : IReadOnlyList<KeyValuePair<string, object?>> 517public KeyValuePair<string, object?> this[int index] 535public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 552private readonly struct LogValues<T0, T1> : IReadOnlyList<KeyValuePair<string, object?>> 567public KeyValuePair<string, object?> this[int index] 587public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 603private readonly struct LogValues<T0, T1, T2> : IReadOnlyList<KeyValuePair<string, object?>> 614public KeyValuePair<string, object?> this[int index] 644public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 658private readonly struct LogValues<T0, T1, T2, T3> : IReadOnlyList<KeyValuePair<string, object?>> 670public KeyValuePair<string, object?> this[int index] 705public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 719private readonly struct LogValues<T0, T1, T2, T3, T4> : IReadOnlyList<KeyValuePair<string, object?>> 732public KeyValuePair<string, object?> this[int index] 770public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 784private readonly struct LogValues<T0, T1, T2, T3, T4, T5> : IReadOnlyList<KeyValuePair<string, object?>> 798public KeyValuePair<string, object?> this[int index] 839public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
LogValuesFormatter.cs (3)
221public KeyValuePair<string, object?> GetValue(object?[] values, int index) 236public IEnumerable<KeyValuePair<string, object?>> GetValues(object[] values) 238var valueArray = new KeyValuePair<string, object?>[values.Length + 1];
Microsoft.Extensions.Logging.Configuration (1)
LoggerFilterConfigureOptions.cs (1)
57foreach (System.Collections.Generic.KeyValuePair<string, string?> section in configurationSection.AsEnumerable(true))
Microsoft.Extensions.Logging.Console (8)
ConsoleLoggerProvider.cs (2)
145foreach (KeyValuePair<string, ConsoleLogger> logger in _loggers) 215foreach (System.Collections.Generic.KeyValuePair<string, ConsoleLogger> logger in _loggers)
JsonConsoleFormatter.cs (6)
52logEntry.State != null, logEntry.State?.ToString(), logEntry.State as IReadOnlyList<KeyValuePair<string, object?>>, stamp); 57string category, int eventId, string? exception, bool hasState, string? stateMessage, IReadOnlyList<KeyValuePair<string, object?>>? stateProperties, 87foreach (KeyValuePair<string, object?> item in stateProperties) 147if (scope is IEnumerable<KeyValuePair<string, object?>> scopeItems) 151foreach (KeyValuePair<string, object?> item in scopeItems) 166private static void WriteItem(Utf8JsonWriter writer, KeyValuePair<string, object?> item)
Microsoft.Extensions.Logging.EventLog (2)
EventLogLogger.cs (2)
100if (scope is IEnumerable<KeyValuePair<string, object>> properties) 102foreach (KeyValuePair<string, object> pair in properties)
Microsoft.Extensions.Logging.EventSource (16)
EventSourceLogger.cs (12)
115IReadOnlyList<KeyValuePair<string, string?>> arguments = GetProperties(state); 137KeyValuePair<string, string?>[] exceptionInfoData = new[] 147IReadOnlyList<KeyValuePair<string, string?>> arguments = GetProperties(state); 176IReadOnlyList<KeyValuePair<string, string?>> arguments = GetProperties(state); 184IReadOnlyList<KeyValuePair<string, string?>> arguments = GetProperties(state); 240private static KeyValuePair<string, string?>[] GetProperties(object? state) 242if (state is IReadOnlyList<KeyValuePair<string, object?>> keyValuePairs) 244var arguments = new KeyValuePair<string, string?>[keyValuePairs.Count]; 247KeyValuePair<string, object?> keyValuePair = keyValuePairs[i]; 253return Array.Empty<KeyValuePair<string, string?>>(); 256private static string ToJson(IReadOnlyList<KeyValuePair<string, string?>> keyValues) 262foreach (KeyValuePair<string, string?> keyValue in keyValues)
LoggingEventSource.cs (4)
188[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<string, string>))] 198IEnumerable<KeyValuePair<string, string?>> Arguments, 218[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<string, string>))] 221internal void ActivityStart(int ID, int FactoryID, string LoggerName, IEnumerable<KeyValuePair<string, string?>> Arguments)
Microsoft.Extensions.Logging.Generators (3)
LoggerMessageGenerator.Emitter.cs (1)
234foreach (KeyValuePair<string, string> t in lm.TemplateMap)
LoggerMessageGenerator.Parser.cs (2)
193foreach (KeyValuePair<string, TypedConstant> namedArgument in attributeData.NamedArguments) 478foreach (KeyValuePair<string, string> t in lm.TemplateMap)
Microsoft.Extensions.Options.SourceGeneration (3)
Emitter.cs (2)
625foreach (var attributeData in attributesData) 796var prop = propertiesOrderedByKey[i];
Parser.cs (1)
520foreach (var namedArgument in attribute.NamedArguments)
Microsoft.Extensions.Resilience.PerformanceTests (1)
MetricsUtil.cs (1)
31ReadOnlySpan<KeyValuePair<string, object?>> tags,
Microsoft.Extensions.Resilience.Tests (1)
Resilience\ResilienceMetricsEnricherTests.cs (1)
24private List<KeyValuePair<string, object?>> _tags = [];
Microsoft.Extensions.SecretManager.Tools.Tests (10)
SecretManagerTests.cs (9)
88var secrets = new KeyValuePair<string, string>[] 104foreach (var secret in secrets) 112foreach (var keyValue in secrets) 124foreach (var keyValue in secrets) 133foreach (var secret in secrets) 283var secrets = new KeyValuePair<string, string>[] 291foreach (var secret in secrets) 299foreach (var keyValue in secrets) 312foreach (var keyValue in secrets)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
90foreach (var file in _files)
Microsoft.Extensions.ServiceDiscovery (2)
Http\HttpServiceEndpointResolver.cs (1)
113foreach (var resolver in _resolvers)
ServiceEndpointResolver.cs (1)
122foreach (var resolver in _resolvers)
Microsoft.Extensions.ServiceDiscovery.Dns (3)
Resolver\DnsResolver.Telemetry.cs (3)
37var hostNameTag = KeyValuePair.Create("dns.question.name", (object?)hostName); 38var queryTypeTag = KeyValuePair.Create("dns.question.type", (object?)queryType); 46var errorTypeTag = KeyValuePair.Create("error.type", (object?)error.ToString());
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (9)
tests\Shared\Logging\LogValuesAssert.cs (9)
19IEnumerable<KeyValuePair<string, object>> actualValues) 31IEnumerable<KeyValuePair<string, object>> expectedValues, 32IEnumerable<KeyValuePair<string, object>> actualValues) 39foreach (var expectedPair in expectedValues) 52private static string GetString(IEnumerable<KeyValuePair<string, object>> logValues) 57private sealed class LogValueComparer : IEqualityComparer<KeyValuePair<string, object>> 59public bool Equals(KeyValuePair<string, object> x, KeyValuePair<string, object> y) 64public int GetHashCode(KeyValuePair<string, object> obj)
Microsoft.Extensions.Telemetry (54)
Buffering\StringifyComprarer.cs (4)
9internal sealed class StringifyComprarer : IEqualityComparer<KeyValuePair<string, object?>> 11public bool Equals(KeyValuePair<string, object?> x, KeyValuePair<string, object?> y) 31public int GetHashCode(KeyValuePair<string, object?> obj)
Enrichment\ApplicationLogEnricher.cs (4)
14private readonly KeyValuePair<string, object>[] _tags; 28foreach (var kvp in _tags) 34private static KeyValuePair<string, object>[] Initialize(ApplicationLogEnricherOptions enricherOptions, ApplicationMetadata applicationMetadata) 36var l = new List<KeyValuePair<string, object>>();
Logging\ExtendedLogger.cs (2)
402case IReadOnlyList<KeyValuePair<string, object?>> stateList: 406case IEnumerable<KeyValuePair<string, object?>> stateList:
Logging\ExtendedLogger.EnrichmentTagCollector.cs (2)
14internal sealed class EnrichmentTagCollector(List<KeyValuePair<string, object?>> extraTags) : IEnrichmentTagCollector 17public void AddRange(IEnumerable<KeyValuePair<string, object?>> items) => extraTags.AddRange(items);
Logging\ExtendedLogger.LegacyTagJoiner.cs (7)
15internal sealed class LegacyTagJoiner : IReadOnlyList<KeyValuePair<string, object?>> 17public KeyValuePair<string, object?>[]? StaticTags; 22private readonly List<KeyValuePair<string, object?>> _extraTags = new(TagCapacity); 23private IReadOnlyList<KeyValuePair<string, object?>>? _incomingTags; 43public void SetIncomingTags(IReadOnlyList<KeyValuePair<string, object?>> value) 49public KeyValuePair<string, object?> this[int index] 82public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
Logging\ExtendedLogger.ModernTagJoiner.cs (7)
16internal sealed class ModernTagJoiner : IReadOnlyList<KeyValuePair<string, object?>> 18public KeyValuePair<string, object?>[]? StaticTags; 23private readonly List<KeyValuePair<string, object?>> _extraTags = new(TagCapacity); 24private KeyValuePair<string, object?>[]? _incomingTags; 25private KeyValuePair<string, object?>[]? _redactedTags; 55public KeyValuePair<string, object?> this[int index] 86public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
Logging\ExtendedLoggerFactory.cs (4)
33private readonly KeyValuePair<string, object?>[] _staticTags; 102var tags = new List<KeyValuePair<string, object?>>(); 179foreach (KeyValuePair<string, ExtendedLogger> existingLogger in _loggers) 200foreach (KeyValuePair<string, ExtendedLogger> registeredLogger in _loggers)
Logging\Import\LoggerFactoryScopeProvider.cs (16)
82IEnumerable<KeyValuePair<string, string?>> baggage = activity.Baggage; 97private static ActivityBaggageLogScopeWrapper GetOrCreateActivityBaggageLogScopeWrapper(Activity activity, IEnumerable<KeyValuePair<string, string?>> items) 150private sealed class ActivityLogScope : IReadOnlyList<KeyValuePair<string, object?>> 154private readonly KeyValuePair<string, object?>[] _items = new KeyValuePair<string, object?>[MaxItems]; 189public KeyValuePair<string, object?> this[int index] 225public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 239private sealed class ActivityBaggageLogScopeWrapper : IEnumerable<KeyValuePair<string, object?>> 241private readonly IEnumerable<KeyValuePair<string, string?>> _items; 245public ActivityBaggageLogScopeWrapper(IEnumerable<KeyValuePair<string, string?>> items) 250public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() => 259IEnumerator<KeyValuePair<string, string?>> enumerator = _items.GetEnumerator(); 284private readonly struct BaggageEnumerator : IEnumerator<KeyValuePair<string, object?>> 286private readonly IEnumerator<KeyValuePair<string, string?>> _enumerator; 288public BaggageEnumerator(IEnumerator<KeyValuePair<string, string?>> enumerator) 293public KeyValuePair<string, object?> Current =>
Logging\LoggerConfig.cs (2)
19KeyValuePair<string, object?>[] staticTags, 49public KeyValuePair<string, object?>[] StaticTags { get; }
src\Shared\LogBuffering\SerializedLogRecord.cs (2)
34List<KeyValuePair<string, object?>> attributes, 66public List<KeyValuePair<string, object?>> Attributes { get; }
src\Shared\LogBuffering\SerializedLogRecordFactory.cs (4)
15private static readonly ObjectPool<List<KeyValuePair<string, object?>>> _attributesPool = 16PoolFactory.CreateListPool<KeyValuePair<string, object?>>(); 24IReadOnlyList<KeyValuePair<string, object?>> attributes, 29List<KeyValuePair<string, object?>> serializedAttributes = _attributesPool.Get();
Microsoft.Extensions.Telemetry.Abstractions (11)
Logging\LoggerMessageHelper.cs (2)
98public static string Stringify<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>? enumerable) 109foreach (var kvp in enumerable)
Logging\LoggerMessageState.cs (4)
19private KeyValuePair<string, object?>[] _tags = []; 20private KeyValuePair<string, object?>[] _redactedTags = []; 27public KeyValuePair<string, object?>[] TagArray => _tags; 32public KeyValuePair<string, object?>[] RedactedTagArray => _redactedTags;
Logging\LoggerMessageState.ReadOnlyList.cs (5)
10public sealed partial class LoggerMessageState : IReadOnlyList<KeyValuePair<string, object?>> 13public KeyValuePair<string, object?> this[int index] => _tags[Throw.IfOutOfRange(index, 0, TagsCount)]; 16int IReadOnlyCollection<KeyValuePair<string, object?>>.Count => TagsCount; 19IEnumerator<KeyValuePair<string, object?>> IEnumerable<KeyValuePair<string, object?>>.GetEnumerator()
Microsoft.Extensions.Telemetry.Abstractions.Tests (5)
Logging\LoggerMessageHelperTests.cs (2)
26Assert.Equal("null", LoggerMessageHelper.Stringify((IEnumerable<KeyValuePair<string, string>>?)null)); 41var d2 = new List<KeyValuePair<string?, string?>>
Logging\LoggerMessageStateTests.cs (3)
137var list = (IReadOnlyList<KeyValuePair<string, object?>>)lms; 167var current = (KeyValuePair<string, object?>)m.Current!;
Microsoft.Extensions.Telemetry.PerformanceTests (4)
BenchLogger.cs (4)
39case IReadOnlyList<KeyValuePair<string, object?>> l: 50case IEnumerable<KeyValuePair<string, object?>> enumerable: 52foreach (var e in enumerable) 62private static object? ProcessItem(in KeyValuePair<string, object?> item)
Microsoft.Extensions.Telemetry.Tests (31)
Enrichment\Internals\TestLogEnrichmentTagCollector.cs (2)
12public TestLogEnrichmentTagCollector(IEnumerable<KeyValuePair<string, object>>? input = null) 16foreach (var kvp in input)
Enrichment\Internals\TestMetricEnrichmentTagCollector.cs (2)
12public TestMetricEnrichmentTagCollector(IEnumerable<KeyValuePair<string, object>>? input = null) 16foreach (var kvp in input)
Enrichment\ProcessLogEnricherTests.cs (1)
53var enrichedProperties = new TestLogEnrichmentTagCollector(new List<KeyValuePair<string, object>>());
Logging\ExtendedLoggerTests.cs (15)
849var property = record.StructuredState!.Last(); 885List<KeyValuePair<string, object?>> list = 894IEnumerable<KeyValuePair<string, object?>> enumerable = 895new List<KeyValuePair<string, object?>> 917var property = record.StructuredState!.Last(); 1162private readonly KeyValuePair<string, object?>[] _values; 1164public ForcedEnricher(KeyValuePair<string, object?>[] values) 1171foreach (var kvp in _values) 1180private readonly KeyValuePair<string, object?>[] _values; 1183public FancyEnricher(KeyValuePair<string, object?>[] values, bool objectVersion) 1193var p = (KeyValuePair<string, object>[])(object)_values; 1194foreach (var kvp in p) 1201var a = new KeyValuePair<string, string>[_values.Length]; 1203foreach (var kvp in _values) 1208foreach (var kvp in a)
Sampling\RandomProbabilisticSamplerTests.cs (5)
17private readonly IReadOnlyList<KeyValuePair<string, object?>> _dummyState = []; 18private readonly Func<IReadOnlyList<KeyValuePair<string, object?>>, Exception?, string> _dummyFormatter = (_, _) => string.Empty; 33new LogEntry<IReadOnlyList<KeyValuePair<string, object?>>>( 45var logEntry = new LogEntry<IReadOnlyList<KeyValuePair<string, object?>>>( 63var logEntry = new LogEntry<IReadOnlyList<KeyValuePair<string, object?>>>(
Sampling\SamplingLoggerBuilderExtensionsTests.cs (1)
194configBuilder.AddInMemoryCollection(new List<KeyValuePair<string, string?>>
Sampling\TraceBasedSamplerTests.cs (5)
17private readonly IReadOnlyList<KeyValuePair<string, object?>> _dummyState = []; 18private readonly Func<IReadOnlyList<KeyValuePair<string, object?>>, Exception?, string> _dummyFormatter = (_, _) => string.Empty; 28new LogEntry<IReadOnlyList<KeyValuePair<string, object?>>>( 47new LogEntry<IReadOnlyList<KeyValuePair<string, object?>>>( 68new LogEntry<IReadOnlyList<KeyValuePair<string, object?>>>(
Microsoft.Extensions.Validation.GeneratorTests (2)
ValidationsGeneratorTestBase.cs (2)
391private sealed class HostingListener : IObserver<DiagnosticListener>, IObserver<KeyValuePair<string, object>> 518public void OnNext(KeyValuePair<string, object> value)
Microsoft.Extensions.Validation.Tests (13)
ValidatableParameterInfoTests.cs (9)
33var error = Assert.Single(errors); 58var error = Assert.Single(errors); 101var error = Assert.Single(errors); 124var error = Assert.Single(errors); 165var error = Assert.Single(errors); 209var error = Assert.Single(errors); 236var error = Assert.Single(errors); 262var error = Assert.Single(errors); 285var error = Assert.Single(errors);
ValidatableTypeInfoTests.cs (4)
155var error = Assert.Single(context.ValidationErrors); 404var error = Assert.Single(context.ValidationErrors); 528var error = Assert.Single(context.ValidationErrors); 553var globalError = Assert.Single(context.ValidationErrors);
Microsoft.Extensions.Validation.ValidationsGenerator (2)
Extensions\ISymbolExtensions.cs (1)
23foreach (var namedArgument in displayNameAttribute.NamedArguments)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
206foreach (var namedArgument in attribute.NamedArguments)
Microsoft.Gen.ComplianceReports (1)
Parser.cs (1)
264foreach (var namedArg in attribute.NamedArguments)
Microsoft.Gen.ComplianceReports.Unit.Tests (12)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.Gen.ContextualOptions.Unit.Tests (14)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
SyntaxContextReceiverTests.cs (2)
34foreach (var declaration in typeDeclarations) 72var declaration = typeDeclarations!.Single();
Microsoft.Gen.Logging (3)
Parsing\AttributeProcessors.cs (3)
65foreach (var a in attr.NamedArguments) 134foreach (var a in attr.NamedArguments) 172foreach (var a in attr.NamedArguments)
Microsoft.Gen.Logging.Generated.Tests (9)
LogMethodTests.cs (7)
955private static void AssertLastState(FakeLogCollector collector, params KeyValuePair<string, string?>[] expected) 957var rol = (IReadOnlyList<KeyValuePair<string, string>>)collector.LatestRecord.State!; 959foreach (var kvp in expected) 968var rol = (collector.LatestRecord.State as IReadOnlyList<KeyValuePair<string, string?>>)!; 976var kvp = new KeyValuePair<string, string?>($"p{i}", i.ToString()); 984var state = (IReadOnlyList<KeyValuePair<string, string>>)record.State!; 987var pair = state.Last();
Utils.cs (2)
95public static string? GetValue(this IReadOnlyList<KeyValuePair<string, string>> state, string key) 97foreach (var kvp in state)
Microsoft.Gen.Logging.Unit.Tests (14)
LogParserUtilitiesTests.cs (2)
178.SetupGet<ImmutableArray<KeyValuePair<string, TypedConstant>>>("CommonNamedArguments") 179.Returns(ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty);
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.Gen.MetadataExtractor (4)
src\Generators\Microsoft.Gen.ComplianceReports\Parser.cs (1)
264foreach (var namedArg in attribute.NamedArguments)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (3)
285foreach (var arg in attribute.NamedArguments) 425KeyValuePair<string, TypedConstant> namedArg = default; 608KeyValuePair<string, TypedConstant> namedArgument,
Microsoft.Gen.MetadataExtractor.Unit.Tests (12)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.Gen.Metrics (5)
Emitter.cs (1)
35foreach (var entry in metricClassesDict.OrderBy(static x => x.Key))
MetricFactoryEmitter.cs (1)
31foreach (var entry in metricClassesDict.OrderBy(static x => x.Key))
Parser.cs (3)
285foreach (var arg in attribute.NamedArguments) 425KeyValuePair<string, TypedConstant> namedArg = default; 608KeyValuePair<string, TypedConstant> namedArgument,
Microsoft.Gen.Metrics.Generated.Tests (4)
MetricTests.cs (2)
98var tag = Assert.Single(measurement.Tags); 126var tag = Assert.Single(measurement.Tags);
MetricTests.Ext.cs (2)
81var tag = Assert.Single(measurement.Tags); 108var tag = Assert.Single(measurement.Tags);
Microsoft.Gen.Metrics.Unit.Tests (12)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.Gen.MetricsReports (3)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (3)
285foreach (var arg in attribute.NamedArguments) 425KeyValuePair<string, TypedConstant> namedArg = default; 608KeyValuePair<string, TypedConstant> namedArgument,
Microsoft.Gen.MetricsReports.Unit.Tests (12)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
Microsoft.Interop.ComInterfaceGenerator (2)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
89foreach (var option in options.OrderBy(item => item.Key))
VirtualMethodPointerStubGenerator.cs (1)
299foreach (KeyValuePair<string, TypedConstant> arg in unmanagedCallConvAttribute.NamedArguments)
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\CustomMarshallerAttributeFixer.cs (1)
60foreach (var marshallerInfo in uniqueMarshallersToFix)
LibraryImportGenerator.cs (1)
125foreach (KeyValuePair<string, TypedConstant> arg in unmanagedCallConvAttribute.NamedArguments)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
89foreach (var option in options.OrderBy(item => item.Key))
Microsoft.Interop.SourceGeneration (17)
ManualTypeMarshallingHelper.cs (1)
38foreach (KeyValuePair<MarshalMode, CustomTypeMarshallerData> mode in Modes)
MarshalAsParser.cs (1)
169foreach (KeyValuePair<string, TypedConstant> namedArg in attributeData.NamedArguments)
MarshallingAttributeInfo.cs (1)
143foreach (KeyValuePair<MarshalMode, CustomTypeMarshallerData> mode in Marshallers.Modes)
MarshalUsingAttributeParser.cs (1)
76foreach (KeyValuePair<string, TypedConstant> arg in attributeData.NamedArguments)
ValueEqualityImmutableDictionary.cs (13)
23foreach (var kvp in this) 39foreach (var kvp in Map.ToImmutableArray().Sort()) 50public bool IsReadOnly => ((ICollection<KeyValuePair<T, U>>)Map).IsReadOnly; 51public bool Contains(KeyValuePair<T, U> item) => Map.Contains(item); 53public void CopyTo(KeyValuePair<T, U>[] array, int arrayIndex) => ((ICollection<KeyValuePair<T, U>>)Map).CopyTo(array, arrayIndex); 54public IEnumerator<KeyValuePair<T, U>> GetEnumerator() => ((IEnumerable<KeyValuePair<T, U>>)Map).GetEnumerator(); 56public bool Remove(KeyValuePair<T, U> item) => ((ICollection<KeyValuePair<T, U>>)Map).Remove(item); 60public void Add(KeyValuePair<T, U> item) => ((ICollection<KeyValuePair<T, U>>)Map).Add(item); 61public void Clear() => ((ICollection<KeyValuePair<T, U>>)Map).Clear();
Microsoft.Maui (8)
Debugger\DebuggerDisplayHelpers.cs (3)
35 public static string GetDebugText(ReadOnlySpan<KeyValuePair<string, object?>> values, bool includeNullValues = true) 48 var kvp = values[i]; 113 static KeyValuePair<string, object?> Create(string key, object? value) => new KeyValuePair<string, object?>(key, value);
HotReload\HotReloadHelper.cs (4)
119 static Dictionary<string, List<KeyValuePair<Type, Type>>> replacedHandlers = new(StringComparer.Ordinal); 158 foreach (var vType in vTypes) 171 foreach (var h in views) 177 static void RegisterHandler(KeyValuePair<Type, Type> pair, Type newHandler)
PropertyMapper.cs (1)
171 foreach (var mapper in _mapper)
Microsoft.Maui.Controls (110)
Application\Application.cs (4)
342 internal override void OnParentResourcesChanged(IEnumerable<KeyValuePair<string, object>> values) 351 var changedResources = new List<KeyValuePair<string, object>>(); 352 foreach (KeyValuePair<string, object> c in Resources) 354 foreach (KeyValuePair<string, object> value in values)
BindableObject.cs (5)
131 var original = bpcontext.Values.GetSpecificityAndValue(); 227 var pair = context.Values.GetSpecificityAndValue(); 318 var b_p = context.Bindings.GetSpecificityAndValue(); 612 var specificityAndValue = context.Values.GetSpecificityAndValue(); 706 var kvp = bindings.GetSpecificityAndValue();
DataTemplate.cs (2)
81 foreach (KeyValuePair<BindableProperty, BindingBase> kvp in Bindings) 98 foreach (KeyValuePair<BindableProperty, object> kvp in Values)
DragAndDrop\DataPackage.cs (2)
33 foreach (var property in Properties) 36 foreach (var property in PropertiesInternal)
DragAndDrop\DataPackagePropertySet.cs (1)
43 public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => _propertyBag.GetEnumerator();
DragAndDrop\DataPackagePropertySetView.cs (1)
35 public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => _dataPackagePropertySet.GetEnumerator();
Element\Element.cs (4)
726 internal virtual void OnParentResourcesChanged(IEnumerable<KeyValuePair<string, object>> values) 748 internal void OnResourcesChanged(IEnumerable<KeyValuePair<string, object>> values) 759 foreach (KeyValuePair<string, object> value in values) 762 foreach (KeyValuePair<BindableProperty, (string, SetterSpecificity)> dynR in DynamicResources)
IResourceDictionary.cs (1)
9 public interface IResourceDictionary : IEnumerable<KeyValuePair<string, object>>
ListProxy.cs (1)
100 foreach (KeyValuePair<int, object> kvp in _items)
OrderedDictionary.cs (21)
40 internal sealed class OrderedDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IList<KeyValuePair<TKey, TValue>> 44 readonly ICollection<KeyValuePair<TKey, TValue>> _kvpCollection; 70 public OrderedDictionary(ICollection<KeyValuePair<TKey, TValue>> dictionary) : this(dictionary, EqualityComparer<TKey>.Default) 74 public OrderedDictionary(ICollection<KeyValuePair<TKey, TValue>> dictionary, IEqualityComparer<TKey> equalityComparer) : this(dictionary != null ? dictionary.Count : 0, equalityComparer) 79 foreach (KeyValuePair<TKey, TValue> kvp in dictionary) 105 void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 119 bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 124 void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 148 bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 153 bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 244 public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() 250 int IList<KeyValuePair<TKey, TValue>>.IndexOf(KeyValuePair<TKey, TValue> item) 255 void IList<KeyValuePair<TKey, TValue>>.Insert(int index, KeyValuePair<TKey, TValue> item) 260 KeyValuePair<TKey, TValue> IList<KeyValuePair<TKey, TValue>>.this[int index]
PlatformBindingHelpers.cs (6)
191 public IList<KeyValuePair<BindableProperty, BindingBase>> BindingsBackpack { get; } = new List<KeyValuePair<BindableProperty, BindingBase>>(); 192 public IList<KeyValuePair<BindableProperty, object>> ValuesBackpack { get; } = new List<KeyValuePair<BindableProperty, object>>(); 202 foreach (var kvp in BindingsBackpack) 204 foreach (var kvp in ValuesBackpack)
ResourceDictionary.cs (21)
154 void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item) 156 ((ICollection<KeyValuePair<string, object>>)_innerDictionary).Add(item); 166 bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item) 168 return ((ICollection<KeyValuePair<string, object>>)_innerDictionary).Contains(item) 172 void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 174 ((ICollection<KeyValuePair<string, object>>)_innerDictionary).CopyTo(array, arrayIndex); 183 bool ICollection<KeyValuePair<string, object>>.IsReadOnly 185 get { return ((ICollection<KeyValuePair<string, object>>)_innerDictionary).IsReadOnly; } 188 bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item) 190 return ((ICollection<KeyValuePair<string, object>>)_innerDictionary).Remove(item); 279 public IEnumerator<KeyValuePair<string, object>> GetEnumerator() 284 internal IEnumerable<KeyValuePair<string, object>> MergedResources 293 foreach (var x in r.MergedResources) 299 foreach (var r in _mergedInstance.MergedResources) 301 foreach (var r in _innerDictionary) 377 void OnValuesChanged(params KeyValuePair<string, object>[] values) 386 foreach (var mr in MergedResources)
ResourcesChangedEventArgs.cs (2)
16 public ResourcesChangedEventArgs(IEnumerable<KeyValuePair<string, object>> values) 22 public IEnumerable<KeyValuePair<string, object>> Values { get; private set; }
ResourcesExtensions.cs (3)
9 public static IEnumerable<KeyValuePair<string, object>> GetMergedResources(this IElementDefinition element) 18 foreach (KeyValuePair<string, object> res in ve.Resources.MergedResources) 37 foreach (KeyValuePair<string, object> res in app.SystemResources)
SetterSpecificityList.cs (1)
103 public KeyValuePair<SetterSpecificity, T> GetSpecificityAndValue()
Shell\ShellNavigationManager.cs (1)
328 foreach (var datum in existing)
Shell\ShellNavigationQueryParameters.cs (10)
17 public ShellNavigationQueryParameters(IEnumerable<KeyValuePair<string, object>> collection) 19 foreach (var item in collection) 25 foreach (var item in dictionary) 65 public void Add(KeyValuePair<string, object> item) 77 public bool Contains(KeyValuePair<string, object> item) => _internal.ContainsKey(item.Key); 81 public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 82 => (_internal as ICollection<KeyValuePair<string, object>>)?.CopyTo(array, arrayIndex); 84 public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => _internal.GetEnumerator(); 92 public bool Remove(KeyValuePair<string, object> item) 95 return (_internal as ICollection<KeyValuePair<string, object>>).Remove(item);
Shell\ShellRouteParameters.cs (9)
20 foreach (var item in shellRouteParams._shellNavigationQueryParameters) 30 foreach (var item in this) 45 foreach (var q in query) 55 foreach (var item in query._shellNavigationQueryParameters) 65 foreach (var item in shellNavigationQueryParameterss) 68 foreach (var item in shellNavigationQueryParameterss) 77 foreach (var item in _shellNavigationQueryParameters) 94 foreach (var item in queryStringParameters) 122 public static void Deconstruct(this KeyValuePair<string, object> tuple, out string key, out object value)
Style.cs (4)
67 foreach (var target in (IEnumerable<KeyValuePair<BindableObject, object>>)(object)_targets) 140 foreach (var target in (IEnumerable<KeyValuePair<BindableObject, object>>)(object)_targets)
StyleSheets\Style.cs (3)
18 Dictionary<KeyValuePair<string, string>, object> convertedValues = new Dictionary<KeyValuePair<string, string>, object>(); 68 foreach (var decl in Declarations)
StyleSheets\StyleSheet.cs (1)
108 foreach (var kvp in Styles)
TemplatedItemsList.cs (2)
424 foreach (KeyValuePair<object, TemplatedItemsList<TView, TItem>> kvp in _groupedItems) 715 foreach (KeyValuePair<object, TemplatedItemsList<TView, TItem>> group in _groupedItems)
VisualElement\VisualElement.cs (4)
1539 internal override void OnParentResourcesChanged(IEnumerable<KeyValuePair<string, object>> values) 1551 var changedResources = new List<KeyValuePair<string, object>>(); 1552 foreach (KeyValuePair<string, object> c in Resources) 1554 foreach (KeyValuePair<string, object> value in values)
VisualStateManager.cs (1)
73 var vsgSpecificityValue = context.Values.GetSpecificityAndValue();
Microsoft.Maui.Controls.Build.Tasks (8)
BindablePropertyReferenceExtensions.cs (1)
65 public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> kvp, out TKey key, out TValue value)
CreateObjectVisitor.cs (2)
78 foreach (var prop in node.Properties) 119 foreach (var prop in node.Properties)
ExpandMarkupsVisitor.cs (1)
73 foreach (var kvp in parentElement.Properties)
NodeILExtensions.cs (1)
700 foreach (var kvp in node.NamespaceResolver.GetNamespacesInScope(XmlNamespaceScope.ExcludeXml))
PerformanceProvider.cs (1)
63 foreach (KeyValuePair<string, Statistic> kvp in Statistics.OrderBy(kvp => kvp.Key))
SetPropertiesVisitor.cs (2)
223 foreach (var kvp in parentElement.Properties) 1885 foreach (var kvp in parentContext.Scopes)
Microsoft.Maui.Controls.SourceGen (1)
src\Controls\src\Xaml\XamlNode.cs (1)
216 foreach (var kvp in Properties)
Microsoft.Maui.Controls.Xaml (15)
IDictionaryExtensions.cs (2)
8 IEnumerable<KeyValuePair<TKey, TValue>> collection) 10 foreach (var kvp in collection)
NodeExtensions.cs (1)
14 foreach (var kvp in parentElement.Properties)
PruneIgnoredNodesVisitor.cs (2)
21 foreach (var propertyKvp in node.Properties) 39 foreach (var propertyKvp in node.Properties.ToList())
XamlNode.cs (1)
216 foreach (var kvp in Properties)
XamlParser.cs (9)
45 var attributes = ParseXamlAttributes(reader, out IList<KeyValuePair<string, string>> xmlns); 163 IList<KeyValuePair<string, string>> xmlns; 197 static IList<XmlType> GetTypeArguments(IList<KeyValuePair<XmlName, INode>> attributes) 204 static IList<KeyValuePair<XmlName, INode>> ParseXamlAttributes(XmlReader reader, out IList<KeyValuePair<string, string>> xmlns) 207 var attributes = new List<KeyValuePair<XmlName, INode>>(); 208 xmlns = new List<KeyValuePair<string, string>>(); 287 static IList<string> PrefixesToIgnore(IList<KeyValuePair<string, string>> xmlns) 290 foreach (var kvp in xmlns)
Microsoft.Maui.Essentials (2)
WebAuthenticator\WebAuthenticatorResult.shared.cs (2)
43 foreach (var kvp in properties) 55 foreach (var kvp in properties)
Microsoft.Maui.Graphics (3)
Text\TextAttributes.cs (2)
19 foreach (var entry in first) 22 foreach (var entry in second)
Text\XmlAttributedTextWriter.cs (1)
71 foreach (var entry in run.Attributes)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (3)
src\Graphics\src\Graphics\Platforms\Windows\AsyncPump.cs (3)
91 private readonly BlockingCollection<KeyValuePair<SendOrPostCallback, object>> _mQueue = 92 new BlockingCollection<KeyValuePair<SendOrPostCallback, object>>(); 115 foreach (var workItem in _mQueue.GetConsumingEnumerable())
Microsoft.Maui.Resizetizer (2)
DetectInvalidResourceOutputFilenamesTask.cs (1)
53 foreach (var pair in tempInvalidItems)
GenerateTizenManifest.cs (1)
169 foreach (var image in TizenSplashUpdater.splashDpiMap)
Microsoft.ML.AutoML (7)
SweepableEstimator\SweepableEstimatorPipeline.cs (1)
54foreach (var kv in kvPairs)
SweepableEstimator\SweepablePipeline.cs (2)
31foreach (var kv in _estimators) 53foreach (var kv in kvPairs)
TrainerExtensions\TrainerExtensionUtil.cs (1)
124foreach (var property in additionalProperties)
TransformInference\TransformInference.cs (1)
47foreach (var property in PipelineNode.Properties)
Tuner\AutoZeroTuner.cs (1)
84IEnumerable<KeyValuePair<string, string>> pipelineSchemas = default;
Tuner\EciCfoTuner.cs (1)
55foreach (var k in _defaultParameter)
Microsoft.ML.AutoML.Interactive (1)
NotebookMonitor.cs (1)
49TrialData.Append(new List<KeyValuePair<string, object>>()
Microsoft.ML.AutoML.Tests (5)
TunerTests.cs (4)
42foreach (var kv in tunerCandidates) 250foreach (var kv in tunerCandidates) 305foreach (var kv in tunerCandidates) 353foreach (var kv in tunerCandidates)
UserInputValidationTests.cs (1)
359new List<KeyValuePair<float, bool>>() { new KeyValuePair<float, bool>(1, true) });
Microsoft.ML.CodeGenerator (4)
CodeGenerator\CSharp\TrainerGeneratorBase.cs (2)
56foreach (var kv in node.Properties) 141foreach (var kv in arguments)
Templates\Console\PredictProgram.cs (2)
44foreach(var kv in SampleData){ 65foreach(var kv in SampleData){
Microsoft.ML.Core (48)
CommandLine\CmdParser.cs (7)
352public static IEnumerable<KeyValuePair<string, string>> GetSettingPairs(IHostEnvironment env, object values, object defaults, SettingsFlags flags = SettingsFlags.None) 372public static IEnumerable<KeyValuePair<string, string>> GetSettingPairs(IHostEnvironment env, object values, SettingsFlags flags = SettingsFlags.None) 828private IEnumerable<KeyValuePair<string, string>> GetSettingPairsCore(IHostEnvironment env, ArgumentInfo info, object values, SettingsFlags flags) 1175public List<KeyValuePair<string, object>> Values; // Key=tag. 1495if (!type.IsGenericEx(typeof(KeyValuePair<,>))) 1568var comList = new List<KeyValuePair<string, IComponentFactory>>(); 1699val.Values = new List<KeyValuePair<string, object>>();
Data\AnnotationUtils.cs (3)
178public static KeyValuePair<string, DataViewType> GetSlotNamesPair(int size) 187public static KeyValuePair<string, DataViewType> GetKeyNamesPair(int size) 196public static KeyValuePair<string, DataViewType> GetPair(this DataViewType type, string kind)
Data\ISchemaBindableMapper.cs (1)
55IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles();
Data\ProgressReporter.cs (2)
343public readonly ConcurrentQueue<KeyValuePair<DateTime, ProgressEntry>> PendingCheckpoints; 358PendingCheckpoints = new ConcurrentQueue<KeyValuePair<DateTime, ProgressEntry>>();
Data\Repository.cs (4)
289private Queue<KeyValuePair<string, Stream>> _closed; 307_closed = new Queue<KeyValuePair<string, Stream>>(); 357var kvp = _closed.Dequeue(); 389var kvp = _closed.Dequeue();
Data\RoleMappedSchema.cs (20)
117public KeyValuePair<ColumnRole, string> Bind(string name) 121public static KeyValuePair<ColumnRole, string> CreatePair(ColumnRole role, string name) 164foreach (var kvp in _map) 214private static Dictionary<string, List<DataViewSchema.Column>> MapFromNames(DataViewSchema schema, IEnumerable<KeyValuePair<ColumnRole, string>> roles, bool opt = false) 220foreach (var kvp in roles) 262public IEnumerable<KeyValuePair<ColumnRole, DataViewSchema.Column>> GetColumnRoles() 264foreach (var roleAndList in _map) 274public IEnumerable<KeyValuePair<ColumnRole, string>> GetColumnRoleNames() 276foreach (var roleAndList in _map) 287public IEnumerable<KeyValuePair<ColumnRole, string>> GetColumnRoleNames(ColumnRole role) 314foreach (var kvp in map) 333public RoleMappedSchema(DataViewSchema schema, bool opt = false, params KeyValuePair<ColumnRole, string>[] roles) 348public RoleMappedSchema(DataViewSchema schema, IEnumerable<KeyValuePair<ColumnRole, string>> roles, bool opt = false) 354private static IEnumerable<KeyValuePair<ColumnRole, string>> PredefinedRolesHelper( 356IEnumerable<KeyValuePair<ColumnRole, string>> custom = null) 370foreach (var role in custom) 391IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> custom = null, bool opt = false) 441public RoleMappedData(IDataView data, bool opt = false, params KeyValuePair<RoleMappedSchema.ColumnRole, string>[] roles) 456public RoleMappedData(IDataView data, IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> roles, bool opt = false) 477IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> custom = null, bool opt = false)
Utilities\LruCache.cs (5)
18private readonly Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>> _cache; 19private readonly LinkedList<KeyValuePair<TKey, TValue>> _lru; 35_cache = new Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>>(_size); 36_lru = new LinkedList<KeyValuePair<TKey, TValue>>(); 44LinkedListNode<KeyValuePair<TKey, TValue>> node;
Utilities\ReservoirSampler.cs (1)
196var tmp = _counts.Select((count, i) => new KeyValuePair<int, int>(count, i)).First(kvp => kvp.Key == 0);
Utilities\Tree.cs (5)
119public bool Contains(KeyValuePair<TKey, Tree<TKey, TValue>> item) 128public void Add(KeyValuePair<TKey, Tree<TKey, TValue>> item) 184public bool Remove(KeyValuePair<TKey, Tree<TKey, TValue>> item) 206public IEnumerator<KeyValuePair<TKey, Tree<TKey, TValue>>> GetEnumerator() 216public void CopyTo(KeyValuePair<TKey, Tree<TKey, TValue>>[] array, int arrayIndex)
Microsoft.ML.Core.Tests (6)
UnitTests\TestEntryPoints.cs (2)
2247var kvp = kvps[i]; 2248var list = kvp.Value as IList<KeyValuePair<string, object>>;
UnitTests\TestVBuffer.cs (4)
473foreach (var iv in a.Items()) 740foreach (var iv in dst.Items(all: true)) 768foreach (var iv in b.Items(all: false)) 802foreach (var iv in b.Items(all: false))
Microsoft.ML.CpuMath.UnitTests (1)
UnitTests.cs (1)
992foreach (var item in environmentVariables)
Microsoft.ML.Data (167)
Commands\CrossValidationCommand.cs (3)
62public KeyValuePair<string, string>[] CustomColumns; 78public KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] PreTransforms; 267foreach (var kvp in ImplOptions.Transforms)
Commands\DataCommand.cs (4)
59public KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] Transforms; 134foreach (var transform in ImplOptions.Transforms) 147foreach (var pair in averageMetric) 197foreach (var pair in averageMetric)
Commands\EvaluateCommand.cs (2)
137public KeyValuePair<string, string>[] CustomColumns; 190public KeyValuePair<string, string>[] CustomColumns;
Commands\ScoreCommand.cs (3)
55public KeyValuePair<string, string>[] CustomColumns; 70public KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] PostTransform; 253IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> customColumns,
Commands\ShowSchemaCommand.cs (2)
173foreach (var kvp in names.Items(all: verbose)) 286foreach (var item in value.Items())
Commands\TestCommand.cs (1)
45public KeyValuePair<string, string>[] CustomColumns;
Commands\TrainCommand.cs (5)
60public KeyValuePair<string, string>[] CustomColumns; 513public static IEnumerable<KeyValuePair<ColumnRole, string>> CheckAndGenerateCustomColumns(IExceptionContext ectx, KeyValuePair<string, string>[] customColumnArg) 518return Enumerable.Empty<KeyValuePair<ColumnRole, string>>(); 519foreach (var kindName in customColumnArg)
Commands\TrainTestCommand.cs (1)
57public KeyValuePair<string, string>[] CustomColumns;
Data\RowCursorUtils.cs (1)
438foreach (var kv in src.Items(all: true))
Data\SchemaDefinition.cs (1)
282foreach (var kvp in AnnotationInfos)
DataDebuggerPreview.cs (2)
89public KeyValuePair<string, object>[] Values { get; } 96Values = new KeyValuePair<string, object>[n];
DataLoadSave\Binary\BinaryLoader.cs (1)
2174foreach (var isLiveAndCol in cols)
DataLoadSave\LegacyCompositeDataLoader.cs (7)
39public KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] Transforms; 113params KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] transformArgs) 124KeyValuePair<string, IComponentFactory<IDataView, IDataTransform>>[] transformArgs) 150foreach (var pair in tagData) 177KeyValuePair<string, string>[] tagData, Func<IHostEnvironment, int, IDataView, IDataView> createTransform) 191KeyValuePair<string, string>[] tagData, Func<IHostEnvironment, int, IDataView, IDataView> createTransform) 470var tagData = new List<KeyValuePair<string, string>>();
DataView\DataViewConstructionUtils.cs (1)
814foreach (var kvp in col.Annotations)
DataView\Transposer.cs (1)
553var heap = new Heap<KeyValuePair<int, int>>((p1, p2) => p1.Key > p2.Key || (p1.Key == p2.Key && p1.Value > p2.Value), _rbuff.Length);
DataView\TypedCursor.cs (2)
439foreach (var pair in value.Items(true)) 475foreach (var pair in value.Items(true))
Deprecated\Instances\HeaderSchema.cs (7)
50foreach (var kvp in _collection.GetNonDefaultFeatureNames()) 110foreach (var kvp in items) 124foreach (var kvp in items) 135foreach (var kvp in items) 344protected override IEnumerable<KeyValuePair<int, string>> GetNonDefaultFeatureNames() 351protected abstract IEnumerable<KeyValuePair<int, string>> GetNonDefaultFeatureNames(); 476protected override IEnumerable<KeyValuePair<int, string>> GetNonDefaultFeatureNames()
Deprecated\Vector\VectorUtils.cs (2)
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);
Dirty\PredictorInterfaces.cs (1)
113IList<KeyValuePair<string, object>> GetSummaryInKeyValuePairs(RoleMappedSchema schema);
EntryPoints\EntryPointNode.cs (13)
355foreach (var kvp in subGraphRunContext._vars) 495foreach (var pair in inputs) 513foreach (var pair in outputs) 605foreach (var kvp in inputMap) 622private void CheckAndSetInputValue(KeyValuePair<string, JToken> pair) 682private void CheckAndMarkOutputValue(KeyValuePair<string, JToken> pair) 706foreach (var kvp in _inputMap) 718foreach (var kvp in _outputMap) 738foreach (var kvp in _inputMap) 749foreach (var kvp in _outputMap) 758foreach (var kvp in toModify) 800foreach (var pair in _inputBindingMap) 819foreach (var pair in _outputHelper.ExtractValues(output))
EntryPoints\InputBase.cs (1)
64Func<IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>>> getCustom = null,
EntryPoints\InputBuilder.cs (4)
503foreach (var pair in settings) 564foreach (var pair in settings) 594foreach (var pair in jDict) 716public IEnumerable<KeyValuePair<string, object>> ExtractValues(object output)
EntryPoints\PredictorModelImpl.cs (2)
23private readonly KeyValuePair<RoleMappedSchema.ColumnRole, string>[] _roleMappings; 60private PredictorModelImpl(TransformModel transformModel, IPredictor predictor, KeyValuePair<RoleMappedSchema.ColumnRole, string>[] roleMappings)
Evaluators\BinaryClassifierEvaluator.cs (1)
1340private protected override IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRolesCore(RoleMappedSchema schema)
Evaluators\ClusteringEvaluator.cs (3)
70var roles = new List<KeyValuePair<RoleMappedSchema.ColumnRole, string>>(); 801private protected override IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRolesCore(RoleMappedSchema schema) 803foreach (var col in base.GetInputColumnRolesCore(schema))
Evaluators\EvaluatorUtils.cs (11)
254public static IEnumerable<KeyValuePair<string, double>> GetMetrics(IDataView metricsView, bool getVectorMetrics = true) 364foreach (var metric in metricVals.Items(all: true)) 484foreach (var kvp in slotNamesCur.Items(true)) 515foreach (var kvp in src.Items()) 539foreach (var kvp in src.Items(true)) 584foreach (var kvp in keyNamesCur.Items(true)) 898foreach (var keyCol in firstDvKeyNoNamesColumns) 915foreach (var keyCol in firstDvKeyNoNamesColumns) 1037foreach (var name in names.Items(all: true)) 1201foreach (var metric in metricVals.Items(all: true)) 1506foreach (var val in count.Items())
Evaluators\MamlEvaluator.cs (3)
114private protected IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles(RoleMappedSchema schema, bool needStrat = false, bool needName = false) 119? Enumerable.Empty<KeyValuePair<RoleMappedSchema.ColumnRole, string>>() 134private protected virtual IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRolesCore(RoleMappedSchema schema)
Evaluators\MultiOutputRegressionEvaluator.cs (1)
757foreach (var metric in metricVals.Items(all: true))
Evaluators\QuantileRegressionEvaluator.cs (3)
102foreach (var i in TotalL2Loss.Items()) 116foreach (var i in TotalL2Loss.Items()) 408foreach (var s in score.Items(all: true))
Evaluators\RankingEvaluator.cs (2)
653protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 893private protected override IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRolesCore(RoleMappedSchema schema)
Model\Pfa\BoundPfaContext.cs (2)
205public string[] DeclareVar(params KeyValuePair<string, JToken>[] vars) 251/// As a complimentary operation to <see cref="DeclareVar(KeyValuePair{string, JToken}[])"/>,
Model\Pfa\PfaContext.cs (9)
32public readonly KeyValuePair<string, JToken>[] Locals; 34public VariableBlock(string type, KeyValuePair<string, JToken>[] locals) 43foreach (var v in Locals) 148public KeyValuePair<string, JToken> CreatePair(string varName, string token) 153public void AddVariables(params KeyValuePair<string, JToken>[] locals) 158var sets = new List<KeyValuePair<string, JToken>>(); 159foreach (var l in locals) 171var lets = new List<KeyValuePair<string, JToken>>(locals.Length - sets.Count); 173foreach (var l in locals)
Prediction\Calibrator.cs (2)
257IList<KeyValuePair<string, object>> ICanGetSummaryInKeyValuePairs.GetSummaryInKeyValuePairs(RoleMappedSchema schema) 684public IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles()
Scorers\FeatureContributionCalculation.cs (1)
388public IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles()
Scorers\GenericScorer.cs (1)
66IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> roles, string suffix, bool user = true)
Scorers\MulticlassClassificationScorer.cs (1)
344public IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles() => _mapper.GetInputColumnRoles();
Scorers\PredictedLabelScorerBase.cs (2)
179protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 195foreach (var pair in base.GetAnnotationTypesCore(iinfo))
Scorers\RowToRowScorerBase.cs (4)
380protected static KeyValuePair<RoleMappedSchema.ColumnRole, string>[] LoadBaseInfo( 394var columns = new KeyValuePair<RoleMappedSchema.ColumnRole, string>[count]; 434protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 441foreach (var pair in Mapper.OutputSchema[iinfo - DerivedColumnCount].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type)))
Scorers\SchemaBindablePredictorWrapper.cs (2)
228public IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles() 548public IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles()
Transforms\ColumnBindingsBase.cs (4)
281foreach (var kvp in inputBindings.GetAnnotationTypes(i)) 509public IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypes(int col) 564protected virtual IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 567return Enumerable.Empty<KeyValuePair<string, DataViewType>>();
Transforms\ColumnConcatenatingTransformer.cs (7)
77public KeyValuePair<string, string>[] Source; 659foreach (var kvp in names.Items()) 807public KeyValuePair<string, JToken> SavePfaInfo(BoundPfaContext ctx) 886var toDeclare = new List<KeyValuePair<string, JToken>>(); 890var toSave = _columns[iinfo].SavePfaInfo(ctx); 921List<KeyValuePair<string, long>> inputList = new List<KeyValuePair<string, long>>();
Transforms\ConversionsExtensionsCatalog.cs (5)
335IEnumerable<KeyValuePair<TInputType, TOutputType>> keyValuePairs, 366IEnumerable<KeyValuePair<TInputType, TOutputType>> keyValuePairs, 399IEnumerable<KeyValuePair<TInputType, TOutputType>> keyValuePairs, 440IEnumerable<KeyValuePair<TInputType, TOutputType[]>> keyValuePairs, 470IEnumerable<KeyValuePair<TInputType, TOutputType[]>> keyValuePairs,
Transforms\GenerateNumberTransform.cs (1)
196protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo)
Transforms\Hashing.cs (7)
1552private sealed class KeyValueComparer<T> : IEqualityComparer<KeyValuePair<int, T>> 1561public bool Equals(KeyValuePair<int, T> x, KeyValuePair<int, T> y) 1566public int GetHashCode(KeyValuePair<int, T> obj) 1689private sealed class ImplVecOrdered<T> : Impl<KeyValuePair<int, T>> 1705protected override ValueMapper<KeyValuePair<int, T>, StringBuilder> GetTextMap() 1711protected override IEqualityComparer<KeyValuePair<int, T>> GetComparer()
Transforms\InvertHashUtils.cs (5)
76public static ValueMapper<KeyValuePair<int, T>, StringBuilder> GetPairMapper<T>(ValueMapper<T, StringBuilder> submap) 81(in KeyValuePair<int, T> pair, ref StringBuilder dst) => 245foreach (var p in _slotToValueSet) 259foreach (var p in _slotToValueSet) 420foreach (var pair in v.Items())
Transforms\KeyToValue.cs (1)
188var toDeclare = new List<KeyValuePair<string, JToken>>();
Transforms\KeyToVector.cs (2)
403foreach (var kvpSlot in namesSlotSrc.Items(all: true)) 636var toDeclare = new List<KeyValuePair<string, JToken>>();
Transforms\MetadataDispatcher.cs (4)
204public IEnumerable<KeyValuePair<string, DataViewType>> GetMetadataTypes(int index) 210return Enumerable.Empty<KeyValuePair<string, DataViewType>>(); 214private IEnumerable<KeyValuePair<string, DataViewType>> GetTypesCore(int index, ColInfo info) 236foreach (var kvp in info.SchemaSrc[info.IndexSrc].Annotations.Schema.Select(c => new KeyValuePair<string, DataViewType>(c.Name, c.Type)))
Transforms\Normalizer.cs (1)
789var toDeclare = new List<KeyValuePair<string, JToken>>();
Transforms\OneToOneTransformerBase.cs (1)
112foreach (var pair in ColMapNewToOld)
Transforms\TrainAndScoreTransformer.cs (2)
39public KeyValuePair<string, string>[] CustomColumns; 134public KeyValuePair<string, string>[] CustomColumns;
Transforms\TransformBase.cs (2)
457protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo) 579var toDeclare = new List<KeyValuePair<string, JToken>>();
Transforms\ValueMapping.cs (1)
166/// <seealso cref="ConversionsExtensionsCatalog.MapValue{TInputType, TOutputType}(TransformsCatalog.ConversionTransforms, string, IEnumerable{KeyValuePair{TInputType, TOutputType}}, string, bool)"/>
Transforms\ValueToKeyMappingTransformer.cs (2)
929var toDeclare = new List<KeyValuePair<string, JToken>>(); 969foreach (var kv in terms.Items())
Transforms\ValueToKeyMappingTransformerImpl.cs (2)
1134foreach (var pair in keyVals.Items(all: true)) 1218foreach (var pair in keyVals.Items(all: true))
Utilities\ColumnCursor.cs (1)
172foreach (var kvp in curValue.Items(all: false))
Utilities\ComponentCreation.cs (1)
48string group = null, string weight = null, IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> custom = null)
Utilities\ModelFileUtils.cs (3)
269public static IEnumerable<KeyValuePair<ColumnRole, string>> LoadRoleMappingsOrNull(IHostEnvironment env, Stream modelStream) 282public static IEnumerable<KeyValuePair<ColumnRole, string>> LoadRoleMappingsOrNull(IHostEnvironment env, RepositoryReader rep) 287var list = new List<KeyValuePair<string, string>>();
Microsoft.ML.DataView (5)
SchemaDebuggerProxy.cs (3)
32public IReadOnlyList<KeyValuePair<string, object>> Values { get; } 39private static List<KeyValuePair<string, object>> BuildValues(DataViewSchema.Annotations annotations) 41var result = new List<KeyValuePair<string, object>>();
VBuffer.cs (2)
342public IEnumerable<KeyValuePair<int, T>> Items(bool all = false) 471private static IEnumerable<KeyValuePair<int, T>> Items(T[] values, int[] indices, int length, int count, bool all)
Microsoft.ML.Ensemble (14)
FeatureSubsetModel.cs (2)
18public KeyValuePair<string, double>[] Metrics { get; set; } 21KeyValuePair<string, double>[] metrics = null)
PipelineEnsemble.cs (3)
103public IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles() 701IList<KeyValuePair<string, object>> ICanGetSummaryInKeyValuePairs.GetSummaryInKeyValuePairs(RoleMappedSchema schema) 705var list = new List<KeyValuePair<string, object>>();
Selector\SubModelSelector\BaseBestPerformanceSelector.cs (2)
88foreach (var kvp in x.Metrics) 101foreach (var kvp in y.Metrics)
Selector\SubModelSelector\BaseSubModelSelector.cs (2)
38foreach (var kvp in model.Metrics) 102private IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetColumnRoles(
Trainer\EnsembleDistributionModelParameters.cs (3)
229var metric = default(KeyValuePair<string, double>); 231foreach (var m in Models[0].Metrics)
Trainer\EnsembleModelParametersBase.cs (2)
74var metrics = new KeyValuePair<string, double>[numMetrics]; 119var metric = model.Metrics[j];
Microsoft.ML.EntryPoints (8)
FeatureCombiner.cs (3)
28internal IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetRoles() 60var concatNames = new List<KeyValuePair<string, string>>(); 152private static List<KeyToVectorMappingEstimator.ColumnOptions> ConvertFeatures(IEnumerable<DataViewSchema.Column> feats, HashSet<string> featNames, List<KeyValuePair<string, string>> concatNames, IChannel ch,
JsonUtils\ExecuteGraphCommand.cs (2)
69foreach (var kvp in jInputs) 87foreach (var kvp in jOutputs)
JsonUtils\JsonManifestUtils.cs (2)
157var inputs = new List<KeyValuePair<Double, JObject>>(); 285var outputs = new List<KeyValuePair<Double, JObject>>();
OneVersusAllMacro.cs (1)
85foreach (var kvp in mapping)
Microsoft.ML.FastTree (35)
Dataset\Dataset.cs (2)
339foreach (KeyValuePair<string, DatasetSkeletonQueryDocData> pair in auxData) 676foreach (KeyValuePair<string, DatasetSkeletonQueryDocData> pair in AuxiliaryData)
Dataset\SparseIntArray.cs (2)
122public DeltaSparseIntArray(int length, IntArrayBits bitsPerItem, IEnumerable<KeyValuePair<int, int>> nonZeroValues) 130foreach (KeyValuePair<int, int> pair in nonZeroValues)
FastTree.cs (21)
1008private static IEnumerable<KeyValuePair<int, int>> NonZeroBinnedValuesForSparse(ReadOnlySpan<double> values, ReadOnlySpan<int> indices, double[] binUpperBounds) 1012var result = new List<KeyValuePair<int, int>>(); 1681foreach (var kv in temp.Items()) 1955var kvEnums = new IEnumerator<KeyValuePair<int, int>>[features.Count]; 1994var kvp = kvEnum.Current; 2377private List<KeyValuePair<int, double>> _sparse; 2417_sparse = new List<KeyValuePair<int, double>>(_nonZeroElements); 2469foreach (var kvp in _sparse) 2484foreach (var kvp in _sparse) 2552public IEnumerable<KeyValuePair<int, int>> Binned(double[] binUpperBounds, int length) 2574foreach (var kvp in _sparse) 2586foreach (var kvp in _sparse) 2665var s = sp[last++]; 3139foreach (var pair in ((ICanGetSummaryInKeyValuePairs)this).GetSummaryInKeyValuePairs(schema)) 3146private IEnumerable<KeyValuePair<string, double>> GetSortedFeatureGains(RoleMappedSchema schema) 3155foreach (var pair in ordered) 3165IList<KeyValuePair<string, object>> ICanGetSummaryInKeyValuePairs.GetSummaryInKeyValuePairs(RoleMappedSchema schema) 3167List<KeyValuePair<string, object>> results = new List<KeyValuePair<string, object>>(); 3170foreach (var pair in ordered) 3250foreach (var pair in gainMap)
GamModelParameters.cs (3)
186foreach (KeyValuePair<int, int> kvp in _inputFeatureToShapeFunctionMap) 771public KeyValuePair<string, double>[] Metrics { get; } 773public MetricsInfo(long version, KeyValuePair<string, double>[] metrics)
Training\EnsembleCompression\LassoBasedEnsembleCompressor.cs (4)
95List<KeyValuePair<short, int>> labelFreqList = new List<KeyValuePair<short, int>>(); 100labelFreqList.Sort(delegate (KeyValuePair<short, int> c1, KeyValuePair<short, int> c2)
TreeEnsemble\InternalTreeEnsemble.cs (1)
333foreach (var pair in sortedByGain)
TreeEnsembleFeaturizationTransformer.cs (1)
64var roles = new List<KeyValuePair<RoleMappedSchema.ColumnRole, string>>();
TreeEnsembleFeaturizer.cs (1)
357public IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles()
Microsoft.ML.GenAI.Core (1)
Extension\ModuleExtension.cs (1)
213IEnumerable<KeyValuePair<string, int>> numberOfLayerToBePlaced)
Microsoft.ML.InternalCodeAnalyzer (1)
ContractsCheckNameofFixProvider.cs (1)
152var shortPair = attr.NamedArguments.FirstOrDefault(p => p.Key == "ShortName");
Microsoft.ML.KMeansClustering (1)
KMeansModelParameters.cs (1)
200foreach (var pair in _centroids[i].Items())
Microsoft.ML.LightGbm (2)
LightGbmTrainerBase.cs (1)
500foreach (var pair in otherParams)
WrappedLightGbmInterface.cs (1)
255foreach (var keyVal in parameters)
Microsoft.ML.OnnxTransformer (1)
OnnxUtils.cs (1)
303foreach (var pair in nodeMetadata)
Microsoft.ML.OnnxTransformerTest (2)
OnnxTransformTests.cs (2)
854foreach (var pair in input.Input) 869foreach (var pair in dataPoints[i].Input)
Microsoft.ML.PCA (1)
PcaTrainer.cs (1)
568foreach (var value in _mean.Items(all: true))
Microsoft.ML.Predictor.Tests (8)
CmdLine\CmdLine.cs (6)
190public KeyValuePair<string, int>[] tagMulti; 208public KeyValuePair<string, IComponentFactory<IDataSaver>>[] subTaggedArray = null; 245private static void AppendSubTaggedArray<T>(StringBuilder sb, KeyValuePair<string, IComponentFactory<T>>[] pairs) 249foreach (var pair in pairs) 272private static void AppendTaggedArray<T>(StringBuilder sb, KeyValuePair<string, T>[] arr) 278foreach (KeyValuePair<string, T> pair in arr)
CompareBaselines.cs (2)
86foreach (var kvp in names2) 109foreach (var kvp in names2)
Microsoft.ML.Recommender (3)
MatrixFactorizationPredictor.cs (2)
373public IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles() 471var roles = new List<KeyValuePair<RoleMappedSchema.ColumnRole, string>>();
MatrixFactorizationTrainer.cs (1)
529var roles = new List<KeyValuePair<RoleMappedSchema.ColumnRole, string>>();
Microsoft.ML.ResultProcessor (14)
ResultProcessor.cs (14)
99foreach (KeyValuePair<string, string> setting in result.Settings) 117foreach (KeyValuePair<string, ResultMetric> resultEntity in result.Results) 294foreach (KeyValuePair<string, string> entity in Settings) 342public KeyValuePair<string, string>[] ResultFilesWithTags; 909var thisFoldResults = AddFoldResults(foldLines); 930foreach (var kvp in foldResults) 933foreach (var kvp1 in kvp.Value) 945foreach (var metricValues in metricToFoldValuesDict) 961protected static KeyValuePair<int, Dictionary<string, float>> AddFoldResults(IList<string> lines) 1067List<KeyValuePair<string, string>> srcFiles = new List<KeyValuePair<string, string>>(); 1075foreach (var taggedPattern in cmd.ResultFilesWithTags) 1085foreach (var fileWithTag in srcFiles) 1154foreach (var kvp in result.PerFoldResults)
Microsoft.ML.Samples (5)
Dynamic\NgramExtraction.cs (1)
77foreach (var item in featureRow.Items())
Dynamic\Transforms\Text\ProduceHashedNgrams.cs (1)
84foreach (var item in featureRow.Items())
Dynamic\Transforms\Text\ProduceHashedWordBags.cs (1)
85foreach (var item in featureRow.Items())
Dynamic\Transforms\Text\ProduceNgrams.cs (1)
91foreach (var item in featureRow.Items())
Dynamic\Transforms\Text\ProduceWordBags.cs (1)
91foreach (var item in featureRow.Items())
Microsoft.ML.SearchSpace (39)
Option\NestOption.cs (14)
53foreach (var kv in this.OrderBy(kv => kv.Key)) 86public int Count => ((ICollection<KeyValuePair<string, OptionBase>>)_options).Count; 89public bool IsReadOnly => ((ICollection<KeyValuePair<string, OptionBase>>)_options).IsReadOnly; 98public void Add(KeyValuePair<string, OptionBase> item) 100((ICollection<KeyValuePair<string, OptionBase>>)_options).Add(item); 106((ICollection<KeyValuePair<string, OptionBase>>)_options).Clear(); 110public bool Contains(KeyValuePair<string, OptionBase> item) 112return ((ICollection<KeyValuePair<string, OptionBase>>)_options).Contains(item); 122public void CopyTo(KeyValuePair<string, OptionBase>[] array, int arrayIndex) 124((ICollection<KeyValuePair<string, OptionBase>>)_options).CopyTo(array, arrayIndex); 128public IEnumerator<KeyValuePair<string, OptionBase>> GetEnumerator() 130return ((IEnumerable<KeyValuePair<string, OptionBase>>)_options).GetEnumerator(); 140public bool Remove(KeyValuePair<string, OptionBase> item) 142return ((ICollection<KeyValuePair<string, OptionBase>>)_options).Remove(item);
Parameter.cs (8)
219public static Parameter CreateNestedParameter(params KeyValuePair<string, Parameter>[] parameters) 222foreach (var param in parameters) 324public void Add(KeyValuePair<string, Parameter> item) 331public bool Contains(KeyValuePair<string, Parameter> item) 338public bool Remove(KeyValuePair<string, Parameter> item) 345IEnumerator<KeyValuePair<string, Parameter>> IEnumerable<KeyValuePair<string, Parameter>>.GetEnumerator() 364public void CopyTo(KeyValuePair<string, Parameter>[] array, int arrayIndex)
SearchSpace.cs (17)
36internal SearchSpace(params KeyValuePair<string, OptionBase>[] options) 42internal SearchSpace(IEnumerable<KeyValuePair<string, OptionBase>> options) 89public int Count => ((ICollection<KeyValuePair<string, OptionBase>>)_options).Count; 92public bool IsReadOnly => ((ICollection<KeyValuePair<string, OptionBase>>)_options).IsReadOnly; 185foreach (var kv in propertyOptions.Concat(fieldOptions)) 335public void Add(KeyValuePair<string, OptionBase> item) 337((ICollection<KeyValuePair<string, OptionBase>>)_options).Add(item); 343((ICollection<KeyValuePair<string, OptionBase>>)_options).Clear(); 347public bool Contains(KeyValuePair<string, OptionBase> item) 349return ((ICollection<KeyValuePair<string, OptionBase>>)_options).Contains(item); 353public void CopyTo(KeyValuePair<string, OptionBase>[] array, int arrayIndex) 355((ICollection<KeyValuePair<string, OptionBase>>)_options).CopyTo(array, arrayIndex); 359public bool Remove(KeyValuePair<string, OptionBase> item) 361return ((ICollection<KeyValuePair<string, OptionBase>>)_options).Remove(item); 365public IEnumerator<KeyValuePair<string, OptionBase>> GetEnumerator() 367return ((IEnumerable<KeyValuePair<string, OptionBase>>)_options).GetEnumerator(); 391foreach (var kv in left.Concat(right))
Microsoft.ML.StandardTrainers (28)
FactorizationMachine\FactorizationMachineTrainer.cs (1)
593var roles = new List<KeyValuePair<RoleMappedSchema.ColumnRole, string>>();
FactorizationMachine\FieldAwareFactorizationMachineModelParameters.cs (1)
423var roles = new List<KeyValuePair<RoleMappedSchema.ColumnRole, string>>();
FactorizationMachine\FieldAwareFactorizationMachineUtils.cs (2)
36foreach (var pair in featureBuffer.Items()) 151public IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles()
Standard\LinearModelParameters.cs (6)
536IList<KeyValuePair<string, object>> ICanGetSummaryInKeyValuePairs.GetSummaryInKeyValuePairs(RoleMappedSchema schema) 541List<KeyValuePair<string, object>> results = new List<KeyValuePair<string, object>>(); 681IList<KeyValuePair<string, object>> ICanGetSummaryInKeyValuePairs.GetSummaryInKeyValuePairs(RoleMappedSchema schema) 686List<KeyValuePair<string, object>> results = new List<KeyValuePair<string, object>>();
Standard\LinearPredictorUtils.cs (8)
196List<KeyValuePair<string, object>> weightValues = new List<KeyValuePair<string, object>>(); 198foreach (var weightValue in weightValues) 207public static IEnumerable<KeyValuePair<string, Single>> GetSortedLinearModelFeatureNamesAndWeights(Single bias, 214var list = new List<KeyValuePair<string, Single>>() { new KeyValuePair<string, Single>("(Bias)", bias) }; 215foreach (var weight in orderedWeights) 229in VBuffer<float> weights, float bias, RoleMappedSchema schema, List<KeyValuePair<string, object>> results) 236foreach (var kvp in pairs)
Standard\LogisticRegression\MulticlassLogisticRegression.cs (6)
832IList<KeyValuePair<string, object>> ICanGetSummaryInKeyValuePairs.GetSummaryInKeyValuePairs(RoleMappedSchema schema) 836List<KeyValuePair<string, object>> results = new List<KeyValuePair<string, object>>(); 851foreach (var weight in orderedWeights) 876foreach (var namedValues in ((ICanGetSummaryInKeyValuePairs)this).GetSummaryInKeyValuePairs(schema)) 1053foreach (var weight in Weights[i].Items(all: true))
Standard\ModelStatistics.cs (2)
170internal virtual void SaveSummaryInKeyValuePairs(DataViewSchema.Column featureColumn, int paramCountCap, List<KeyValuePair<string, object>> resultCollection) 531internal override void SaveSummaryInKeyValuePairs(DataViewSchema.Column featureColumn, int paramCountCap, List<KeyValuePair<string, object>> resultCollection)
Standard\MulticlassClassification\OneVersusAllTrainer.cs (1)
212var roles = new KeyValuePair<CR, string>[1];
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (1)
190var roles = new KeyValuePair<CR, string>[1];
Microsoft.ML.Sweeper (13)
Algorithms\NelderMead.cs (13)
75private readonly List<KeyValuePair<ParameterSet, float[]>> _pendingSweeps; 76private readonly Queue<KeyValuePair<ParameterSet, float[]>> _pendingSweepsNotSubmitted; 77private KeyValuePair<IRunResult, float[]> _lastReflectionResult; 79private KeyValuePair<IRunResult, float[]> _worst; 80private KeyValuePair<IRunResult, float[]> _secondWorst; 81private KeyValuePair<IRunResult, float[]> _best; 121_pendingSweeps = new List<KeyValuePair<ParameterSet, float[]>>(); 122_pendingSweepsNotSubmitted = new Queue<KeyValuePair<ParameterSet, float[]>>(); 352foreach (var result in results) 361private List<KeyValuePair<IRunResult, float[]>> FindRunResult(IEnumerable<IRunResult> previousRuns) 363var result = new List<KeyValuePair<IRunResult, float[]>>(); 364foreach (var sweep in _pendingSweeps) 424var point = _pendingSweepsNotSubmitted.Dequeue();
Microsoft.ML.Sweeper.Tests (2)
TestSweeper.cs (2)
272var results = new List<KeyValuePair<int, IRunResult>>(); 291foreach (var run in results)
Microsoft.ML.TestFramework (1)
DataPipe\TestDataPipeBase.cs (1)
340foreach (var kvp in args.Transforms)
Microsoft.ML.Tests (14)
TextLoaderTests.cs (2)
756foreach (var entry in irisFirstRow) 854foreach (var entry in irisFirstRow)
TrainerEstimators\CalibratorEstimators.cs (1)
137var probability = calibratedData.RowView[i].Values[6];
Transformers\ValueMappingTests.cs (11)
139var keyValuePairs = new List<KeyValuePair<string, string>>() { 364var keyValuePairs = new List<KeyValuePair<string, int>>() { 396var keyValuePairs = new List<KeyValuePair<string, string>>() { 430var keyValuePairs = new List<KeyValuePair<string, uint>>() { 471var keyValuePairs = new List<KeyValuePair<string, ulong>>() { 512var keyValuePairs = new List<KeyValuePair<string, string>>() { 552var keyValuePairs = new List<KeyValuePair<string, string>>() { 594var keyValuePairs = new List<KeyValuePair<string, int>>() { 613var keyValuePairs = new List<KeyValuePair<string, int[]>>() { 633var keyValuePairs = new List<KeyValuePair<ReadOnlyMemory<char>, int>>() { 687var keyValuePairs = new List<KeyValuePair<string, int>>() {
Microsoft.ML.TimeSeries (9)
RootCauseAnalyzer.cs (7)
78foreach (KeyValuePair<string, Object> entry in dimensions) 480List<KeyValuePair<BestDimension, double>> valueMapAsList = valueMap.ToList(); 488foreach (KeyValuePair<BestDimension, double> dimension in valueMapAsList) 535private BestDimension GetBestDimension(BestDimension best, KeyValuePair<BestDimension, double> dimension, Dictionary<BestDimension, Double> valueRatioMap) 724foreach (var item in smallDictionary) 828foreach (var pair in x) 841foreach (KeyValuePair<string, object> pair in obj)
RootCauseLocalizationType.cs (2)
156foreach (KeyValuePair<string, Object> item in Dimension) 229foreach (KeyValuePair<string, Object> item in Dimension)
Microsoft.ML.TimeSeries.Tests (5)
TimeSeriesDirectApi.cs (5)
975foreach (KeyValuePair<string, object> pair in rootCause.Items[0].Dimension) 1004foreach (KeyValuePair<string, object> pair in preparedCauses[0].Items[0].Dimension) 1020foreach (KeyValuePair<string, object> pair in preparedCauses[1].Items[0].Dimension) 1054foreach (KeyValuePair<string, object> pair in rootCause.Items[0].Dimension) 1204foreach (KeyValuePair<string, object> pair in rootCause.Items[0].Dimension)
Microsoft.ML.Tokenizers (22)
Model\BertTokenizer.cs (1)
776foreach (var kvp in options.SpecialTokens)
Model\BPETokenizer.cs (1)
342foreach (KeyValuePair<StringSpanOrdinalKey, int> kvp in _vocab)
Model\EnglishRobertaTokenizer.cs (1)
240foreach (var item in _vocab)
Model\SentencePieceBaseModel.cs (1)
44foreach (var item in specialTokens)
Model\SentencePieceBpeModel.cs (1)
52foreach (var item in _vocab)
Model\TiktokenTokenizer.cs (4)
141foreach (KeyValuePair<string, int> specialToken in specialTokens) 1231foreach (var extraSpecialToken in extraSpecialTokens) 1391foreach (var extraSpecialToken in extraSpecialTokens) 1431foreach (var extraSpecialToken in extraSpecialTokens)
Normalizer\SentencePieceNormalizer.cs (2)
209foreach (var kvp in SpecialTokens!) 244foreach (var kvp in SpecialTokens!)
Utils\DoubleArrayTrie.cs (1)
744foreach (KeyValuePair<string, int> pair in dictionary)
Utils\LruCache.cs (7)
17private readonly Dictionary<StringSpanOrdinalKey, LinkedListNode<KeyValuePair<string, TValue>>> _cache = new(); 18private readonly LinkedList<KeyValuePair<string, TValue>> _lruList = new(); 51if (_cache.TryGetValue(new StringSpanOrdinalKey(key), out LinkedListNode<KeyValuePair<string, TValue>>? cached)) 78if (_cache.TryGetValue(new StringSpanOrdinalKey(ptr, key.Length), out LinkedListNode<KeyValuePair<string, TValue>>? cached)) 101if (_cache.TryGetValue(new StringSpanOrdinalKey(key), out LinkedListNode<KeyValuePair<string, TValue>>? cached)) 111LinkedListNode<KeyValuePair<string, TValue>>? nodeToEvict = _lruList.Last; 116var node = new LinkedListNode<KeyValuePair<string, TValue>>(new KeyValuePair<string, TValue>(key, value));
Utils\TokenizerExtensions.cs (3)
40foreach (KeyValuePair<TKey, TValue> pair in source) 54foreach (KeyValuePair<TKey, TValue> pair in source) 72foreach (KeyValuePair<int, string> pair in value)
Microsoft.ML.Tokenizers.Tests (4)
DoubleArrayTrieTest.cs (1)
64foreach (var kvp in dict)
LlamaTests.cs (1)
662foreach (var kvp in tokenizer.SpecialTokens)
src\Microsoft.ML.Tokenizers\Utils\DoubleArrayTrie.cs (1)
744foreach (KeyValuePair<string, int> pair in dictionary)
TiktokenTests.cs (1)
126foreach (KeyValuePair<ReadOnlyMemory<byte>, int> kvp in encoder)
Microsoft.ML.TorchSharp (7)
Utils\DefaultDictionary.cs (6)
45public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() 55public void Add(KeyValuePair<TKey, TValue> item) 65public bool Contains(KeyValuePair<TKey, TValue> item) 70public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 72((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 75public bool Remove(KeyValuePair<TKey, TValue> item)
Utils\TorchUtils.cs (1)
21foreach (var kvp in dictionary)
Microsoft.ML.Transforms (40)
CountFeatureSelection.cs (1)
434foreach (var kvp in value.Items())
Dracula\CMCountTable.cs (3)
136foreach (var kvp in dict) 253foreach (var kvp in oldDict) 272foreach (var kvp in _tables[iLabel][iDepth])
Dracula\CountTableTransformer.cs (1)
657foreach (var pair in inputSlotNames.Items(true))
Dracula\DictCountTable.cs (3)
107foreach (var pair in table) 190foreach (var kvp in table.Tables[i]) 215foreach (var pair in src)
Expression\KeyWordTable.cs (2)
99public IEnumerable<KeyValuePair<NormStr, TokKind>> Punctuators 104public IEnumerable<KeyValuePair<NormStr, KeyWordKind>> KeyWords
Expression\LambdaParser.cs (2)
244foreach (var kvp in _kwt.KeyWords) 249foreach (var kvp in _kwt.Punctuators)
KeyToVectorMapping.cs (1)
313foreach (var kvpSlot in namesSlotSrc.Items(all: true))
LearnerFeatureSelection.cs (1)
63public KeyValuePair<string, string>[] CustomColumns;
MissingValueIndicatorTransform.cs (1)
213foreach (var kvp in names.Items(all: true))
OptionalColumnTransform.cs (1)
186protected override IEnumerable<KeyValuePair<string, DataViewType>> GetAnnotationTypesCore(int iinfo)
PermutationFeatureImportance.cs (1)
78foreach (var k in weights.Items(all: true))
SvmLight\SvmLightSaver.cs (1)
162foreach (var pair in features.Items().Where(p => p.Value != 0))
Text\LdaSingleBox.cs (10)
224public List<KeyValuePair<int, float>> GetDocTopicVector(int docID) 228var topicRet = new List<KeyValuePair<int, float>>(); 261public List<KeyValuePair<int, float>> TestDoc(ReadOnlySpan<int> termID, ReadOnlySpan<double> termVal, int termNum, int numBurninIter, bool reset) 286var topicRet = new List<KeyValuePair<int, float>>(); 292public List<KeyValuePair<int, float>> TestDocDense(ReadOnlySpan<double> termVal, int termNum, int numBurninIter, bool reset) 319var topicRet = new List<KeyValuePair<int, float>>(); 335public KeyValuePair<int, int>[] GetModel(int wordId) 339var wordTopicVector = new KeyValuePair<int, int>[length]; 346public KeyValuePair<int, float>[] GetTopicSummary(int topicId) 350var topicSummary = new KeyValuePair<int, float>[length];
Text\LdaTransform.cs (5)
345foreach (KeyValuePair<int, float> p in scores) 362foreach (KeyValuePair<int, float> p in scores) 396KeyValuePair<int, int>[] termTopicVector = _ldaTrainer.GetModel(i); 402foreach (KeyValuePair<int, int> p in termTopicVector) 518List<KeyValuePair<int, float>> retTopics;
Text\NgramTransform.cs (1)
290foreach (var pair in buffers[iinfo].Items())
Text\SentimentAnalyzingTransform.cs (3)
78KeyValuePair<string, string>[] aliased; 118private static IDataView AliasIfNeeded(IHostEnvironment env, IDataView input, string[] colNames, out KeyValuePair<string, string>[] hiddenNames) 137private static IDataView UnaliasIfNeeded(IHostEnvironment env, IDataView input, KeyValuePair<string, string>[] hiddenNames)
Text\StopWordsRemovingTransformer.cs (1)
510foreach (var pair in _colMapNewToOld)
Text\TextFeaturizingEstimator.cs (1)
585var srcTaggedCols = new List<KeyValuePair<string, string>>(2);
Text\WordTokenizing.cs (1)
338var toDeclare = new List<KeyValuePair<string, JToken>>();
Microsoft.NET.StringTools (3)
WeakStringCache.Concurrent.cs (1)
130foreach (KeyValuePair<int, StringWeakHandle> entry in _weakHandlesByHashCode)
WeakStringCache.cs (2)
138foreach (KeyValuePair<int, StringWeakHandle> entry in _weakHandlesByHashCode) 159foreach (KeyValuePair<int, StringWeakHandle> entry in _weakHandlesByHashCode)
Microsoft.NET.StringTools.net35 (3)
WeakStringCache.cs (2)
138foreach (KeyValuePair<int, StringWeakHandle> entry in _weakHandlesByHashCode) 159foreach (KeyValuePair<int, StringWeakHandle> entry in _weakHandlesByHashCode)
WeakStringCache.Locking.cs (1)
90foreach (KeyValuePair<int, StringWeakHandle> entry in _weakHandlesByHashCode)
Microsoft.VisualStudio.LanguageServices (9)
Interop\CleanableWeakComHandleTable.cs (2)
95var pair = cleanUpEnumerator.Current; 207foreach (var keyValuePair in _table)
ProjectSystem\BrokeredService\WorkspaceProject.cs (1)
162foreach (var property in properties)
ProjectSystem\RuleSets\VisualStudioRuleSetManager.RuleSetFile.cs (1)
133foreach (var rule in effectiveRuleset.SpecificDiagnosticOptions)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (4)
50public ConcurrentLruCache(KeyValuePair<K, V>[] array) 53foreach (var kvp in array) 62internal IEnumerable<KeyValuePair<K, V>> TestingEnumerable 68var copy = new KeyValuePair<K, V>[_cache.Count];
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
497foreach (var documentDiagnostics in group)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\ModifierFlagsExtensions.cs (1)
112foreach (var modifierDefinition in s_modifierDefinitions)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
95foreach (var pair in ruleSetSpecificDiagnosticOptions)
Microsoft.VisualStudio.LanguageServices.DevKit (5)
Logging\VSCodeTelemetryLogger.cs (5)
61public void Log(string name, List<KeyValuePair<string, object?>> properties) 82public void LogBlockEnd(int blockId, List<KeyValuePair<string, object?>> properties, CancellationToken cancellationToken) 172foreach (var keyValue in kvp) 198private static void SetProperties(TelemetryEvent telemetryEvent, List<KeyValuePair<string, object?>> properties) 200foreach (var property in properties)
MSBuild (51)
CollectionHelpers.cs (1)
65foreach (var aKvp in a)
CommunicationsUtilities.cs (2)
539foreach (KeyValuePair<string, string> entry in currentEnvironment) 548foreach (KeyValuePair<string, string> entry in newEnvironment)
CopyOnWriteDictionary.cs (14)
76object v = info.GetValue(nameof(_backing), typeof(KeyValuePair<string, V>[]))!; 82_backing = b.AddRange((KeyValuePair<string, V>[])v); 214public void SetItems(IEnumerable<KeyValuePair<string, V>> items) 219public IEnumerable<KeyValuePair<string, V>> Where(Func<KeyValuePair<string, V>, bool> predicate) 256public void Add(KeyValuePair<string, V> item) 272public bool Contains(KeyValuePair<string, V> item) 280public void CopyTo(KeyValuePair<string, V>[] array, int arrayIndex) 288public bool Remove(KeyValuePair<string, V> item) 306IEnumerator<KeyValuePair<string, V>> IEnumerable<KeyValuePair<string, V>>.GetEnumerator() 323return ((IEnumerable<KeyValuePair<string, V>>)this).GetEnumerator(); 374foreach (KeyValuePair<string, V> entry in this) 400KeyValuePair<string, V>[] array = snapshot.ToArray();
LogMessagePacket.cs (1)
28internal LogMessagePacket(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent)
LogMessagePacketBase.cs (2)
311internal LogMessagePacketBase(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent, TargetFinishedTranslator targetFinishedTranslator) 363internal KeyValuePair<int, BuildEventArgs>? NodeBuildEvent
OutOfProcTaskAppDomainWrapperBase.cs (1)
324foreach (KeyValuePair<string, TaskParameter> param in taskParams)
OutOfProcTaskHostNode.cs (8)
65private static IDictionary<string, KeyValuePair<string, string>> s_mismatchedEnvironmentValues; 1031foreach (KeyValuePair<string, KeyValuePair<string, string>> variable in s_mismatchedEnvironmentValues) 1094foreach (KeyValuePair<string, KeyValuePair<string, string>> variable in s_mismatchedEnvironmentValues) 1150s_mismatchedEnvironmentValues = new Dictionary<string, KeyValuePair<string, string>>(StringComparer.OrdinalIgnoreCase); 1152foreach (KeyValuePair<string, string> variable in _savedEnvironment) 1169foreach (KeyValuePair<string, string> variable in environment)
ReadOnlyEmptyDictionary.cs (6)
217public void Add(KeyValuePair<K, V> item) 233public bool Contains(KeyValuePair<K, V> item) 241public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) 248public bool Remove(KeyValuePair<K, V> item) 257public IEnumerator<KeyValuePair<K, V>> GetEnumerator() 259return Enumerable.Empty<KeyValuePair<K, V>>().GetEnumerator();
TaskHostConfiguration.cs (1)
201foreach (KeyValuePair<string, object> parameter in taskParameters)
TaskHostTaskComplete.cs (1)
121foreach (KeyValuePair<string, object> parameter in result.FinalParameterValues)
TaskParameter.cs (13)
445foreach (KeyValuePair<string, string> entry in escapedGenericWrappedMetadata) 894foreach (KeyValuePair<string, string> entry in _customEscapedMetadata) 926foreach (KeyValuePair<string, string> metadatum in _customEscapedMetadata) 988public IEnumerable<KeyValuePair<string, string>> EnumerateMetadata() 1001private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager() 1008var result = new KeyValuePair<string, string>[_customEscapedMetadata.Count]; 1010foreach (var kvp in _customEscapedMetadata) 1012var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 1020private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataLazy() 1027foreach (var kvp in _customEscapedMetadata) 1029var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 1034public void ImportMetadata(IEnumerable<KeyValuePair<string, string>> metadata) 1036foreach (KeyValuePair<string, string> kvp in metadata)
TypeLoader.cs (1)
362foreach (KeyValuePair<string, Type> desiredTypeInAssembly in _publicTypeNameToType)
MSBuildTaskHost (83)
BinaryTranslator.cs (8)
1419foreach (KeyValuePair<string, string> pair in additionalEntries) 1431foreach (KeyValuePair<string, string> pair in dictionary) 1451foreach (KeyValuePair<string, string> pair in dictionary) 1474foreach (KeyValuePair<K, V> pair in dictionary) 1501foreach (KeyValuePair<string, T> pair in dictionary) 1529foreach (KeyValuePair<string, T> pair in dictionary) 1558foreach (KeyValuePair<string, T> pair in dictionary) 1581foreach (KeyValuePair<string, DateTime> kvp in dictionary)
BinaryWriterExtensions.cs (2)
125foreach (KeyValuePair<string, string?> kvp in data.ExtendedMetadata) 136foreach (KeyValuePair<string, TimeSpan> kvp in durations)
BuildExceptionBase.cs (1)
105foreach (var pair in customKeyedSerializedData)
CommunicationsUtilities.cs (2)
539foreach (KeyValuePair<string, string> entry in currentEnvironment) 548foreach (KeyValuePair<string, string> entry in newEnvironment)
CopyOnWriteDictionary.cs (13)
76object v = info.GetValue(nameof(_backing), typeof(KeyValuePair<string, V>[]))!; 82_backing = b.AddRange((KeyValuePair<string, V>[])v); 214public void SetItems(IEnumerable<KeyValuePair<string, V>> items) 219public IEnumerable<KeyValuePair<string, V>> Where(Func<KeyValuePair<string, V>, bool> predicate) 256public void Add(KeyValuePair<string, V> item) 272public bool Contains(KeyValuePair<string, V> item) 280public void CopyTo(KeyValuePair<string, V>[] array, int arrayIndex) 288public bool Remove(KeyValuePair<string, V> item) 312public IEnumerator<KeyValuePair<string, V>> GetEnumerator() 323return ((IEnumerable<KeyValuePair<string, V>>)this).GetEnumerator(); 374foreach (KeyValuePair<string, V> entry in this) 400KeyValuePair<string, V>[] array = snapshot.ToArray();
Immutable\ImmutableDictionary.cs (16)
62public bool Contains(KeyValuePair<K, V> item) 77public IEnumerator<KeyValuePair<K, V>> GetEnumerator() 92void ICollection<KeyValuePair<K, V>>.CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) 95foreach (var item in this) 104foreach (var item in this) 143internal ImmutableDictionary<K, V> SetItems(IEnumerable<KeyValuePair<K, V>> items) 146foreach (KeyValuePair<K, V> item in items) 204internal KeyValuePair<K, V>[] ToArray() 209internal ImmutableDictionary<K, V> AddRange(KeyValuePair<K, V>[] v) 213foreach (var item in v) 267void ICollection<KeyValuePair<K, V>>.Add(KeyValuePair<K, V> item) 272void ICollection<KeyValuePair<K, V>>.Clear() 277bool ICollection<KeyValuePair<K, V>>.Remove(KeyValuePair<K, V> item)
LogMessagePacket.cs (1)
28internal LogMessagePacket(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent)
LogMessagePacketBase.cs (2)
311internal LogMessagePacketBase(KeyValuePair<int, BuildEventArgs>? nodeBuildEvent, TargetFinishedTranslator targetFinishedTranslator) 363internal KeyValuePair<int, BuildEventArgs>? NodeBuildEvent
NativeMethods.cs (6)
1351List<KeyValuePair<int, SafeProcessHandle>> children = GetChildProcessIds(processIdToKill, myStartTime); 1355foreach (KeyValuePair<int, SafeProcessHandle> childProcessInfo in children) 1362foreach (KeyValuePair<int, SafeProcessHandle> childProcessInfo in children) 1445internal static List<KeyValuePair<int, SafeProcessHandle>> GetChildProcessIds(int parentProcessId, DateTime parentStartTime) 1447List<KeyValuePair<int, SafeProcessHandle>> myChildren = new List<KeyValuePair<int, SafeProcessHandle>>();
OutOfProcTaskAppDomainWrapperBase.cs (1)
324foreach (KeyValuePair<string, TaskParameter> param in taskParams)
OutOfProcTaskHostNode.cs (8)
65private static IDictionary<string, KeyValuePair<string, string>> s_mismatchedEnvironmentValues; 1031foreach (KeyValuePair<string, KeyValuePair<string, string>> variable in s_mismatchedEnvironmentValues) 1094foreach (KeyValuePair<string, KeyValuePair<string, string>> variable in s_mismatchedEnvironmentValues) 1150s_mismatchedEnvironmentValues = new Dictionary<string, KeyValuePair<string, string>>(StringComparer.OrdinalIgnoreCase); 1152foreach (KeyValuePair<string, string> variable in _savedEnvironment) 1169foreach (KeyValuePair<string, string> variable in environment)
ReadOnlyEmptyDictionary.cs (7)
217public void Add(KeyValuePair<K, V> item) 233public bool Contains(KeyValuePair<K, V> item) 241public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) 248public bool Remove(KeyValuePair<K, V> item) 257public IEnumerator<KeyValuePair<K, V>> GetEnumerator() 259return Enumerable.Empty<KeyValuePair<K, V>>().GetEnumerator(); 320public interface IReadOnlyDictionary<TKey, TValue> : IReadOnlyCollection<KeyValuePair<TKey, TValue>>
TaskHostConfiguration.cs (1)
201foreach (KeyValuePair<string, object> parameter in taskParameters)
TaskHostTaskComplete.cs (1)
121foreach (KeyValuePair<string, object> parameter in result.FinalParameterValues)
TaskParameter.cs (13)
445foreach (KeyValuePair<string, string> entry in escapedGenericWrappedMetadata) 894foreach (KeyValuePair<string, string> entry in _customEscapedMetadata) 926foreach (KeyValuePair<string, string> metadatum in _customEscapedMetadata) 988public IEnumerable<KeyValuePair<string, string>> EnumerateMetadata() 1001private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager() 1008var result = new KeyValuePair<string, string>[_customEscapedMetadata.Count]; 1010foreach (var kvp in _customEscapedMetadata) 1012var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 1020private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataLazy() 1027foreach (var kvp in _customEscapedMetadata) 1029var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value)); 1034public void ImportMetadata(IEnumerable<KeyValuePair<string, string>> metadata) 1036foreach (KeyValuePair<string, string> kvp in metadata)
TypeLoader.cs (1)
274foreach (KeyValuePair<string, Type> desiredTypeInAssembly in _publicTypeNameToType)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
101[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.KeyValuePair<,>))]
Mvc.Api.Analyzers.Test (1)
DeclaredApiResponseMetadataTest.cs (1)
163protected override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => throw new System.NotImplementedException();
Mvc.RoutingWebSite (1)
Controllers\LinkParserController.cs (1)
49foreach (var kvp in values)
NativeIISSample (1)
Startup.cs (1)
65foreach (var header in context.Request.Headers)
netstandard (1)
netstandard.cs (1)
125[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.KeyValuePair<,>))]
PrepareTests (1)
MinimizeUtil.cs (1)
105foreach (var pair in idToFilePathMap)
PresentationBuildTasks (1)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
132foreach (KeyValuePair<string, string> pair in _namespaceMap)
PresentationCore (43)
MS\Internal\FontCache\FamilyCollection.cs (3)
433foreach (KeyValuePair<XmlLanguage, string> localizedFamilyName in compositeFamily.FamilyNames) 459foreach (KeyValuePair<CultureInfo, string> name in font.FaceNames) 481foreach (KeyValuePair<CultureInfo, string> name in font.FaceNames)
MS\Internal\FontCache\FontFaceLayoutInfo.cs (7)
699public void Add(KeyValuePair<int, ushort> item) 709public bool Contains(KeyValuePair<int, ushort> item) 714public void CopyTo(KeyValuePair<int, ushort>[] array, int arrayIndex) 730foreach (KeyValuePair<int, ushort> pair in this) 744public bool Remove(KeyValuePair<int, ushort> item) 753public IEnumerator<KeyValuePair<int, ushort>> GetEnumerator() 764return ((IEnumerable<KeyValuePair<int, ushort>>)this).GetEnumerator();
MS\Internal\FontFace\PhysicalFontFamily.cs (1)
42foreach (KeyValuePair<CultureInfo, string> pair in dictionary)
System\Windows\Media\CharacterMetricsDictionary.cs (14)
26public IEnumerator<KeyValuePair<int, CharacterMetrics>> GetEnumerator() 83public void Add(KeyValuePair<int, CharacterMetrics> item) 105public bool Contains(KeyValuePair<int, CharacterMetrics> item) 114public void CopyTo(KeyValuePair<int, CharacterMetrics>[] array, int index) 156public bool Remove(KeyValuePair<int, CharacterMetrics> item) 187foreach (KeyValuePair<int, CharacterMetrics> item in this) 203foreach (KeyValuePair<int, CharacterMetrics> item in this) 463foreach (KeyValuePair<int, CharacterMetrics> pair in this) 474foreach (KeyValuePair<int, CharacterMetrics> pair in this) 520private struct Enumerator : SC.IDictionaryEnumerator, IEnumerator<KeyValuePair<int, CharacterMetrics>> 557KeyValuePair<int, CharacterMetrics> entry = GetCurrentEntry(); 563public KeyValuePair<int, CharacterMetrics> Current 571private KeyValuePair<int, CharacterMetrics> GetCurrentEntry() 583KeyValuePair<int, CharacterMetrics> entry = GetCurrentEntry();
System\Windows\Media\CultureSpecificStringDictionary.cs (11)
31public IEnumerator<KeyValuePair<XmlLanguage, string>> GetEnumerator() 80public void Add(KeyValuePair<XmlLanguage, string> item) 97public bool Contains(KeyValuePair<XmlLanguage, string> item) 106public void CopyTo(KeyValuePair<XmlLanguage, string>[] array, int index) 125public bool Remove(KeyValuePair<XmlLanguage, string> item) 156foreach (KeyValuePair<XmlLanguage, string> item in _innerDictionary) 172foreach (KeyValuePair<XmlLanguage, string> item in _innerDictionary) 352protected IEnumerator<KeyValuePair<XmlLanguage, string>> _enumerator; 384private KeyValuePair<XmlLanguage, string> GetCurrentEntry() 387KeyValuePair<XmlLanguage, string> entry = _enumerator.Current; 402KeyValuePair<XmlLanguage, string> entry = GetCurrentEntry();
System\Windows\Media\GlyphTypeface.cs (7)
388foreach (KeyValuePair<CultureInfo, string> pair in adjustedFaceNames) 1792public void Add(KeyValuePair<ushort, double> item) 1802public bool Contains(KeyValuePair<ushort, double> item) 1807public void CopyTo(KeyValuePair<ushort, double>[] array, int arrayIndex) 1837public bool Remove(KeyValuePair<ushort, double> item) 1846public IEnumerator<KeyValuePair<ushort, double>> GetEnumerator() 1858return ((IEnumerable<KeyValuePair<ushort, double>>)this).GetEnumerator();
PresentationFramework (93)
MS\Internal\Annotations\ObservableDictionary.cs (14)
127public IEnumerator<KeyValuePair<string, string>> GetEnumerator() 129return ((IEnumerable<KeyValuePair<string, string>>)_nameValues).GetEnumerator(); 151void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> pair) 153((ICollection<KeyValuePair<string, string>>)_nameValues).Add(pair); 162bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> pair) 164return ((ICollection<KeyValuePair<string, string>>)_nameValues).Contains(pair); 173bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> pair) 175return ((ICollection<KeyValuePair<string, string>>)_nameValues).Remove(pair); 185void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] target, int startIndex) 191((ICollection<KeyValuePair<string, string>>)_nameValues).CopyTo(target, startIndex);
MS\Internal\Annotations\Storage\StoreAnnotationsMap.cs (3)
170foreach (KeyValuePair<Guid, CachedAnnotation> annotKV in _currentAnnotations) 200foreach (KeyValuePair<Guid, CachedAnnotation> annotKV in _currentAnnotations) 216foreach (KeyValuePair<Guid, CachedAnnotation> annotKV in _currentAnnotations)
MS\Internal\Data\AccessorTable.cs (1)
110foreach (KeyValuePair<AccessorTableKey, AccessorInfo> entry in _table)
MS\Internal\Data\CollectionViewGroupInternal.cs (2)
540foreach (KeyValuePair<object, WeakReference> item in _nameToGroupMap) 586foreach (KeyValuePair<object, WeakReference> item in _nameToGroupMap)
MS\Internal\Globalization\BamlTreeMap.cs (1)
490foreach (KeyValuePair<string, ElementLocalizability> pair in _classAttributeTable)
MS\Internal\Globalization\BamlTreeUpdater.cs (4)
45List<KeyValuePair<BamlLocalizableResourceKey, BamlLocalizableResource>> deferredResources = new(); 46foreach (KeyValuePair<BamlLocalizableResourceKey, BamlLocalizableResource> item in dictionaryEnumerator) 61KeyValuePair<BamlLocalizableResourceKey, BamlLocalizableResource> entry = deferredResources[i]; 69foreach (KeyValuePair<BamlLocalizableResourceKey, BamlLocalizableResource> item in dictionaryEnumerator)
MS\Internal\Helper.cs (23)
752List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item); 774List<KeyValuePair<int, object>> itemValues = EnsureItemValues(owner, item); 782KeyValuePair<int, object> keyValue = new KeyValuePair<int, object>(dpIndex, value); 805List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item); 826internal static List<KeyValuePair<int, object>> GetItemValues(DependencyObject owner, object item) 831internal static List<KeyValuePair<int, object>> GetItemValues(DependencyObject owner, object item, 832WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage) 835List<KeyValuePair<int, object>> itemValues = null; 843internal static List<KeyValuePair<int, object>> EnsureItemValues(DependencyObject owner, object item) 845WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage = EnsureItemValueStorage(owner); 846List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item, itemValueStorage); 850itemValues = new List<KeyValuePair<int, object>>(3); // So far the only use of this is to store three values. 858internal static WeakDictionary<object, List<KeyValuePair<int, object>>> EnsureItemValueStorage(DependencyObject owner) 860WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage = ItemValueStorageField.GetValue(owner); 864itemValueStorage = new WeakDictionary<object, List<KeyValuePair<int, object>>>(); 879List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item) ?? new List<KeyValuePair<int, object>>(); 1024private static void ClearItemValueStorageRecursive(WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage, int[] dpIndices) 1028foreach (List<KeyValuePair<int, object>> itemValuesList in itemValueStorage.Values) 1032KeyValuePair<int, object> itemValue = itemValuesList[i]; 1035ClearItemValueStorageRecursive((WeakDictionary<object, List<KeyValuePair<int, object>>>)itemValue.Value, dpIndices); 1519private static readonly UncommonField<WeakDictionary<object, List<KeyValuePair<int, object>>>> ItemValueStorageField = 1520new UncommonField<WeakDictionary<object, List<KeyValuePair<int, object>>>>();
MS\Internal\Ink\ClipboardProcessor.cs (3)
80foreach ( KeyValuePair<InkCanvasClipboardFormat, ClipboardData> pair in _preferredClipboardData ) 185foreach ( KeyValuePair<InkCanvasClipboardFormat, ClipboardData> pair in _preferredClipboardData ) 254foreach ( KeyValuePair<InkCanvasClipboardFormat, ClipboardData> pair in _preferredClipboardData )
MS\Internal\WeakDictionary.cs (7)
265public void Add(KeyValuePair<TKey, TValue> item) 275public bool Contains(KeyValuePair<TKey, TValue> item) 290public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 296foreach (KeyValuePair<TKey, TValue> item in this) 303foreach (KeyValuePair<TKey, TValue> item in this) 319public bool Remove(KeyValuePair<TKey, TValue> item) 332public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (1)
1006else if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(System.Collections.Generic.KeyValuePair<,>))
System\Windows\Annotations\LocatorPart.cs (4)
105foreach (KeyValuePair<string, string> k_v in _nameValues) 140foreach (KeyValuePair<string, string> k_v in _nameValues) 394foreach (KeyValuePair<string, string> k_v in ((ICollection<KeyValuePair<string, string>>)this.NameValuePairs))
System\Windows\Annotations\LocatorPartList.cs (1)
168foreach (KeyValuePair<string, string> pair in part.NameValuePairs)
System\Windows\Annotations\Storage\XmlStreamStore.cs (2)
792foreach (KeyValuePair<Uri, IList<Uri>> item in knownNamespaces) 846foreach (KeyValuePair<Uri, IList<Uri>> item in knownNamespaces)
System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (6)
585KeyValuePair<object, T> pair = _list[i]; 618_list = new List<KeyValuePair<object, T>>(); 645KeyValuePair<object, T> pair = _list[i]; 670foreach(KeyValuePair<object,T> dictionaryEntry in _hashtable) 694foreach(KeyValuePair<object, T> keyValuePair in _list) 726private List<KeyValuePair<object, T>> _list = null;
System\Windows\Controls\DataGrid.cs (1)
6787foreach (KeyValuePair<DataGridColumn, CellAutomationValueHolder> kvp in _editingCellAutomationValueHolders)
System\Windows\Controls\Grid.cs (2)
2865private static int CompareRoundingErrors(KeyValuePair<int, double> x, KeyValuePair<int, double> y)
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (1)
505foreach (KeyValuePair<WeakReferenceKey<StaticResourceExtension>, WeakReference<ResourceDictionary>>
System\Windows\Documents\DocumentSequence.cs (1)
890IEnumerator<KeyValuePair<Object, GetPageAsyncRequest>> ienum = _asyncOps.GetEnumerator();
System\Windows\Documents\FixedDocument.cs (1)
1214IEnumerator<KeyValuePair<Object, GetPageAsyncRequest>> ienum = _asyncOps.GetEnumerator();
System\Windows\Documents\WinRTSpellerInterop.cs (1)
517foreach (KeyValuePair<string, List<string>> items in _customDictionaryFiles)
System\Windows\Markup\Baml2006\Baml2006ReaderFrame.cs (1)
68foreach (KeyValuePair<string, string> pair in _namespaces)
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (2)
308foreach (KeyValuePair<BamlLocalizableResourceKey, BamlLocalizableResource> pair in _dictionary) 388foreach (KeyValuePair<BamlLocalizableResourceKey, BamlLocalizableResource> pair in _dictionary)
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1428foreach (KeyValuePair<string, string> mapping in _uriToPrefix)
System\Windows\Markup\XamlTypeMapper.cs (1)
311foreach (KeyValuePair<string, string> kvp in dict)
System\Windows\Shell\WindowChromeWorker.cs (4)
13using HANDLE_MESSAGE = System.Collections.Generic.KeyValuePair<Standard.WM, Standard.MessageHandler>; 30private readonly List<HANDLE_MESSAGE> _messageTable; 60_messageTable = new List<HANDLE_MESSAGE> 350foreach (var handlePair in _messageTable)
System\Windows\SystemResources.cs (2)
205foreach (var dictionary in _dictionaries) 236foreach (var dictionary in _dictionaries)
System\Windows\VisualStateManager.cs (3)
381foreach (KeyValuePair<TimelineDataToken, Timeline> pair in transitionAnimations) 388foreach (KeyValuePair<TimelineDataToken, Timeline> pair in newStateAnimations) 407foreach (KeyValuePair<TimelineDataToken, Timeline> pair in currentAnimations)
PresentationUI (1)
MS\Internal\Documents\RightsManagementProvider.cs (1)
1539private readonly KeyValuePair<string, string> _noLicCacheKeyValuePair =
ReachFramework (2)
MS\Internal\Printing\MostFrequentlyUsedCache.cs (1)
63foreach(KeyValuePair<K, Entry> pair in this._dictionary)
PrintConfig\PrintSchemaShim.cs (1)
1159foreach (KeyValuePair<TKey, TValue> pair in dictionary)
Roslyn.Compilers.Extension (1)
CompilerPackage.cs (1)
116foreach (var fileAndContents in filesToWrite)
Roslyn.Diagnostics.Analyzers (147)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
406ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments = default)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
37public static readonly IEnumerable<KeyValuePair<byte, string>> ByteSpecialValues = []; 39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAttributeData.cs (3)
15ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) : AttributeData 18private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments = namedArguments.NullToEmpty(); 23protected override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _namedArguments;
Roslyn.Diagnostics.CSharp.Analyzers (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (2)
50foreach (var pair in map) 69KeyValuePair<ValueTuple<SyntaxToken, SyntaxToken>,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (1)
90foreach (var argument in attribute.NamedArguments)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (4)
231ITypeSymbol? type, T value, IEnumerable<KeyValuePair<T, string>> constants, 242ITypeSymbol? type, T value, IEnumerable<KeyValuePair<T, string>> constants, 278private static ExpressionSyntax? GenerateFieldReference<T>(ITypeSymbol? type, T value, IEnumerable<KeyValuePair<T, string>> constants) 281foreach (var constant in constants)
Roslyn.VisualStudio.Next.UnitTests (3)
Services\PerformanceTrackerServiceTests.cs (1)
175foreach (var kv in matrix)
TestUtils.cs (2)
15public static void VerifyAssetStorage<T>(IEnumerable<KeyValuePair<Checksum, T>> items, SolutionAssetCache storage) 17foreach (var kv in items)
RulesetToEditorconfigConverter (1)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
RunTests (2)
AssemblyScheduler.cs (1)
42foreach (var kvp in orderedTypeInfos)
ProcessRunner.cs (1)
197foreach (var pair in environmentVariables)
ScenarioTests.Common.Tests (3)
ScenarioTestTypes.cs (3)
178private readonly BlockingCollection<KeyValuePair<SendOrPostCallback, object>> _queue = 179new BlockingCollection<KeyValuePair<SendOrPostCallback, object>>(); 228KeyValuePair<SendOrPostCallback, object> workItem;
Shared (25)
EmptyCollections\EmptyReadonlyDictionary.cs (12)
27public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => EmptyReadOnlyList<KeyValuePair<TKey, TValue>>.Instance.GetEnumerator(); 32bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 48void ICollection<KeyValuePair<TKey, TValue>>.Clear() 53void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 60void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 61bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => false; 62bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => false;
JsonSchemaExporter\JsonSchemaExporter.cs (4)
101KeyValuePair<string, JsonSchema>? typeDiscriminator = null, 150KeyValuePair<string, JsonSchema>? derivedTypeDiscriminator = null; 240List<KeyValuePair<string, JsonSchema>>? properties = null; 400List<KeyValuePair<string, JsonSchema>>? dictProps = null;
JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (3)
144public List<KeyValuePair<string, JsonSchema>>? Properties 154private List<KeyValuePair<string, JsonSchema>>? _properties; 384foreach (KeyValuePair<string, JsonSchema> property in Properties)
LogBuffering\SerializedLogRecord.cs (2)
34List<KeyValuePair<string, object?>> attributes, 66public List<KeyValuePair<string, object?>> Attributes { get; }
LogBuffering\SerializedLogRecordFactory.cs (4)
15private static readonly ObjectPool<List<KeyValuePair<string, object?>>> _attributesPool = 16PoolFactory.CreateListPool<KeyValuePair<string, object?>>(); 24IReadOnlyList<KeyValuePair<string, object?>> attributes, 29List<KeyValuePair<string, object?>> serializedAttributes = _attributesPool.Get();
Shared.Tests (5)
EmptyCollections\EmptyReadonlyDictionaryTests.cs (2)
52dict.CopyTo(Array.Empty<KeyValuePair<int, string>>(), 0); 58var coll = EmptyReadOnlyDictionary<int, string>.Instance as ICollection<KeyValuePair<int, string>>;
JsonSchemaExporter\TestTypes.cs (3)
1119public IEnumerator<KeyValuePair<string, int>> GetEnumerator() => Enumerable.Repeat(new KeyValuePair<string, int>(nameof(BaseValue), BaseValue), 1).GetEnumerator(); 1156public readonly struct StructDictionary<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> values) 1166public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => _dictionary.GetEnumerator();
SignalRSamples (1)
ConnectionList.cs (1)
40foreach (var item in _connections)
SocialSample (1)
Startup.cs (1)
225foreach (var pair in context.Properties.Items)
SocialWeather (1)
ConnectionList.cs (1)
41foreach (var item in _connections)
Sockets.BindTests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Sockets.FunctionalTests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
25var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Stress.ApiService (2)
Program.cs (2)
151IReadOnlyList<KeyValuePair<string, object?>> eventData = new List<KeyValuePair<string, object?>>()
Stress.TelemetryService (3)
TelemetryStresser.cs (3)
95public static Metric CreateSumMetric(string metricName, DateTime startTime, KeyValuePair<string, string>[]? attributes = null, int? value = null) 114private static NumberDataPoint CreateNumberPoint(DateTime startTime, int value, KeyValuePair<string, string>[]? attributes = null) 124foreach (var attribute in attributes)
System.Collections (101)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
20public DebugViewDictionaryItem(KeyValuePair<TKey, TValue> keyValue)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionaryDebugView.cs (1)
22var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
System\Collections\Generic\OrderedDictionary.cs (47)
35IList<KeyValuePair<TKey, TValue>>, IReadOnlyList<KeyValuePair<TKey, TValue>>, IList 182public OrderedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) : this(collection, null) 199public OrderedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) : 200this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 245bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 297if (value is not KeyValuePair<TKey, TValue> tpair) 299throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 349KeyValuePair<TKey, TValue> IList<KeyValuePair<TKey, TValue>>.this[int index] 356KeyValuePair<TKey, TValue> IReadOnlyList<KeyValuePair<TKey, TValue>>.this[int index] => GetAt(index); 512private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> collection) 516if (collection is KeyValuePair<TKey, TValue>[] array) 518foreach (KeyValuePair<TKey, TValue> pair in array) 525foreach (KeyValuePair<TKey, TValue> pair in collection) 594public KeyValuePair<TKey, TValue> GetAt(int index) 1164IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 1165Count == 0 ? EnumerableHelpers.GetEmptyEnumerator<KeyValuePair<TKey, TValue>>() : 1169IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1175int IList<KeyValuePair<TKey, TValue>>.IndexOf(KeyValuePair<TKey, TValue> item) 1193void IList<KeyValuePair<TKey, TValue>>.Insert(int index, KeyValuePair<TKey, TValue> item) => Insert(index, item.Key, item.Value); 1196void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => Add(item.Key, item.Value); 1199bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 1209void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 1226bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => 1305if (array is KeyValuePair<TKey, TValue>[] tarray) 1307((ICollection<KeyValuePair<TKey, TValue>>)this).CopyTo(tarray, index); 1318foreach (KeyValuePair<TKey, TValue> pair in this) 1333if (value is not KeyValuePair<TKey, TValue> pair) 1335throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 1344value is KeyValuePair<TKey, TValue> pair && 1351if (value is KeyValuePair<TKey, TValue> pair) 1353return ((IList<KeyValuePair<TKey, TValue>>)this).IndexOf(pair); 1362if (value is not KeyValuePair<TKey, TValue> pair) 1364throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 1373if (value is KeyValuePair<TKey, TValue> pair) 1375((ICollection<KeyValuePair<TKey, TValue>>)this).Remove(pair); 1394public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1414public KeyValuePair<TKey, TValue> Current { get; private set; }
System\Collections\Generic\SortedDictionary.cs (34)
21private readonly TreeSet<KeyValuePair<TKey, TValue>> _set; // Do not rename (binary serialization) 41_set = new TreeSet<KeyValuePair<TKey, TValue>>(sortedDictionary._set, keyValuePairComparer); 45_set = new TreeSet<KeyValuePair<TKey, TValue>>(keyValuePairComparer); 47foreach (KeyValuePair<TKey, TValue> pair in dictionary) 56_set = new TreeSet<KeyValuePair<TKey, TValue>>(new KeyValuePairComparer(comparer)); 59void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 64bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 66TreeSet<KeyValuePair<TKey, TValue>>.Node? node = _set.FindNode(keyValuePair); 82bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 84TreeSet<KeyValuePair<TKey, TValue>>.Node? node = _set.FindNode(keyValuePair); 98bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 112TreeSet<KeyValuePair<TKey, TValue>>.Node? node = _set.FindNode(new KeyValuePair<TKey, TValue>(key, default(TValue)!)); 124TreeSet<KeyValuePair<TKey, TValue>>.Node? node = _set.FindNode(new KeyValuePair<TKey, TValue>(key, default(TValue)!)); 213_set.InOrderTreeWalk(delegate (TreeSet<KeyValuePair<TKey, TValue>>.Node node) 226_set.InOrderTreeWalk(delegate (TreeSet<KeyValuePair<TKey, TValue>>.Node node) 239public void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 246IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 247Count == 0 ? EnumerableHelpers.GetEmptyEnumerator<KeyValuePair<TKey, TValue>>() : 261TreeSet<KeyValuePair<TKey, TValue>>.Node? node = _set.FindNode(new KeyValuePair<TKey, TValue>(key, default(TValue)!)); 402IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 404public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 406private TreeSet<KeyValuePair<TKey, TValue>>.Enumerator _treeEnum; 428public KeyValuePair<TKey, TValue> Current 547_dictionary._set.InOrderTreeWalk(delegate (TreeSet<KeyValuePair<TKey, TValue>>.Node node) { array[index++] = node.Item.Key; return true; }); 580_dictionary._set.InOrderTreeWalk(delegate (TreeSet<KeyValuePair<TKey, TValue>>.Node node) { objects[index++] = node.Item.Key; return true; }); 708_dictionary._set.InOrderTreeWalk(delegate (TreeSet<KeyValuePair<TKey, TValue>>.Node node) { array[index++] = node.Item.Value; return true; }); 741_dictionary._set.InOrderTreeWalk(delegate (TreeSet<KeyValuePair<TKey, TValue>>.Node node) { objects[index++] = node.Item.Value; return true; }); 838public sealed class KeyValuePairComparer : Comparer<KeyValuePair<TKey, TValue>> 847public override int Compare(KeyValuePair<TKey, TValue> x, KeyValuePair<TKey, TValue> y)
System\Collections\Generic\SortedList.cs (18)
189void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 194bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 204bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 365bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 431void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 447KeyValuePair<TKey, TValue> entry = new KeyValuePair<TKey, TValue>(keys[i], values[i]); 476if (array is KeyValuePair<TKey, TValue>[] keyValuePairArray) 545public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => new Enumerator(this, Enumerator.KeyValuePair); 547IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 548Count == 0 ? EnumerableHelpers.GetEmptyEnumerator<KeyValuePair<TKey, TValue>>() : 553IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 750private struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 823public KeyValuePair<TKey, TValue> Current => new KeyValuePair<TKey, TValue>(_key!, _value!);
System.Collections.Concurrent (87)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
20public DebugViewDictionaryItem(KeyValuePair<TKey, TValue> keyValue)
System\Collections\Concurrent\ConcurrentDictionary.cs (36)
98public ConcurrentDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 118public ConcurrentDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 141public ConcurrentDictionary(int concurrencyLevel, IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 285private static int GetCapacityFromCollection(IEnumerable<KeyValuePair<TKey, TValue>> collection) => 288ICollection<KeyValuePair<TKey, TValue>> c => Math.Max(DefaultCapacity, c.Count), 289IReadOnlyCollection<KeyValuePair<TKey, TValue>> rc => Math.Max(DefaultCapacity, rc.Count), 334private void InitializeFromCollection(IEnumerable<KeyValuePair<TKey, TValue>> collection) 336foreach (KeyValuePair<TKey, TValue> pair in collection) 407/// <param name="item">The <see cref="KeyValuePair{TKey,TValue}"/> representing the key and value to remove.</param> 419/// The <see cref="KeyValuePair{TKey, TValue}.Key"/> property of <paramref name="item"/> is a null reference. 421public bool TryRemove(KeyValuePair<TKey, TValue> item) 736/// Copies the elements of the <see cref="ICollection{T}"/> to an array of type <see cref="KeyValuePair{TKey,TValue}"/>, 740/// The one-dimensional array of type <see cref="KeyValuePair{TKey,TValue}"/> that is the destination of the <see 741/// cref="KeyValuePair{TKey,TValue}"/> elements copied from the <see cref="ICollection"/>. The array must have zero-based indexing. 751void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 782public KeyValuePair<TKey, TValue>[] ToArray() 792return Array.Empty<KeyValuePair<TKey, TValue>>(); 795var array = new KeyValuePair<TKey, TValue>[count]; 807private void CopyToPairs(KeyValuePair<TKey, TValue>[] array, int index) 859public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => new Enumerator(this); 862private sealed class Enumerator(ConcurrentDictionary<TKey, TValue> dictionary) : IEnumerator<KeyValuePair<TKey, TValue>> 876public KeyValuePair<TKey, TValue> Current { get; private set; } 1592/// <param name="keyValuePair">The <see cref="KeyValuePair{TKey,TValue}"/> 1602void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => ((IDictionary<TKey, TValue>)this).Add(keyValuePair.Key, keyValuePair.Value); 1608/// <param name="keyValuePair">The <see cref="KeyValuePair{TKey,TValue}"/> 1613bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) => 1624bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 1630/// cref="KeyValuePair{TKey,TValue}"/> 1637bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) => 1887if (array is KeyValuePair<TKey, TValue>[] pairs) 2297private readonly IEnumerator<KeyValuePair<TKey, TValue>> _enumerator; // Enumerator over the dictionary. 2718var keyValuePairs = new KeyValuePair<TKey, TValue>[_dictionary.Count];
System\Collections\Concurrent\OrderablePartitioner.cs (8)
99public abstract IList<IEnumerator<KeyValuePair<long, TSource>>> GetOrderablePartitions(int partitionCount); 126public virtual IEnumerable<KeyValuePair<long, TSource>> GetOrderableDynamicPartitions() 167IList<IEnumerator<KeyValuePair<long, TSource>>> orderablePartitions = GetOrderablePartitions(partitionCount); 208IEnumerable<KeyValuePair<long, TSource>> orderablePartitions = GetOrderableDynamicPartitions(); 217private readonly IEnumerable<KeyValuePair<long, TSource>> _source; 218public EnumerableDropIndices(IEnumerable<KeyValuePair<long, TSource>> source) 238private readonly IEnumerator<KeyValuePair<long, TSource>> _source; 239public EnumeratorDropIndices(IEnumerator<KeyValuePair<long, TSource>> source)
System\Collections\Concurrent\PartitionerStatic.cs (42)
305private abstract class DynamicPartitionEnumerator_Abstract<TSource, TSourceReader> : IEnumerator<KeyValuePair<long, TSource>> 371public abstract KeyValuePair<long, TSource> Current { get; } 501public override IList<IEnumerator<KeyValuePair<long, TSource>>> GetOrderablePartitions(int partitionCount) 504IEnumerator<KeyValuePair<long, TSource>>[] partitions 505= new IEnumerator<KeyValuePair<long, TSource>>[partitionCount]; 519public override IEnumerable<KeyValuePair<long, TSource>> GetOrderableDynamicPartitions() 539private sealed class InternalPartitionEnumerable : IEnumerable<KeyValuePair<long, TSource>>, IDisposable 545private volatile KeyValuePair<long, TSource>[]? _fillBuffer; // intermediate buffer to reduce locking 584_fillBuffer = new KeyValuePair<long, TSource>[fillBufferMultiplier * Partitioner.GetDefaultChunkSize<TSource>()]; 603public IEnumerator<KeyValuePair<long, TSource>> GetEnumerator() 620private void TryCopyFromFillBuffer(KeyValuePair<long, TSource>[] destArray, 628KeyValuePair<long, TSource>[]? fillBufferLocalRef = _fillBuffer; 666internal bool GrabChunk(KeyValuePair<long, TSource>[] destArray, int requestedChunkSize, ref int actualNumElementsGrabbed) 692internal bool GrabChunk_Single(KeyValuePair<long, TSource>[] destArray, int requestedChunkSize, ref int actualNumElementsGrabbed) 741internal bool GrabChunk_Buffered(KeyValuePair<long, TSource>[] destArray, int requestedChunkSize, ref int actualNumElementsGrabbed) 872private KeyValuePair<long, TSource>[]? _localList; //defer allocating to avoid false sharing 921_localList ??= new KeyValuePair<long, TSource>[_maxChunkSize]; 941public override KeyValuePair<long, TSource> Current 1002protected abstract IEnumerable<KeyValuePair<long, TSource>> GetOrderableDynamicPartitions_Factory(TCollection data); 1010public override IList<IEnumerator<KeyValuePair<long, TSource>>> GetOrderablePartitions(int partitionCount) 1013IEnumerator<KeyValuePair<long, TSource>>[] partitions 1014= new IEnumerator<KeyValuePair<long, TSource>>[partitionCount]; 1015IEnumerable<KeyValuePair<long, TSource>> partitionEnumerable = GetOrderableDynamicPartitions_Factory(_data); 1027public override IEnumerable<KeyValuePair<long, TSource>> GetOrderableDynamicPartitions() 1159protected override IEnumerable<KeyValuePair<long, TSource>> GetOrderableDynamicPartitions_Factory(IList<TSource> _data) 1169private sealed class InternalPartitionEnumerable : IEnumerable<KeyValuePair<long, TSource>> 1181public IEnumerator<KeyValuePair<long, TSource>> GetEnumerator() 1211public override KeyValuePair<long, TSource> Current 1245protected override IEnumerable<KeyValuePair<long, TSource>> GetOrderableDynamicPartitions_Factory(TSource[] _data) 1254private sealed class InternalPartitionEnumerable : IEnumerable<KeyValuePair<long, TSource>> 1272public IEnumerator<KeyValuePair<long, TSource>> GetEnumerator() 1295public override KeyValuePair<long, TSource> Current 1347protected abstract IEnumerator<KeyValuePair<long, TSource>> CreatePartition(int startIndex, int endIndex); 1366public override IList<IEnumerator<KeyValuePair<long, TSource>>> GetOrderablePartitions(int partitionCount) 1372IEnumerator<KeyValuePair<long, TSource>>[] partitions = new IEnumerator<KeyValuePair<long, TSource>>[partitionCount]; 1401private abstract class StaticIndexRangePartition<TSource> : IEnumerator<KeyValuePair<long, TSource>> 1428public abstract KeyValuePair<long, TSource> Current { get; } 1495protected override IEnumerator<KeyValuePair<long, TSource>> CreatePartition(int startIndex, int endIndex) 1518public override KeyValuePair<long, TSource> Current 1553protected override IEnumerator<KeyValuePair<long, TSource>> CreatePartition(int startIndex, int endIndex) 1575public override KeyValuePair<long, TSource> Current
System.Collections.Immutable (193)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
20public DebugViewDictionaryItem(KeyValuePair<TKey, TValue> keyValue)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionaryDebugView.cs (1)
22var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
System\Collections\Frozen\FrozenDictionary.cs (29)
28public static FrozenDictionary<TKey, TValue> Create<TKey, TValue>(params ReadOnlySpan<KeyValuePair<TKey, TValue>> source) 42public static FrozenDictionary<TKey, TValue> Create<TKey, TValue>(IEqualityComparer<TKey>? comparer, params ReadOnlySpan<KeyValuePair<TKey, TValue>> source) 55foreach (KeyValuePair<TKey, TValue> pair in source) 73public static FrozenDictionary<TKey, TValue> ToFrozenDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? comparer = null) 115IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? comparer, 135foreach (KeyValuePair<TKey, TValue> pair in source) 371/// <summary>Copies the elements of the dictionary to an array of type <see cref="KeyValuePair{TKey, TValue}"/>, starting at the specified <paramref name="destinationIndex"/>.</summary> 374public void CopyTo(KeyValuePair<TKey, TValue>[] destination, int destinationIndex) 380/// <summary>Copies the elements of the dictionary to a span of type <see cref="KeyValuePair{TKey, TValue}"/>.</summary> 382public void CopyTo(Span<KeyValuePair<TKey, TValue>> destination) 424if (array is KeyValuePair<TKey, TValue>[] pairs) 426foreach (KeyValuePair<TKey, TValue> item in this) 433foreach (KeyValuePair<TKey, TValue> item in this) 447foreach (KeyValuePair<TKey, TValue> item in this) 460bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 601bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) => 634IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 635Count == 0 ? ((IList<KeyValuePair<TKey, TValue>>)Array.Empty<KeyValuePair<TKey, TValue>>()).GetEnumerator() : 640Count == 0 ? Array.Empty<KeyValuePair<TKey, TValue>>().GetEnumerator() : 651void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 660bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException(); 666void ICollection<KeyValuePair<TKey, TValue>>.Clear() => throw new NotSupportedException(); 672public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>> 701public readonly KeyValuePair<TKey, TValue> Current
System\Collections\Frozen\FrozenSetInternalBase.cs (1)
190private unsafe KeyValuePair<int, int> CheckUniqueAndUnfoundElements(IEnumerable<T> other, bool returnIfUnfound)
System\Collections\Frozen\Int32\Int32FrozenDictionary.cs (3)
26KeyValuePair<int, TValue>[] entries = new KeyValuePair<int, TValue>[source.Count]; 27((ICollection<KeyValuePair<int, TValue>>)source).CopyTo(entries, 0);
System\Collections\Frozen\Integer\DenseIntegralFrozenDictionary.cs (2)
83foreach (KeyValuePair<TKey, TValue> entry in source) 99foreach (KeyValuePair<TKey, TValue> entry in source)
System\Collections\Frozen\KeysAndValuesFrozenDictionary.cs (3)
22KeyValuePair<TKey, TValue>[] entries = new KeyValuePair<TKey, TValue>[source.Count]; 23((ICollection<KeyValuePair<TKey, TValue>>)source).CopyTo(entries, 0);
System\Collections\Immutable\DictionaryEnumerator.cs (2)
10private readonly IEnumerator<KeyValuePair<TKey, TValue>> _inner; 12internal DictionaryEnumerator(IEnumerator<KeyValuePair<TKey, TValue>> inner)
System\Collections\Immutable\IImmutableDictionary.cs (3)
39IImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs); 58IImmutableDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items); 81bool Contains(KeyValuePair<TKey, TValue> pair);
System\Collections\Immutable\ImmutableDictionary.cs (10)
62public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 75/// In contrast to <see cref="CreateRange{TKey, TValue}(IEnumerable{KeyValuePair{TKey, TValue}})"/>, 80params ReadOnlySpan<KeyValuePair<TKey, TValue>> items) 94public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 108/// In contrast to <see cref="CreateRange{TKey, TValue}(IEqualityComparer{TKey}?, IEnumerable{KeyValuePair{TKey, TValue}})"/>, 114params ReadOnlySpan<KeyValuePair<TKey, TValue>> items) 129public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 271public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 291public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 303public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source) where TKey : notnull
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (15)
21/// While <see cref="ImmutableDictionary{TKey, TValue}.AddRange(IEnumerable{KeyValuePair{TKey, TValue}})"/> 149bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 161foreach (KeyValuePair<TKey, TValue> item in this) 184foreach (KeyValuePair<TKey, TValue> item in this) 349foreach (KeyValuePair<TKey, TValue> item in this) 433public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 556foreach (KeyValuePair<TKey, TValue> item in this) 609public void Add(KeyValuePair<TKey, TValue> item) 631public bool Contains(KeyValuePair<TKey, TValue> item) 639void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 643foreach (KeyValuePair<TKey, TValue> item in this) 661public bool Remove(KeyValuePair<TKey, TValue> item) 682IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
System\Collections\Immutable\ImmutableDictionary_2.Comparers.cs (7)
21internal sealed class Comparers : IEqualityComparer<HashBucket>, IEqualityComparer<KeyValuePair<TKey, TValue>> 69internal IEqualityComparer<KeyValuePair<TKey, TValue>> KeyOnlyComparer 128bool IEqualityComparer<KeyValuePair<TKey, TValue>>.Equals(KeyValuePair<TKey, TValue> x, KeyValuePair<TKey, TValue> y) 140int IEqualityComparer<KeyValuePair<TKey, TValue>>.GetHashCode(KeyValuePair<TKey, TValue> obj)
System\Collections\Immutable\ImmutableDictionary_2.cs (32)
30private static readonly Action<KeyValuePair<int, HashBucket>> s_FreezeBucketAction = (kv) => kv.Value.Freeze(); 172foreach (KeyValuePair<int, ImmutableDictionary<TKey, TValue>.HashBucket> bucket in _root) 174foreach (KeyValuePair<TKey, TValue> item in bucket.Value) 189foreach (KeyValuePair<int, ImmutableDictionary<TKey, TValue>.HashBucket> bucket in _root) 191foreach (KeyValuePair<TKey, TValue> item in bucket.Value) 271bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 311public ImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 318internal ImmutableDictionary<TKey, TValue> AddRange(ReadOnlySpan<KeyValuePair<TKey, TValue>> pairs, KeyCollisionBehavior collisionBehavior = KeyCollisionBehavior.ThrowIfValueDifferent) 339public ImmutableDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 406public bool Contains(KeyValuePair<TKey, TValue> pair) 483foreach (KeyValuePair<TKey, TValue> item in this) 529IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 537IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 601void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 606void ICollection<KeyValuePair<TKey, TValue>>.Clear() 611bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 616void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 622foreach (KeyValuePair<TKey, TValue> item in this) 762foreach (KeyValuePair<TKey, TValue> item in this) 806IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 809Enumerable.Empty<KeyValuePair<TKey, TValue>>().GetEnumerator() : 851private static bool TryCastToImmutableMap(IEnumerable<KeyValuePair<TKey, TValue>> sequence, [NotNullWhen(true)] out ImmutableDictionary<TKey, TValue>? other) 888private static bool Contains(KeyValuePair<TKey, TValue> keyValuePair, MutationInput origin) 957private static MutationResult AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items, MutationInput origin, KeyCollisionBehavior collisionBehavior = KeyCollisionBehavior.ThrowIfValueDifferent) 963foreach (KeyValuePair<TKey, TValue> pair in items) 983private static MutationResult AddRange(ReadOnlySpan<KeyValuePair<TKey, TValue>> items, MutationInput origin, KeyCollisionBehavior collisionBehavior = KeyCollisionBehavior.ThrowIfValueDifferent) 987foreach (KeyValuePair<TKey, TValue> pair in items) 1081private ImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs, bool avoidToHashMap)
System\Collections\Immutable\ImmutableDictionary_2.Enumerator.cs (2)
16public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDisposable 54public KeyValuePair<TKey, TValue> Current
System\Collections\Immutable\ImmutableDictionary_2.HashBucket.cs (22)
19internal readonly struct HashBucket : IEnumerable<KeyValuePair<TKey, TValue>> 25private readonly KeyValuePair<TKey, TValue> _firstValue; 34private readonly ImmutableList<KeyValuePair<TKey, TValue>>.Node _additionalElements; 41private HashBucket(KeyValuePair<TKey, TValue> firstElement, ImmutableList<KeyValuePair<TKey, TValue>>.Node? additionalElements = null) 44_additionalElements = additionalElements ?? ImmutableList<KeyValuePair<TKey, TValue>>.Node.EmptyNode; 61internal KeyValuePair<TKey, TValue> FirstValue 77internal ImmutableList<KeyValuePair<TKey, TValue>>.Node AdditionalElements 96IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 140internal HashBucket Add(TKey key, TValue value, IEqualityComparer<KeyValuePair<TKey, TValue>> keyOnlyComparer, IEqualityComparer<TValue> valueComparer, KeyCollisionBehavior behavior, out OperationResult result) 142var kv = new KeyValuePair<TKey, TValue>(key, value); 191ref readonly KeyValuePair<TKey, TValue> existingEntry = ref _additionalElements.ItemRef(keyCollisionIndex); 214internal HashBucket Remove(TKey key, IEqualityComparer<KeyValuePair<TKey, TValue>> keyOnlyComparer, out OperationResult result) 222var kv = new KeyValuePair<TKey, TValue>(key, default(TValue)!); 274var kv = new KeyValuePair<TKey, TValue>(key, default(TValue)!); 313var kv = new KeyValuePair<TKey, TValue>(equalKey, default(TValue)!); 336internal struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDisposable 351private ImmutableList<KeyValuePair<TKey, TValue>>.Enumerator _additionalEnumerator; 361_additionalEnumerator = default(ImmutableList<KeyValuePair<TKey, TValue>>.Enumerator); 401public KeyValuePair<TKey, TValue> Current 442_additionalEnumerator = new ImmutableList<KeyValuePair<TKey, TValue>>.Enumerator(_bucket._additionalElements);
System\Collections\Immutable\ImmutableDictionary_2.MutationInput.cs (1)
80internal IEqualityComparer<KeyValuePair<TKey, TValue>> KeyOnlyComparer
System\Collections\Immutable\ImmutableHashSet_1.cs (1)
32private static readonly Action<KeyValuePair<int, HashBucket>> s_FreezeBucketAction = (kv) => kv.Value.Freeze();
System\Collections\Immutable\ImmutableSortedDictionary.cs (6)
58public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 71public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 85public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 200public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 220public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IComparer<TKey>? keyComparer) where TKey : notnull 232public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source) where TKey : notnull
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (11)
127bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 308foreach (KeyValuePair<TKey, TValue> item in this) 483public void Add(KeyValuePair<TKey, TValue> item) 500public bool Contains(KeyValuePair<TKey, TValue> item) 508void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 516public bool Remove(KeyValuePair<TKey, TValue> item) 537IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 575public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 579foreach (KeyValuePair<TKey, TValue> pair in items)
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (22)
161bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly 268public ImmutableSortedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 278public ImmutableSortedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 399IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 407IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 440public bool Contains(KeyValuePair<TKey, TValue> pair) 506void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 511void ICollection<KeyValuePair<TKey, TValue>>.Clear() 516bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 521void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 527foreach (KeyValuePair<TKey, TValue> item in this) 696IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 699Enumerable.Empty<KeyValuePair<TKey, TValue>>().GetEnumerator() : 753private static bool TryCastToImmutableMap(IEnumerable<KeyValuePair<TKey, TValue>> sequence, [NotNullWhen(true)] out ImmutableSortedDictionary<TKey, TValue>? other) 776private ImmutableSortedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items, bool overwriteOnCollision, bool avoidToSortedMap) 790foreach (KeyValuePair<TKey, TValue> item in items) 831private ImmutableSortedDictionary<TKey, TValue> FillFromEmpty(IEnumerable<KeyValuePair<TKey, TValue>> items, bool overwriteOnCollision) 852foreach (KeyValuePair<TKey, TValue> item in items)
System\Collections\Immutable\ImmutableSortedDictionary_2.Enumerator.cs (2)
26public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, ISecurePooledObjectUser 88public KeyValuePair<TKey, TValue> Current
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (12)
17internal sealed class Node : IEnumerable<KeyValuePair<TKey, TValue>> 126public KeyValuePair<TKey, TValue> Value 166IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 199internal void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex, int dictionarySize) 205foreach (KeyValuePair<TKey, TValue> item in this) 220foreach (KeyValuePair<TKey, TValue> item in this) 235IReadOnlyList<KeyValuePair<TKey, TValue>> list = dictionary.AsReadOnlyList(); 394foreach (KeyValuePair<TKey, TValue> item in this) 413internal bool Contains(KeyValuePair<TKey, TValue> pair, IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer) 589private static Node NodeTreeFromList(IReadOnlyList<KeyValuePair<TKey, TValue>> items, int start, int length) 604KeyValuePair<TKey, TValue> item = items[start + leftCount];
System\Collections\Immutable\SortedInt32KeyNode.cs (3)
120public KeyValuePair<int, TValue> Value 132foreach (KeyValuePair<int, TValue> pair in this) 244internal void Freeze(Action<KeyValuePair<int, TValue>>? freezeAction = null)
System\Collections\Immutable\SortedInt32KeyNode.Enumerator.cs (2)
25public struct Enumerator : IEnumerator<KeyValuePair<int, TValue>>, ISecurePooledObjectUser 74public KeyValuePair<int, TValue> Current
System.Collections.NonGeneric (1)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
20public DebugViewDictionaryItem(KeyValuePair<TKey, TValue> keyValue)
System.ComponentModel.Annotations (3)
System\ComponentModel\DataAnnotations\Validator.cs (3)
467foreach (var property in properties) 516private static List<KeyValuePair<ValidationContext, object?>> GetPropertyValues(object instance, 520var items = new List<KeyValuePair<ValidationContext, object?>>(properties.Count);
System.ComponentModel.Composition (28)
Microsoft\Internal\Requires.cs (3)
24public static void NullOrNotNullElements<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>? values, string parameterName) 78private static void NotNullElements<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>>? values, string parameterName) 84foreach (KeyValuePair<TKey, TValue> keyValue in values)
System\ComponentModel\Composition\ConstraintServices.cs (3)
23public static Expression<Func<ExportDefinition, bool>> CreateConstraint(string contractName, string? requiredTypeIdentity, IEnumerable<KeyValuePair<string, Type>> requiredMetadata, CreationPolicy requiredCreationPolicy) 66private static Expression? CreateMetadataConstraintBody(IEnumerable<KeyValuePair<string, Type>> requiredMetadata, ParameterExpression parameter) 72foreach (KeyValuePair<string, Type> requiredMetadataItem in requiredMetadata)
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (2)
38private KeyValuePair<object, object?>[]? _values; 305var newQueries = new KeyValuePair<object, object?>[_valueCount == 0 ? 5 : _valueCount * 2];
System\ComponentModel\Composition\Hosting\CompositionServices.cs (2)
469internal static IEnumerable<KeyValuePair<string, Type>> GetRequiredMetadata(Type? metadataViewType) 476return Enumerable.Empty<KeyValuePair<string, Type>>();
System\ComponentModel\Composition\Hosting\ExportProvider.GetExportOverrides.cs (1)
800IEnumerable<KeyValuePair<string, Type>> requiredMetadata = CompositionServices.GetRequiredMetadata(metadataViewType);
System\ComponentModel\Composition\Hosting\ImportSourceImportDefinitionHelpers.cs (1)
100public override IEnumerable<KeyValuePair<string, Type>> RequiredMetadata
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (8)
24private readonly IEnumerable<KeyValuePair<string, Type>> _requiredMetadata = Enumerable.Empty<KeyValuePair<string, Type>>(); 101public ContractBasedImportDefinition(string contractName, string? requiredTypeIdentity, IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 163public ContractBasedImportDefinition(string contractName, string? requiredTypeIdentity, IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 208public virtual IEnumerable<KeyValuePair<string, Type>> RequiredMetadata 224foreach (KeyValuePair<string, Type> metadataItem in _requiredMetadata) 319foreach (KeyValuePair<string, Type> metadataItem in RequiredMetadata) 374foreach (KeyValuePair<string, Type> metadataItem in _requiredMetadata)
System\ComponentModel\Composition\ReflectionModel\ReflectionImportDefinition.cs (1)
16IEnumerable<KeyValuePair<string, Type>>? requiredMetadata,
System\ComponentModel\Composition\ReflectionModel\ReflectionMemberImportDefinition.cs (1)
18IEnumerable<KeyValuePair<string, Type>>? requiredMetadata,
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (5)
165IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 178IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 204IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 251IEnumerable<KeyValuePair<string, Type>>? requiredMetadata, 263IEnumerable<KeyValuePair<string, Type>>? requiredMetadata,
System\ComponentModel\Composition\ReflectionModel\ReflectionParameterImportDefinition.cs (1)
20IEnumerable<KeyValuePair<string, Type>>? requiredMetadata,
System.ComponentModel.TypeConverter (2)
System\ComponentModel\ComponentResourceManager.cs (1)
139foreach (KeyValuePair<string, object?> kvp in resources)
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
865foreach (KeyValuePair<Type, ReflectedTypeData> kvp in _typeData)
System.Composition.Hosting (6)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (5)
75public void Add(KeyValuePair<string, object> item) 85public bool Contains(KeyValuePair<string, object> item) 90public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 105public bool Remove(KeyValuePair<string, object> item) 110public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (1)
46foreach (var result in _updateResults)
System.Composition.Runtime (3)
System\Composition\Hosting\Core\CompositionContract.cs (3)
69public IEnumerable<KeyValuePair<string, object>> MetadataConstraints => _metadataConstraints; 183foreach (KeyValuePair<string, object> firstItem in first) 217foreach (KeyValuePair<string, object> kv in metadata)
System.Composition.TypedParts (1)
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
83foreach (var d in propertyDependencies)
System.Configuration.ConfigurationManager (1)
System\Configuration\BaseConfigurationRecord.cs (1)
440foreach (KeyValuePair<string, List<SectionInput>> keyValuePair in indirectLocationInputs)
System.Console (1)
System\TerminalFormatStrings.cs (1)
166foreach (KeyValuePair<string, ConsoleKeyInfo> entry in KeyFormatToConsoleKey)
System.Data.Common (17)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (1)
498foreach (var entry in parsedvalues)
System\Data\Common\DbConnectionStringBuilder.cs (1)
324foreach (KeyValuePair<string, object> entry in CurrentValues)
System\Data\Common\DbProviderFactories.cs (1)
93foreach (var kvp in _registeredFactories)
System\Data\Common\ObjectStorage.cs (13)
552private static Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>? s_tempAssemblyCache; 589KeyValuePair<Type, XmlRootAttribute> key = new KeyValuePair<Type, XmlRootAttribute>(type, attribute); 592Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>? cache = s_tempAssemblyCache; 609Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer> tmp = 610new Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>( 612foreach (KeyValuePair<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer> entry in cache) 620cache = new Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>( 641private sealed class TempAssemblyComparer : IEqualityComparer<KeyValuePair<Type, XmlRootAttribute>> 643internal static readonly IEqualityComparer<KeyValuePair<Type, XmlRootAttribute>> s_default = new TempAssemblyComparer(); 647public bool Equals(KeyValuePair<Type, XmlRootAttribute> x, KeyValuePair<Type, XmlRootAttribute> y) 658public int GetHashCode(KeyValuePair<Type, XmlRootAttribute> obj)
System\Data\DataView.cs (1)
1561foreach (KeyValuePair<string, Index> entry in indexes)
System.Data.Odbc (6)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (1)
498foreach (var entry in parsedvalues)
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionFactory.cs (3)
47foreach (KeyValuePair<DbConnectionPoolKey, DbConnectionPoolGroup> entry in connectionPoolGroups) 222foreach (KeyValuePair<DbConnectionPoolKey, DbConnectionPoolGroup> entry in connectionPoolGroups) 305foreach (KeyValuePair<DbConnectionPoolKey, DbConnectionPoolGroup> entry in connectionPoolGroups)
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionPoolGroup.cs (2)
118foreach (var entry in oldPoolCollection) 239foreach (var entry in _poolCollection)
System.Diagnostics.DiagnosticSource (314)
src\libraries\Common\src\System\Diagnostics\DiagnosticsHelper.cs (9)
22internal static bool CompareTags(IList<KeyValuePair<string, object?>>? sortedTags, IEnumerable<KeyValuePair<string, object?>>? tags2) 38if (tags2 is ICollection<KeyValuePair<string, object?>> tagsCol) 45if (tagsCol is IList<KeyValuePair<string, object?>> secondList) 49KeyValuePair<string, object?> pair = secondList[i]; 58KeyValuePair<string, object?> pair1 = sortedTags[j]; 79using (IEnumerator<KeyValuePair<string, object?>> enumerator = tags2.GetEnumerator()) 89KeyValuePair<string, object?> pair = enumerator.Current; 97KeyValuePair<string, object?> pair1 = sortedTags[j];
System\Diagnostics\Activity.cs (66)
59private static readonly IEnumerable<KeyValuePair<string, string?>> s_emptyBaggageTags = new KeyValuePair<string, string?>[0]; 60private static readonly IEnumerable<KeyValuePair<string, object?>> s_emptyTagObjects = new KeyValuePair<string, object?>[0]; 336public IEnumerable<KeyValuePair<string, string?>> Tags 345public IEnumerable<KeyValuePair<string, object?>> TagObjects 376public IEnumerable<KeyValuePair<string, string?>> Baggage 390static IEnumerable<KeyValuePair<string, string?>> Iterate(Activity? activity) 397for (DiagNode<KeyValuePair<string, string?>>? current = activity._baggage.First; current != null; current = current.Next) 413public Enumerator<KeyValuePair<string, object?>> EnumerateTagObjects() => new Enumerator<KeyValuePair<string, object?>>(_tags?.First); 433foreach (KeyValuePair<string, string?> keyValue in Baggage) 488KeyValuePair<string, object?> kvp = new KeyValuePair<string, object?>(key, value); 512KeyValuePair<string, object?> kvp = new KeyValuePair<string, object?>(key, value); 633KeyValuePair<string, string?> kvp = new KeyValuePair<string, string?>(key, value); 657KeyValuePair<string, string?> kvp = new KeyValuePair<string, string?>(key, value); 1176IEnumerable<KeyValuePair<string, object?>>? tags, IEnumerable<ActivityLink>? links, DateTimeOffset startTime, 1199using (IEnumerator<KeyValuePair<string, object?>> enumerator = tags.GetEnumerator()) 1551private sealed class BaggageLinkedList : IEnumerable<KeyValuePair<string, string?>> 1553private DiagNode<KeyValuePair<string, string?>>? _first; 1555public BaggageLinkedList(KeyValuePair<string, string?> firstValue, bool set = false) => _first = ((set && firstValue.Value == null) ? null : new DiagNode<KeyValuePair<string, string?>>(firstValue)); 1557public DiagNode<KeyValuePair<string, string?>>? First => _first; 1559public void Add(KeyValuePair<string, string?> value) 1561DiagNode<KeyValuePair<string, string?>> newNode = new DiagNode<KeyValuePair<string, string?>>(value); 1570public void Set(KeyValuePair<string, string?> value) 1580DiagNode<KeyValuePair<string, string?>>? current = _first; 1592DiagNode<KeyValuePair<string, string?>> newNode = new DiagNode<KeyValuePair<string, string?>>(value); 1613DiagNode<KeyValuePair<string, string?>> previous = _first; 1627public DiagEnumerator<KeyValuePair<string, string?>> GetEnumerator() => new DiagEnumerator<KeyValuePair<string, string?>>(_first); 1628IEnumerator<KeyValuePair<string, string?>> IEnumerable<KeyValuePair<string, string?>>.GetEnumerator() => GetEnumerator(); 1632internal sealed class TagsLinkedList : IEnumerable<KeyValuePair<string, object?>> 1634private DiagNode<KeyValuePair<string, object?>>? _first; 1635private DiagNode<KeyValuePair<string, object?>>? _last; 1639public TagsLinkedList(KeyValuePair<string, object?> firstValue, bool set = false) => _last = _first = ((set && firstValue.Value == null) ? null : new DiagNode<KeyValuePair<string, object?>>(firstValue)); 1641public TagsLinkedList(IEnumerator<KeyValuePair<string, object?>> e) 1643_last = _first = new DiagNode<KeyValuePair<string, object?>>(e.Current); 1647_last.Next = new DiagNode<KeyValuePair<string, object?>>(e.Current); 1652public DiagNode<KeyValuePair<string, object?>>? First => _first; 1654public TagsLinkedList(IEnumerable<KeyValuePair<string, object?>> list) => Add(list); 1657public void Add(IEnumerable<KeyValuePair<string, object?>> list) 1659IEnumerator<KeyValuePair<string, object?>> e = list.GetEnumerator(); 1667_last = _first = new DiagNode<KeyValuePair<string, object?>>(e.Current); 1671_last!.Next = new DiagNode<KeyValuePair<string, object?>>(e.Current); 1677_last.Next = new DiagNode<KeyValuePair<string, object?>>(e.Current); 1682public void Add(KeyValuePair<string, object?> value) 1684DiagNode<KeyValuePair<string, object?>> newNode = new DiagNode<KeyValuePair<string, object?>>(value); 1704DiagNode<KeyValuePair<string, object?>>? current = _first; 1736DiagNode<KeyValuePair<string, object?>> previous = _first; 1754public void Set(KeyValuePair<string, object?> value) 1764DiagNode<KeyValuePair<string, object?>>? current = _first; 1776DiagNode<KeyValuePair<string, object?>> newNode = new DiagNode<KeyValuePair<string, object?>>(value); 1790public DiagEnumerator<KeyValuePair<string, object?>> GetEnumerator() => new DiagEnumerator<KeyValuePair<string, object?>>(_first); 1791IEnumerator<KeyValuePair<string, object?>> IEnumerable<KeyValuePair<string, object?>>.GetEnumerator() => GetEnumerator(); 1794public IEnumerable<KeyValuePair<string, string?>> EnumerateStringValues() 1796DiagNode<KeyValuePair<string, object?>>? current = _first; 1823DiagNode<KeyValuePair<string, object?>>? current = _first.Next;
System\Diagnostics\ActivityCreationOptions.cs (2)
28internal ActivityCreationOptions(ActivitySource source, string name, T parent, ActivityKind kind, IEnumerable<KeyValuePair<string, object?>>? tags, IEnumerable<ActivityLink>? links, ActivityIdFormat idFormat) 108public IEnumerable<KeyValuePair<string, object?>>? Tags { get; }
System\Diagnostics\ActivityEvent.cs (6)
14private static readonly IEnumerable<KeyValuePair<string, object?>> s_emptyTags = Array.Empty<KeyValuePair<string, object?>>(); 35private ActivityEvent(string name, DateTimeOffset timestamp, IEnumerable<KeyValuePair<string, object?>>? tags, int tagsCount) 56public IEnumerable<KeyValuePair<string, object?>> Tags => _tags ?? s_emptyTags; 62public Activity.Enumerator<KeyValuePair<string, object?>> EnumerateTagObjects() => new Activity.Enumerator<KeyValuePair<string, object?>>(_tags?.First);
System\Diagnostics\ActivityLink.cs (3)
39public IEnumerable<KeyValuePair<string, object?>>? Tags => _tags; 51public Activity.Enumerator<KeyValuePair<string, object?>> EnumerateTagObjects() => new Activity.Enumerator<KeyValuePair<string, object?>>(_tags?.First);
System\Diagnostics\ActivityLink.netcoreapp.cs (1)
22foreach (KeyValuePair<string, object?> kvp in Tags)
System\Diagnostics\ActivitySource.cs (11)
37public ActivitySource(string name, string? version = "", IEnumerable<KeyValuePair<string, object?>>? tags = default) : this(name, version, tags, telemetrySchemaUrl: null) {} 45private ActivitySource(string name, string? version, IEnumerable<KeyValuePair<string, object?>>? tags, string? telemetrySchemaUrl) 55var tagList = new List<KeyValuePair<string, object?>>(tags); 91public IEnumerable<KeyValuePair<string, object?>>? Tags { get; } 136public Activity? CreateActivity(string name, ActivityKind kind, ActivityContext parentContext, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) 152public Activity? CreateActivity(string name, ActivityKind kind, string? parentId, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) 174public Activity? StartActivity(string name, ActivityKind kind, ActivityContext parentContext, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default) 187public Activity? StartActivity(string name, ActivityKind kind, string? parentId, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default) 200public Activity? StartActivity(ActivityKind kind, ActivityContext parentContext = default, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default, [CallerMemberName] string name = "") 203private Activity? CreateActivity(string name, ActivityKind kind, ActivityContext context, string? parentId, IEnumerable<KeyValuePair<string, object?>>? tags, 287foreach (KeyValuePair<string, object?> tag in atc)
System\Diagnostics\ActivitySourceOptions.cs (1)
41public IEnumerable<KeyValuePair<string, object?>>? Tags { get; set; }
System\Diagnostics\ActivityTagsCollection.cs (16)
24private readonly List<KeyValuePair<string, object?>> _list = new List<KeyValuePair<string, object?>>(); 37public ActivityTagsCollection(IEnumerable<KeyValuePair<string, object?>> list) 41foreach (KeyValuePair<string, object?> kvp in list) 99foreach (KeyValuePair<string, object?> kvp in _list) 115foreach (KeyValuePair<string, object?> kvp in _list) 156public void Add(KeyValuePair<string, object?> item) 177public bool Contains(KeyValuePair<string, object?> item) => _list.Contains(item); 191public void CopyTo(KeyValuePair<string, object?>[] array, int arrayIndex) => _list.CopyTo(array, arrayIndex); 196IEnumerator<KeyValuePair<string, object?>> IEnumerable<KeyValuePair<string, object?>>.GetEnumerator() => new Enumerator(_list); 232public bool Remove(KeyValuePair<string, object?> item) => _list.Remove(item); 272public struct Enumerator : IEnumerator<KeyValuePair<string, object?>>, IEnumerator 274private List<KeyValuePair<string, object?>>.Enumerator _enumerator; 275internal Enumerator(List<KeyValuePair<string, object?>> list) => _enumerator = list.GetEnumerator(); 277public KeyValuePair<string, object?> Current => _enumerator.Current;
System\Diagnostics\DiagLinkedList.cs (2)
173foreach (KeyValuePair<string, object?> kvp in al.EnumerateTagObjects()) 198foreach (KeyValuePair<string, object?> kvp in ae.EnumerateTagObjects())
System\Diagnostics\DiagnosticListener.cs (6)
29public partial class DiagnosticListener : DiagnosticSource, IObservable<KeyValuePair<string, object?>>, IDisposable 64public virtual IDisposable Subscribe(IObserver<KeyValuePair<string, object?>> observer, Predicate<string>? isEnabled) 108public virtual IDisposable Subscribe(IObserver<KeyValuePair<string, object?>> observer, Func<string, object?, object?, bool>? isEnabled) 118public virtual IDisposable Subscribe(IObserver<KeyValuePair<string, object?>> observer) 265internal IObserver<KeyValuePair<string, object?>> Observer = null!; 429private DiagnosticSubscription SubscribeInternal(IObserver<KeyValuePair<string, object?>> observer,
System\Diagnostics\DiagnosticSourceActivity.cs (1)
143public virtual IDisposable Subscribe(IObserver<KeyValuePair<string, object?>> observer, Func<string, object?, object?, bool>? isEnabled,
System\Diagnostics\DiagnosticSourceEventSource.cs (18)
227[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))] 229public void Event(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>>? Arguments) 249[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))] 251public void Activity1Start(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments) 261[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))] 263public void Activity1Stop(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments) 273[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))] 275public void Activity2Start(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments) 285[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))] 287public void Activity2Stop(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments) 297[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))] 299public void RecursiveActivity1Start(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments) 309[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))] 311public void RecursiveActivity1Stop(string SourceName, string EventName, IEnumerable<KeyValuePair<string, string?>> Arguments) 334[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))] 336public void ActivityStart(string SourceName, string ActivityName, IEnumerable<KeyValuePair<string, string?>> Arguments) => 347[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))] 349public void ActivityStop(string SourceName, string ActivityName, IEnumerable<KeyValuePair<string, string?>> Arguments) =>
System\Diagnostics\DistributedContextPropagator.cs (4)
67public abstract IEnumerable<KeyValuePair<string, string?>>? ExtractBaggage(object? carrier, PropagatorGetterCallback? getter); 125internal static void InjectBaggage(object? carrier, IEnumerable<KeyValuePair<string, string?>> baggage, PropagatorSetterCallback setter) 127using (IEnumerator<KeyValuePair<string, string?>> e = baggage.GetEnumerator()) 135KeyValuePair<string, string?> item = e.Current;
System\Diagnostics\DsesFilterAndTransform.cs (7)
432public List<KeyValuePair<string, string?>> Morph(object? args) 435var outputArgs = new List<KeyValuePair<string, string?>>(); 485var keyValue = explicitTransform.Morph(args); 499Action<string, string, IEnumerable<KeyValuePair<string, string?>>>? writeEvent = null; 532void OnEventWritten(KeyValuePair<string, object?> evnt) 544var subscription = newListener.Subscribe(new CallbackObserver<KeyValuePair<string, object?>>(OnEventWritten), eventNameFilterPredicate); 646public KeyValuePair<string, string?> Morph(object? obj)
System\Diagnostics\Helpers.cs (3)
13internal static string FormatTags(IEnumerable<KeyValuePair<string, object?>>? tags) 22foreach (KeyValuePair<string, object?> tag in tags) 38internal static string FormatTags(KeyValuePair<string, string>[] labels)
System\Diagnostics\LegacyPropagator.cs (5)
63public override IEnumerable<KeyValuePair<string, string?>>? ExtractBaggage(object? carrier, PropagatorGetterCallback? getter) 72IEnumerable<KeyValuePair<string, string?>>? baggage = null; 85internal static bool TryExtractBaggage(string baggageString, out IEnumerable<KeyValuePair<string, string?>>? baggage) 88List<KeyValuePair<string, string?>>? baggageList = null; 168baggageList ??= new List<KeyValuePair<string, string?>>();
System\Diagnostics\Metrics\AggregationManager.cs (1)
510foreach (KeyValuePair<Instrument, InstrumentState> kv in _instrumentStates)
System\Diagnostics\Metrics\Aggregator.cs (2)
109public LabeledAggregationStatistics(IAggregationStatistics stats, params KeyValuePair<string, string>[] labels) 115public KeyValuePair<string, string>[] Labels { get; }
System\Diagnostics\Metrics\AggregatorStore.cs (11)
70public TAggregator? GetAggregator(ReadOnlySpan<KeyValuePair<string, object?>> labels) 83private TAggregator? GetAggregatorSlow(ReadOnlySpan<KeyValuePair<string, object?>> labels) 323internal delegate bool AggregatorLookupFunc<TAggregator>(ReadOnlySpan<KeyValuePair<string, object?>> labels, out TAggregator? aggregator); 331ReadOnlySpan<KeyValuePair<string, object?>> labels) 341return (ReadOnlySpan<KeyValuePair<string, object?>> l, out TAggregator? aggregator) => 396private static LabelInstruction[] Compile(ReadOnlySpan<KeyValuePair<string, object?>> labels) 434ReadOnlySpan<KeyValuePair<string, object?>> labels, 488foreach (KeyValuePair<TStringSequence, ConcurrentDictionary<TObjectSequence, TAggregator>> kvName in this) 495foreach (KeyValuePair<TObjectSequence, TAggregator> kvValue in kvName.Value) 502KeyValuePair<string, string>[] labels = new KeyValuePair<string, string>[indexedNames.Length];
System\Diagnostics\Metrics\Counter.cs (9)
22internal Counter(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 38public void Add(T delta, KeyValuePair<string, object?> tag) => RecordMeasurement(delta, tag); 46public void Add(T delta, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2) => RecordMeasurement(delta, tag1, tag2); 55public void Add(T delta, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2, KeyValuePair<string, object?> tag3) => RecordMeasurement(delta, tag1, tag2, tag3); 62public void Add(T delta, params ReadOnlySpan<KeyValuePair<string, object?>> tags) => RecordMeasurement(delta, tags); 69public void Add(T delta, params KeyValuePair<string, object?>[] tags) => RecordMeasurement(delta, tags.AsSpan());
System\Diagnostics\Metrics\Gauge.cs (9)
20internal Gauge(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 36public void Record(T value, KeyValuePair<string, object?> tag) => RecordMeasurement(value, tag); 44public void Record(T value, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2) => RecordMeasurement(value, tag1, tag2); 53public void Record(T value, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2, KeyValuePair<string, object?> tag3) => RecordMeasurement(value, tag1, tag2, tag3); 60public void Record(T value, params ReadOnlySpan<KeyValuePair<string, object?>> tags) => RecordMeasurement(value, tags); 67public void Record(T value, params KeyValuePair<string, object?>[] tags) => RecordMeasurement(value, tags.AsSpan());
System\Diagnostics\Metrics\Histogram.cs (9)
23internal Histogram(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags, InstrumentAdvice<T>? advice) 40public void Record(T value, KeyValuePair<string, object?> tag) => RecordMeasurement(value, tag); 48public void Record(T value, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2) => RecordMeasurement(value, tag1, tag2); 57public void Record(T value, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2, KeyValuePair<string, object?> tag3) => RecordMeasurement(value, tag1, tag2, tag3); 64public void Record(T value, params ReadOnlySpan<KeyValuePair<string, object?>> tags) => RecordMeasurement(value, tags); 71public void Record(T value, params KeyValuePair<string, object?>[] tags) => RecordMeasurement(value, tags.AsSpan());
System\Diagnostics\Metrics\Instrument.common.cs (3)
55protected Instrument(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) 74IEnumerable<KeyValuePair<string, object?>>? tags = default, 94protected void RecordMeasurement(T measurement, ReadOnlySpan<KeyValuePair<string, object?>> tags)
System\Diagnostics\Metrics\Instrument.cs (5)
15internal static KeyValuePair<string, object?>[] EmptyTags => Array.Empty<KeyValuePair<string, object?>>(); 67IEnumerable<KeyValuePair<string, object?>>? tags = default) 75var tagList = new List<KeyValuePair<string, object?>>(tags); 135public IEnumerable<KeyValuePair<string, object?>>? Tags { get; }
System\Diagnostics\Metrics\Instrument.netcore.cs (6)
23protected void RecordMeasurement(T measurement, KeyValuePair<string, object?> tag) => 32protected void RecordMeasurement(T measurement, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2) => 42protected void RecordMeasurement(T measurement, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2, KeyValuePair<string, object?> tag3) =>
System\Diagnostics\Metrics\InstrumentState.cs (2)
14public abstract void Update(double measurement, ReadOnlySpan<KeyValuePair<string, object?>> labels); 40public override void Update(double measurement, ReadOnlySpan<KeyValuePair<string, object?>> labels)
System\Diagnostics\Metrics\Measurement.cs (11)
16private readonly KeyValuePair<string, object?>[] _tags; 32/// <param name="tags">The <see cref="KeyValuePair{TKey, TValue}"/> tags associated with the measurement.</param> 33public Measurement(T value, IEnumerable<KeyValuePair<string, object?>>? tags) 43/// <param name="tags">The <see cref="KeyValuePair{TKey, TValue}"/> tags associated with the measurement.</param> 44public Measurement(T value, params KeyValuePair<string, object?>[]? tags) 48_tags = new KeyValuePair<string, object?>[tags.Length]; 64/// <param name="tags">The <see cref="KeyValuePair{TKey, TValue}"/> tags associated with the measurement.</param> 65public Measurement(T value, params ReadOnlySpan<KeyValuePair<string, object?>> tags) 76/// <param name="tags">A <see cref="TagList"/> containing the <see cref="KeyValuePair{TKey, TValue}"/> tags associated with the measurement.</param> 81_tags = new KeyValuePair<string, object?>[tags.Count]; 95public ReadOnlySpan<KeyValuePair<string, object?>> Tags => _tags.AsSpan();
System\Diagnostics\Metrics\Meter.cs (21)
69public Meter(string name, string? version, IEnumerable<KeyValuePair<string, object?>>? tags, object? scope = null) 75private void Initialize(string name, string? version, IEnumerable<KeyValuePair<string, object?>>? tags, object? scope = null, string? telemetrySchemaUrl = null) 81var tagList = new List<KeyValuePair<string, object?>>(tags); 115public IEnumerable<KeyValuePair<string, object?>>? Tags { get; private set; } 151public Counter<T> CreateCounter<T>(string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct 175public Gauge<T> CreateGauge<T>(string name, string? unit = null, string? description = null, IEnumerable<KeyValuePair<string, object?>>? tags = null) where T : struct 212public Histogram<T> CreateHistogram<T>(string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct 226public Histogram<T> CreateHistogram<T>(string name, string? unit = default, string? description = default, IEnumerable<KeyValuePair<string, object?>>? tags = default, InstrumentAdvice<T>? advice = default) where T : struct 253public UpDownCounter<T> CreateUpDownCounter<T>(string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct 280public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct => 308public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct => 335public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct => 362public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct => 389public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct => 417public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct => 438public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct => 459public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct => 480public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct => 528private static Instrument? GetCachedInstrument(List<Instrument> instrumentList, Type instrumentType, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) 534instrument.Description == description && DiagnosticsHelper.CompareTags(instrument.Tags as List<KeyValuePair<string, object?>>, tags)) 544private Instrument GetOrCreateInstrument<T>(Type instrumentType, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags, Func<Instrument> instrumentCreator)
System\Diagnostics\Metrics\MeterFactoryExtensions.cs (1)
22public static Meter Create(this IMeterFactory meterFactory, string name, string? version = null, IEnumerable<KeyValuePair<string, object?>>? tags = null)
System\Diagnostics\Metrics\MeterListener.cs (3)
12public delegate void MeasurementCallback<T>(Instrument instrument, T measurement, ReadOnlySpan<KeyValuePair<string, object?>> tags, object? state) where T : struct; 287foreach (KeyValuePair<Instrument, object?> kvp in callbacksArguments) 298internal void NotifyMeasurement<T>(Instrument instrument, T measurement, ReadOnlySpan<KeyValuePair<string, object?>> tags, object? state) where T : struct
System\Diagnostics\Metrics\MeterOptions.cs (1)
32public IEnumerable<KeyValuePair<string, object?>>? Tags { get; set; }
System\Diagnostics\Metrics\ObservableCounter.cs (3)
24internal ObservableCounter(Meter meter, string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 34internal ObservableCounter(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 44internal ObservableCounter(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\ObservableGauge.cs (3)
24internal ObservableGauge(Meter meter, string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 34internal ObservableGauge(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 44internal ObservableGauge(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\ObservableInstrument.cs (1)
38protected ObservableInstrument(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\ObservableUpDownCounter.cs (3)
24internal ObservableUpDownCounter(Meter meter, string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 34internal ObservableUpDownCounter(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 44internal ObservableUpDownCounter(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\TagList.netcore.cs (28)
22public struct TagList : IList<KeyValuePair<string, object?>>, IReadOnlyList<KeyValuePair<string, object?>> 31private KeyValuePair<string, object?>[]? _overflowTags; 38public TagList(params ReadOnlySpan<KeyValuePair<string, object?>> tagList) : this() 42scoped Span<KeyValuePair<string, object?>> tags = _tagsCount <= InlineTags.Length ? 44_overflowTags = new KeyValuePair<string, object?>[_tagsCount + OverflowAdditionalCapacity]; 63public KeyValuePair<string, object?> this[int index] 99public void Add(KeyValuePair<string, object?> tag) 117private void AddToOverflow(KeyValuePair<string, object?> tag) 123_overflowTags = new KeyValuePair<string, object?>[InlineTags.Length + OverflowAdditionalCapacity]; 124((ReadOnlySpan<KeyValuePair<string, object?>>)_tags).CopyTo(_overflowTags); 141public readonly void CopyTo(Span<KeyValuePair<string, object?>> tags) 158public readonly void CopyTo(KeyValuePair<string, object?>[] array, int arrayIndex) 172public void Insert(int index, KeyValuePair<string, object?> item) 184_overflowTags = new KeyValuePair<string, object?>[InlineTags.Length + OverflowAdditionalCapacity]; 185((ReadOnlySpan<KeyValuePair<string, object?>>)_tags).CopyTo(_overflowTags); 200Span<KeyValuePair<string, object?>> tags = _tags; 217Span<KeyValuePair<string, object?>> tags = _overflowTags is not null ? _overflowTags : _tags; 233public readonly bool Contains(KeyValuePair<string, object?> item) => 241public bool Remove(KeyValuePair<string, object?> item) 257public readonly IEnumerator<KeyValuePair<string, object?>> GetEnumerator() => new Enumerator(in this); 270public readonly int IndexOf(KeyValuePair<string, object?> item) 272ReadOnlySpan<KeyValuePair<string, object?>> tags = 303internal readonly ReadOnlySpan<KeyValuePair<string, object?>> Tags => 305((ReadOnlySpan<KeyValuePair<string, object?>>)_tags).Slice(0, _tagsCount); 311private KeyValuePair<string, object?> _first; 314public struct Enumerator : IEnumerator<KeyValuePair<string, object?>> 325public KeyValuePair<string, object?> Current => _tagList[_index];
System\Diagnostics\Metrics\UpDownCounter.cs (9)
21internal UpDownCounter(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 37public void Add(T delta, KeyValuePair<string, object?> tag) => RecordMeasurement(delta, tag); 45public void Add(T delta, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2) => RecordMeasurement(delta, tag1, tag2); 54public void Add(T delta, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2, KeyValuePair<string, object?> tag3) => RecordMeasurement(delta, tag1, tag2, tag3); 61public void Add(T delta, params ReadOnlySpan<KeyValuePair<string, object?>> tags) => RecordMeasurement(delta, tags); 68public void Add(T delta, params KeyValuePair<string, object?>[] tags) => RecordMeasurement(delta, tags.AsSpan());
System\Diagnostics\NoOutputPropagator.cs (1)
21public override IEnumerable<KeyValuePair<string, string?>>? ExtractBaggage(object? carrier, PropagatorGetterCallback? getter) => LegacyPropagator.Instance.ExtractBaggage(carrier, getter);
System\Diagnostics\PassThroughPropagator.cs (3)
21GetRootId(out string? parentId, out string? traceState, out bool isW3c, out IEnumerable<KeyValuePair<string, string?>>? baggage); 42public override IEnumerable<KeyValuePair<string, string?>>? ExtractBaggage(object? carrier, PropagatorGetterCallback? getter) => LegacyPropagator.Instance.ExtractBaggage(carrier, getter); 44private static void GetRootId(out string? parentId, out string? traceState, out bool isW3c, out IEnumerable<KeyValuePair<string, string?>>? baggage)
System\Diagnostics\W3CPropagator.cs (8)
67public override IEnumerable<KeyValuePair<string, string?>>? ExtractBaggage(object? carrier, PropagatorGetterCallback? getter) 80TryExtractBaggage(theBaggage, out IEnumerable<KeyValuePair<string, string?>>? baggage); 85internal static bool TryExtractBaggage(string? baggageString, out IEnumerable<KeyValuePair<string, string?>>? baggage) 88List<KeyValuePair<string, string?>>? baggageList = null; 113baggageList ??= new List<KeyValuePair<string, string?>>(); 201internal static void InjectW3CBaggage(object? carrier, IEnumerable<KeyValuePair<string, string?>> baggage, PropagatorSetterCallback setter) 203using (IEnumerator<KeyValuePair<string, string?>> e = baggage.GetEnumerator()) 214KeyValuePair<string, string?> item = e.Current;
System.Diagnostics.Process (8)
System\Collections\Specialized\DictionaryWrapper.cs (5)
44public void Add(KeyValuePair<string, string?> item) => Add(item.Key, item.Value); 50public bool Contains(KeyValuePair<string, string?> item) 59public void CopyTo(KeyValuePair<string, string?>[] array, int arrayIndex) 69public bool Remove(KeyValuePair<string, string?> item) 81public IEnumerator<KeyValuePair<string, string?>> GetEnumerator() => _contents.GetEnumerator();
System\Collections\Specialized\StringDictionaryWrapper.cs (1)
55foreach (KeyValuePair<string, string?> keyValuePair in _contents)
System\Diagnostics\Process.Unix.cs (1)
615foreach (KeyValuePair<string, string?> pair in psi.Environment)
System\Diagnostics\ProcessWaitState.Unix.cs (1)
641foreach (KeyValuePair<int, ProcessWaitState> kv in s_childProcessWaitStates)
System.Formats.Nrbf (1)
System\Formats\Nrbf\RecordMap.cs (1)
28public IEnumerator<KeyValuePair<SerializationRecordId, SerializationRecord>> GetEnumerator() => _map.GetEnumerator();
System.Formats.Tar (8)
System\Formats\Tar\PaxGlobalExtendedAttributesTarEntry.cs (1)
27public PaxGlobalExtendedAttributesTarEntry(IEnumerable<KeyValuePair<string, string>> globalExtendedAttributes)
System\Formats\Tar\PaxTarEntry.cs (3)
33/// <para>Use the <see cref="PaxTarEntry(TarEntryType, string, IEnumerable{KeyValuePair{string, string}})"/> constructor to include extended attributes when creating the entry.</para> 67public PaxTarEntry(TarEntryType entryType, string entryName, IEnumerable<KeyValuePair<string, string>> extendedAttributes) 113/// <remarks>The extended attributes are specified when constructing an entry and updated with additional attributes when the entry is written. Use <see cref="PaxTarEntry(TarEntryType, string, IEnumerable{KeyValuePair{string, string}})"/> to append custom extended attributes.
System\Formats\Tar\TarHeader.cs (3)
111internal void AddExtendedAttributes(IEnumerable<KeyValuePair<string, string>> existing) 116using IEnumerator<KeyValuePair<string, string>> enumerator = existing.GetEnumerator(); 119KeyValuePair<string, string> kvp = enumerator.Current;
System\Formats\Tar\TarHelpers.Unix.cs (1)
112foreach (KeyValuePair<string, UnixFileMode> dir in pendingModes)
System.IO.Packaging (5)
System\IO\Packaging\Package.cs (3)
417Dictionary<string, KeyValuePair<PackUriHelper.ValidatedPartUri, PackagePart>> partDictionary = new(parts.Length); 1203private void CopyPartDictionaryToPartList(Dictionary<string, KeyValuePair<PackUriHelper.ValidatedPartUri, PackagePart>> partDictionary, List<string> partIndex) 1215var keyValue = partDictionary[id];
System\IO\Packaging\PartBasedPackageProperties.cs (1)
771foreach (KeyValuePair<PackageXmlEnum, object> entry in _propertyDictionary)
System\IO\Packaging\XmlCompatibilityReader.cs (1)
115foreach (KeyValuePair<string, string> pair in _namespaceMap)
System.Linq (11)
System\Linq\AggregateBy.cs (6)
27public static IEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>( 71public static IEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>( 103private static IEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateByIterator<TSource, TKey, TAccumulate>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 112foreach (KeyValuePair<TKey, TAccumulate> countBy in PopulateDictionary(enumerator, keySelector, seed, func, keyComparer)) 135private static IEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateByIterator<TSource, TKey, TAccumulate>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, TAccumulate> seedSelector, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 144foreach (KeyValuePair<TKey, TAccumulate> countBy in PopulateDictionary(enumerator, keySelector, seedSelector, func, keyComparer))
System\Linq\CountBy.cs (3)
20public static IEnumerable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer = null) where TKey : notnull 39private static IEnumerable<KeyValuePair<TKey, int>> CountByIterator<TSource, TKey>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 48foreach (KeyValuePair<TKey, int> countBy in BuildCountDictionary(enumerator, keySelector, keyComparer))
System\Linq\ToCollection.cs (2)
82public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source) where TKey : notnull => 98public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? comparer) where TKey : notnull
System.Linq.AsyncEnumerable (27)
System\Linq\AggregateBy.cs (16)
33public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>( 46source.IsKnownEmpty() ? Empty<KeyValuePair<TKey, TAccumulate>>() : 49static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl( 80foreach (KeyValuePair<TKey, TAccumulate> countBy in dict) 104public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>( 117source.IsKnownEmpty() ? Empty<KeyValuePair<TKey, TAccumulate>>() : 120static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl( 146foreach (KeyValuePair<TKey, TAccumulate> countBy in dict) 171public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>( 184source.IsKnownEmpty() ? Empty<KeyValuePair<TKey, TAccumulate>>() : 187static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl( 218foreach (KeyValuePair<TKey, TAccumulate> countBy in dict) 243public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>( 256source.IsKnownEmpty() ? Empty<KeyValuePair<TKey, TAccumulate>>() : 259static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl( 285foreach (KeyValuePair<TKey, TAccumulate> countBy in dict)
System\Linq\CountBy.cs (8)
23public static IAsyncEnumerable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>( 32source.IsKnownEmpty() ? Empty<KeyValuePair<TKey, int>>() : 35static async IAsyncEnumerable<KeyValuePair<TKey, int>> Impl( 57foreach (KeyValuePair<TKey, int> countBy in countsBy) 74public static IAsyncEnumerable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>( 83source.IsKnownEmpty() ? Empty<KeyValuePair<TKey, int>>() : 86static async IAsyncEnumerable<KeyValuePair<TKey, int>> Impl( 108foreach (KeyValuePair<TKey, int> countBy in countsBy)
System\Linq\ToDictionaryAsync.cs (3)
25this IAsyncEnumerable<KeyValuePair<TKey, TValue>> source, 34ConfiguredCancelableAsyncEnumerable<KeyValuePair<TKey, TValue>> source, 38await foreach (KeyValuePair<TKey, TValue> element in source)
System.Linq.Expressions (32)
System\Dynamic\ExpandoObject.cs (16)
669int ICollection<KeyValuePair<string, object?>>.Count => _count; 671bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => false; 673void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) 678void ICollection<KeyValuePair<string, object?>>.Clear() 703bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) 713void ICollection<KeyValuePair<string, object?>>.CopyTo(KeyValuePair<string, object?>[] array, int arrayIndex) 720ContractUtils.RequiresArrayRange(array, arrayIndex, _count, nameof(arrayIndex), nameof(ICollection<KeyValuePair<string, object>>.Count)); 721foreach (KeyValuePair<string, object?> item in this) 728bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item) 737IEnumerator<KeyValuePair<string, object?>> IEnumerable<KeyValuePair<string, object?>>.GetEnumerator() 751private IEnumerator<KeyValuePair<string, object?>> GetExpandoEnumerator(ExpandoData data, int version)
System\Linq\Expressions\Compiler\BoundConstants.cs (2)
122foreach (KeyValuePair<TypedConstant, int> reference in _references) 146foreach (KeyValuePair<TypedConstant, int> reference in _references)
System\Linq\Expressions\Compiler\CompilerScope.cs (1)
367foreach (KeyValuePair<ParameterExpression, int> refCount in ReferenceCount)
System\Linq\Expressions\Interpreter\InstructionList.cs (7)
26internal readonly List<KeyValuePair<int, object?>>? DebugCookies; 29object[]? objects, RuntimeLabel[] labels, List<KeyValuePair<int, object?>>? debugCookies) 81private List<KeyValuePair<int, object?>>? _debugCookies; 112Func<int, int> labelIndexer, IReadOnlyList<KeyValuePair<int, object?>>? debugCookies) 119IEnumerator<KeyValuePair<int, object?>> cookieEnumerator = (debugCookies ?? Array.Empty<KeyValuePair<int, object?>>()).GetEnumerator(); 237_debugCookies ??= new List<KeyValuePair<int, object?>>();
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
337foreach (KeyValuePair<LabelTarget, LabelInfo> kvp in _treeLabels)
System\Linq\Expressions\Interpreter\Utilities.cs (5)
172private KeyValuePair<TKey, TValue>[]? _keysAndValues; 229KeyValuePair<TKey, TValue>[]? keysAndValues = _keysAndValues; 244public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() 254private IEnumerator<KeyValuePair<TKey, TValue>> GetEnumeratorWorker() 311_keysAndValues = new KeyValuePair<TKey, TValue>[ArraySize];
System.Linq.Parallel (12)
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (1)
234private IEnumerator<KeyValuePair<Wrapper<TInputOutput>, Pair<TInputOutput, TLeftKey>>>? _outputEnumerator; // The enumerator output elements + order keys.
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (1)
298private IEnumerator<KeyValuePair<Wrapper<TInputOutput>, Pair<TInputOutput, ConcatKey<TLeftKey, TRightKey>>>>? _outputEnumerator; // Enumerator over the output of the union.
System\Linq\Parallel\QueryOperators\PartitionerQueryOperator.cs (5)
148IList<IEnumerator<KeyValuePair<long, TElement>>> partitionerPartitions = 163IEnumerator<KeyValuePair<long, TElement>> partition = partitionerPartitions[i]; 209private readonly IEnumerator<KeyValuePair<long, TElement>> _sourceEnumerator; 211internal OrderablePartitionerEnumerator(IEnumerator<KeyValuePair<long, TElement>> sourceEnumerator) 220KeyValuePair<long, TElement> current = _sourceEnumerator.Current;
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (2)
197private IEnumerator<KeyValuePair<Wrapper<TInputOutput>, TKey>>? _hashLookupEnumerator; // Enumerates over _hashLookup. 261KeyValuePair<Wrapper<TInputOutput>, TKey> currentPair = _hashLookupEnumerator.Current;
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (2)
681private readonly KeyValuePair<Wrapper<TGroupKey>, ListChunk<TElement>> _keyValues; // A key value pair. 687internal GroupByGrouping(KeyValuePair<Wrapper<TGroupKey>, ListChunk<TElement>> keyValues)
System\Linq\Parallel\Utils\HashLookup.cs (1)
135internal KeyValuePair<TKey, TValue> this[int index]
System.Linq.Queryable (10)
System\Linq\Queryable.cs (10)
2261/// <returns>An <see cref="IQueryable{T}" /> that contains count for each distinct elements from the source sequence as a <see cref="KeyValuePair{TKey, TValue}"/> object.</returns> 2264public static IQueryable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer = null) where TKey : notnull 2269return source.Provider.CreateQuery<KeyValuePair<TKey, int>>( 2272new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, int>>>(CountBy).Method, 3093public static IQueryable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func, IEqualityComparer<TKey>? keyComparer = null) where TKey : notnull 3099return source.Provider.CreateQuery<KeyValuePair<TKey, TAccumulate>>( 3102new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, TAccumulate>>>(AggregateBy).Method, 3123public static IQueryable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, TAccumulate>> seedSelector, Expression<Func<TAccumulate, TSource, TAccumulate>> func, IEqualityComparer<TKey>? keyComparer = null) where TKey : notnull 3130return source.Provider.CreateQuery<KeyValuePair<TKey, TAccumulate>>( 3133new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, TAccumulate>>, Expression<Func<TAccumulate, TSource, TAccumulate>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, TAccumulate>>>(AggregateBy).Method,
System.Net.Http (50)
src\libraries\Common\src\System\Collections\Generic\BidirectionalDictionary.cs (3)
9internal sealed class BidirectionalDictionary<T1, T2> : IEnumerable<KeyValuePair<T1, T2>> 53IEnumerator<KeyValuePair<T1, T2>> IEnumerable<KeyValuePair<T1, T2>>.GetEnumerator()
System\Net\Http\DiagnosticsHandler.cs (1)
119KeyValuePair<string, object?> methodTag = DiagnosticsHelper.GetMethodTag(request.Method, out bool isUnknownMethod);
System\Net\Http\DiagnosticsHelper.cs (1)
21internal static KeyValuePair<string, object?> GetMethodTag(HttpMethod method, out bool isUnknownMethod)
System\Net\Http\FormUrlEncodedContent.cs (3)
16IEnumerable<KeyValuePair< 26private static byte[] GetContentByteArray(IEnumerable<KeyValuePair<string?, string?>> nameValueCollection) 33foreach (KeyValuePair<string?, string?> pair in nameValueCollection)
System\Net\Http\Headers\HttpHeaders.cs (7)
17/// We're using a custom type instead of <see cref="KeyValuePair{TKey, TValue}"/> because we need ref access to fields. 31public abstract class HttpHeaders : IEnumerable<KeyValuePair<string, IEnumerable<string>>> 339public IEnumerator<KeyValuePair<string, IEnumerable<string>>> GetEnumerator() => _count == 0 ? 340((IEnumerable<KeyValuePair<string, IEnumerable<string>>>)Array.Empty<KeyValuePair<string, IEnumerable<string>>>()).GetEnumerator() : 343private IEnumerator<KeyValuePair<string, IEnumerable<string>>> GetEnumeratorCore() 1399foreach (KeyValuePair<HeaderDescriptor, object> entry in dictionary)
System\Net\Http\Headers\HttpHeadersNonValidated.cs (7)
91IEnumerator<KeyValuePair<string, HeaderStringValues>> IEnumerable<KeyValuePair<string, HeaderStringValues>>.GetEnumerator() => GetEnumerator(); 101foreach (KeyValuePair<string, HeaderStringValues> header in this) 113foreach (KeyValuePair<string, HeaderStringValues> header in this) 121public struct Enumerator : IEnumerator<KeyValuePair<string, HeaderStringValues>> 126private KeyValuePair<string, HeaderStringValues> _current; 159public KeyValuePair<string, HeaderStringValues> Current => _current;
System\Net\Http\HttpRequestOptions.cs (16)
35int ICollection<KeyValuePair<string, object?>>.Count => Options.Count; 36bool ICollection<KeyValuePair<string, object?>>.IsReadOnly => ((IDictionary<string, object?>)Options).IsReadOnly; 38void ICollection<KeyValuePair<string, object?>>.Add(KeyValuePair<string, object?> item) => ((IDictionary<string, object?>)Options).Add(item); 39void ICollection<KeyValuePair<string, object?>>.Clear() => Options.Clear(); 40bool ICollection<KeyValuePair<string, object?>>.Contains(KeyValuePair<string, object?> item) => ((IDictionary<string, object?>)Options).Contains(item); 42void ICollection<KeyValuePair<string, object?>>.CopyTo(KeyValuePair<string, object?>[] array, int arrayIndex) => 44IEnumerator<KeyValuePair<string, object?>> IEnumerable<KeyValuePair<string, object?>>.GetEnumerator() => Options.GetEnumerator(); 47bool ICollection<KeyValuePair<string, object?>>.Remove(KeyValuePair<string, object?> item) => ((IDictionary<string, object?>)Options).Remove(item); 50int IReadOnlyCollection<KeyValuePair<string, object?>>.Count => Options.Count; 92public KeyValuePair<string, object?>[] Items 97var items = new KeyValuePair<string, object?>[dictionary.Count];
System\Net\Http\MultipartContent.cs (2)
317foreach (KeyValuePair<string, HeaderStringValues> headerPair in content.Headers.NonValidated) 372foreach (KeyValuePair<string, HeaderStringValues> headerPair in content.Headers.NonValidated)
System\Net\Http\SocketsHttpHandler\FailedProxyCache.cs (2)
124foreach (KeyValuePair<Uri, long> kvp in _failedProxies) 128((ICollection<KeyValuePair<Uri, long>>)_failedProxies).Remove(kvp);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (3)
956foreach (KeyValuePair<int, Http2Stream> kvp in _httpStreams) 1095foreach (KeyValuePair<int, Http2Stream> kvp in _httpStreams) 1834foreach (KeyValuePair<int, Http2Stream> kvp in _httpStreams)
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (1)
436foreach (KeyValuePair<QuicStream, Http3RequestStream> request in _activeRequests)
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (3)
456foreach (KeyValuePair<HttpConnectionKey, HttpConnectionPool> pool in _pools) 485foreach (KeyValuePair<HttpConnectionKey, HttpConnectionPool> entry in _pools) 512foreach (KeyValuePair<HttpConnectionKey, HttpConnectionPool> pool in _pools)
System\Net\Http\SocketsHttpHandler\Metrics\ConnectionMetrics.cs (1)
49private static KeyValuePair<string, object?> GetStateTag(bool idle) => new KeyValuePair<string, object?>("http.connection.state", idle ? "idle" : "active");
System.Net.NameResolution (11)
System\Net\Dns.cs (7)
368KeyValuePair<IPAddress, AddressFamily> t => t.Key, 629KeyValuePair<string, AddressFamily> t => GetHostAddressesCore(t.Key, t.Value, activity), 631KeyValuePair<IPAddress, AddressFamily> t => GetHostAddressesCore(t.Key, t.Value, activity), 640KeyValuePair<string, AddressFamily> t => GetHostEntryCore(t.Key, t.Value, activity), 642KeyValuePair<IPAddress, AddressFamily> t => GetHostEntryCore(t.Key, t.Value, activity), 761((ICollection<KeyValuePair<object, Task>>)s_tasks).Remove(new KeyValuePair<object, Task>(key!, task!)); 774((ICollection<KeyValuePair<object, Task>>)s_tasks).Remove(new KeyValuePair<object, Task>(key!, task));
System\Net\NameResolutionMetrics.cs (2)
31var hostNameTag = KeyValuePair.Create("dns.question.name", (object?)hostName); 40var errorTypeTag = KeyValuePair.Create("error.type", (object?)errorType);
System\Net\NameResolutionTelemetry.cs (2)
133KeyValuePair<string, AddressFamily> t => t.Key, 135KeyValuePair<IPAddress, AddressFamily> t => t.Key.ToString(),
System.Net.NetworkInformation (2)
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (2)
276foreach (KeyValuePair<NetworkAddressChangedEventHandler, ExecutionContext?> 318foreach (KeyValuePair<NetworkAvailabilityChangedEventHandler, ExecutionContext?>
System.Net.Requests (3)
System\Net\HttpWebResponse.cs (2)
203foreach (var header in _httpResponseMessage.Headers) 210foreach (var header in _httpResponseMessage.Content.Headers)
System\Net\ServicePoint\ServicePointManager.cs (1)
133foreach (KeyValuePair<string, WeakReference<ServicePoint>> entry in s_servicePointTable)
System.Net.Security (3)
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (2)
130private IEnumerable<KeyValuePair<string, string>> EnumerateMechanisms() 173foreach (KeyValuePair<string, string> packageAndOid in EnumerateMechanisms())
System\Net\Security\SslSessionsCache.cs (1)
220KeyValuePair<SslCredKey, SafeCredentialReference>[] toRemoveAttempt = s_cachedCreds.ToArray();
System.Net.WebSockets.Client (6)
System\Net\WebSockets\HttpResponseHeadersReadOnlyCollection.cs (4)
23foreach (KeyValuePair<string, HeaderStringValues> header in _headers) 34foreach (KeyValuePair<string, HeaderStringValues> header in _headers) 45public IEnumerator<KeyValuePair<string, IEnumerable<string>>> GetEnumerator() 47foreach (KeyValuePair<string, HeaderStringValues> header in _headers)
System\Net\WebSockets\WebSocketHandle.Managed.cs (2)
389KeyValuePair<string, string> secKeyAndSecWebSocketAccept = CreateSecKeyAndSecWebSocketAccept(); 485private static KeyValuePair<string, string> CreateSecKeyAndSecWebSocketAccept()
System.Private.CoreLib (128)
src\libraries\System.Private.CoreLib\src\System\AppContext.AnyOS.cs (2)
46foreach (KeyValuePair<string, bool> kvp in s_switches) 73foreach (KeyValuePair<string, object?> kvp in s_dataStore)
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (3)
212foreach (KeyValuePair<SharedArrayPoolThreadLocalArray[], object?> tlsBuckets in _allTlsBuckets) 219foreach (KeyValuePair<SharedArrayPoolThreadLocalArray[], object?> tlsBuckets in _allTlsBuckets) 244foreach (KeyValuePair<SharedArrayPoolThreadLocalArray[], object?> tlsBuckets in _allTlsBuckets)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
20public DebugViewDictionaryItem(KeyValuePair<TKey, TValue> keyValue)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (33)
98public Dictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) : this(collection, null) { } 100public Dictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) : 101this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 111private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 157ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 158if (enumerable is KeyValuePair<TKey, TValue>[] array) 162else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>)) 164span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable); 169foreach (KeyValuePair<TKey, TValue> pair in enumerable) 177foreach (KeyValuePair<TKey, TValue> pair in span) 254void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => 257bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 268bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 342private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 372IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 373Count == 0 ? GenericEmptyEnumerator<KeyValuePair<TKey, TValue>>.Instance : 391var array = new KeyValuePair<TKey, TValue>[Count]; 393info.AddValue(KeyValuePairsName, array, typeof(KeyValuePair<TKey, TValue>[])); 1218KeyValuePair<TKey, TValue>[]? array = (KeyValuePair<TKey, TValue>[]?) 1219siInfo.GetValue(KeyValuePairsName, typeof(KeyValuePair<TKey, TValue>[])); 1457bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 1459void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) => 1489if (array is KeyValuePair<TKey, TValue>[] pairs) 1531IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1765public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1770private KeyValuePair<TKey, TValue> _current; 1810public KeyValuePair<TKey, TValue> Current => _current;
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionary.cs (1)
12public interface IDictionary<TKey, TValue> : ICollection<KeyValuePair<TKey, TValue>>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IDictionaryDebugView.cs (1)
22var keyValuePairs = new KeyValuePair<TKey, TValue>[_dict.Count];
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\IReadOnlyDictionary.cs (1)
9public interface IReadOnlyDictionary<TKey, TValue> : IReadOnlyCollection<KeyValuePair<TKey, TValue>>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\KeyValuePair.cs (1)
15public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (15)
73bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) 78void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 83bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 85void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 90void ICollection<KeyValuePair<TKey, TValue>>.Clear() 95bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 100public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() 179if (array is KeyValuePair<TKey, TValue>[] pairs) 187foreach (var item in m_dictionary) 197foreach (var item in m_dictionary) 217private readonly IEnumerator<KeyValuePair<TKey, TValue>> _enumerator;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\CounterPayload.cs (6)
10internal sealed class CounterPayload : IEnumerable<KeyValuePair<string, object?>> 38public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 48private IEnumerable<KeyValuePair<string, object?>> ForEnumeration 71internal sealed class IncrementingCounterPayload : IEnumerable<KeyValuePair<string, object?>> 93public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 103private IEnumerable<KeyValuePair<string, object?>> ForEnumeration
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\DiagnosticCounter.cs (1)
132KeyValuePair<string, string?> current = enumerator.Current;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (5)
2330foreach (KeyValuePair<int, bool> entry in dispatcher.m_EventEnabled) 5452foreach (KeyValuePair<int, ChannelInfo> item in this.channelTab) 5636var sortedChannels = new List<KeyValuePair<int, ChannelInfo>>(); 5637foreach (KeyValuePair<int, ChannelInfo> p in channelTab) { sortedChannels.Add(p); } 5640foreach (KeyValuePair<int, ChannelInfo> kvpair in sortedChannels)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (5)
54public void Add(KeyValuePair<string, object?> payloadEntry) 64public bool Contains(KeyValuePair<string, object?> entry) 85public IEnumerator<KeyValuePair<string, object?>> GetEnumerator() 95public void CopyTo(KeyValuePair<string, object?>[] payloadEntries, int count) 105public bool Remove(KeyValuePair<string, object?> entry)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\NameInfo.cs (2)
14: ConcurrentSetItem<KeyValuePair<string, EventTags>, NameInfo> 58public override int Compare(KeyValuePair<string, EventTags> key)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (1)
410IsGenericMatch(dataType, typeof(KeyValuePair<,>)))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventTypes.cs (1)
28private ConcurrentSet<KeyValuePair<string, EventTags>, NameInfo> nameInfos;
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceSet.cs (1)
218foreach (var item in copyOfTable)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (8)
15public sealed class ConditionalWeakTable<TKey, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 360IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 366GenericEmptyEnumerator<KeyValuePair<TKey, TValue>>.Instance : 371IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 374private sealed class Enumerator : IEnumerator<KeyValuePair<TKey, TValue>> 395private KeyValuePair<TKey, TValue> _current; // the current entry set by MoveNext and returned from Current 478public KeyValuePair<TKey, TValue> Current
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\TypeMapLazyDictionary.cs (1)
260public IEnumerator<KeyValuePair<TKey, Type>> GetEnumerator() => throw new NotSupportedException();
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (2)
287foreach (KeyValuePair<long, WeakReference<AssemblyLoadContext>> item in allContexts) 481foreach (KeyValuePair<long, WeakReference<AssemblyLoadContext>> alcAlive in allContexts)
src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
168foreach (KeyValuePair<int, EncodingInfo> pair in encodingInfoList)
src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (35)
141private readonly KeyValuePair<IAsyncLocal, object?> _item0; 143public OneElementAsyncLocalValueMap(KeyValuePair<IAsyncLocal, object?> item0) 154KeyValuePair<IAsyncLocal, object?> newItem = KeyValuePair.Create(key, value); 187private readonly KeyValuePair<IAsyncLocal, object?> _item0; 188private readonly KeyValuePair<IAsyncLocal, object?> _item1; 191KeyValuePair<IAsyncLocal, object?> item0, 192KeyValuePair<IAsyncLocal, object?> item1) 204KeyValuePair<IAsyncLocal, object?> newItem = KeyValuePair.Create(key, value); 244private readonly KeyValuePair<IAsyncLocal, object?> _item0; 245private readonly KeyValuePair<IAsyncLocal, object?> _item1; 246private readonly KeyValuePair<IAsyncLocal, object?> _item2; 249KeyValuePair<IAsyncLocal, object?> item0, 250KeyValuePair<IAsyncLocal, object?> item1, 251KeyValuePair<IAsyncLocal, object?> item2) 264KeyValuePair<IAsyncLocal, object?> newItem = KeyValuePair.Create(key, value); 311private readonly KeyValuePair<IAsyncLocal, object?> _item0; 312private readonly KeyValuePair<IAsyncLocal, object?> _item1; 313private readonly KeyValuePair<IAsyncLocal, object?> _item2; 314private readonly KeyValuePair<IAsyncLocal, object?> _item3; 317KeyValuePair<IAsyncLocal, object?> item0, 318KeyValuePair<IAsyncLocal, object?> item1, 319KeyValuePair<IAsyncLocal, object?> item2, 320KeyValuePair<IAsyncLocal, object?> item3) 333KeyValuePair<IAsyncLocal, object?> newItem = KeyValuePair.Create(key, value); 388private readonly KeyValuePair<IAsyncLocal, object?>[] _keyValues; 390internal MultiElementAsyncLocalValueMap(KeyValuePair<IAsyncLocal, object?>[] keyValues) 407KeyValuePair<IAsyncLocal, object?>[] newValues = _keyValues.AsSpan().ToArray(); 428var newValues = new KeyValuePair<IAsyncLocal, object?>[_keyValues.Length - 1]; 448var newValues = new KeyValuePair<IAsyncLocal, object?>[_keyValues.Length + 1]; 456foreach (KeyValuePair<IAsyncLocal, object?> pair in _keyValues) 466foreach (KeyValuePair<IAsyncLocal, object?> pair in _keyValues) 494foreach (KeyValuePair<IAsyncLocal, object?> pair in this) 513var newValues = new KeyValuePair<IAsyncLocal, object?>[MultiElementAsyncLocalValueMap.MaxMultiElements]; 515foreach (KeyValuePair<IAsyncLocal, object?> pair in this) 528foreach (KeyValuePair<IAsyncLocal, object?> pair in this)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (1)
491foreach (KeyValuePair<TaskScheduler, object?> item in s_activeTaskSchedulers)
System.Private.CoreLib.Generators (3)
EventSourceGenerator.Parser.cs (2)
49ImmutableArray<KeyValuePair<string, TypedConstant>> args = attribute.NamedArguments; 50foreach (KeyValuePair<string, TypedConstant> arg in args)
NativeRuntimeEventSourceGenerator.cs (1)
42foreach (KeyValuePair<string, string> kvp in manifestsToGenerate)
System.Private.DataContractSerialization (13)
System\Runtime\Serialization\CollectionDataContract.cs (5)
772MethodInfo? buildIncrementCollectionCountDelegate = GetBuildIncrementCollectionCountGenericDelegate(typeof(KeyValuePair<,>).MakeGenericType(ItemType.GetGenericArguments())); 903return new GenericDictionaryEnumerator<K, V>((IEnumerator<KeyValuePair<K, V>>)enumerator); 1621private readonly IEnumerator<KeyValuePair<K, V>> _enumerator; 1623public GenericDictionaryEnumerator(IEnumerator<KeyValuePair<K, V>> enumerator) 1642KeyValuePair<K, V> current = _enumerator.Current;
System\Runtime\Serialization\DataContractSet.cs (3)
44foreach (KeyValuePair<XmlQualifiedName, DataContract> pair in dataContractSet.Contracts) 51foreach (KeyValuePair<DataContract, object> pair in dataContractSet._processedContracts) 644internal IEnumerator<KeyValuePair<XmlQualifiedName, DataContract>> GetEnumerator()
System\Runtime\Serialization\Globals.cs (1)
278s_typeOfKeyValuePair ??= typeof(KeyValuePair<,>);
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
285foreach (KeyValuePair<XmlQualifiedName, DataContract> knownDataContract in _traditionalDataContract.KnownDataContracts)
System\Runtime\Serialization\Json\JsonXmlDataContract.cs (1)
76foreach (KeyValuePair<XmlQualifiedName, DataContract> pair in entry)
System\Runtime\Serialization\SchemaExporter.cs (1)
47foreach (KeyValuePair<XmlQualifiedName, DataContract> pair in _dataContractSet.Contracts)
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (1)
957foreach (KeyValuePair<string, string> prefixNsPair in namespaces)
System.Private.Windows.Core (1)
System\Private\Windows\BinaryFormat\Deserializer\Deserializer.cs (1)
360foreach (KeyValuePair<SerializationRecordId, HashSet<SerializationRecordId>> pair in _incompleteDependencies)
System.Private.Windows.Core.TestUtilities (2)
XUnit\SkipOnArchitectureAttribute.cs (2)
29public IReadOnlyCollection<KeyValuePair<string, string>> GetTraits() 37return Array.Empty<KeyValuePair<string, string>>();
System.Private.Xml (22)
System\Xml\Dom\DocumentSchemaValidator.cs (1)
460foreach (KeyValuePair<string, string> pair in namespaceDecls)
System\Xml\Dom\XmlDocument.cs (2)
666foreach (KeyValuePair<XmlQualifiedName, SchemaAttDef> attrDefs in ed.AttDefs) 1672foreach (KeyValuePair<XmlQualifiedName, SchemaAttDef> attrDefs in ed.AttDefs)
System\Xml\Dom\XmlLoader.cs (2)
658foreach (KeyValuePair<XmlQualifiedName, SchemaElementDecl> elementDecls in schInfo.ElementDecls) 663foreach (KeyValuePair<XmlQualifiedName, SchemaAttDef> attDefs in elementDecl.AttDefs)
System\Xml\Schema\ContentValidator.cs (6)
135foreach (KeyValuePair<XmlQualifiedName, int> entry in _names) 147foreach (KeyValuePair<string, int> wildcard in _wildcards) 203foreach (KeyValuePair<XmlQualifiedName, int> name in _names) 213foreach (KeyValuePair<string, int> wildcard in _wildcards) 2197foreach (KeyValuePair<XmlQualifiedName, int> element in _elements) 2212foreach (KeyValuePair<XmlQualifiedName, int> element in _elements)
System\Xml\Schema\SchemaInfo.cs (2)
305foreach (KeyValuePair<XmlQualifiedName, SchemaElementDecl> entry in sinfo._elementDecls) 312foreach (KeyValuePair<XmlQualifiedName, SchemaElementDecl> entry in sinfo._elementDeclsByType)
System\Xml\Schema\XmlSchemaValidator.cs (1)
2140foreach (KeyValuePair<string, string> pair in namespaceDecls)
System\Xml\Serialization\CodeGenerator.cs (1)
1582foreach (var item in _locals)
System\Xml\Serialization\Types.cs (2)
1150foreach (KeyValuePair<string, MemberInfo> pair in memberInfos) 1162foreach (KeyValuePair<string, MemberInfo> pair in replaceList)
System\Xml\Serialization\XmlSerializerNamespaces.cs (1)
123foreach (var nsPair in _namespaces)
System\Xml\XPath\XPathNavigator.cs (1)
1884foreach (KeyValuePair<string, string> pair in dictionary)
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (2)
214foreach (KeyValuePair<Template, Stylesheet> pair in _fwdApplyImportsGraph!) 274foreach (KeyValuePair<QilName, XslFlags> modeFlag in sheet.ModeFlags)
System\Xml\Xsl\Xslt\XsltInput.cs (1)
132foreach (KeyValuePair<string, string> prefixNamespacePair in namespacesInScope)
System.Reflection.Emit (6)
System\Reflection\Emit\ILGeneratorImpl.cs (2)
32private List<KeyValuePair<object, BlobWriter>> _memberReferences = new(); 50internal List<KeyValuePair<object, BlobWriter>> GetMemberReferences() => _memberReferences;
System\Reflection\Emit\ModuleBuilderImpl.cs (4)
452KeyValuePair<SymbolDocumentWriter, List<SequencePoint>> pair = enumerator.Current; 611foreach (KeyValuePair<object, BlobWriter> pair in il.GetMemberReferences()) 618if (pair.Key is KeyValuePair<MethodInfo, Type[]> pair2) 782KeyValuePair<MethodInfo, BlobBuilder> pair = new(method, signature);
System.Reflection.Metadata (19)
System\Reflection\Metadata\Ecma335\BlobDictionary.cs (5)
17private readonly Dictionary<int, KeyValuePair<ImmutableArray<byte>, BlobHandle>> _dictionary; 25private unsafe ref KeyValuePair<ImmutableArray<byte>, BlobHandle> GetValueRefOrAddDefault(ReadOnlySpan<byte> key, out bool exists) 30ref var entry = ref CollectionsMarshal.GetValueRefOrAddDefault(_dictionary, dictionaryKey, out exists); 45ref var entry = ref GetValueRefOrAddDefault(key, out exists); 106public Dictionary<int, KeyValuePair<ImmutableArray<byte>, BlobHandle>>.Enumerator GetEnumerator() =>
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (6)
540var sorted = new List<KeyValuePair<string, StringHandle>>(strings); 553foreach (KeyValuePair<string, StringHandle> entry in sorted) 580private sealed class SuffixSort : IComparer<KeyValuePair<string, StringHandle>> 584public int Compare(KeyValuePair<string, StringHandle> xPair, KeyValuePair<string, StringHandle> yPair) 626foreach (var entry in _blobs)
System\Reflection\Metadata\Internal\NamespaceCache.cs (6)
142foreach (var group in namespaceBuilderTable) 170List<KeyValuePair<NamespaceDefinitionHandle, NamespaceDataBuilder>>? remaps = null; 171foreach (var group in table) 181remaps ??= new List<KeyValuePair<NamespaceDefinitionHandle, NamespaceDataBuilder>>(); 193foreach (var tuple in remaps) 316foreach (var namespaceData in namespaces)
System\Reflection\Metadata\Internal\VirtualHeap.cs (1)
60foreach (var blobPair in blobs)
System\Reflection\Metadata\MetadataReader.cs (1)
1470foreach (var group in groupedNestedTypes)
System.Resources.Extensions (3)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
307foreach (KeyValuePair<string, PrecannedResource> entry in _preserializedData) 315foreach (var item in _resourceList)
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (1)
365foreach (KeyValuePair<SerializationRecordId, HashSet<SerializationRecordId>> pair in _incompleteDependencies)
System.Resources.Writer (2)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
307foreach (KeyValuePair<string, PrecannedResource> entry in _preserializedData) 315foreach (var item in _resourceList)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
93[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.KeyValuePair<,>))]
System.Runtime.Caching (6)
System\Runtime\Caching\MemoryCache.cs (1)
495protected override IEnumerator<KeyValuePair<string, object>> GetEnumerator()
System\Runtime\Caching\ObjectCache.cs (5)
16public abstract class ObjectCache : IEnumerable<KeyValuePair<string, object>> 49return ((IEnumerable<KeyValuePair<string, object>>)this).GetEnumerator(); 54IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator() 59protected abstract IEnumerator<KeyValuePair<string, object>> GetEnumerator();
System.Runtime.Serialization.Schema (4)
System\Runtime\Serialization\Schema\CodeExporter.cs (4)
51foreach (KeyValuePair<XmlQualifiedName, DataContract> pair in dataContractSet.Contracts) 72foreach (KeyValuePair<string, string> pair in _options.Namespaces) 211foreach (KeyValuePair<XmlQualifiedName, DataContract> pair in _dataContractSet.Contracts) 975foreach (KeyValuePair<XmlQualifiedName, DataContract> pair in knownContracts)
System.Security.Claims (1)
System\Security\Claims\Claim.cs (1)
494foreach (var kvp in _properties)
System.Security.Cryptography.Cose (9)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (8)
37private ICollection<KeyValuePair<CoseHeaderLabel, CoseHeaderValue>> HeaderParametersAsCollection => _headerParameters; 139public void Add(KeyValuePair<CoseHeaderLabel, CoseHeaderValue> item) => Add(item.Key, item.Value); 198public bool Contains(KeyValuePair<CoseHeaderLabel, CoseHeaderValue> item) 202public void CopyTo(KeyValuePair<CoseHeaderLabel, CoseHeaderValue>[] array, int arrayIndex) 206public IEnumerator<KeyValuePair<CoseHeaderLabel, CoseHeaderValue>> GetEnumerator() 231public bool Remove(KeyValuePair<CoseHeaderLabel, CoseHeaderValue> item) 358foreach (KeyValuePair<CoseHeaderLabel, CoseHeaderValue> kvp in map) 399foreach (KeyValuePair<CoseHeaderLabel, CoseHeaderValue> kvp in map)
System\Security\Cryptography\Cose\CoseMessage.cs (1)
544foreach (KeyValuePair<CoseHeaderLabel, CoseHeaderValue> kvp in protectedHeaders)
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\ConnectionPool.cs (1)
92foreach (KeyValuePair<TKey, EndpointConnectionPool> poolEntry in _endpointPools)
System.ServiceModel.Primitives (13)
netstandard.cs (13)
1721public sealed partial class MessageProperties : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object>>, System.Collections.Generic.IDictionary<string, object>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>, System.Collections.IEnumerable, System.IDisposable 1731bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.IsReadOnly { get { return default; } } 1741void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.Add(System.Collections.Generic.KeyValuePair<string, object> pair) { } 1742bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.Contains(System.Collections.Generic.KeyValuePair<string, object> pair) { return default; } 1743void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.CopyTo(System.Collections.Generic.KeyValuePair<string, object>[] array, int index) { } 1744bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Object>>.Remove(System.Collections.Generic.KeyValuePair<string, object> pair) { return default; } 1745System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, object>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, System.Object>>.GetEnumerator() { return default; }
System.ServiceModel.Primitives.Tests (1)
ServiceModel\MessageContractTest.4.4.0.cs (1)
161foreach (var property in msg.Properties)
System.Speech (13)
artifacts\obj\System.Speech\Debug\net10.0\System.Speech.notsupported.cs (13)
296public sealed partial class SemanticValue : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue>>, System.Collections.Generic.IDictionary<string, System.Speech.Recognition.SemanticValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue>>, System.Collections.IEnumerable 303bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.IsReadOnly { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } } 307public bool Contains(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue> item) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } 311void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.Add(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue> key) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } 312void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.Clear() { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } 313void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.CopyTo(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue>[] array, int index) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } 314bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.Remove(System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue> key) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } 318System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, System.Speech.Recognition.SemanticValue>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,System.Speech.Recognition.SemanticValue>>.GetEnumerator() { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); }
System.Text.Json (60)
src\libraries\System.Text.Json\Common\ReflectionExtensions.cs (1)
225=> type.IsGenericType && type.GetGenericTypeDefinition() == typeof(KeyValuePair<,>);
System\Text\Json\JsonHelpers.cs (1)
257IEnumerable<KeyValuePair<TKey, TValue>> collection,
System\Text\Json\Nodes\JsonObject.cs (10)
36public JsonObject(IEnumerable<KeyValuePair<string, JsonNode?>> properties, JsonNodeOptions? options = null) : this(options) 38int capacity = properties is ICollection<KeyValuePair<string, JsonNode?>> propertiesCollection ? propertiesCollection.Count : 0; 41foreach (KeyValuePair<string, JsonNode?> node in properties) 99foreach (KeyValuePair<string, JsonNode?> item in dictionary) 109KeyValuePair<string, JsonNode?>? item = FindValue(node); 144foreach (KeyValuePair<string, JsonNode?> entry in Dictionary) 182foreach (KeyValuePair<string, JsonNode?> item in currentDict) 273private KeyValuePair<string, JsonNode?>? FindValue(JsonNode? value) 275foreach (KeyValuePair<string, JsonNode?> item in Dictionary) 308foreach (KeyValuePair<string, JsonNode?> item in _node)
System\Text\Json\Nodes\JsonObject.IDictionary.cs (9)
46public void Add(KeyValuePair<string, JsonNode?> property) => Add(property.Key, property.Value); 121bool ICollection<KeyValuePair<string, JsonNode?>>.Contains(KeyValuePair<string, JsonNode?> item) => 141void ICollection<KeyValuePair<string, JsonNode?>>.CopyTo(KeyValuePair<string, JsonNode?>[] array, int index) => 150public IEnumerator<KeyValuePair<string, JsonNode?>> GetEnumerator() => Dictionary.GetEnumerator(); 161bool ICollection<KeyValuePair<string, JsonNode?>>.Remove(KeyValuePair<string, JsonNode?> item) => Remove(item.Key); 197bool ICollection<KeyValuePair<string, JsonNode?>>.IsReadOnly => false;
System\Text\Json\Nodes\JsonObject.IList.cs (13)
9public partial class JsonObject : IList<KeyValuePair<string, JsonNode?>> 15public KeyValuePair<string, JsonNode?> GetAt(int index) => Dictionary.GetAt(index); 29KeyValuePair<string, JsonNode?> existing = dictionary.GetAt(index); 43KeyValuePair<string, JsonNode?> existing = dictionary.GetAt(index); 80KeyValuePair<string, JsonNode?> existing = Dictionary.GetAt(index); 86KeyValuePair<string, JsonNode?> IList<KeyValuePair<string, JsonNode?>>.this[int index] 93int IList<KeyValuePair<string, JsonNode?>>.IndexOf(KeyValuePair<string, JsonNode?> item) => ((IList<KeyValuePair<string, JsonNode?>>)Dictionary).IndexOf(item); 96void IList<KeyValuePair<string, JsonNode?>>.Insert(int index, KeyValuePair<string, JsonNode?> item) => Insert(index, item.Key, item.Value); 99void IList<KeyValuePair<string, JsonNode?>>.RemoveAt(int index) => RemoveAt(index);
System\Text\Json\Schema\JsonSchema.cs (3)
65public List<KeyValuePair<string, JsonSchema>>? Properties { get => _properties; set { VerifyMutable(); _properties = value; } } 66private List<KeyValuePair<string, JsonSchema>>? _properties; 193foreach (KeyValuePair<string, JsonSchema> property in Properties)
System\Text\Json\Schema\JsonSchemaExporter.cs (4)
65KeyValuePair<string, JsonSchema>? typeDiscriminator = null, 111KeyValuePair<string, JsonSchema>? derivedTypeDiscriminator = null; 197List<KeyValuePair<string, JsonSchema>>? properties = null; 315List<KeyValuePair<string, JsonSchema>>? dictProps = null;
System\Text\Json\Serialization\Converters\Collection\DictionaryDefaultConverter.cs (3)
16where TDictionary : IEnumerable<KeyValuePair<TKey, TValue>> 27IEnumerator<KeyValuePair<TKey, TValue>> enumerator; 40enumerator = (IEnumerator<KeyValuePair<TKey, TValue>>)state.Current.CollectionEnumerator;
System\Text\Json\Serialization\Converters\Collection\ImmutableDictionaryOfTKeyTValueConverter.cs (2)
43Func<IEnumerable<KeyValuePair<TKey, TValue>>, TDictionary>? creator = 44(Func<IEnumerable<KeyValuePair<TKey, TValue>>, TDictionary>?)state.Current.JsonTypeInfo.CreateObjectWithArgs;
System\Text\Json\Serialization\Converters\FSharp\FSharpMapConverter.cs (2)
13where TMap : IEnumerable<KeyValuePair<TKey, TValue>> 48int mapCount = ((ICollection<KeyValuePair<TKey, TValue>>)map).Count;
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (1)
425foreach (KeyValuePair<string, JsonNode?> property in jsonObject)
System\Text\Json\Serialization\JsonSerializerOptionsUpdateHandler.cs (1)
21foreach (KeyValuePair<JsonSerializerOptions, object?> options in JsonSerializerOptions.TrackedOptionsInstances.All)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Collections.cs (1)
83Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection> createRangeFunc)
System\Text\Json\Serialization\Metadata\MemberAccessor.cs (1)
22public abstract Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection> CreateImmutableDictionaryCreateRangeDelegate<TCollection, TKey, TValue>();
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.Cache.cs (1)
67foreach (KeyValuePair<TKey, CacheEntry> kvp in _cache)
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.cs (1)
46public override Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection> CreateImmutableDictionaryCreateRangeDelegate<TCollection, TKey, TValue>() =>
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (3)
206public override Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection> CreateImmutableDictionaryCreateRangeDelegate<TCollection, TKey, TValue>() => 207CreateDelegate<Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection>>( 208CreateImmutableDictionaryCreateRangeDelegate(typeof(TCollection), typeof(TKey), typeof(TValue), typeof(IEnumerable<KeyValuePair<TKey, TValue>>)));
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (3)
136public override Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection> CreateImmutableDictionaryCreateRangeDelegate<TCollection, TKey, TValue>() 139return (Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection>)createRange.CreateDelegate( 140typeof(Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection>));
System.Text.Json.SourceGeneration (5)
Helpers\KnownTypeSymbols.cs (1)
79public INamedTypeSymbol? KeyValuePair => GetOrResolveType(typeof(KeyValuePair<,>), ref _KeyValuePair);
JsonSourceGenerator.Emitter.cs (1)
1433foreach (KeyValuePair<string, string> name_varName_pair in _propertyNames)
JsonSourceGenerator.Parser.cs (3)
298foreach (KeyValuePair<string, TypedConstant> namedArg in attributeData.NamedArguments) 470foreach (KeyValuePair<string, TypedConstant> namedArg in attributeData.NamedArguments) 1279ImmutableArray<KeyValuePair<string, TypedConstant>> namedArgs = attributeData.NamedArguments;
System.Text.RegularExpressions (17)
System\Text\RegularExpressions\GroupCollection.cs (5)
194IEnumerator<KeyValuePair<string, Group>> IEnumerable<KeyValuePair<string, Group>>.GetEnumerator() => 234private sealed class Enumerator : IEnumerator<Group>, IEnumerator<KeyValuePair<string, Group>> 273KeyValuePair<string, Group> IEnumerator<KeyValuePair<string, Group>>.Current
System\Text\RegularExpressions\RegexCharClass.cs (2)
1878var temp = new List<KeyValuePair<string, string>>(s_definedCategories); 1997foreach (KeyValuePair<string, string> kvp in s_definedCategories)
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
757foreach (KeyValuePair<int, (RegexCharClass Set, int Count)> pair in combined)
System\Text\RegularExpressions\RegexWriter.cs (1)
116foreach (KeyValuePair<string, int> stringEntry in _stringTable)
System\Text\RegularExpressions\Symbolic\SparseIntMap.cs (3)
15private readonly List<KeyValuePair<int, T>> _dense = new(); 25public List<KeyValuePair<int, T>> Values => _dense; 36List<KeyValuePair<int, T>> dense = _dense;
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (4)
1314foreach (ref KeyValuePair<int, int> nfaState in CollectionsMarshal.AsSpan(state.NfaState!.NfaStateSet.Values)) 1328foreach (ref KeyValuePair<int, int> nfaState in CollectionsMarshal.AsSpan(state.NfaState!.NfaStateSet.Values)) 1373foreach (ref KeyValuePair<int, int> sourceState in CollectionsMarshal.AsSpan(sourceStates.Values)) 1427foreach (ref KeyValuePair<int, int> nfaState in CollectionsMarshal.AsSpan(state.NfaState!.NfaStateSet.Values))
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Dgml.cs (1)
57foreach (KeyValuePair<(int Source, int Target), (TSet Rule, List<int> NfaTargets)> transition in transitions)
System.Text.RegularExpressions.Generator (6)
RegexGenerator.cs (2)
182foreach (KeyValuePair<string, string[]> helper in regexImpl.Item3) 266foreach (KeyValuePair<string, string[]> helper in requiredHelpers.OrderBy(h => h.Key, StringComparer.Ordinal))
RegexGenerator.Emitter.cs (1)
1557foreach (KeyValuePair<string, string[]> localFunctions in additionalLocalFunctions.OrderBy(k => k.Key))
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (2)
1878var temp = new List<KeyValuePair<string, string>>(s_definedCategories); 1997foreach (KeyValuePair<string, string> kvp in s_definedCategories)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
757foreach (KeyValuePair<int, (RegexCharClass Set, int Count)> pair in combined)
System.Threading.Channels (2)
System\Threading\Channels\AsyncOperation.cs (2)
375var t = (KeyValuePair<Action<object?>, object?>)s!;
System.Threading.RateLimiting (5)
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (4)
26private readonly List<KeyValuePair<TKey, Lazy<RateLimiter>>> _cachedLimiters = new(); 128foreach (KeyValuePair<TKey, Lazy<RateLimiter>> limiter in _limiters) 163foreach (KeyValuePair<TKey, Lazy<RateLimiter>> limiter in _limiters) 228foreach (KeyValuePair<TKey, Lazy<RateLimiter>> rateLimiter in _cachedLimiters)
System\Threading\RateLimiting\RateLimitLease.cs (1)
63public virtual IEnumerable<KeyValuePair<string, object?>> GetAllMetadata()
System.Threading.Tasks.Dataflow (120)
Blocks\ActionBlock.cs (2)
128private void ProcessMessage(Action<TInput> action, KeyValuePair<TInput, long> messageWithId) 151private void ProcessMessageWithTask(Func<TInput, Task> action, KeyValuePair<TInput, long> messageWithId)
Blocks\BatchBlock.cs (59)
274internal readonly KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>[] PostponedMessagesTemp; 276internal readonly List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> ReservedSourcesTemp; 292PostponedMessagesTemp = new KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>[batchSize]; 293ReservedSourcesTemp = new List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>>(batchSize); 758KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>[] postponedTemp = _nonGreedyState.PostponedMessagesTemp; 759List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp; 789KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage = postponedTemp[i]; 792var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 793var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage); 803KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage; 810var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 811var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage); 876KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>[] postponedTemp = _nonGreedyState.PostponedMessagesTemp; 877List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp; 906KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage = postponedTemp[i]; 907var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 908var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage); 917KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage; 923var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!); 924var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage); 984List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp; 993KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>> sourceAndMessage = reserved[i]; 994reserved[i] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>); // in case of exception from ConsumeMessage 1002for (int prev = 0; prev < i; prev++) reserved[prev] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>); 1006var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!); 1007var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, consumedMessage); 1016foreach (KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>> sourceAndMessage in reserved) 1036List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp; 1045KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>> sourceAndMessage = reserved[i]; 1046reserved[i] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>); // in case of exception from ConsumeMessage 1051var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!); 1052var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, consumedMessage); 1065foreach (KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>> sourceAndMessage in reserved) 1088List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp; 1091KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>> sourceAndMessage = reserved[i]; 1092reserved[i] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>); 1094KeyValuePair<DataflowMessageHeader, T> message = sourceAndMessage.Value;
Blocks\BroadcastBlock.cs (1)
335KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage;
Blocks\BufferBlock.cs (1)
337KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage;
Blocks\JoinBlock.cs (6)
493internal KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> ReservedMessage; 495internal KeyValuePair<bool, T> ConsumedMessage; 603KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> next; 648_nonGreedy.ReservedMessage = default(KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>); 690KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> next; 770_nonGreedy.ReservedMessage = default(KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>);
Blocks\TransformBlock.cs (4)
171private void ProcessMessage(Func<TInput, TOutput> transform, KeyValuePair<TInput, long> messageWithId) 223private void ProcessMessageWithTask(Func<TInput, Task<TOutput>> transform, KeyValuePair<TInput, long> messageWithId) 259var tuple = (Tuple<TransformBlock<TInput, TOutput>, KeyValuePair<TInput, long>>)state!; 268private void AsyncCompleteProcessMessageWithTask(Task<TOutput> completed, KeyValuePair<TInput, long> messageWithId)
Blocks\TransformManyBlock.cs (6)
99Action<KeyValuePair<TInput, long>> processMessageAction, 170private void ProcessMessage(Func<TInput, IEnumerable<TOutput>> transformFunction, KeyValuePair<TInput, long> messageWithId) 195private void ProcessMessageWithTask(Func<TInput, Task<IEnumerable<TOutput>>> function, KeyValuePair<TInput, long> messageWithId) 242var tuple = (Tuple<TransformManyBlock<TInput, TOutput>, KeyValuePair<TInput, long>>)state!; 254Task<IEnumerable<TOutput>> completed, KeyValuePair<TInput, long> messageWithId) 310KeyValuePair<TInput, long> messageWithId, IEnumerable<TOutput>? outputItems)
Blocks\TransformManyBlock.IAsyncEnumerable.cs (2)
54private async Task ProcessMessageAsync(Func<TInput, IAsyncEnumerable<TOutput>> transformFunction, KeyValuePair<TInput, long> messageWithId) 89KeyValuePair<TInput, long> messageWithId, IAsyncEnumerable<TOutput>? outputItems)
Internal\Common.cs (1)
510KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage;
Internal\EnumerableDebugView.cs (3)
23private readonly IEnumerable<KeyValuePair<TKey, TValue>> _enumerable; 27public EnumerableDebugView(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 35public KeyValuePair<TKey, TValue>[] Items { get { return _enumerable.ToArray(); } }
Internal\QueuedMap.cs (9)
47private readonly List<KeyValuePair<int, T>> _storage; 58_storage = new List<KeyValuePair<int, T>>(); 65_storage = new List<KeyValuePair<int, T>>(capacity); 153private readonly ArrayBasedLinkedQueue<KeyValuePair<TKey, TValue>> _queue; 161_queue = new ArrayBasedLinkedQueue<KeyValuePair<TKey, TValue>>(); 169_queue = new ArrayBasedLinkedQueue<KeyValuePair<TKey, TValue>>(capacity); 195internal bool TryPop(out KeyValuePair<TKey, TValue> item) 207internal int PopRange(KeyValuePair<TKey, TValue>[] items, int arrayOffset, int count) 219KeyValuePair<TKey, TValue> item;
Internal\ReorderingBuffer.cs (4)
44private readonly Dictionary<long, KeyValuePair<bool, TOutput>> _reorderingBuffer = new Dictionary<long, KeyValuePair<bool, TOutput>>(); 166KeyValuePair<bool, TOutput> nextOutputItemWithValidity; 193public Dictionary<long, KeyValuePair<bool, TOutput>> ItemsBuffered { get { return _buffer._reorderingBuffer; } }
Internal\TargetCore.cs (22)
51private static readonly Common.KeepAlivePredicate<TargetCore<TInput>, KeyValuePair<TInput, long>> _keepAlivePredicate = 52(TargetCore<TInput> thisTargetCore, out KeyValuePair<TInput, long> messageWithId) => 66private readonly IProducerConsumerQueue<KeyValuePair<TInput, long>> _messages; 70private readonly Action<KeyValuePair<TInput, long>> _callAction; 108Action<KeyValuePair<TInput, long>> callAction, 125(IProducerConsumerQueue<KeyValuePair<TInput, long>>)new SingleProducerSingleConsumerQueue<KeyValuePair<TInput, long>>() : 126(IProducerConsumerQueue<KeyValuePair<TInput, long>>)new MultiProducerMultiConsumerQueue<KeyValuePair<TInput, long>>(); 161KeyValuePair<TInput, long> dummy; 400KeyValuePair<TInput, long> messageWithId = default(KeyValuePair<TInput, long>); 418KeyValuePair<TInput, long> transferMessageWithId; 521private bool TryGetNextMessageForNewAsyncOperation(out KeyValuePair<TInput, long> messageWithId) 536messageWithId = default(KeyValuePair<TInput, long>); 575private bool TryGetNextAvailableOrPostponedMessage(out KeyValuePair<TInput, long> messageWithId) 596messageWithId = default(KeyValuePair<TInput, long>); 613out KeyValuePair<TInput, long> result) 625KeyValuePair<ISourceBlock<TInput>, DataflowMessageHeader> element; 699result = default(KeyValuePair<TInput, long>); 771KeyValuePair<TInput, long> ignored; 772IProducerConsumerQueue<KeyValuePair<TInput, long>> messages = _messages;
System.Threading.Tasks.Parallel (4)
System\Threading\Tasks\Parallel.cs (4)
2570IEnumerable<KeyValuePair<long, TSource>>? orderablePartitionerSource = null; 2635IEnumerator<KeyValuePair<long, TSource>>? myPartition = partitionState as IEnumerator<KeyValuePair<long, TSource>>; 2647KeyValuePair<long, TSource> kvp = myPartition.Current;
System.Windows.Forms (12)
misc\CollectionHelper.cs (4)
27if (target is KeyValuePair<TKey, TValue>[] pairsTarget) 29foreach (KeyValuePair<TKey, TValue> kvp in source) 36foreach (KeyValuePair<TKey, TValue> kvp in source) 53foreach (KeyValuePair<TKey, TValue> kvp in source)
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (2)
194foreach (var entry in _nativeProperties) 305foreach (var entry in _nativeProperties)
System\Windows\Forms\Controls\ComboBox\ComboBox.ACNativeWindow.cs (1)
108foreach (var acNativeWindowByHandle in s_acWindows)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
166foreach (KeyValuePair<int, AccessibleObject> keyValuePair in _listViewSubItemAccessibleObjects)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (1)
266foreach (var entry in categories)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (1)
84foreach (var item in _dictionary)
System\Windows\Forms\DataBinding\BindingContext.cs (1)
321foreach (KeyValuePair<HashKey, WeakReference> de in _listManagers)
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
506foreach (KeyValuePair<Control, string> entry in controlError)
System.Windows.Forms.Design (8)
System\ComponentModel\Design\ComponentDesigner.cs (1)
675foreach (KeyValuePair<string, InheritedPropertyDescriptor> de in _inheritedProps)
System\ComponentModel\Design\DesignerHost.Site.cs (1)
53foreach (KeyValuePair<object, object> de in _dictionary)
System\ComponentModel\Design\MenuCommandService.cs (1)
159foreach (KeyValuePair<Guid, List<MenuCommand>> group in _commandGroups)
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (1)
187foreach (KeyValuePair<string, object?> stateEntry in state)
System\ComponentModel\Design\Serialization\ComponentCache.cs (1)
91foreach (KeyValuePair<object, Entry> kvp in _cache)
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (2)
291foreach (KeyValuePair<string, object?> item in resourceSet) 487foreach (KeyValuePair<string, object?> de in _metadata)
System\Resources\Tools\StronglyTypedResourceBuilder.cs (1)
868foreach (KeyValuePair<string, ResourceData> entry in resourceList)
System.Windows.Forms.Tests (7)
misc\CollectionHelperTests.cs (5)
76var target = new KeyValuePair<string, string>[2]; 80var firstTargetItem = target[0]; 81Assert.Equal(typeof(KeyValuePair<string, string>), firstTargetItem.GetType()); 85var secondTargetItem = target[1]; 86Assert.Equal(typeof(KeyValuePair<string, string>), secondTargetItem.GetType());
System\Resources\ResXResourceWriterTests.cs (1)
41KeyValuePair<object, object> pair = Assert.Single(dictionary);
System\Windows\Forms\ListBindingHelperTests.cs (1)
135yield return new object[] { new Dictionary<int, string> { { 1, "string" } }, typeof(KeyValuePair<int, string>) };
System.Windows.Input.Manipulations (3)
System\Windows\Input\Manipulations\ManipulationSequence.cs (3)
858foreach (KeyValuePair<int, ManipulatorState> pair in this.manipulatorStates) 1014foreach (KeyValuePair<int, ManipulatorState> pair in this.manipulatorStates) 1033foreach (KeyValuePair<int, ManipulatorState> pair in this.manipulatorStates)
System.Xaml (76)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
132foreach (KeyValuePair<string, string> pair in _namespaceMap)
System\Xaml\AttachablePropertyServices.cs (3)
30public static void CopyPropertiesTo(object instance, KeyValuePair<AttachableMemberIdentifier, object>[] array, int index) 123public void CopyPropertiesTo(object instance, KeyValuePair<AttachableMemberIdentifier, object>[] array, int index) 132((ICollection<KeyValuePair<AttachableMemberIdentifier, object>>)instanceProperties).CopyTo(array, index);
System\Xaml\Context\ObjectWriterContext.cs (8)
988public IEnumerable<KeyValuePair<string, object>> GetAllNamesAndValuesInScope() 990List<KeyValuePair<string, object>> allNamesAndValues = new List<KeyValuePair<string, object>>(); 998foreach (KeyValuePair<string, object> nameValuePair in nameScopeDictionary) 1127public IEnumerable<KeyValuePair<string, object>> GetAllNamesAndValuesInScope() 1129List<KeyValuePair<string, object>> allNamesAndValues = new List<KeyValuePair<string, object>>(); 1133foreach (KeyValuePair<string, object> nameValuePair in nameScopeDictionary)
System\Xaml\Context\ServiceProviderContext.cs (1)
366IEnumerable<KeyValuePair<string, object>> IXamlNameResolver.GetAllNamesAndValuesInScope()
System\Xaml\Context\XamlCommonFrame.cs (2)
59foreach (KeyValuePair<string, string> ns in namespaces) 80foreach (KeyValuePair<string, string> kvp in _namespaces)
System\Xaml\Context\XamlParserContext.cs (1)
102foreach (KeyValuePair<string, string> kvp in _prescopeNamespaces)
System\Xaml\IAttachedPropertyStore.cs (1)
18void CopyPropertiesTo(KeyValuePair<AttachableMemberIdentifier, object>[] array, int index);
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
206foreach (KeyValuePair<string, string> ns in rootNamespaces)
System\Xaml\IXamlNameResolver.cs (1)
52IEnumerable<KeyValuePair<string, object>> GetAllNamesAndValuesInScope();
System\Xaml\MS\Impl\XmlNsInfo.cs (1)
228foreach (KeyValuePair<string, IList<string>> clrToXmlNs in result)
System\Xaml\NameScope.cs (10)
100private IEnumerator<KeyValuePair<string, object>> GetEnumerator() => new Enumerator(_nameMap); 104IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator() => GetEnumerator(); 112public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 126public bool Remove(KeyValuePair<string, object> item) 141public void Add(KeyValuePair<string, object> item) 156public bool Contains(KeyValuePair<string, object> item) 258private class Enumerator : IEnumerator<KeyValuePair<string, object>> 269public KeyValuePair<string, object> Current 275return default(KeyValuePair<string, object>);
System\Xaml\NameScopeDictionary.cs (17)
127private class Enumerator : IEnumerator<KeyValuePair<string, object>> 159public KeyValuePair<string, object> Current 175return default(KeyValuePair<string, object>); 224private IEnumerator<KeyValuePair<string, object>> GetEnumerator() 237IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator() 244int ICollection<KeyValuePair<string, object>>.Count 252bool ICollection<KeyValuePair<string, object>>.IsReadOnly 260void ICollection<KeyValuePair<string, object>>.Clear() 265void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex) 270bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item) 275void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item) 280bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
System\Xaml\Runtime\ClrObjectRuntime.cs (5)
393Type genericKVP = typeof(KeyValuePair<,>).MakeGenericType(keyType, itemType); 435public override KeyValuePair<AttachableMemberIdentifier, object>[] GetAttachedProperties(object instance) 439KeyValuePair<AttachableMemberIdentifier, object>[] result = null; 443result = new KeyValuePair<AttachableMemberIdentifier, object>[count]; 760private static IEnumerable<DictionaryEntry> DictionaryEntriesFromIEnumeratorKvp<TKey, TValue>(IEnumerator<KeyValuePair<TKey, TValue>> enumerator)
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (1)
103public override KeyValuePair<AttachableMemberIdentifier, object>[] GetAttachedProperties(object instance)
System\Xaml\Schema\TypeReflector.cs (6)
644List<KeyValuePair<MethodInfo, MethodInfo>> candidates = 645new List<KeyValuePair<MethodInfo, MethodInfo>>(); 1004foreach (KeyValuePair<string, List<MethodInfo>> nameAndSetterList in setters) 1031foreach (KeyValuePair<string, List<MethodInfo>> nameAndGetterList in getters) 1047foreach (KeyValuePair<string, List<MethodInfo>> nameAndAdderList in adders) 1190foreach (KeyValuePair<K, V> pair in this)
System\Xaml\Schema\XamlTypeInvoker.cs (1)
189foreach (KeyValuePair<XamlType, MethodInfo> pair in _addMethods)
System\Xaml\XamlObjectReader.cs (6)
1873foreach (var ap in props) 2546List<KeyValuePair<string, string>> namespaceMapList = new List<KeyValuePair<string, string>>(); 2547foreach (var pair in namespaceToPrefixMap) 2569private static int CompareByValue(KeyValuePair<string, string> x, KeyValuePair<string, string> y)
System\Xaml\XamlRuntime.cs (1)
72public abstract KeyValuePair<AttachableMemberIdentifier, object>[] GetAttachedProperties(object instance);
System\Xaml\XamlSchemaContext.cs (2)
114foreach (KeyValuePair<string, XamlNamespace> ns in NamespaceByUriList) 233foreach (KeyValuePair<string, string> nsToPrefix in newNamespaces.Prefixes)
System\Xaml\XamlXmlWriter.cs (7)
535foreach (var pair in prefixMap) 761public List<KeyValuePair<string, string>> GetSortedPrefixMap() 763List<KeyValuePair<string, string>> prefixMapList = new List<KeyValuePair<string, string>>(); 764foreach (var pair in prefixMap) 773private static int CompareByKey(KeyValuePair<string, string> x, KeyValuePair<string, string> y)
System.Xaml.Tests (30)
System\Windows\Markup\NameReferenceConverterTests.cs (1)
242public IEnumerable<KeyValuePair<string, object>> GetAllNamesAndValuesInScope()
System\Windows\Markup\ReferenceTests.cs (1)
122public IEnumerable<KeyValuePair<string, object>> GetAllNamesAndValuesInScope() =>
System\Xaml\Schema\XamlTypeInvokerTests.cs (1)
280new XamlType(typeof(KeyValuePair<int, string>), new XamlSchemaContext()),
System\Xaml\XamlTypeTests.cs (27)
2783yield return new object[] { new SubXamlType(typeof(KeyValuePair<int, string>), new XamlSchemaContext()), false }; 3150int ICollection<KeyValuePair<string, int>>.Count => throw new NotImplementedException(); 3152int ICollection<KeyValuePair<int, string>>.Count => throw new NotImplementedException(); 3154bool ICollection<KeyValuePair<string, int>>.IsReadOnly => throw new NotImplementedException(); 3156bool ICollection<KeyValuePair<int, string>>.IsReadOnly => throw new NotImplementedException(); 3160void ICollection<KeyValuePair<string, int>>.Add(KeyValuePair<string, int> item) => throw new NotImplementedException(); 3164void ICollection<KeyValuePair<int, string>>.Add(KeyValuePair<int, string> item) => throw new NotImplementedException(); 3166void ICollection<KeyValuePair<string, int>>.Clear() => throw new NotImplementedException(); 3168void ICollection<KeyValuePair<int, string>>.Clear() => throw new NotImplementedException(); 3170bool ICollection<KeyValuePair<string, int>>.Contains(KeyValuePair<string, int> item) => throw new NotImplementedException(); 3172bool ICollection<KeyValuePair<int, string>>.Contains(KeyValuePair<int, string> item) => throw new NotImplementedException(); 3178void ICollection<KeyValuePair<string, int>>.CopyTo(KeyValuePair<string, int>[] array, int arrayIndex) => throw new NotImplementedException(); 3180void ICollection<KeyValuePair<int, string>>.CopyTo(KeyValuePair<int, string>[] array, int arrayIndex) => throw new NotImplementedException(); 3182IEnumerator<KeyValuePair<string, int>> IEnumerable<KeyValuePair<string, int>>.GetEnumerator() => throw new NotImplementedException(); 3186IEnumerator<KeyValuePair<int, string>> IEnumerable<KeyValuePair<int, string>>.GetEnumerator() => throw new NotImplementedException(); 3190bool ICollection<KeyValuePair<string, int>>.Remove(KeyValuePair<string, int> item) => throw new NotImplementedException(); 3194bool ICollection<KeyValuePair<int, string>>.Remove(KeyValuePair<int, string> item) => throw new NotImplementedException();
TagHelpersWebSite (1)
TagHelpers\DictionaryPrefixTestTagHelper.cs (1)
20foreach (var item in PrefixValues)
Templates.Blazor.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
73foreach (var project in _projects)
src\Shared\Process\ProcessEx.cs (1)
116foreach (var envVar in envVars)
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
73foreach (var project in _projects)
src\Shared\Process\ProcessEx.cs (1)
116foreach (var envVar in envVars)
Templates.Blazor.WebAssembly.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
73foreach (var project in _projects)
src\Shared\Process\ProcessEx.cs (1)
116foreach (var envVar in envVars)
Templates.Mvc.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
73foreach (var project in _projects)
src\Shared\Process\ProcessEx.cs (1)
116foreach (var envVar in envVars)
Templates.Tests (4)
BaselineTest.cs (2)
41foreach (var template in baseline) 43foreach (var scenarioName in (JObject)template.Value)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
73foreach (var project in _projects)
src\Shared\Process\ProcessEx.cs (1)
116foreach (var envVar in envVars)
Test.Utilities (134)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
12public static void Deconstruct<TKey, TValue>(KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (29)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 200else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>)) 202span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable); 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (3)
18internal readonly struct EnumerableConditionalWeakTable<TKey, TValue>() : IEnumerable<KeyValuePair<TKey, TValue>> 38public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() 39=> ((IEnumerable<KeyValuePair<TKey, TValue>>)_table).GetEnumerator();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
237foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
Text.Analyzers (147)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (4)
24IEnumerable<KeyValuePair<K, OrderPreservingMultiDictionary<K, V>.ValueSet>> 42foreach (var kvp in _dictionary) 129IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (2)
702public static string NormalizePathPrefix(string filePath, ImmutableArray<KeyValuePair<string, string>> pathMap) 711foreach (var kv in pathMap)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (3)
118private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 120internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data) 155foreach (var kvp in _dictionary)
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (1)
81foreach (var value in values)
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
15internal sealed class MultiDictionary<K, V> : IEnumerable<KeyValuePair<K, MultiDictionary<K, V>.ValueSet>> 283IEnumerator<KeyValuePair<K, ValueSet>> IEnumerable<KeyValuePair<K, ValueSet>>.GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (2)
11internal sealed class OrderedMultiDictionary<K, V> : IEnumerable<KeyValuePair<K, SetWithInsertionOrder<V>>> 60public IEnumerator<KeyValuePair<K, SetWithInsertionOrder<V>>> GetEnumerator()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
621public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items) 632public static ImmutableDictionary<K, V> ToImmutableDictionaryOrEmpty<K, V>(this IEnumerable<KeyValuePair<K, V>>? items, IEqualityComparer<K>? keyComparer)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
768foreach (var kvp in dictionary) 891foreach (var entry in dictionary) 933foreach (var entry in map)
src\Dependencies\Collections\Extensions\KeyValuePairExtensions.cs (1)
15public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
src\Dependencies\Collections\Internal\IDictionaryDebugView`2.cs (2)
30public KeyValuePair<K, V>[] Items 34var items = new KeyValuePair<K, V>[_dict.Count];
src\Dependencies\Collections\KeyValuePair.cs (1)
25public static KeyValuePair<TKey, TValue> Create<TKey, TValue>(TKey key, TValue value) =>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (4)
35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (18)
106bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 183public bool Contains(KeyValuePair<TKey, TValue> pair) 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 238foreach (var item in items) 318IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 324IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 332IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 341void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 342=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex); 356void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) 359void ICollection<KeyValuePair<TKey, TValue>>.Clear() 362bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (12)
49bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder); 78public void Add(KeyValuePair<TKey, TValue> item) 81public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 87public bool Contains(KeyValuePair<TKey, TValue> item) 108public bool Remove(KeyValuePair<TKey, TValue> item) 125void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 126=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex); 128IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() 129=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 31/// <see cref="KeyValuePair{TKey, TValue}"/>. This is the return value for most instances of this 45public readonly KeyValuePair<TKey, TValue> Current => _enumerator.Current;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
70readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 118public void Add(KeyValuePair<TKey, TValue> item) 121public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 126foreach (var pair in items) 146public readonly bool Contains(KeyValuePair<TKey, TValue> item) 185public bool Remove(KeyValuePair<TKey, TValue> item) 211foreach (var pair in this) 236readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) 237=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex); 239IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (27)
46private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator; 134public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) 139public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) 140: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer) 150private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable) 194ReadOnlySpan<KeyValuePair<TKey, TValue>> span; 195if (enumerable is KeyValuePair<TKey, TValue>[] array) 208foreach (var pair in enumerable) 216foreach (var pair in span) 270void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) 273bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) 284bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) 358private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 389IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() => 393private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator() 870bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false; 872void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index) 902if (array is KeyValuePair<TKey, TValue>[] pairs) 945=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator(); 1172public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator 1177private KeyValuePair<TKey, TValue> _current; 1217public readonly KeyValuePair<TKey, TValue> Current => _current;
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Dictionary.cs (1)
21: Collection<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>
src\Dependencies\PooledObjects\ArrayBuilder.cs (1)
581foreach (var pair in accumulator)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (2)
11public static KeyValuePair<TKey?, TValue?> AsNullable<TKey, TValue>(this KeyValuePair<TKey, TValue> pair)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (3)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 299if (_wildcardMatchResult.TryGetValue(symbol, out var firstMatch)) 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult;
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
76public static PooledConcurrentDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 79foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (3)
120foreach (var kvp in _dictionary) 145private readonly IEnumerator<KeyValuePair<T, byte>> _kvpEnumerator; 147internal KeyEnumerator(IEnumerable<KeyValuePair<T, byte>> data)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (4)
20Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer) 51public static PooledDictionary<K, V> GetInstance(IEnumerable<KeyValuePair<K, V>> initializer, IEqualityComparer<K>? keyComparer = null) 54foreach (var kvp in initializer)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
77foreach (var kvp in ruleset.SpecificDiagnosticOptions.OrderBy(kvp => kvp.Key))
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (8)
37internal sealed class SmallDictionary<K, V> : IEnumerable<KeyValuePair<K, V>> 57foreach (var kv in other) 877public readonly KeyValuePair<K, V> Current => new(_current!.Key, _current!.Value); 917public sealed class EnumerableCore : IEnumerator<KeyValuePair<K, V>> 926KeyValuePair<K, V> IEnumerator<KeyValuePair<K, V>>.Current => _e.Current; 947IEnumerator<KeyValuePair<K, V>> IEnumerable<KeyValuePair<K, V>>.GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (2)
55foreach (var kvp in SymbolWritesMap) 74foreach (var kvp in SymbolWritesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (1)
23public BidirectionalMap(IEnumerable<KeyValuePair<TKey, TValue>> pairs, IEqualityComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (2)
45internal sealed class EnumerableConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> 119public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
251foreach (var entry in dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (1)
605foreach (var match in matches.ToImmutableArray())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
406ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments = default)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (11)
37public static readonly IEnumerable<KeyValuePair<byte, string>> ByteSpecialValues = []; 39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAttributeData.cs (3)
15ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments) : AttributeData 18private readonly ImmutableArray<KeyValuePair<string, TypedConstant>> _namedArguments = namedArguments.NullToEmpty(); 23protected override ImmutableArray<KeyValuePair<string, TypedConstant>> CommonNamedArguments => _namedArguments;
UnitTests.Common (3)
TestTypes.cs (3)
268private readonly BlockingCollection<KeyValuePair<SendOrPostCallback, object>> _queue = 269new BlockingCollection<KeyValuePair<SendOrPostCallback, object>>(); 305KeyValuePair<SendOrPostCallback, object> workItem;
VBCSCompiler.UnitTests (9)
CompilerServerTests.cs (9)
36private static readonly KeyValuePair<string, string>[] s_helloWorldSrcCs = 51private static readonly KeyValuePair<string, string>[] s_helloWorldSrcVb = 108private static void CreateFiles(TempDirectory currentDirectory, IEnumerable<KeyValuePair<string, string>> files) 112foreach (var pair in files) 121IEnumerable<KeyValuePair<string, string>> environmentVariables, 132foreach (var variable in environmentVariables) 142foreach (var variable in resetVariables) 180IEnumerable<KeyValuePair<string, string>> filesInDirectory = null, 181IEnumerable<KeyValuePair<string, string>> additionalEnvironmentVars = null,
WindowsBase.Tests (13)
System\Windows\NameScopeTests.cs (13)
493var array = new KeyValuePair<string, object>[3]; 517var array = new KeyValuePair<string, object>[1]; 542var array = Array.Empty<KeyValuePair<string, object>>(); 553var array = new KeyValuePair<string, object>[1]; 730IEnumerable<KeyValuePair<string, object>> collection = nameScope; 732using IEnumerator<KeyValuePair<string, object>> enumerator = collection.GetEnumerator(); 759IEnumerable<KeyValuePair<string, object>> collection = nameScope; 761using IEnumerator<KeyValuePair<string, object>> enumerator = collection.GetEnumerator(); 795Assert.Equal("name", ((KeyValuePair<string, object>)enumerator.Current).Key); 796Assert.Same(scopedElement, ((KeyValuePair<string, object>)enumerator.Current).Value); 820Assert.Equal(default(KeyValuePair<string, object>), enumerator.Current); 824Assert.Equal(default(KeyValuePair<string, object>), enumerator.Current); 828Assert.Equal(default(KeyValuePair<string, object>), enumerator.Current);
WindowsFormsIntegration (2)
System\Windows\Integration\PropertyMap.cs (2)
169foreach (KeyValuePair<string, PropertyTranslator> entry in DefaultTranslators) 277foreach (KeyValuePair<string, PropertyTranslator> entry in DefaultTranslators)
XmlFileLogger (12)
ItemGroupParser.cs (4)
31var nameValue = ParseNameValue(line); 40var nameValue = ParseNameValue(lines[0].Substring(prefix.Length)); 70var nameValue = ParseNameValue(line.Substring(16)); 85private static KeyValuePair<string, string> ParseNameValue(string nameEqualsValue)
LogProcessNode.cs (1)
129foreach (var p in Properties.Properties)
ObjectModel\Item.cs (4)
20private readonly List<KeyValuePair<string, string>> _metadata = new List<KeyValuePair<string, string>>(); 45public IEnumerable<KeyValuePair<string, string>> Metadata 77foreach (var metadataItem in Metadata)
PropertyBag.cs (3)
34public PropertyBag(IEnumerable<KeyValuePair<string, string>> properties, PropertyBag parent = null) 61public void AddProperties(IEnumerable<KeyValuePair<string, string>> newProperties) 68foreach (var property in newProperties)
XmlFormattersWebSite (2)
Controllers\HomeController.cs (1)
31foreach (var keyModelStatePair in modelStateDictionary)
Controllers\ValidationController.cs (1)
29foreach (var keyModelStatePair in modelStateDictionary)
xunit.assert (4)
Sdk\ArgumentFormatter.cs (2)
538 [DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<,>))] 545 if (typeInfo.IsGenericType && typeInfo.GetGenericTypeDefinition() == typeof(KeyValuePair<,>))
Sdk\AssertEqualityComparer.cs (1)
143 static readonly Type typeKeyValuePair = typeof(KeyValuePair<,>);
Sdk\AssertHelper.cs (1)
704 foreach (var kvp in expectedGetters)
xunit.console (3)
CommandLine.cs (3)
100static void GuardNoOptionValue(KeyValuePair<string, string> option) 241var option = PopOption(arguments); 494static KeyValuePair<string, string> PopOption(Stack<string> arguments)
Xunit.NetCore.Extensions (1)
AssemblyFixtureSupport\XunitTestCollectionRunnerWithAssemblyFixture.cs (1)
42foreach (var kvp in CollectionFixtureMappings)