4827 instantiations of KeyValuePair
AnalyzerRunner (1)
Aspire.Azure.AI.OpenAI.Tests (18)
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")
AspireConfigurableOpenAIExtensionsTests.cs (8)
22new KeyValuePair<string, string?>("ConnectionStrings:openai", "IsAzure=false")
45new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=https://aspireopenaitests.fake.com/;Key=fake;IsAzure=true")
72new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=https://aspireopenaitests.fake.com/;Key=fake;IsAzure=false")
99new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=https://aspireopenaitests.azure.com/;Key=fake")
127new KeyValuePair<string, string?>("ConnectionStrings:openai", $"Endpoint={domain};Key=fake")
145new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=https://aspireopenaitests.azure.com/;Key=fake;IsAzure=false")
172new KeyValuePair<string, string?>("ConnectionStrings:openai", "Endpoint=;Key=fake;IsAzure=false")
199new KeyValuePair<string, string?>("ConnectionStrings:openai", "Key=fake;IsAzure=false")
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")
Aspire.Azure.Messaging.EventHubs.Tests (50)
AspireEventHubsExtensionsTests.cs (50)
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"),
Aspire.Azure.Messaging.ServiceBus.Tests (17)
AspireServiceBusExtensionsTests.cs (11)
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"),
Aspire.Azure.Messaging.WebPubSub.Tests (12)
AspireWebPubSubExtensionsTests.cs (10)
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),
Aspire.Azure.Search.Documents.Tests (4)
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")
Aspire.Azure.Security.KeyVault.Tests (9)
AspireKeyVaultExtensionsTests.cs (7)
26new KeyValuePair<string, string?>("ConnectionStrings:secrets", "https://unused.vault.azure.net/")
55new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Azure:Security:KeyVault", key, "VaultUri"), "unused"),
56new KeyValuePair<string, string?>("ConnectionStrings:secrets", ConformanceTests.VaultUri)
81new KeyValuePair<string, string?>("ConnectionStrings:secrets", ConformanceTests.VaultUri)
180new KeyValuePair<string, string?>("ConnectionStrings:secrets1", ConformanceTests.VaultUri),
181new KeyValuePair<string, string?>("ConnectionStrings:secrets2", "https://aspiretests2.vault.azure.net/"),
182new KeyValuePair<string, string?>("ConnectionStrings:secrets3", "https://aspiretests3.vault.azure.net/")
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/")
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")
Aspire.Components.Common.Tests (6)
ConformanceTests.cs (4)
383new KeyValuePair<string, string?>($"{ConfigurationSectionName}:DisableTracing", "false"),
384new KeyValuePair<string, string?>($"{ConfigurationSectionName}:{key}:DisableTracing", "true"),
405new KeyValuePair<string, string?>($"{ConfigurationSectionName}:DisableHealthChecks", "false"),
406new KeyValuePair<string, string?>($"{ConfigurationSectionName}:{key}:DisableHealthChecks", "true"),
Aspire.Confluent.Kafka (11)
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"),
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)
Aspire.Dashboard.Components.Tests (3)
Aspire.Dashboard.Tests (16)
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")
Aspire.Elastic.Clients.Elasticsearch.Tests (8)
AspireElasticClientExtensionsTest.cs (6)
100new KeyValuePair<string, string?>("ConnectionStrings:elasticsearch1", "http://elastic:password@localhost1:19530"),
101new KeyValuePair<string, string?>("ConnectionStrings:elasticsearch2", "http://elastic:password@localhost1:19531"),
102new KeyValuePair<string, string?>("ConnectionStrings:elasticsearch3", "http://elastic:password@localhost1:19532"),
126new KeyValuePair<string, string?>("ConnectionStrings:elasticsearch1", "Endpoint=http://elastic:password@localhost1:19530"),
127new KeyValuePair<string, string?>("ConnectionStrings:elasticsearch2", "Endpoint=http://localhost1:19531"),
174new KeyValuePair<string, string?>($"ConnectionStrings:{DefaultConnectionName}", connectionString)
Aspire.Hosting.Testing.Tests (1)
Aspire.Hosting.Tests (1)
Aspire.Microsoft.Azure.Cosmos.Tests (4)
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)
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"),
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (13)
AspireAzureEfCoreCosmosDBExtensionsTests.cs (10)
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)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
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)
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)
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)
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"),
Aspire.NATS.Net.Tests (11)
AspireNatsClientExtensionsTests.cs (9)
38new KeyValuePair<string, string?>("ConnectionStrings:nats", _connectionString)
65new KeyValuePair<string, string?>("ConnectionStrings:nats", "nats://nats:password@aspire-host:4222")
94new KeyValuePair<string, string?>("ConnectionStrings:nats", "unused")
127new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:Nats:Client", key, "ConnectionString"), "unused"),
128new KeyValuePair<string, string?>("ConnectionStrings:nats", _connectionString)
240new KeyValuePair<string, string?>("ConnectionStrings:nats1", "nats://aspire-host1:4222"),
241new KeyValuePair<string, string?>("ConnectionStrings:nats2", "nats://aspire-host2:4222"),
242new KeyValuePair<string, string?>("ConnectionStrings:nats3", "nats://aspire-host3:4222"),
269new KeyValuePair<string, string?>($"ConnectionStrings:{DefaultConnectionName}", connectionString)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (23)
AspireEFPostgreSqlExtensionsTests.cs (16)
33new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString)
49new KeyValuePair<string, string?>("ConnectionStrings:npgsql", "unused")
70new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:ConnectionString", "unused"),
71new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString)
90new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString),
91new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:Retry", "true")
132new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString),
133new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableRetry", "true")
173new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString)
178new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:CommandTimeout", "123")
207new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString)
212new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:CommandTimeout", "400")
244new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString),
245new KeyValuePair<string, string?>("ConnectionStrings:npgsql2", connectionString2),
269new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString)
292new KeyValuePair<string, string?>("ConnectionStrings:npgsql", ConnectionString)
EnrichNpgsqlTests.cs (5)
61new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:Retry", "true")
154new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableRetry", "true")
198new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableRetry", "false")
353new KeyValuePair<string, string?>("Aspire:Npgsql:EntityFrameworkCore:PostgreSQL:DisableTracing", "false"),
354new 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"),
Aspire.OpenAI.Tests (13)
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")
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)
EnrichOracleDatabaseTests.cs (5)
61new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:DisableRetry", "false")
151new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:DisableRetry", "true")
194new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:DisableRetry", "false")
342new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:DisableTracing", "false"),
343new KeyValuePair<string, string?>("Aspire:Oracle:EntityFrameworkCore:TestDbContext:DisableTracing", "true")
Aspire.Playground.Tests (3)
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)
EnrichMySqlTests.cs (5)
74new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:DisableRetry", "false")
164new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:DisableRetry", "true")
207new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:DisableRetry", "false")
355new KeyValuePair<string, string?>("Aspire:Pomelo:EntityFrameworkCore:MySql:DisableTracing", "false"),
356new 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)
Aspire.RabbitMQ.Client.Tests (8)
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())
Aspire.RabbitMQ.Client.v7.Tests (8)
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())
Aspire.StackExchange.Redis (1)
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
Aspire.StackExchange.Redis.Tests (15)
AspireRedisExtensionsTests.cs (14)
62new KeyValuePair<string, string?>("ConnectionStrings:myredis", ConnectionString)
90new KeyValuePair<string, string?>("ConnectionStrings:redis", "unused")
123new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:StackExchange:Redis", key, "ConnectionString"), "unused"),
124new KeyValuePair<string, string?>("ConnectionStrings:redis", ConnectionString)
162new KeyValuePair<string, string?>("ConnectionStrings:redis", TestingEndpoint)
167new KeyValuePair<string, string?>("ConnectionStrings:redis", TestingEndpoint),
168new KeyValuePair<string, string?>(ConformanceTests.CreateConfigKey("Aspire:StackExchange:Redis", useKeyed ? "redis" : null, "ConfigurationOptions:AbortOnConnectFail"), "true")
173new KeyValuePair<string, string?>("ConnectionStrings:redis", $"{TestingEndpoint},abortConnect={(abortConnect ? "true" : "false")}")
270new KeyValuePair<string, string?>("ConnectionStrings:redis", connectionString)
309new KeyValuePair<string, string?>("ConnectionStrings:redis2", container2.GetConnectionString()),
310new KeyValuePair<string, string?>("ConnectionStrings:redis3", container3.GetConnectionString())
345new KeyValuePair<string, string?>("ConnectionStrings:redis1", container1.GetConnectionString()),
346new KeyValuePair<string, string?>("ConnectionStrings:redis2", container2.GetConnectionString()),
347new KeyValuePair<string, string?>("ConnectionStrings:redis3", container3.GetConnectionString())
Diagnostics.EFCore.FunctionalTests (5)
dotnet-svcutil-lib (17)
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));
dotnet-svcutil-lib.Tests (4)
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)
489var kvp = new KeyValuePair<string, string>(InternalHeaderNames.Path, path);
498var kvp = new KeyValuePair<string, string>(InternalHeaderNames.Path, path);
524new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
525new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"),
526new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:443"),
527new KeyValuePair<string, string>("user-agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0"),
528new KeyValuePair<string, string>("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"),
529new KeyValuePair<string, string>("accept-language", "en-US,en;q=0.5"),
530new KeyValuePair<string, string>("accept-encoding", "gzip, deflate, br"),
531new KeyValuePair<string, string>("upgrade-insecure-requests", "1"),
536new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
537new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "https"),
538new 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 (1105)
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"),
5439new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
5440new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
5441new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
5519new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
5520new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
5521new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
5603new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
5604new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
5605new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
5685new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
5686new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
5687new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
5889new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
5890new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
5891new 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\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"),
396new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
397new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
398new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
399new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
415new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
416new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
417new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
418new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
419new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json"),
453new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
454new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"),
455new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
456new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
457new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json")
463new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
464new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"),
465new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
466new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80")
497new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
498new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
499new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
500new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
531new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
532new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
533new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
534new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
554new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
555new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"),
556new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
557new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
558new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json")
632new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
633new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
634new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"),
635new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
636new KeyValuePair<string, string>(HeaderNames.Expect, "100-continue"),
686new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
687new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
688new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"),
689new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
690new KeyValuePair<string, string>(HeaderNames.Expect, "100-continue"),
Http3\Http3StreamTests.cs (357)
27new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
28new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
29new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
30new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
48new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
49new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
50new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
51new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
71new KeyValuePair<string, string>(InternalHeaderNames.Method, ""),
72new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
73new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
74new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
89new KeyValuePair<string, string>(InternalHeaderNames.Method, "Hello,World"),
90new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
91new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
92new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
107new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
108new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
109new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
110new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
129new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
130new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
131new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
132new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
133new KeyValuePair<string, string>("test", new string('a', 1024 * 32 + 1))
148var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT") };
163var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "OPTIONS"),
164new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
165new KeyValuePair<string, string>(InternalHeaderNames.Path, "*")};
182var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "OPTIONS"),
183new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
184new KeyValuePair<string, string>(InternalHeaderNames.Path, "/")};
202var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
203new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
204new KeyValuePair<string, string>(InternalHeaderNames.Path, "/a/path?a&que%35ry")};
237var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
238new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
239new KeyValuePair<string, string>(InternalHeaderNames.Path, input)};
262var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT"),
263new KeyValuePair<string, string>(headerName, value) };
278var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
279new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
280new KeyValuePair<string, string>(InternalHeaderNames.Scheme, scheme) }; // Not the expected "http"
297var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
298new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
299new KeyValuePair<string, string>(InternalHeaderNames.Scheme, scheme) }; // Not the expected "http"
322var headers = new[] { new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
323new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
324new KeyValuePair<string, string>(InternalHeaderNames.Scheme, scheme) }; // Not the expected "http"
339new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
340new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
341new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
359new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
360new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
361new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
362new KeyValuePair<string, string>(InternalHeaderNames.Authority, ""),
379new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
380new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
381new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
382new KeyValuePair<string, string>("Host", "abc"),
401new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
402new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
403new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
404new KeyValuePair<string, string>(InternalHeaderNames.Authority, ""),
405new KeyValuePair<string, string>("Host", "abc"),
424new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
425new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
426new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
427new KeyValuePair<string, string>(InternalHeaderNames.Authority, "def"),
428new KeyValuePair<string, string>("Host", "abc"),
447new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
448new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
449new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
450new KeyValuePair<string, string>(InternalHeaderNames.Authority, "def"),
451new KeyValuePair<string, string>("Host", "a=bc"),
470new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
471new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
472new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
473new KeyValuePair<string, string>(InternalHeaderNames.Authority, "local=host:80"),
489new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
490new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
491new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
492new KeyValuePair<string, string>(InternalHeaderNames.Authority, "d=ef"),
493new KeyValuePair<string, string>("Host", "abc"),
509new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
510new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
511new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
512new KeyValuePair<string, string>("Host", "host1"),
513new KeyValuePair<string, string>("Host", "host2"),
532new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET" + new string('a', 1024 * 3)),
533new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Hello/How/Are/You/" + new string('a', 1024 * 3)),
534new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
535new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost" + new string('a', 1024 * 3) + ":80"),
550new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
551new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
552new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
553new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"),
579new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
580new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
581new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
582new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"),
615new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
616new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
617new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
618new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"),
650new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
651new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
652new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
653new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
683new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
684new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
685new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
686new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"),
713new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
714new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
715new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
754new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
755new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"),
756new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
757new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
758new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json")
788new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
789new KeyValuePair<string, string>(InternalHeaderNames.Path, "/hello"),
790new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
791new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
792new KeyValuePair<string, string>(HeaderNames.ContentType, "application/json")
822new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
823new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
824new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
825new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
852new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
853new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
854new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
855new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
883new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
884new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
885new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
886new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
919new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
920new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
921new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
922new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
946new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
947new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
948new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
949new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
978new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
979new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
980new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
981new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
1004new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
1005new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1006new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1007new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
1032new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
1033new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1034new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1035new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
1070new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
1071new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1072new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1073new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
1101new KeyValuePair<string, string>(InternalHeaderNames.Method, "Custom"),
1102new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1103new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1104new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
1130new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1131new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1132new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1177new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1178new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1179new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1229new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1230new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1231new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1277new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1278new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1279new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1330new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1331new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1332new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1379new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1380new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1381new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1431new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1432new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1433new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1472new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1473new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1474new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1532new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1533new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1534new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1587new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1588new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1589new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1644new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1645new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1646new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1702new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1703new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1704new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1761new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
1762new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1763new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1825new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1826new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1827new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1888new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
1889new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1890new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1973new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
1974new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
1975new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
1979new KeyValuePair<string, string>("TestName", "TestValue"),
2002new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2003new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2004new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2008new KeyValuePair<string, string>("TestName", "TestValue"),
2046new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2047new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2048new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2052new KeyValuePair<string, string>("TestName", "TestValue"),
2121new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2122new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2123new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2162new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2163new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2164new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2165new KeyValuePair<string, string>(":unknown", "0"),
2176new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2177new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2178new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2179new KeyValuePair<string, string>(InternalHeaderNames.Status, "200"),
2192new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2193new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2194new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"),
2195new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2200var headers = requestHeaders.Concat(new[] { new KeyValuePair<string, string>(headerField.Key, headerField.Value) });
2213var methodHeader = new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT");
2228new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2229new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2230new KeyValuePair<string, string>(InternalHeaderNames.Authority, "127.0.0.1"),
2231new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2232new KeyValuePair<string, string>("content-length", "0")
2252new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2253new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2254new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2318new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2319new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2320new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2321new KeyValuePair<string, string>("a", _4kHeaderValue),
2322new KeyValuePair<string, string>("b", _4kHeaderValue),
2323new KeyValuePair<string, string>("c", _4kHeaderValue),
2324new KeyValuePair<string, string>("d", _4kHeaderValue),
2325new KeyValuePair<string, string>("e", _4kHeaderValue),
2326new KeyValuePair<string, string>("f", _4kHeaderValue),
2327new KeyValuePair<string, string>("g", _4kHeaderValue),
2328new KeyValuePair<string, string>("h", _4kHeaderValue),
2349new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2350new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2351new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2352new KeyValuePair<string, string>("a", _4kHeaderValue),
2353new KeyValuePair<string, string>("b", _4kHeaderValue),
2354new KeyValuePair<string, string>("c", _4kHeaderValue),
2355new KeyValuePair<string, string>("d", _4kHeaderValue),
2356new KeyValuePair<string, string>("e", _4kHeaderValue),
2357new KeyValuePair<string, string>("f", _4kHeaderValue),
2358new KeyValuePair<string, string>("g", _4kHeaderValue),
2359new KeyValuePair<string, string>("h", _4kHeaderValue),
2360new KeyValuePair<string, string>("i", _4kHeaderValue),
2361new KeyValuePair<string, string>("j", _4kHeaderValue),
2362new KeyValuePair<string, string>("k", _4kHeaderValue),
2363new KeyValuePair<string, string>("l", _4kHeaderValue),
2364new KeyValuePair<string, string>("m", _4kHeaderValue),
2365new KeyValuePair<string, string>("n", _4kHeaderValue),
2366new KeyValuePair<string, string>("o", _4kHeaderValue),
2367new KeyValuePair<string, string>("p", _4kHeaderValue),
2380new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2381new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2382new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2386headers.Add(new KeyValuePair<string, string>(i.ToString(CultureInfo.InvariantCulture), i.ToString(CultureInfo.InvariantCulture)));
2408new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2409new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2410new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2414headers.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"),
2428new KeyValuePair<string, string>("Custom", "val\0ue"),
2439new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2440new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2441new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2442new KeyValuePair<string, string>("Cus\0tom", "value"),
2453new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2454new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2455new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2456new KeyValuePair<string, string>("connection", "keep-alive")
2467new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2468new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2469new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2470new KeyValuePair<string, string>("te", "trailers, deflate")
2481new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2482new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2483new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2484new KeyValuePair<string, string>("te", "trailers")
2500new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
2501new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2502new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2503new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"),
2534new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
2535new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2536new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2537new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"),
2574new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
2575new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2576new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2607new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
2608new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2609new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2651new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
2652new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2653new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2659new KeyValuePair<string, string>(HeaderNames.ContentLength, "18"),
2703new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
2704new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2705new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2711new KeyValuePair<string, string>(HeaderNames.ContentLength, "12"),
2742new KeyValuePair<string, string>(InternalHeaderNames.Method, new string('A', 8192 / 2)),
2743new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + new string('A', 8192 / 2)),
2744new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http")
2774new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2775new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2776new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2777new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
2806new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2807new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2808new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2809new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
2847new KeyValuePair<string, string>(InternalHeaderNames.Method, "POST"),
2848new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2849new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2883new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2884new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2885new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2886new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
2923new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2924new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2925new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2926new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
2964new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2965new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2966new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
2967new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost:80"),
2988new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET"),
2989new KeyValuePair<string, string>(InternalHeaderNames.Path, "/"),
2990new KeyValuePair<string, string>(InternalHeaderNames.Scheme, "http"),
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")
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)
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"),
Microsoft.Arcade.Test.Common (1)
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)
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 (39)
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"),
Microsoft.AspNetCore.Authentication.WsFederation (2)
Microsoft.AspNetCore.Authorization (1)
Microsoft.AspNetCore.Components (4)
Microsoft.AspNetCore.Components.Endpoints.Tests (6)
Microsoft.AspNetCore.Components.Tests (6)
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)
Microsoft.AspNetCore.Components.WebAssembly.Tests (2)
Microsoft.AspNetCore.Cors (1)
Microsoft.AspNetCore.DataProtection (1)
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),
Microsoft.AspNetCore.Diagnostics (4)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (7)
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)
Microsoft.AspNetCore.Grpc.Swagger (1)
Microsoft.AspNetCore.Hosting (35)
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),
Microsoft.AspNetCore.Hosting.Tests (11)
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)
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));
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\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)
Microsoft.AspNetCore.Http.Extensions (2)
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)
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"),
Microsoft.AspNetCore.Http.Results.Tests (6)
Microsoft.AspNetCore.Http.Tests (3)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.InternalTesting (2)
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.Mvc.Abstractions (1)
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),
Microsoft.AspNetCore.Mvc.Core.Test (40)
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),
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") },
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
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),
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"));
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"),
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"),
Microsoft.AspNetCore.Mvc.IntegrationTests (9)
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)
Microsoft.AspNetCore.Mvc.ViewFeatures (31)
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),
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));
Microsoft.AspNetCore.OutputCaching (2)
Microsoft.AspNetCore.OutputCaching.Tests (4)
Microsoft.AspNetCore.Owin (16)
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)
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"));
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));
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\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.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"),
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.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\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\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.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);
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)
757new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"),
758new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5001"),
840new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"),
841new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5002"),
842new KeyValuePair<string, string>("Endpoints:C:Url", "http://*:5003"),
868new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"),
869new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5002"),
870new KeyValuePair<string, string>("Endpoints:C:Url", "http://*:5003"),
871new KeyValuePair<string, string>("Endpoints:C:Protocols", "Http1"),
916new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"),
917new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5001"),
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\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 (156)
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 (101)
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"),
218new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
258new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
259new KeyValuePair<string, string>("Certificates:Development:Password", "1234"),
302new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
306new KeyValuePair<string, string>("Certificates:Development:Password", "1234"),
310new KeyValuePair<string, string>("Certificates:Default:path", defaultCertPath),
311new KeyValuePair<string, string>("Certificates:Default:Password", "testPassword"),
372new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
373new KeyValuePair<string, string>("Endpoints:End1:Certificate:Path", TestResources.TestCertificatePath),
374new KeyValuePair<string, string>("Endpoints:End1:Certificate:Password", "testPassword")
424new KeyValuePair<string, string>("Certificates:Development:Password", "1234"),
471new KeyValuePair<string, string>("Certificates:Development:Password", "1234"),
532new KeyValuePair<string, string>("Certificates:Development:Password", "1234"),
567new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
568new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")),
569new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-aspnet.key"))
591new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
592new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")),
593new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-ecdsa.key")),
594new KeyValuePair<string, string>("Certificates:Default:Password", "aspnetcore")
616new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
617new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")),
618new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-aspnet.key")),
619new KeyValuePair<string, string>("Certificates:Default:Password", "abcde"),
641new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
642new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", "https-aspnet.crt")),
643new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", "https-aspnet.pub")),
680new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
681new KeyValuePair<string, string>("Certificates:Default:Path", Path.Combine("shared", "TestCertificates", certificateFile)),
682new KeyValuePair<string, string>("Certificates:Default:KeyPath", Path.Combine("shared", "TestCertificates", certificateKey)),
684.Concat(password != null ? new[] { new KeyValuePair<string, string>("Certificates:Default:Password", password) } : Array.Empty<KeyValuePair<string, string>>()))
714new KeyValuePair<string, string>("Certificates:Development:Password", "12341234"),
745new KeyValuePair<string, string>("Certificates:Development:Password", "12341234")
770new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
772new KeyValuePair<string, string>("Endpoints:End1:Certificate:Path", "fakecert.pfx"),
780new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
781new KeyValuePair<string, string>("Endpoints:End1:Certificate:Subject", "example.org"),
789new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
790new KeyValuePair<string, string>("Endpoints:End1:ClientCertificateMode", ClientCertificateMode.RequireCertificate.ToString()),
798new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
799new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", SslProtocols.Tls13.ToString()),
807new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
808new KeyValuePair<string, string>("Endpoints:End1:Sni:Protocols", HttpProtocols.Http1.ToString()),
822new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
823new KeyValuePair<string, string>("EndpointDefaults:ClientCertificateMode", ClientCertificateMode.RequireCertificate.ToString()),
835new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
836new KeyValuePair<string, string>("EndpointDefaults:SslProtocols:0", SslProtocols.Tls13.ToString()),
871new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
872new KeyValuePair<string, string>("Endpoints:End1:Certificate:Path", certificatePath),
873new KeyValuePair<string, string>("Endpoints:End1:Certificate:Password", certificatePassword),
970new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
971new KeyValuePair<string, string>("Endpoints:End1:Certificate:Path", fileLink.FullName),
972new KeyValuePair<string, string>("Endpoints:End1:Certificate:Password", certificatePassword),
1066new KeyValuePair<string, string>("EndpointDefaults:Protocols", input),
1067new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1136new KeyValuePair<string, string>("Endpoints:End1:Protocols", input),
1137new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1187new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "Tls11"),
1188new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1228new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "Tls11"),
1229new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1257new KeyValuePair<string, string>("EndpointDefaults:SslProtocols:0", "Tls11"),
1258new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1291new KeyValuePair<string, string>("EndpointDefaults:SslProtocols:0", "Tls11"),
1292new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1324new KeyValuePair<string, string>("Endpoints:End1:ClientCertificateMode", "AllowCertificate"),
1325new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1358new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1359new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Protocols", HttpProtocols.None.ToString()),
1360new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:SslProtocols:0", SslProtocols.Tls13.ToString()),
1361new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:ClientCertificateMode", ClientCertificateMode.RequireCertificate.ToString()),
1362new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Certificate:Path", certPath),
1363new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Certificate:KeyPath", keyPath),
1392new KeyValuePair<string, string>("Endpoints:End1:ClientCertificateMode", "AllowCertificate"),
1393new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1419new KeyValuePair<string, string>("EndpointDefaults:ClientCertificateMode", "AllowCertificate"),
1420new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1449new KeyValuePair<string, string>("EndpointDefaults:ClientCertificateMode", "AllowCertificate"),
1450new KeyValuePair<string, string>("Endpoints:End1:Url", "https://*:5001"),
1470new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"),
1471new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5001"),
1482new KeyValuePair<string, string>("Endpoints:A:Url", "http://*:5000"),
1483new KeyValuePair<string, string>("Endpoints:B:Url", "http://*:5002"),
1484new KeyValuePair<string, string>("Endpoints:C:Url", "http://*:5003"),
1509new KeyValuePair<string, string>("Endpoints:DefaultProtocol:Url", "http://*:5000"),
1510new KeyValuePair<string, string>("Endpoints:NonDefaultProtocol:Url", "http://*:5001"),
1511new KeyValuePair<string, string>("Endpoints:NonDefaultProtocol:Protocols", "Http1AndHttp2"),
1518new KeyValuePair<string, string>("Endpoints:DefaultProtocol:Url", "http://*:5000"),
1519new KeyValuePair<string, string>("Endpoints:NonDefaultProtocol:Url", "http://*:5001"),
1520new KeyValuePair<string, string>("Endpoints:NonDefaultProtocol:Protocols", "Http1AndHttp2"),
1521new KeyValuePair<string, string>("EndpointDefaults:Protocols", "Http1"),
1546new KeyValuePair<string, string>("Endpoints:Changed:Url", "http://*:5001"),
1547new KeyValuePair<string, string>("Endpoints:Unchanged:Url", "http://*:5000"),
1561new KeyValuePair<string, string>("Endpoints:Changed:Url", "http://*:5002"),
1562new 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),
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\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)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.StaticFiles.Tests (1)
Microsoft.AspNetCore.Tests (2)
Microsoft.AspNetCore.WebUtilities (3)
Microsoft.Build (56)
Evaluation\Expander.cs (21)
2046itemsFromCapture.Add(new KeyValuePair<string, S>(item.EvaluatedIncludeEscaped, item));
2069itemsFromCapture.Add(new KeyValuePair<string, S>(joinedItems, null));
2324yield return new KeyValuePair<string, S>(resultantItem, item);
2329yield return new KeyValuePair<string, S>(item.EvaluatedIncludeEscaped, item);
2339yield return new KeyValuePair<string, S>(Convert.ToString(itemsOfType.Count(), CultureInfo.InvariantCulture), null /* no base item */);
2382yield return new KeyValuePair<string, S>(result, item.Value);
2386yield return new KeyValuePair<string, S>(null, item.Value);
2458yield return new KeyValuePair<string, S>(escapedPath, null);
2533yield return new KeyValuePair<string, S>(escapedDirectoryPath, null);
2596yield return new KeyValuePair<string, S>(directoryName, item.Value);
2600yield return new KeyValuePair<string, S>(null, item.Value);
2641yield return new KeyValuePair<string, S>(itemSpec, item.Value);
2647yield return new KeyValuePair<string, S>(metadataValue, item.Value);
2652yield return new KeyValuePair<string, S>(metadataValue, item.Value);
2735yield return new KeyValuePair<string, S>(include, item.Value);
2739yield return new KeyValuePair<string, S>(null, item.Value);
2779yield return new KeyValuePair<string, S>(include, item.Value);
2783yield return new KeyValuePair<string, S>(null, item.Value);
2799yield return new KeyValuePair<string, S>(item.Key, null);
2937yield return new KeyValuePair<string, S>("true", item.Value);
2948yield return new KeyValuePair<string, S>("false", null);
Microsoft.Build.BuildCheck.UnitTests (1)
Microsoft.Build.CommandLine.UnitTests (1)
Microsoft.Build.Engine.OM.UnitTests (14)
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"),
Microsoft.Build.Engine.UnitTests (28)
BackEnd\Lookup_Tests.cs (5)
206table1.Add(new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("m1", "m1") }, project.FullPath));
207table1.Add(new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("m1", "m2") }, project.FullPath));
216new ProjectItemInstance(project, "i1", "a2", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should get added
217new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should not get added
218new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m3") }, project.FullPath), // Should get added
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)
Microsoft.Build.Tasks.Core (8)
AssemblyDependency\ReferenceTable.cs (7)
1150var newEntry = new KeyValuePair<AssemblyNameExtension, Reference>(unifiedDependency.PostUnified, newReference);
2861yield return new KeyValuePair<string, string>(ItemMetadataNames.resolvedFrom, reference.ResolvedSearchPath);
2864yield return new KeyValuePair<string, string>(ItemMetadataNames.copyLocal, reference.IsCopyLocal ? "true" : "false");
2869yield return new KeyValuePair<string, string>(ItemMetadataNames.redist, reference.RedistName);
2876yield return new KeyValuePair<string, string>(ItemMetadataNames.frameworkFile, "true");
2882yield return new KeyValuePair<string, string>(ItemMetadataNames.imageRuntime, reference.ImageRuntime);
2889yield return new KeyValuePair<string, string>(ItemMetadataNames.isRedistRoot, (bool)reference.IsRedistRoot ? "true" : "false");
Microsoft.Build.Tasks.UnitTests (6)
Microsoft.Build.Utilities.Core (4)
Microsoft.CodeAnalysis (34)
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());
Microsoft.CodeAnalysis.CodeStyle (11)
Microsoft.CodeAnalysis.Collections.Package (8)
Microsoft.CodeAnalysis.CSharp (5)
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));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (12)
Semantics\InterceptorsTests.cs (12)
5261var resolver = new SourceFileResolver([], null, [new KeyValuePair<string, string>(pathPrefix, "/_/")]);
5316var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/"));
5352var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/"));
5386var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/"));
5456new KeyValuePair<string, string>(pathPrefix1, "/_/"),
5457new KeyValuePair<string, string>(pathPrefix2, "/_/")
5495var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, @"\_\"));
5530var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, @"\_/"));
5572var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, @"\_/"));
6013var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/"));
6054var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(pathPrefix, "/_/"));
6116var pathMap = ImmutableArray.Create(new KeyValuePair<string, string>(directory2, "./"));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Symbols\IndexerTests.cs (5)
153new KeyValuePair<string, string>("System.Object IC.this[System.String index].get", "System.Object B.this[System.String index].get"),
154new KeyValuePair<string, string>("void IC.this[System.String index].set", "void B.this[System.String index].set"),
164new KeyValuePair<string, string>("System.Object IB.this[System.String index].get", "System.Object C.this[System.String index].get"),
165new KeyValuePair<string, string>("System.Object IC.this[System.String index].get", "System.Object C.this[System.String index].get"),
166new KeyValuePair<string, string>("void IC.this[System.String index].set", "void C.this[System.String index].set"),
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]);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.LanguageServer (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
Microsoft.CodeAnalysis.Test.Utilities (2)
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\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)),
Microsoft.CodeAnalysis.VisualBasic (10)
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.Workspaces (10)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (12)
VisualStudioMSBuildWorkspaceTests.cs (12)
1870new KeyValuePair<string, object>("_MyType", "Windows"),
1871new KeyValuePair<string, object>("CONFIG", "Debug"),
1872new KeyValuePair<string, object>("DEBUG", -1),
1873new KeyValuePair<string, object>("F", false),
1874new KeyValuePair<string, object>("PLATFORM", "AnyCPU"),
1875new KeyValuePair<string, object>("T", -1),
1876new KeyValuePair<string, object>("TARGET", "library"),
1877new KeyValuePair<string, object>("TRACE", -1),
1878new KeyValuePair<string, object>("VBC_VER", 123),
1879new KeyValuePair<string, object>("X", 1),
1880new KeyValuePair<string, object>("Y", 2),
1881new KeyValuePair<string, object>("Z", true),
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Microsoft.CSharp (1)
Microsoft.Data.Analysis (1)
Microsoft.DotNet.Arcade.Sdk (2)
Microsoft.DotNet.Build.Tasks.Packaging (1)
Microsoft.DotNet.Helix.Client (2)
Microsoft.DotNet.NuGetRepack.Tests (1)
Microsoft.DotNet.SignTool (1)
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 });
Microsoft.DotNet.XUnitExtensions (11)
Microsoft.Extensions.AI.Abstractions (3)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.Tests (21)
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]);
Functions\AIFunctionFactoryTest.cs (13)
31AssertExtensions.EqualFunctionCallResults("test test", await func.InvokeAsync([new KeyValuePair<string, object?>("a", "test")]));
34AssertExtensions.EqualFunctionCallResults("hello world", await func.InvokeAsync([new KeyValuePair<string, object?>("b", "hello"), new KeyValuePair<string, object?>("a", "world")]));
37AssertExtensions.EqualFunctionCallResults(3L, await func.InvokeAsync([new KeyValuePair<string, object?>("a", 1), new KeyValuePair<string, object?>("b", 2L)]));
45AssertExtensions.EqualFunctionCallResults("hello hello", await func.InvokeAsync([new KeyValuePair<string, object?>("a", "hello")]));
92AssertExtensions.EqualFunctionCallResults("test test", await func.InvokeAsync([new KeyValuePair<string, object?>("a", "test")]));
95AssertExtensions.EqualFunctionCallResults("hello world", await func.InvokeAsync([new KeyValuePair<string, object?>("b", "hello"), new KeyValuePair<string, object?>("a", "world")]));
99AssertExtensions.EqualFunctionCallResults(null, await func.InvokeAsync([new KeyValuePair<string, object?>("a", 1), new KeyValuePair<string, object?>("b", 2L)]));
104AssertExtensions.EqualFunctionCallResults(null, await func.InvokeAsync([new KeyValuePair<string, object?>("a", 1), new KeyValuePair<string, object?>("b", 2L)]));
Microsoft.Extensions.Caching.Memory (2)
Microsoft.Extensions.Configuration.Abstractions (1)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
Microsoft.Extensions.DependencyInjection (1)
Microsoft.Extensions.Diagnostics.HealthChecks (3)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (3)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (52)
Linux\Network\LinuxNetworkMetrics.cs (25)
25KeyValuePair<string, object?> tcpTag = new("network.transport", "tcp");
44KeyValuePair<string, object?> tcpVersionFourTag = new(NetworkTypeKey, "ipv4");
45KeyValuePair<string, object?> tcpVersionSixTag = new(NetworkTypeKey, "ipv6");
51measurements.Add(new Measurement<long>(stateV4.ClosedCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "close") }));
52measurements.Add(new Measurement<long>(stateV4.ListenCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "listen") }));
53measurements.Add(new Measurement<long>(stateV4.SynSentCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "syn_sent") }));
54measurements.Add(new Measurement<long>(stateV4.SynRcvdCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "syn_recv") }));
55measurements.Add(new Measurement<long>(stateV4.EstabCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "established") }));
56measurements.Add(new Measurement<long>(stateV4.FinWait1Count, new TagList { tcpVersionFourTag, new(NetworkStateKey, "fin_wait_1") }));
57measurements.Add(new Measurement<long>(stateV4.FinWait2Count, new TagList { tcpVersionFourTag, new(NetworkStateKey, "fin_wait_2") }));
58measurements.Add(new Measurement<long>(stateV4.CloseWaitCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "close_wait") }));
59measurements.Add(new Measurement<long>(stateV4.ClosingCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "closing") }));
60measurements.Add(new Measurement<long>(stateV4.LastAckCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "last_ack") }));
61measurements.Add(new Measurement<long>(stateV4.TimeWaitCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "time_wait") }));
65measurements.Add(new Measurement<long>(stateV6.ClosedCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "close") }));
66measurements.Add(new Measurement<long>(stateV6.ListenCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "listen") }));
67measurements.Add(new Measurement<long>(stateV6.SynSentCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "syn_sent") }));
68measurements.Add(new Measurement<long>(stateV6.SynRcvdCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "syn_recv") }));
69measurements.Add(new Measurement<long>(stateV6.EstabCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "established") }));
70measurements.Add(new Measurement<long>(stateV6.FinWait1Count, new TagList { tcpVersionSixTag, new(NetworkStateKey, "fin_wait_1") }));
71measurements.Add(new Measurement<long>(stateV6.FinWait2Count, new TagList { tcpVersionSixTag, new(NetworkStateKey, "fin_wait_2") }));
72measurements.Add(new Measurement<long>(stateV6.CloseWaitCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "close_wait") }));
73measurements.Add(new Measurement<long>(stateV6.ClosingCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "closing") }));
74measurements.Add(new Measurement<long>(stateV6.LastAckCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "last_ack") }));
75measurements.Add(new Measurement<long>(stateV6.TimeWaitCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "time_wait") }));
Windows\Network\WindowsNetworkMetrics.cs (27)
25KeyValuePair<string, object?> tcpTag = new("network.transport", "tcp");
44KeyValuePair<string, object?> tcpVersionFourTag = new(NetworkTypeKey, "ipv4");
45KeyValuePair<string, object?> tcpVersionSixTag = new(NetworkTypeKey, "ipv6");
51measurements.Add(new Measurement<long>(stateV4.ClosedCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "close") }));
52measurements.Add(new Measurement<long>(stateV4.ListenCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "listen") }));
53measurements.Add(new Measurement<long>(stateV4.SynSentCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "syn_sent") }));
54measurements.Add(new Measurement<long>(stateV4.SynRcvdCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "syn_recv") }));
55measurements.Add(new Measurement<long>(stateV4.EstabCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "established") }));
56measurements.Add(new Measurement<long>(stateV4.FinWait1Count, new TagList { tcpVersionFourTag, new(NetworkStateKey, "fin_wait_1") }));
57measurements.Add(new Measurement<long>(stateV4.FinWait2Count, new TagList { tcpVersionFourTag, new(NetworkStateKey, "fin_wait_2") }));
58measurements.Add(new Measurement<long>(stateV4.CloseWaitCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "close_wait") }));
59measurements.Add(new Measurement<long>(stateV4.ClosingCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "closing") }));
60measurements.Add(new Measurement<long>(stateV4.LastAckCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "last_ack") }));
61measurements.Add(new Measurement<long>(stateV4.TimeWaitCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "time_wait") }));
62measurements.Add(new Measurement<long>(stateV4.DeleteTcbCount, new TagList { tcpVersionFourTag, new(NetworkStateKey, "delete") }));
66measurements.Add(new Measurement<long>(stateV6.ClosedCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "close") }));
67measurements.Add(new Measurement<long>(stateV6.ListenCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "listen") }));
68measurements.Add(new Measurement<long>(stateV6.SynSentCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "syn_sent") }));
69measurements.Add(new Measurement<long>(stateV6.SynRcvdCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "syn_recv") }));
70measurements.Add(new Measurement<long>(stateV6.EstabCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "established") }));
71measurements.Add(new Measurement<long>(stateV6.FinWait1Count, new TagList { tcpVersionSixTag, new(NetworkStateKey, "fin_wait_1") }));
72measurements.Add(new Measurement<long>(stateV6.FinWait2Count, new TagList { tcpVersionSixTag, new(NetworkStateKey, "fin_wait_2") }));
73measurements.Add(new Measurement<long>(stateV6.CloseWaitCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "close_wait") }));
74measurements.Add(new Measurement<long>(stateV6.ClosingCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "closing") }));
75measurements.Add(new Measurement<long>(stateV6.LastAckCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "last_ack") }));
76measurements.Add(new Measurement<long>(stateV6.TimeWaitCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "time_wait") }));
77measurements.Add(new Measurement<long>(stateV6.DeleteTcbCount, new TagList { tcpVersionSixTag, new(NetworkStateKey, "delete") }));
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (6)
Linux\AcceptanceTest.cs (6)
50new($"{nameof(ResourceMonitoringOptions)}:{nameof(ResourceMonitoringOptions.CpuConsumptionRefreshInterval)}", cpuRefresh.ToString()),
51new($"{nameof(ResourceMonitoringOptions)}:{nameof(ResourceMonitoringOptions.MemoryConsumptionRefreshInterval)}", memoryRefresh.ToString()),
102new($"{nameof(ResourceMonitoringOptions)}:{nameof(ResourceMonitoringOptions.CpuConsumptionRefreshInterval)}", cpuRefresh.ToString()),
103new($"{nameof(ResourceMonitoringOptions)}:{nameof(ResourceMonitoringOptions.MemoryConsumptionRefreshInterval)}", memoryRefresh.ToString()),
151new($"{nameof(ResourceMonitoringOptions)}:{nameof(ResourceMonitoringOptions.CpuConsumptionRefreshInterval)}", cpuRefresh.ToString()),
152new($"{nameof(ResourceMonitoringOptions)}:{nameof(ResourceMonitoringOptions.MemoryConsumptionRefreshInterval)}", memoryRefresh.ToString()),
Microsoft.Extensions.Diagnostics.Testing (2)
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)
Microsoft.Extensions.Hosting.Testing (2)
Microsoft.Extensions.Hosting.Testing.Tests (2)
Microsoft.Extensions.Http (2)
Microsoft.Extensions.Http.Diagnostics (12)
Microsoft.Extensions.Http.Diagnostics.Tests (32)
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");
Microsoft.Extensions.Http.Resilience (1)
Microsoft.Extensions.Http.Resilience.Tests (1)
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)
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);
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)
Microsoft.Extensions.SecretManager.Tools.Tests (10)
Microsoft.Extensions.Telemetry (13)
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);
Microsoft.Extensions.Telemetry.Abstractions (1)
Microsoft.Extensions.Telemetry.Abstractions.Tests (7)
Microsoft.Extensions.Telemetry.PerformanceTests (12)
Microsoft.Extensions.Telemetry.Tests (10)
Logging\ExtendedLoggerTests.cs (10)
29new KeyValuePair<string, object?>("EK1", "EV1"),
35new KeyValuePair<string, object?>("SEK1", "SEV1"),
62lms.TagArray[index] = new("PK2", "PV2");
132new KeyValuePair<string, object?>("EK1", "EV1"),
133new KeyValuePair<string, object?>("EK2", "EV2"),
152lms.TagArray[index] = new("PK2", "PV2");
187new KeyValuePair<string, object?>("EK1", "EV1"),
193new KeyValuePair<string, object?>("SEK1", "SEV1"),
275var a = new[] { new KeyValuePair<string, object?>("K1", "V1") };
938a[i++] = new(kvp.Key, (string)kvp.Value!);
Microsoft.Gen.Logging.Generated.Tests (20)
LogMethodTests.cs (20)
212AssertLastState(collector, new("p0", "0"), new("p1", "1"));
635new KeyValuePair<string, string?>("A1", "0"),
636new KeyValuePair<string, string?>("{OriginalFormat}", "M0 {A1}"));
643new KeyValuePair<string, string?>("A1", "42"),
644new KeyValuePair<string, string?>("{OriginalFormat}", "M1 {A1} {A1}"));
651new KeyValuePair<string, string?>("A1", "42"),
652new KeyValuePair<string, string?>("a2", "43"),
653new KeyValuePair<string, string?>("A3", "44"),
654new KeyValuePair<string, string?>("a4", "45"),
655new KeyValuePair<string, string?>("A5", "46"),
656new KeyValuePair<string, string?>("a6", "47"),
657new KeyValuePair<string, string?>("A7", "48"),
658new KeyValuePair<string, string?>("{OriginalFormat}", "M2 {A1} {a2} {A3} {a4} {A5} {a6} {A7}"));
665new KeyValuePair<string, string?>("A1", "42"),
666new KeyValuePair<string, string?>("a2", "43"),
667new KeyValuePair<string, string?>("{OriginalFormat}", "M3 {a2} {A1}"));
681new KeyValuePair<string, string?>("{OriginalFormat}", "M0"));
695new KeyValuePair<string, string?>("{OriginalFormat}", "M0"));
947var kvp = new KeyValuePair<string, string?>($"p{i}", i.ToString());
Microsoft.Gen.Metrics.Generated.Tests (4)
Microsoft.Maui (1)
Microsoft.Maui.Controls (9)
Microsoft.Maui.Controls.Xaml (2)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (1)
Microsoft.ML.AutoML (2)
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)
Microsoft.ML.Core (13)
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);
Microsoft.ML.Data (34)
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);
Microsoft.ML.DataView (6)
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)
Microsoft.ML.EntryPoints (4)
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));
Microsoft.ML.Recommender (2)
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\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>(
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)
Microsoft.ML.Tokenizers (2)
Microsoft.ML.Transforms (13)
Microsoft.VisualStudio.LanguageServices (1)
MSBuild (8)
OutOfProcTaskHostNode.cs (5)
1148s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(null, oldValue);
1154s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue);
1165s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, null);
1171s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue);
1197LogMessagePacket logMessage = new LogMessagePacket(new KeyValuePair<int, BuildEventArgs>(_currentConfiguration.NodeId, e));
MSBuildTaskHost (9)
OutOfProcTaskHostNode.cs (5)
1148s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(null, oldValue);
1154s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue);
1165s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, null);
1171s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue);
1197LogMessagePacket logMessage = new LogMessagePacket(new KeyValuePair<int, BuildEventArgs>(_currentConfiguration.NodeId, e));
OutputCachingSample (1)
PresentationCore (5)
PresentationFramework (12)
System\Windows\Shell\WindowChromeWorker.cs (9)
63new HANDLE_MESSAGE(WM.SETTEXT, _HandleSetTextOrIcon),
64new HANDLE_MESSAGE(WM.SETICON, _HandleSetTextOrIcon),
65new HANDLE_MESSAGE(WM.NCACTIVATE, _HandleNCActivate),
66new HANDLE_MESSAGE(WM.NCCALCSIZE, _HandleNCCalcSize),
67new HANDLE_MESSAGE(WM.NCHITTEST, _HandleNCHitTest),
68new HANDLE_MESSAGE(WM.NCRBUTTONUP, _HandleNCRButtonUp),
69new HANDLE_MESSAGE(WM.SIZE, _HandleSize),
70new HANDLE_MESSAGE(WM.WINDOWPOSCHANGED, _HandleWindowPosChanged),
71new HANDLE_MESSAGE(WM.DWMCOMPOSITIONCHANGED, _HandleDwmCompositionChanged),
PresentationUI (1)
ScenarioTests.Common.Tests (2)
Shared.Tests (5)
Sockets.BindTests (1)
Stress.ApiService (9)
Program.cs (7)
51metrics.IncrementCounter(1, new TagList([new KeyValuePair<string, object?>("add-tag", "1")]));
52metrics.IncrementCounter(2, new TagList([new KeyValuePair<string, object?>("add-tag", "")]));
124new KeyValuePair<string, object?>("Message", message),
125new KeyValuePair<string, object?>("ActivityId", 123),
126new KeyValuePair<string, object?>("Level", (int) 10),
127new KeyValuePair<string, object?>("Tid", Environment.CurrentManagedThreadId),
128new KeyValuePair<string, object?>("Pid", Environment.ProcessId),
Stress.TelemetryService (1)
System.Collections (17)
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 (8)
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.ComponentModel.Annotations (1)
System.ComponentModel.Composition (3)
System.Data.Common (2)
System.Diagnostics.DiagnosticSource (22)
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);
590exceptionTags.Add(new KeyValuePair<string, object?>(ExceptionMessageTag, exception.Message));
595exceptionTags.Add(new KeyValuePair<string, object?>(ExceptionStackTraceTag, exception.ToString()));
600exceptionTags.Add(new KeyValuePair<string, object?>(ExceptionTypeTag, exception.GetType().ToString()));
636KeyValuePair<string, string?> kvp = new KeyValuePair<string, string?>(key, value);
660KeyValuePair<string, string?> kvp = new KeyValuePair<string, string?>(key, value);
1805yield return new KeyValuePair<string, string?>(current.Value.Key, (string?)current.Value.Value);
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.IO.Packaging (1)
System.Linq.Expressions (4)
System.Linq.Parallel (1)
System.Net.Http (5)
System.Net.NameResolution (4)
System\Net\Dns.cs (4)
539asyncState = family == AddressFamily.Unspecified ? (object)ipAddress : new KeyValuePair<IPAddress, AddressFamily>(ipAddress, family);
573asyncState = family == AddressFamily.Unspecified ? (object)hostName : new KeyValuePair<string, AddressFamily>(hostName, family);
713((ICollection<KeyValuePair<object, Task>>)s_tasks).Remove(new KeyValuePair<object, Task>(key!, task!));
726((ICollection<KeyValuePair<object, Task>>)s_tasks).Remove(new KeyValuePair<object, Task>(key!, task));
System.Net.Security (2)
System.Net.WebSockets.Client (2)
System.Private.CoreLib (28)
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);
System.Private.Windows.Core.TestUtilities (1)
System.Reflection.Emit (3)
System.Reflection.Metadata (2)
System.Text.Json (1)
System.Text.RegularExpressions (4)
System.Threading.Channels (1)
System.Threading.RateLimiting (1)
System.Threading.Tasks.Dataflow (24)
Blocks\BatchBlock.cs (12)
795var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!);
796var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
813var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!);
814var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
910var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!);
911var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
926var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!);
927var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
1009var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!);
1010var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, consumedMessage);
1054var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!);
1055var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, consumedMessage);
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));
System.Xaml (5)
UnitTests.Common (1)
VBCSCompiler.UnitTests (3)
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)
xunit.console (1)
8183 references to KeyValuePair
AnalyzerRunner (8)
Aspire.Azure.AI.OpenAI.Tests (1)
Aspire.Azure.Data.Tables.Tests (1)
Aspire.Azure.Messaging.ServiceBus.Tests (3)
Aspire.Azure.Messaging.WebPubSub.Tests (1)
Aspire.Azure.Security.KeyVault.Tests (1)
Aspire.Azure.Storage.Blobs.Tests (1)
Aspire.Azure.Storage.Queues.Tests (1)
Aspire.Components.Common.Tests (2)
Aspire.Confluent.Kafka (4)
Aspire.Confluent.Kafka.Tests (2)
Aspire.Dashboard (60)
Otlp\Model\OtlpApplication.cs (8)
31private readonly ConcurrentDictionary<KeyValuePair<string, string>[], OtlpApplicationView> _applicationViews = new(ApplicationViewKeyComparer.Instance);
47KeyValuePair<string, string>[]? tempAttributes = null;
111private void AddMetrics(OtlpInstrument instrument, Metric metric, AddContext context, ref KeyValuePair<string, string>[]? tempAttributes)
228foreach (var instrument in _instruments)
300private sealed class ApplicationViewKeyComparer : IEqualityComparer<KeyValuePair<string, string>[]>
304public bool Equals(KeyValuePair<string, string>[]? x, KeyValuePair<string, string>[]? y)
334public int GetHashCode([DisallowNull] KeyValuePair<string, string>[] obj)
Otlp\Model\OtlpHelpers.cs (20)
180public static KeyValuePair<string, string>[] ToKeyValuePairs(this RepeatedField<KeyValue> attributes, OtlpContext context)
184return Array.Empty<KeyValuePair<string, string>>();
187var values = new KeyValuePair<string, string>[Math.Min(attributes.Count, context.Options.MaxAttributeCount)];
200public static KeyValuePair<string, string>[] ToKeyValuePairs(this RepeatedField<KeyValue> attributes, OtlpContext context, Func<KeyValue, bool> filter)
204return Array.Empty<KeyValuePair<string, string>>();
208List<KeyValuePair<string, string>>? values = null;
218values ??= new List<KeyValuePair<string, string>>(readLimit);
226var existingAttribute = values[existingIndex];
244static int GetIndex(List<KeyValuePair<string, string>> values, string name)
257public static void CopyKeyValuePairs(RepeatedField<KeyValue> attributes, KeyValuePair<string, string>[] parentAttributes, OtlpContext context, out int copyCount, [NotNull] ref KeyValuePair<string, string>[]? copiedAttributes)
271copiedAttributes = new KeyValuePair<string, string>[copyCount];
285private static void CopyKeyValues(RepeatedField<KeyValue> attributes, KeyValuePair<string, string>[] copiedAttributes, int index, OtlpContext context, out int copyCount)
303var existingAttribute = copiedAttributes[existingIndex];
321public static string? GetValue(this KeyValuePair<string, string>[] values, string name)
332public static int GetIndex(this KeyValuePair<string, string>[] values, string name)
344public static string? GetPeerAddress(this KeyValuePair<string, string>[] values)
375public static bool HasKey(this KeyValuePair<string, string>[] values, string name)
387public static string ConcatProperties(this KeyValuePair<string, string>[] properties)
391foreach (var kv in properties)
Otlp\Model\OtlpInstrument.cs (11)
38public Dictionary<ReadOnlyMemory<KeyValuePair<string, string>>, DimensionScope> Dimensions { get; } = new(ScopeAttributesComparer.Instance);
41public DimensionScope FindScope(RepeatedField<KeyValue> attributes, ref KeyValuePair<string, string>[]? tempAttributes)
62private DimensionScope CreateDimensionScope(Memory<KeyValuePair<string, string>> comparableAttributes)
122private sealed class ScopeAttributesComparer : IEqualityComparer<ReadOnlyMemory<KeyValuePair<string, string>>>
126public bool Equals(ReadOnlyMemory<KeyValuePair<string, string>> x, ReadOnlyMemory<KeyValuePair<string, string>> y)
131public int GetHashCode([DisallowNull] ReadOnlyMemory<KeyValuePair<string, string>> obj)
134foreach (KeyValuePair<string, string> pair in obj.Span)
143private sealed class KeyValuePairComparer : IComparer<KeyValuePair<string, string>>
147public int Compare(KeyValuePair<string, string> x, KeyValuePair<string, string> y)
Aspire.Dashboard.Components.Tests (26)
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 (14)
44public static InstrumentationScope CreateScope(string? name = null, IEnumerable<KeyValuePair<string, string>>? attributes = null)
50foreach (var attribute in attributes)
84public static Metric CreateSumMetric(string metricName, DateTime startTime, IEnumerable<KeyValuePair<string, string>>? attributes = null, IEnumerable<Exemplar>? exemplars = null, int? value = null)
103private static NumberDataPoint CreateNumberPoint(DateTime startTime, int value, IEnumerable<KeyValuePair<string, string>>? attributes = null, IEnumerable<Exemplar>? exemplars = null)
113foreach (var attribute in attributes)
129public static Span.Types.Event CreateSpanEvent(string name, int startTime, IEnumerable<KeyValuePair<string, string>>? attributes = null)
138foreach (var attribute in attributes)
147public 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)
168foreach (var attribute in attributes)
177public static LogRecord CreateLogRecord(DateTime? time = null, DateTime? observedTime = null, string? message = null, SeverityNumber? severity = null, IEnumerable<KeyValuePair<string, string>>? attributes = null, bool? skipBody = null)
191foreach (var attribute in attributes)
199public static Resource CreateResource(string? name = null, string? instanceId = null, IEnumerable<KeyValuePair<string, string>>? attributes = null)
212foreach (var attribute in attributes)
291KeyValuePair<string, string>[]? attributes = null, OtlpSpanStatusCode? statusCode = null, string? statusMessage = null)
Aspire.Dashboard.Tests (49)
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);
1132private static void AssertDimensionValues(Dictionary<ReadOnlyMemory<KeyValuePair<string, string>>, DimensionScope> dimensions, ReadOnlyMemory<KeyValuePair<string, string>> key, int valueCount)
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 (14)
44public static InstrumentationScope CreateScope(string? name = null, IEnumerable<KeyValuePair<string, string>>? attributes = null)
50foreach (var attribute in attributes)
84public static Metric CreateSumMetric(string metricName, DateTime startTime, IEnumerable<KeyValuePair<string, string>>? attributes = null, IEnumerable<Exemplar>? exemplars = null, int? value = null)
103private static NumberDataPoint CreateNumberPoint(DateTime startTime, int value, IEnumerable<KeyValuePair<string, string>>? attributes = null, IEnumerable<Exemplar>? exemplars = null)
113foreach (var attribute in attributes)
129public static Span.Types.Event CreateSpanEvent(string name, int startTime, IEnumerable<KeyValuePair<string, string>>? attributes = null)
138foreach (var attribute in attributes)
147public 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)
168foreach (var attribute in attributes)
177public static LogRecord CreateLogRecord(DateTime? time = null, DateTime? observedTime = null, string? message = null, SeverityNumber? severity = null, IEnumerable<KeyValuePair<string, string>>? attributes = null, bool? skipBody = null)
191foreach (var attribute in attributes)
199public static Resource CreateResource(string? name = null, string? instanceId = null, IEnumerable<KeyValuePair<string, string>>? attributes = null)
212foreach (var attribute in attributes)
291KeyValuePair<string, string>[]? attributes = null, OtlpSpanStatusCode? statusCode = null, string? statusMessage = null)
Aspire.EndToEnd.Tests (2)
Aspire.Hosting (5)
Aspire.Hosting.Analyzers (1)
Aspire.Hosting.Azure (3)
Aspire.Hosting.Azure.AppContainers (1)
Aspire.Hosting.Azure.PostgreSQL (1)
Aspire.Hosting.Azure.ServiceBus (1)
Aspire.Hosting.Azure.Sql (3)
Aspire.Hosting.Testing (7)
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 (10)
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.Microsoft.Azure.Cosmos.Tests (1)
Aspire.Microsoft.Data.SqlClient (3)
Aspire.Microsoft.Data.SqlClient.Tests (1)
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (3)
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (2)
Aspire.Milvus.Client.Tests (1)
Aspire.MySqlConnector.Tests (1)
Aspire.NATS.Net.Tests (1)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (2)
Aspire.Npgsql.Tests (1)
Aspire.OpenAI.Tests (1)
Aspire.Oracle.EntityFrameworkCore.Tests (2)
Aspire.Playground.Tests (11)
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)
Aspire.RabbitMQ.Client (3)
Aspire.RabbitMQ.Client.Tests (2)
Aspire.RabbitMQ.Client.v7.Tests (2)
Aspire.StackExchange.Redis (2)
Aspire.StackExchange.Redis.Tests (4)
Aspire.Workload.Tests (2)
AuthSamples.FunctionalTests (5)
AzureAppServicesHostingStartupSample (1)
AzureAppServicesSample (1)
Binding.Http.IntegrationTests (1)
BuildActionTelemetryTable (1)
BuildBoss (2)
BuildValidator (1)
Client.ClientBase.IntegrationTests (1)
CodeStyleConfigFileGenerator (1)
ConfigurationSchemaGenerator (2)
CookiePolicySample (1)
DefaultBuilder.SampleApp (1)
Diagnostics.EFCore.FunctionalTests (6)
dotnet-openapi (2)
dotnet-svcutil-lib (107)
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\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)
dotnet-svcutil-lib.Tests (1)
dotnet-user-jwts (2)
dotnet-user-secrets (5)
FilesWebSite (1)
GenerateRulesMissingDocumentation (1)
GetDocument.Insider (2)
HeaderPropagationSample (3)
HelixTestRunner (1)
http2cat (23)
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)
HttpOverridesSample (1)
IIS.FunctionalTests (30)
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\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)
illink (15)
ILLink.RoslynAnalyzer (11)
ILLink.Tasks (2)
InMemory.FunctionalTests (110)
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\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[]
385var maxFieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout();
782private async Task<ConnectionContext> MakeRequestAsync(int index, KeyValuePair<string, string>[] headers, bool sendData, bool waitForServerDispose)
835public void Add(KeyValuePair<string, StringValues> item) => _innerHeaders.Add(item);
837public bool Contains(KeyValuePair<string, StringValues> item) => _innerHeaders.Contains(item);
839public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex) => _innerHeaders.CopyTo(array, arrayIndex);
840public IEnumerator<KeyValuePair<string, StringValues>> GetEnumerator() => _innerHeaders.GetEnumerator();
842public bool Remove(KeyValuePair<string, StringValues> item) => _innerHeaders.Remove(item);
Http3\Http3StreamTests.cs (20)
2185public static TheoryData<IEnumerable<KeyValuePair<string, string>>> DuplicatePseudoHeaderFieldData
2189var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>();
2198foreach (var headerField in requestHeaders)
2208public static TheoryData<IEnumerable<KeyValuePair<string, string>>> ConnectMissingPseudoHeaderFieldData
2212var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>();
2213var methodHeader = new KeyValuePair<string, string>(InternalHeaderNames.Method, "CONNECT");
2221public static TheoryData<IEnumerable<KeyValuePair<string, string>>> PseudoHeaderFieldAfterRegularHeadersData
2225var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>();
2235foreach (var headerField in requestHeaders.Where(h => h.Key.StartsWith(':')))
2245public static TheoryData<IEnumerable<KeyValuePair<string, string>>> MissingPseudoHeaderFieldData
2249var data = new TheoryData<IEnumerable<KeyValuePair<string, string>>>();
2257foreach (var headerField in requestHeaders)
2269public Task HEADERS_Received_HeaderBlockContainsDuplicatePseudoHeaderField_ConnectionError(IEnumerable<KeyValuePair<string, string>> headers)
2276public async Task HEADERS_Received_HeaderBlockDoesNotContainMandatoryPseudoHeaderField_MethodIsCONNECT_NoError(IEnumerable<KeyValuePair<string, string>> headers)
2287public Task HEADERS_Received_HeaderBlockContainsPseudoHeaderFieldAfterRegularHeaders_ConnectionError(IEnumerable<KeyValuePair<string, string>> headers)
2292private async Task HEADERS_Received_InvalidHeaderFields_StreamError(IEnumerable<KeyValuePair<string, string>> headers, string expectedErrorMessage, Http3ErrorCode? errorCode = null)
2304public async Task HEADERS_Received_HeaderBlockDoesNotContainMandatoryPseudoHeaderField_StreamError(IEnumerable<KeyValuePair<string, string>> headers)
2377var headers = new List<KeyValuePair<string, string>>();
2405var headers = new List<KeyValuePair<string, string>>();
2799var maxFieldSetting = await Http3Api.ServerReceivedSettingsReader.ReadAsync().DefaultTimeout();
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\test\Http3\Http3InMemory.cs (9)
46_serverReceivedSettings = Channel.CreateUnbounded<KeyValuePair<Http3SettingType, long>>();
83internal readonly Channel<KeyValuePair<Http3SettingType, long>> _serverReceivedSettings;
92internal ChannelReader<KeyValuePair<Http3SettingType, long>> ServerReceivedSettingsReader => _serverReceivedSettings.Reader;
268internal async ValueTask<Http3RequestStream> InitializeConnectionAndStreamsAsync(RequestDelegate application, IEnumerable<KeyValuePair<string, string>> headers, bool endStream = false)
419internal async ValueTask<Http3RequestStream> CreateRequestStream(IEnumerable<KeyValuePair<string, string>> headers, Http3RequestHeaderHandler headerHandler = null, bool endStream = false, TaskCompletionSource tsc = null)
693public Task SendHeadersAsync(IEnumerable<KeyValuePair<string, string>> headers, bool endStream = false)
711internal Http3HeadersEnumerator GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers)
1038public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>();
InProcessWebSite (3)
installer.tasks (1)
Interop.FunctionalTests (4)
InteropTests (1)
Microsoft.Analyzers.Extra (3)
Microsoft.Analyzers.Local (6)
Microsoft.Analyzers.Local.Tests (3)
Microsoft.Arcade.Common (1)
Microsoft.Arcade.Test.Common (2)
Microsoft.AspNetCore.App.Analyzers (3)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.AspNetCore.App.CodeFixes (2)
Microsoft.AspNetCore.Authentication (2)
Microsoft.AspNetCore.Authentication.Cookies (4)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
Microsoft.AspNetCore.Authentication.Test (9)
Microsoft.AspNetCore.Authentication.Twitter (5)
Microsoft.AspNetCore.Authorization (7)
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)
Microsoft.AspNetCore.Components (40)
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; }
Microsoft.AspNetCore.Components.Analyzers (1)
Microsoft.AspNetCore.Components.Endpoints (3)
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
Microsoft.AspNetCore.Components.Forms (3)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Tests (6)
Microsoft.AspNetCore.Components.Web (3)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
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()
Microsoft.AspNetCore.CookiePolicy (3)
Microsoft.AspNetCore.CookiePolicy.Test (3)
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)
Microsoft.AspNetCore.DataProtection.Tests (2)
Microsoft.AspNetCore.Diagnostics (15)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (8)
Microsoft.AspNetCore.Diagnostics.Middleware (8)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (18)
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)
Microsoft.AspNetCore.Grpc.JsonTranscoding (5)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
Microsoft.AspNetCore.Grpc.Swagger (6)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.Hosting (27)
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)
Microsoft.AspNetCore.Hosting.Abstractions (1)
Microsoft.AspNetCore.Hosting.Tests (18)
Microsoft.AspNetCore.Http (98)
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;
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\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)
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);
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)
Microsoft.AspNetCore.Http.Connections.Client (5)
Microsoft.AspNetCore.Http.Connections.Tests (1)
Microsoft.AspNetCore.Http.Extensions (8)
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);
Microsoft.AspNetCore.Http.Features (6)
Microsoft.AspNetCore.Http.Microbenchmarks (21)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
Microsoft.AspNetCore.Http.Results (13)
Results.cs (6)
741IEnumerable<KeyValuePair<string, object?>>? extensions = null)
773return ValidationProblem(errors, detail, instance, statusCode, title, type, (IEnumerable<KeyValuePair<string, object?>>?)extensions);
791IEnumerable<KeyValuePair<string, string[]>> errors,
797IEnumerable<KeyValuePair<string, object?>>? extensions = null)
817private static void CopyExtensions(IEnumerable<KeyValuePair<string, object?>>? extensions, HttpValidationProblemDetails problemDetails)
821foreach (var extension in extensions)
TypedResults.cs (7)
765return Problem(detail, instance, statusCode, title, type, (IEnumerable<KeyValuePair<string, object?>>?)extensions);
786IEnumerable<KeyValuePair<string, object?>>? extensions = null)
832return ValidationProblem(errors, detail, instance, title, type, (IEnumerable<KeyValuePair<string, object?>>?)extensions);
848IEnumerable<KeyValuePair<string, string[]>> errors,
853IEnumerable<KeyValuePair<string, object?>>? extensions = null)
871private static void CopyExtensions(IEnumerable<KeyValuePair<string, object?>>? extensions, ProblemDetails problemDetails)
875foreach (var extension in extensions)
Microsoft.AspNetCore.Http.Results.Tests (7)
Microsoft.AspNetCore.Http.Tests (3)
Microsoft.AspNetCore.HttpLogging (9)
Microsoft.AspNetCore.Identity.FunctionalTests (7)
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)
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.Tests (10)
Microsoft.AspNetCore.Mvc.Abstractions (21)
Microsoft.AspNetCore.Mvc.Abstractions.Test (16)
Microsoft.AspNetCore.Mvc.Analyzers (2)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
Microsoft.AspNetCore.Mvc.Core (101)
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
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);
Microsoft.AspNetCore.Mvc.Core.Test (122)
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));
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);
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\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\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>?))]
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
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)
Microsoft.AspNetCore.Mvc.FunctionalTests (52)
Microsoft.AspNetCore.Mvc.IntegrationTests (170)
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");
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)
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);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (6)
Microsoft.AspNetCore.Mvc.Razor (4)
Microsoft.AspNetCore.Mvc.Razor.Test (3)
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
Microsoft.AspNetCore.Mvc.RazorPages.Test (56)
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)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
Microsoft.AspNetCore.Mvc.Test (2)
Microsoft.AspNetCore.Mvc.Testing (6)
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);
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();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (38)
Microsoft.AspNetCore.OpenApi (2)
Microsoft.AspNetCore.OpenApi.Tests (68)
Microsoft.AspNetCore.OutputCaching (11)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
Microsoft.AspNetCore.OutputCaching.Tests (1)
Microsoft.AspNetCore.Owin (52)
DictionaryStringArrayWrapper.cs (18)
20private static KeyValuePair<string, StringValues> Convert(KeyValuePair<string, string[]> item) => new KeyValuePair<string, StringValues>(item.Key, item.Value);
22private static KeyValuePair<string, string[]> Convert(KeyValuePair<string, StringValues> item) => new KeyValuePair<string, string[]>(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() => Inner.Select(Convert).GetEnumerator();
62bool ICollection<KeyValuePair<string, string[]>>.Remove(KeyValuePair<string, string[]> item) => Inner.Remove(Convert(item));
DictionaryStringValuesWrapper.cs (18)
21private static KeyValuePair<string, StringValues> Convert(KeyValuePair<string, string[]> item) => new KeyValuePair<string, StringValues>(item.Key, item.Value);
23private static KeyValuePair<string, string[]> Convert(KeyValuePair<string, StringValues> item) => new KeyValuePair<string, string[]>(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() => Inner.Select(Convert).GetEnumerator();
107bool ICollection<KeyValuePair<string, StringValues>>.Remove(KeyValuePair<string, StringValues> item) => Inner.Remove(Convert(item));
OwinEnvironment.cs (15)
239void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
244void ICollection<KeyValuePair<string, object>>.Clear()
250bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
255void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
265foreach (var entryPair in this)
271int ICollection<KeyValuePair<string, object>>.Count
276bool ICollection<KeyValuePair<string, object>>.IsReadOnly
281bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
287public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
289foreach (var entryPair in _entries)
297foreach (var entryPair in _context.Items)
Microsoft.AspNetCore.Owin.Tests (2)
Microsoft.AspNetCore.RateLimiting (1)
Microsoft.AspNetCore.RateLimiting.Tests (1)
Microsoft.AspNetCore.Razor.Runtime (15)
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);
Microsoft.AspNetCore.Razor.Runtime.Test (8)
Microsoft.AspNetCore.Razor.Test (2)
Microsoft.AspNetCore.ResponseCaching (6)
Microsoft.AspNetCore.ResponseCaching.Tests (1)
Microsoft.AspNetCore.Routing (81)
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.Routing.Abstractions (5)
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)
Microsoft.AspNetCore.Routing.Tests (36)
Microsoft.AspNetCore.Server.HttpSys (32)
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()
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (29)
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)
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()
Microsoft.AspNetCore.Server.IntegrationTesting (5)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (3)
Microsoft.AspNetCore.Server.Kestrel.Core (91)
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;
791_onStarting = new Stack<KeyValuePair<Func<object, Task>, object>>();
800_onCompleted = new Stack<KeyValuePair<Func<object, Task>, object>>();
815static async Task ProcessEvents(HttpProtocol protocol, Stack<KeyValuePair<Func<object, Task>, object>> events)
821while (events.TryPop(out var entry))
843static async Task ProcessEvents(HttpProtocol protocol, Stack<KeyValuePair<Func<object, Task>, object>> events)
847while (events.TryPop(out var entry))
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)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (46)
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\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)
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\test\Http3\Http3InMemory.cs (9)
46_serverReceivedSettings = Channel.CreateUnbounded<KeyValuePair<Http3SettingType, long>>();
83internal readonly Channel<KeyValuePair<Http3SettingType, long>> _serverReceivedSettings;
92internal ChannelReader<KeyValuePair<Http3SettingType, long>> ServerReceivedSettingsReader => _serverReceivedSettings.Reader;
268internal async ValueTask<Http3RequestStream> InitializeConnectionAndStreamsAsync(RequestDelegate application, IEnumerable<KeyValuePair<string, string>> headers, bool endStream = false)
419internal async ValueTask<Http3RequestStream> CreateRequestStream(IEnumerable<KeyValuePair<string, string>> headers, Http3RequestHeaderHandler headerHandler = null, bool endStream = false, TaskCompletionSource tsc = null)
693public Task SendHeadersAsync(IEnumerable<KeyValuePair<string, string>> headers, bool endStream = false)
711internal Http3HeadersEnumerator GetHeadersEnumerator(IEnumerable<KeyValuePair<string, string>> headers)
1038public ICollection<KeyValuePair<string, object>> Tags { get; } = new List<KeyValuePair<string, object>>();
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (7)
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))
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (7)
Microsoft.AspNetCore.Session (5)
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)
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\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\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\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()
Microsoft.AspNetCore.SignalR.Client.Core (4)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Microsoft.AspNetCore.SignalR.Core (9)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
Microsoft.AspNetCore.SpaServices.Extensions (5)
Microsoft.AspNetCore.TestHost (7)
Microsoft.AspNetCore.Tests (2)
Microsoft.AspNetCore.WebUtilities (7)
Microsoft.AspNetCore.WebUtilities.Tests (5)
Microsoft.Build (399)
BackEnd\Components\RequestBuilder\Lookup.cs (12)
340foreach (KeyValuePair<string, Dictionary<ProjectItemInstance, MetadataModifications>> entry in PrimaryModifyTable)
346foreach (KeyValuePair<ProjectItemInstance, MetadataModifications> modify in entry.Value)
395foreach (KeyValuePair<string, Dictionary<ProjectItemInstance, MetadataModifications>> entry in PrimaryModifyTable)
511foreach (KeyValuePair<ProjectItemInstance, MetadataModifications> modify in modifies)
795var modify = new KeyValuePair<ProjectItemInstance, MetadataModifications>(actualItem, metadataChangeCopy);
817foreach (var modify in allModifies)
857foreach (var modificationPair in modificationsToApply.ExplicitModifications)
897foreach (var kvPair in modify)
916KeyValuePair<ProjectItemInstance, MetadataModifications> modify,
931foreach (var metadataChange in modify.Value.ExplicitModifications)
1105foreach (var modificationPair in other.ExplicitModifications)
1147public IEnumerable<KeyValuePair<string, MetadataModification>> ExplicitModifications
BackEnd\Components\Scheduler\SchedulingPlan.cs (8)
113List<KeyValuePair<int, double>> configurationsInOrder = new(accumulatedTimeByConfiguration);
114configurationsInOrder.Sort((KeyValuePair<int, double> l, KeyValuePair<int, double> r) => Comparer<int>.Default.Compare(l.Key, r.Key));
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)
Collections\CopyOnWritePropertyDictionary.cs (12)
78bool ICollection<KeyValuePair<string, T>>.IsReadOnly => false;
272void ICollection<KeyValuePair<string, T>>.Add(KeyValuePair<string, T> item)
280bool ICollection<KeyValuePair<string, T>>.Contains(KeyValuePair<string, T> item)
293void ICollection<KeyValuePair<string, T>>.CopyTo(KeyValuePair<string, T>[] array, int arrayIndex)
301bool ICollection<KeyValuePair<string, T>>.Remove(KeyValuePair<string, T> item)
314IEnumerator<KeyValuePair<string, T>> IEnumerable<KeyValuePair<string, T>>.GetEnumerator()
352IEnumerable<KeyValuePair<string, T>> Items()
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)
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)
300public IEnumerator<KeyValuePair<string, V>> GetEnumerator()
310return ((IEnumerable<KeyValuePair<string, V>>)this).GetEnumerator();
361foreach (KeyValuePair<string, V> entry in this)
387KeyValuePair<string, V>[] array = snapshot.ToArray();
Definition\Project.cs (18)
90/// - <see cref="AddItem(string,string, IEnumerable<KeyValuePair<string, string>>)"/>
91/// - <see cref="AddItemFast(string,string, IEnumerable<KeyValuePair<string, string>>)"/>
619internal IEnumerable<KeyValuePair<string, string>> GlobalPropertiesEnumerable => implementation.GlobalPropertiesEnumerable();
1204public IList<ProjectItem> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
1235public IList<ProjectItem> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
1715internal bool IsSuitableExistingItemXml(ProjectItemElement candidateExistingItemXml, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
1982/// - <see cref="AddItem(string,string, IEnumerable<KeyValuePair<string, string>>)"/>
1983/// - <see cref="AddItemFast(string,string, IEnumerable<KeyValuePair<string, string>>)"/>
2124public override IEnumerable<KeyValuePair<string, string>> GlobalPropertiesEnumerable()
3004public override IList<ProjectItem> AddItem(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
3053public override IList<ProjectItem> AddItemFast(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
3436public bool IsSuitableExistingItemXml(ProjectItemElement candidateExistingItemXml, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
3591private List<ProjectItem> AddItemHelper(ProjectItemElement itemElement, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata)
3615foreach (KeyValuePair<string, string> metadatum in metadata)
3779foreach (KeyValuePair<string, string> pair in globalProperties)
3838private ProjectElement GetAnySuitableExistingItemXml(string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata, out ProjectItemElement suitableExistingItemXml)
3964bool IsSuitableExistingItemXml(ProjectItemElement candidateExistingItemXml, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata);
3989public bool IsSuitableExistingItemXml(ProjectItemElement candidateExistingItemXml, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata) { throw new NotImplementedException(); }
Evaluation\Expander.cs (68)
668out List<KeyValuePair<string, I>> itemsFromCapture)
1786internal static IEnumerable<KeyValuePair<string, S>> Transform<S>(Expander<P, I> expander, bool includeNullEntries, Stack<TransformFunction<S>> transformFunctionStack, IEnumerable<KeyValuePair<string, S>> itemsOfType)
1795foreach (KeyValuePair<string, S> item in Transform(expander, includeNullEntries, transformFunctionStack, function.Execute(expander, includeNullEntries, itemsOfType)))
1804foreach (KeyValuePair<string, S> item in itemsOfType)
1937List<KeyValuePair<string, S>> itemsFromCapture;
1947foreach (var itemTuple in itemsFromCapture)
2003out List<KeyValuePair<string, S>> itemsFromCapture)
2023itemsFromCapture = new List<KeyValuePair<string, S>>();
2034itemsFromCapture = new List<KeyValuePair<string, S>>(itemsOfType.Count);
2054foreach (KeyValuePair<string, S> itemTuple in Transform<S>(expander, includeNullEntries, transformFunctionStack, IntrinsicItemFunctions<S>.GetItemPairEnumerable(itemsOfType)))
2187List<KeyValuePair<string, S>> itemsFromCapture;
2202var item = itemsFromCapture[i];
2248public delegate IEnumerable<KeyValuePair<string, S>> ItemTransformFunction(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments);
2311internal static IEnumerable<KeyValuePair<string, S>> GetItemPairEnumerable(IEnumerable<S> itemsOfType)
2337internal static IEnumerable<KeyValuePair<string, S>> Count(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2346internal static IEnumerable<KeyValuePair<string, S>> ItemSpecModifierFunction(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2350foreach (KeyValuePair<string, S> item in itemsOfType)
2394internal static IEnumerable<KeyValuePair<string, S>> Exists(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2398foreach (KeyValuePair<string, S> item in itemsOfType)
2441internal static IEnumerable<KeyValuePair<string, S>> Combine(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2447foreach (KeyValuePair<string, S> item in itemsOfType)
2465internal static IEnumerable<KeyValuePair<string, S>> GetPathsOfAllDirectoriesAbove(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2473foreach (KeyValuePair<string, S> item in itemsOfType)
2541internal static IEnumerable<KeyValuePair<string, S>> DirectoryName(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2547foreach (KeyValuePair<string, S> item in itemsOfType)
2608internal static IEnumerable<KeyValuePair<string, S>> Metadata(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2614foreach (KeyValuePair<string, S> item in itemsOfType)
2662internal static IEnumerable<KeyValuePair<string, S>> DistinctWithCase(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2671internal static IEnumerable<KeyValuePair<string, S>> Distinct(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2680internal static IEnumerable<KeyValuePair<string, S>> DistinctWithComparer(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments, StringComparer comparer)
2687foreach (KeyValuePair<string, S> item in itemsOfType)
2699internal static IEnumerable<KeyValuePair<string, S>> Reverse(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2708internal static IEnumerable<KeyValuePair<string, S>> ExpandQuotedExpressionFunction(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2712foreach (KeyValuePair<string, S> item in itemsOfType)
2748internal static IEnumerable<KeyValuePair<string, S>> ExecuteStringFunction(
2753IEnumerable<KeyValuePair<string, S>> itemsOfType,
2758foreach (KeyValuePair<string, S> item in itemsOfType)
2791internal static IEnumerable<KeyValuePair<string, S>> ClearMetadata(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2795foreach (KeyValuePair<string, S> item in itemsOfType)
2808internal static IEnumerable<KeyValuePair<string, S>> HasMetadata(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2814foreach (KeyValuePair<string, S> item in itemsOfType)
2842internal static IEnumerable<KeyValuePair<string, S>> WithMetadataValue(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2849foreach (KeyValuePair<string, S> item in itemsOfType)
2875internal static IEnumerable<KeyValuePair<string, S>> WithoutMetadataValue(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2882foreach (KeyValuePair<string, S> item in itemsOfType)
2908internal static IEnumerable<KeyValuePair<string, S>> AnyHaveMetadataValue(Expander<P, I> expander, IElementLocation elementLocation, bool includeNullEntries, string functionName, IEnumerable<KeyValuePair<string, S>> itemsOfType, string[] arguments)
2916foreach (KeyValuePair<string, S> item in itemsOfType)
3010public IEnumerable<KeyValuePair<string, S>> Execute(Expander<P, I> expander, bool includeNullEntries, IEnumerable<KeyValuePair<string, S>> itemsOfType)
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\ProjectItemInstance.cs (18)
122internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, IEnumerable<KeyValuePair<string, string>> directMetadata, string definingFileEscaped)
307IEnumerable<KeyValuePair<string, string>> IItemData.EnumerateMetadata() => ((IMetadataContainer)this).EnumerateMetadata();
411public void SetMetadata(IEnumerable<KeyValuePair<string, string>> metadataDictionary)
538IEnumerable<KeyValuePair<string, string>> IMetadataContainer.EnumerateMetadata() => _taskItem.EnumerateMetadata();
540void IMetadataContainer.ImportMetadata(IEnumerable<KeyValuePair<string, string>> metadata) => _taskItem.ImportMetadata(metadata);
603internal static void SetMetadata(IEnumerable<KeyValuePair<string, string>> metadataList, IEnumerable<ProjectItemInstance> items)
647internal void SetMetadataOnTaskOutput(IEnumerable<KeyValuePair<string, string>> items)
1050public IEnumerable<KeyValuePair<string, string>> EnumerateMetadata()
1080public void ImportMetadata(IEnumerable<KeyValuePair<string, string>> metadata)
1094private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager(ICopyOnWritePropertyDictionary<ProjectMetadataInstance> list)
1096var result = new List<KeyValuePair<string, string>>(list.Count);
1110private IEnumerable<KeyValuePair<string, string>> EnumerateMetadata(ICopyOnWritePropertyDictionary<ProjectMetadataInstance> list)
1450IEnumerable<KeyValuePair<string, string>> metadataToImport = metadataEnumerable
1708public void SetMetadata(IEnumerable<KeyValuePair<string, string>> metadataDictionary)
1712foreach (KeyValuePair<string, string> metadataEntry in metadataDictionary)
1888internal void SetMetadataOnTaskOutput(IEnumerable<KeyValuePair<string, string>> items)
2059public void SetMetadata(IEnumerable<KeyValuePair<ProjectMetadataElement, string>> metadataList, IEnumerable<ProjectItemInstance> destinationItems)
2224public void SetMetadata(IEnumerable<KeyValuePair<ProjectMetadataElement, string>> metadata, IEnumerable<TaskItem> destinationItems)
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;
TaskParameter.cs (13)
447foreach (KeyValuePair<string, string> entry in escapedGenericWrappedMetadata)
896foreach (KeyValuePair<string, string> entry in _customEscapedMetadata)
928foreach (KeyValuePair<string, string> metadatum in _customEscapedMetadata)
990public IEnumerable<KeyValuePair<string, string>> EnumerateMetadata()
1002private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager()
1009var result = new KeyValuePair<string, string>[_customEscapedMetadata.Count];
1011foreach (var kvp in _customEscapedMetadata)
1013var 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)
Microsoft.Build.BuildCheck.UnitTests (3)
Microsoft.Build.CommandLine.UnitTests (3)
Microsoft.Build.Engine.OM.UnitTests (37)
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\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)
Microsoft.Build.Engine.UnitTests (47)
BackEnd\Lookup_Tests.cs (5)
206table1.Add(new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("m1", "m1") }, project.FullPath));
207table1.Add(new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>("m1", "m2") }, project.FullPath));
216new ProjectItemInstance(project, "i1", "a2", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should get added
217new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should not get added
218new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m3") }, project.FullPath), // Should get added
Microsoft.Build.Framework (97)
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()
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;
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
Microsoft.Build.Tasks.Core (58)
AssemblyDependency\ReferenceTable.cs (12)
1103List<KeyValuePair<AssemblyNameExtension, Reference>> newEntries)
1150var newEntry = new KeyValuePair<AssemblyNameExtension, Reference>(unifiedDependency.PostUnified, newReference);
1382foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in References)
1547foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in References)
1686var newEntries = new List<KeyValuePair<AssemblyNameExtension, Reference>>();
1769foreach (KeyValuePair<AssemblyNameExtension, Reference> newEntry in newEntries)
1783foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in References)
2179foreach (KeyValuePair<AssemblyNameExtension, Reference> assemblyNameWithReference in References)
2206foreach (KeyValuePair<string, List<AssemblyNameReference>> kvp in baseNameToReferences)
2598foreach (KeyValuePair<AssemblyNameExtension, Reference> kvp in References)
2859IEnumerable<KeyValuePair<string, string>> EnumerateCommonMetadata()
3155foreach (KeyValuePair<AssemblyNameExtension, Reference> assembly in References)
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);
1860KeyValuePair<string, XmlNode> altCulturePair = _cultures.FirstOrDefault();
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)
300public IEnumerator<KeyValuePair<string, V>> GetEnumerator()
310return ((IEnumerable<KeyValuePair<string, V>>)this).GetEnumerator();
361foreach (KeyValuePair<string, V> entry in this)
387KeyValuePair<string, V>[] array = snapshot.ToArray();
Microsoft.Build.Tasks.UnitTests (31)
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;
1105private 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)
1127xmlInputs = new List<KeyValuePair<XslTransformation.XmlInput.XmlModes, object>>();
1128xslInputs = new List<KeyValuePair<XslTransformation.XsltInput.XslModes, object>>();
Microsoft.Build.UnitTests.Shared (14)
ObjectModelHelpers.cs (11)
1033foreach (KeyValuePair<string, string> globalProperty in globalProperties)
1230public static Dictionary<string, V> MakeDictionary<V>(IEnumerable<KeyValuePair<string, V>> enumerable)
1233foreach (KeyValuePair<string, V> item in enumerable)
1271public static void AssertDictionariesEqual<K, V>(IDictionary<K, V> x, IDictionary<K, V> y, Action<KeyValuePair<K, V>, KeyValuePair<K, V>> assertPairsEqual)
1283var xPair = x.ElementAt(i);
1284var yPair = y.ElementAt(i);
1720foreach (KeyValuePair<string, string[]> pair in projectReferenceTargets)
1759foreach (var nodeDependencies in dependencyEdges)
1777foreach (var nodeDependencies in dependencyEdges)
1822foreach (var nodeDependencies in dependencyEdges)
Microsoft.Build.Utilities.Core (44)
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)
300public IEnumerator<KeyValuePair<string, V>> GetEnumerator()
310return ((IEnumerable<KeyValuePair<string, V>>)this).GetEnumerator();
361foreach (KeyValuePair<string, V> entry in this)
387KeyValuePair<string, V>[] array = snapshot.ToArray();
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)
511private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager()
520var result = new KeyValuePair<string, string>[count];
521foreach (var kvp in _metadata)
523var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value));
530private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataLazy()
537foreach (var kvp in _metadata)
539var unescaped = new KeyValuePair<string, string>(kvp.Key, EscapingUtilities.UnescapeAll(kvp.Value));
Microsoft.CodeAnalysis (274)
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];
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()
Compilation\DeterministicKeyBuilder.cs (6)
46ImmutableArray<KeyValuePair<string, string>> pathMap,
128ImmutableArray<KeyValuePair<string, string>> pathMap,
203ImmutableArray<KeyValuePair<string, string>> pathMap,
256ImmutableArray<KeyValuePair<string, string>> pathMap,
287ImmutableArray<KeyValuePair<string, string>> pathMap,
385ImmutableArray<KeyValuePair<string, string>> pathMap,
Emit\NoPia\EmbeddedTypesManager.cs (2)
159internal abstract TAttributeData CreateSynthesizedAttribute(WellKnownMember constructor, ImmutableArray<TypedConstant> constructorArguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics);
160internal abstract bool TryGetAttributeArguments(TAttributeData attrData, out ImmutableArray<TypedConstant> constructorArguments, out ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, TSyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics);
InternalUtilities\KeyValuePairUtil.cs (3)
11public static KeyValuePair<K, V> Create<K, V>(K key, V value)
16public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
22public static KeyValuePair<TKey, TValue> ToKeyValuePair<TKey, TValue>(this (TKey, TValue) tuple) => Create(tuple.Item1, tuple.Item2);
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\PEModule.cs (5)
680foreach (var pair in namespaces)
760foreach (var kvp in namespaceHandles)
1369(KeyValuePair<string, TypedConstant> nameValuePair, bool isProperty, SerializationTypeCode typeCode, SerializationTypeCode elementTypeCode) namedArgValues =
1527(KeyValuePair<string, TypedConstant> nameValuePair, bool isProperty, SerializationTypeCode typeCode, SerializationTypeCode elementTypeCode) namedArgValues =
3814internal IEnumerable<KeyValuePair<string, (int FirstIndex, int SecondIndex)>> GetForwardedTypes()
src\Dependencies\Collections\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)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (18)
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
155public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
181public bool Contains(KeyValuePair<TKey, TValue> pair)
230public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
236foreach (var item in items)
316IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
330IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
357void ICollection<KeyValuePair<TKey, TValue>>.Clear()
360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
372private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (12)
47bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder);
76public void Add(KeyValuePair<TKey, TValue> item)
79public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
85public bool Contains(KeyValuePair<TKey, TValue> item)
106public bool Remove(KeyValuePair<TKey, TValue> item)
123void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
124=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex);
126IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
127=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
68readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
116public void Add(KeyValuePair<TKey, TValue> item)
119public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
124foreach (var pair in items)
144public readonly bool Contains(KeyValuePair<TKey, TValue> item)
183public bool Remove(KeyValuePair<TKey, TValue> item)
209foreach (var pair in this)
234readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
235=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
237IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\SegmentedDictionary`2.cs (29)
44private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator;
132public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection)
137public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
148private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable)
192ReadOnlySpan<KeyValuePair<TKey, TValue>> span;
193if (enumerable is KeyValuePair<TKey, TValue>[] array)
198else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
200span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable);
206foreach (var pair in enumerable)
214foreach (var pair in span)
268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
356private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
387IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() =>
391private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator()
868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
900if (array is KeyValuePair<TKey, TValue>[] pairs)
943=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator();
1170public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator
1175private KeyValuePair<TKey, TValue> _current;
1215public readonly KeyValuePair<TKey, TValue> Current => _current;
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)
Microsoft.CodeAnalysis.CodeStyle (107)
src\Compilers\Core\Portable\InternalUtilities\KeyValuePairUtil.cs (3)
11public static KeyValuePair<K, V> Create<K, V>(K key, V value)
16public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
22public static KeyValuePair<TKey, TValue> ToKeyValuePair<TKey, TValue>(this (TKey, TValue) tuple) => Create(tuple.Item1, tuple.Item2);
src\Dependencies\Collections\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)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (18)
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
155public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
181public bool Contains(KeyValuePair<TKey, TValue> pair)
230public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
236foreach (var item in items)
316IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
330IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
357void ICollection<KeyValuePair<TKey, TValue>>.Clear()
360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
372private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (12)
47bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder);
76public void Add(KeyValuePair<TKey, TValue> item)
79public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
85public bool Contains(KeyValuePair<TKey, TValue> item)
106public bool Remove(KeyValuePair<TKey, TValue> item)
123void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
124=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex);
126IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
127=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
68readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
116public void Add(KeyValuePair<TKey, TValue> item)
119public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
124foreach (var pair in items)
144public readonly bool Contains(KeyValuePair<TKey, TValue> item)
183public bool Remove(KeyValuePair<TKey, TValue> item)
209foreach (var pair in this)
234readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
235=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
237IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\SegmentedDictionary`2.cs (27)
44private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator;
132public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection)
137public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
148private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable)
192ReadOnlySpan<KeyValuePair<TKey, TValue>> span;
193if (enumerable is KeyValuePair<TKey, TValue>[] array)
206foreach (var pair in enumerable)
214foreach (var pair in span)
268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
356private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
387IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() =>
391private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator()
868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
900if (array is KeyValuePair<TKey, TValue>[] pairs)
943=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator();
1170public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator
1175private KeyValuePair<TKey, TValue> _current;
1215public readonly KeyValuePair<TKey, TValue> Current => _current;
Microsoft.CodeAnalysis.CodeStyle.Fixes (15)
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>()
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (3)
Microsoft.CodeAnalysis.Collections.Package (78)
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 (18)
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
155public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
181public bool Contains(KeyValuePair<TKey, TValue> pair)
230public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
236foreach (var item in items)
316IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
330IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
357void ICollection<KeyValuePair<TKey, TValue>>.Clear()
360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
372private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
ImmutableSegmentedDictionary`2+Builder.cs (12)
47bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder);
76public void Add(KeyValuePair<TKey, TValue> item)
79public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
85public bool Contains(KeyValuePair<TKey, TValue> item)
106public bool Remove(KeyValuePair<TKey, TValue> item)
123void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
124=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex);
126IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
127=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
68readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
116public void Add(KeyValuePair<TKey, TValue> item)
119public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
124foreach (var pair in items)
144public readonly bool Contains(KeyValuePair<TKey, TValue> item)
183public bool Remove(KeyValuePair<TKey, TValue> item)
209foreach (var pair in this)
234readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
235=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
237IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
SegmentedDictionary`2.cs (27)
44private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator;
132public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection)
137public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
148private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable)
192ReadOnlySpan<KeyValuePair<TKey, TValue>> span;
193if (enumerable is KeyValuePair<TKey, TValue>[] array)
206foreach (var pair in enumerable)
214foreach (var pair in span)
268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
356private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
387IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() =>
391private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator()
868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
900if (array is KeyValuePair<TKey, TValue>[] pairs)
943=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator();
1170public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator
1175private KeyValuePair<TKey, TValue> _current;
1215public readonly KeyValuePair<TKey, TValue> Current => _current;
Microsoft.CodeAnalysis.CSharp (109)
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;
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,
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\NoPia\EmbeddedTypesManager.cs (4)
124internal override CSharpAttributeData CreateSynthesizedAttribute(WellKnownMember constructor, ImmutableArray<TypedConstant> constructorArguments, ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics)
140ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty);
149ImmutableArray<KeyValuePair<string, TypedConstant>>.Empty);
156internal override bool TryGetAttributeArguments(CSharpAttributeData attrData, out ImmutableArray<TypedConstant> constructorArguments, out ImmutableArray<KeyValuePair<string, TypedConstant>> namedArguments, SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics)
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;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
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)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
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)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
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)
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)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
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.EditorFeatures (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (1)
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\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)
313ImmutableArray<KeyValuePair<string, string>> properties = default,
337ImmutableArray<KeyValuePair<string, string>> properties = default,
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
Microsoft.CodeAnalysis.InteractiveHost (4)
Microsoft.CodeAnalysis.LanguageServer (5)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.PooledObjects.Package (1)
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)
Microsoft.CodeAnalysis.Scripting (2)
Microsoft.CodeAnalysis.Test.Utilities (11)
Microsoft.CodeAnalysis.UnitTests (27)
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\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>[];
Microsoft.CodeAnalysis.VisualBasic (67)
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)))
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 (159)
src\Compilers\Core\Portable\InternalUtilities\KeyValuePairUtil.cs (3)
11public static KeyValuePair<K, V> Create<K, V>(K key, V value)
16public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
22public static KeyValuePair<TKey, TValue> ToKeyValuePair<TKey, TValue>(this (TKey, TValue) tuple) => Create(tuple.Item1, tuple.Item2);
src\Dependencies\Collections\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)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (18)
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
155public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
181public bool Contains(KeyValuePair<TKey, TValue> pair)
230public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
236foreach (var item in items)
316IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
330IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
357void ICollection<KeyValuePair<TKey, TValue>>.Clear()
360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
372private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (12)
47bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder);
76public void Add(KeyValuePair<TKey, TValue> item)
79public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
85public bool Contains(KeyValuePair<TKey, TValue> item)
106public bool Remove(KeyValuePair<TKey, TValue> item)
123void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
124=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex);
126IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
127=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
68readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
116public void Add(KeyValuePair<TKey, TValue> item)
119public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
124foreach (var pair in items)
144public readonly bool Contains(KeyValuePair<TKey, TValue> item)
183public bool Remove(KeyValuePair<TKey, TValue> item)
209foreach (var pair in this)
234readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
235=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
237IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\SegmentedDictionary`2.cs (27)
44private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator;
132public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection)
137public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
148private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable)
192ReadOnlySpan<KeyValuePair<TKey, TValue>> span;
193if (enumerable is KeyValuePair<TKey, TValue>[] array)
206foreach (var pair in enumerable)
214foreach (var pair in span)
268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
356private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
387IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() =>
391private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator()
868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
900if (array is KeyValuePair<TKey, TValue>[] pairs)
943=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator();
1170public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator
1175private KeyValuePair<TKey, TValue> _current;
1215public readonly KeyValuePair<TKey, TValue> Current => _current;
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>()
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (105)
src\Compilers\Core\Portable\InternalUtilities\KeyValuePairUtil.cs (3)
11public static KeyValuePair<K, V> Create<K, V>(K key, V value)
16public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value)
22public static KeyValuePair<TKey, TValue> ToKeyValuePair<TKey, TValue>(this (TKey, TValue) tuple) => Create(tuple.Item1, tuple.Item2);
src\Dependencies\Collections\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)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (18)
104bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
155public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
181public bool Contains(KeyValuePair<TKey, TValue> pair)
230public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
236foreach (var item in items)
316IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
330IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
339void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
340=> ((ICollection<KeyValuePair<TKey, TValue>>)_dictionary).CopyTo(array, arrayIndex);
354void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
357void ICollection<KeyValuePair<TKey, TValue>>.Clear()
360bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
372private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (12)
47bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => ICollectionCalls<KeyValuePair<TKey, TValue>>.IsReadOnly(ref _builder);
76public void Add(KeyValuePair<TKey, TValue> item)
79public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
85public bool Contains(KeyValuePair<TKey, TValue> item)
106public bool Remove(KeyValuePair<TKey, TValue> item)
123void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
124=> ICollectionCalls<KeyValuePair<TKey, TValue>>.CopyTo(ref _builder, array, arrayIndex);
126IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
127=> IEnumerableCalls<KeyValuePair<TKey, TValue>>.GetEnumerator(ref _builder);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (12)
68readonly bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
116public void Add(KeyValuePair<TKey, TValue> item)
119public void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
124foreach (var pair in items)
144public readonly bool Contains(KeyValuePair<TKey, TValue> item)
183public bool Remove(KeyValuePair<TKey, TValue> item)
209foreach (var pair in this)
234readonly void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
235=> ((ICollection<KeyValuePair<TKey, TValue>>)ReadOnlyDictionary).CopyTo(array, arrayIndex);
237IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
src\Dependencies\Collections\SegmentedDictionary`2.cs (29)
44private static IEnumerator<KeyValuePair<TKey, TValue>>? s_emptyEnumerator;
132public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection)
137public SegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer)
138: this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
148private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> enumerable)
192ReadOnlySpan<KeyValuePair<TKey, TValue>> span;
193if (enumerable is KeyValuePair<TKey, TValue>[] array)
198else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
200span = CollectionsMarshal.AsSpan((List<KeyValuePair<TKey, TValue>>)enumerable);
206foreach (var pair in enumerable)
214foreach (var pair in span)
268void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
271bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
282bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
356private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
387IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() =>
391private static IEnumerator<KeyValuePair<TKey, TValue>> GetEmptyEnumerator()
868bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
870void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
900if (array is KeyValuePair<TKey, TValue>[] pairs)
943=> ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator();
1170public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator
1175private KeyValuePair<TKey, TValue> _current;
1215public readonly KeyValuePair<TKey, TValue> Current => _current;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (4)
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
Microsoft.CSharp (4)
Microsoft.Data.Analysis (9)
Microsoft.DotNet.Arcade.Sdk (6)
Microsoft.DotNet.Build.Tasks.Feed (1)
Microsoft.DotNet.Build.Tasks.Packaging (23)
Microsoft.DotNet.Build.Tasks.Workloads (3)
Microsoft.DotNet.Helix.Client (3)
Microsoft.DotNet.Helix.Sdk (2)
Microsoft.DotNet.NuGetRepack.Tests (2)
Microsoft.DotNet.Open.Api.Tools.Tests (2)
Microsoft.DotNet.PackageTesting (1)
Microsoft.DotNet.SharedFramework.Sdk (1)
Microsoft.DotNet.SignTool (8)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Microsoft.DotNet.VersionTools (6)
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 });
Microsoft.DotNet.XUnitExtensions (16)
Microsoft.Extensions.AI (18)
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 (49)
AdditionalPropertiesDictionary{TValue}.cs (19)
43public AdditionalPropertiesDictionary(IEnumerable<KeyValuePair<string, TValue>> collection)
49foreach (var item in 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);
205public struct Enumerator : IEnumerator<KeyValuePair<string, TValue>>
218public KeyValuePair<string, TValue> Current => _dictionaryEnumerator.Current;
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.Tests (9)
Microsoft.Extensions.AI.AzureAIInference (15)
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)
Microsoft.Extensions.AI.Integration.Tests (1)
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)
Microsoft.Extensions.AI.OpenAI (17)
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)
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]);
Microsoft.Extensions.ApiDescription.Client.Tests (2)
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
Microsoft.Extensions.Caching.Hybrid.Tests (3)
Microsoft.Extensions.Caching.Memory (6)
Microsoft.Extensions.Compliance.Redaction (1)
Microsoft.Extensions.Configuration (12)
Microsoft.Extensions.Configuration.Abstractions (2)
Microsoft.Extensions.Configuration.Binder (1)
Microsoft.Extensions.Configuration.CommandLine (1)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (2)
Microsoft.Extensions.DependencyInjection (3)
Microsoft.Extensions.Diagnostics (12)
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)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (2)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (6)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (5)
Microsoft.Extensions.Diagnostics.Testing (16)
Microsoft.Extensions.Diagnostics.Testing.Tests (2)
Microsoft.Extensions.Features (7)
Microsoft.Extensions.FileProviders.Physical (2)
Microsoft.Extensions.FileSystemGlobbing (1)
Microsoft.Extensions.Hosting (4)
Microsoft.Extensions.Hosting.Testing (1)
Microsoft.Extensions.Http (9)
Microsoft.Extensions.Http.Diagnostics (35)
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)
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\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>>();
Microsoft.Extensions.Http.Resilience (4)
Microsoft.Extensions.Http.Resilience.Tests (5)
Microsoft.Extensions.Identity.Core (1)
Microsoft.Extensions.Logging (18)
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)
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()
Microsoft.Extensions.Logging.Configuration (1)
Microsoft.Extensions.Logging.Console (8)
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)
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)
183[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<string, string>))]
193IEnumerable<KeyValuePair<string, string?>> Arguments,
213[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(KeyValuePair<string, string>))]
216internal void ActivityStart(int ID, int FactoryID, string LoggerName, IEnumerable<KeyValuePair<string, string?>> Arguments)
Microsoft.Extensions.Logging.Generators (3)
Microsoft.Extensions.Options.SourceGeneration (3)
Microsoft.Extensions.Resilience.PerformanceTests (1)
Microsoft.Extensions.Resilience.Tests (1)
Microsoft.Extensions.SecretManager.Tools.Tests (10)
Microsoft.Extensions.ServiceDiscovery (1)
Microsoft.Extensions.Telemetry (44)
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 =>
Microsoft.Extensions.Telemetry.Abstractions (11)
Microsoft.Extensions.Telemetry.Abstractions.Tests (5)
Microsoft.Extensions.Telemetry.PerformanceTests (4)
Microsoft.Extensions.Telemetry.Tests (15)
Microsoft.Gen.ComplianceReports (1)
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;
Microsoft.Gen.Logging (3)
Microsoft.Gen.Logging.Generated.Tests (7)
Microsoft.Gen.Logging.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;
Microsoft.Gen.MetadataExtractor (6)
Microsoft.Gen.MetadataExtractor.Unit.Tests (12)
Microsoft.Gen.Metrics (5)
Microsoft.Gen.Metrics.Generated.Tests (4)
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)
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)
Microsoft.Interop.LibraryImportGenerator (3)
Microsoft.Interop.SourceGeneration (17)
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 (5)
Microsoft.Maui.Controls (110)
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]
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)
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);
Microsoft.Maui.Controls.Build.Tasks (8)
Microsoft.Maui.Controls.SourceGen (1)
Microsoft.Maui.Controls.Xaml (15)
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)
Microsoft.Maui.Graphics (3)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (3)
Microsoft.Maui.Resizetizer (2)
Microsoft.ML.AutoML (7)
Microsoft.ML.AutoML.Interactive (1)
Microsoft.ML.AutoML.Tests (5)
Microsoft.ML.CodeGenerator (4)
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\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\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)
Microsoft.ML.CpuMath.UnitTests (1)
Microsoft.ML.Data (167)
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>>();
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,
Microsoft.ML.DataView (5)
Microsoft.ML.Ensemble (14)
Microsoft.ML.EntryPoints (8)
Microsoft.ML.FastTree (35)
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)
Microsoft.ML.GenAI.Core (1)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.LightGbm (2)
Microsoft.ML.OnnxTransformer (1)
Microsoft.ML.OnnxTransformerTest (2)
Microsoft.ML.PCA (1)
Microsoft.ML.Predictor.Tests (8)
Microsoft.ML.Recommender (3)
Microsoft.ML.ResultProcessor (14)
Microsoft.ML.Samples (5)
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);
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)
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)
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)
Microsoft.ML.TestFramework (1)
Microsoft.ML.Tests (14)
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)
Microsoft.ML.TimeSeries.Tests (5)
Microsoft.ML.Tokenizers (21)
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));
Microsoft.ML.Tokenizers.Tests (2)
Microsoft.ML.TorchSharp (7)
Microsoft.ML.Transforms (40)
Microsoft.NET.StringTools (3)
Microsoft.NET.StringTools.net35 (3)
Microsoft.VisualStudio.LanguageServices (11)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Microsoft.VisualStudio.LanguageServices.DevKit (5)
MSBuild (50)
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)
300public IEnumerator<KeyValuePair<string, V>> GetEnumerator()
310return ((IEnumerable<KeyValuePair<string, V>>)this).GetEnumerator();
361foreach (KeyValuePair<string, V> entry in this)
387KeyValuePair<string, V>[] array = snapshot.ToArray();
OutOfProcTaskHostNode.cs (8)
66private static IDictionary<string, KeyValuePair<string, string>> s_mismatchedEnvironmentValues;
1021foreach (KeyValuePair<string, KeyValuePair<string, string>> variable in s_mismatchedEnvironmentValues)
1084foreach (KeyValuePair<string, KeyValuePair<string, string>> variable in s_mismatchedEnvironmentValues)
1140s_mismatchedEnvironmentValues = new Dictionary<string, KeyValuePair<string, string>>(StringComparer.OrdinalIgnoreCase);
1142foreach (KeyValuePair<string, string> variable in _savedEnvironment)
1159foreach (KeyValuePair<string, string> variable in environment)
TaskParameter.cs (13)
447foreach (KeyValuePair<string, string> entry in escapedGenericWrappedMetadata)
896foreach (KeyValuePair<string, string> entry in _customEscapedMetadata)
928foreach (KeyValuePair<string, string> metadatum in _customEscapedMetadata)
990public IEnumerable<KeyValuePair<string, string>> EnumerateMetadata()
1002private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager()
1009var result = new KeyValuePair<string, string>[_customEscapedMetadata.Count];
1011foreach (var kvp in _customEscapedMetadata)
1013var 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)
MSBuildTaskHost (82)
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)
300public IEnumerator<KeyValuePair<string, V>> GetEnumerator()
310return ((IEnumerable<KeyValuePair<string, V>>)this).GetEnumerator();
361foreach (KeyValuePair<string, V> entry in this)
387KeyValuePair<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)
OutOfProcTaskHostNode.cs (8)
66private static IDictionary<string, KeyValuePair<string, string>> s_mismatchedEnvironmentValues;
1021foreach (KeyValuePair<string, KeyValuePair<string, string>> variable in s_mismatchedEnvironmentValues)
1084foreach (KeyValuePair<string, KeyValuePair<string, string>> variable in s_mismatchedEnvironmentValues)
1140s_mismatchedEnvironmentValues = new Dictionary<string, KeyValuePair<string, string>>(StringComparer.OrdinalIgnoreCase);
1142foreach (KeyValuePair<string, string> variable in _savedEnvironment)
1159foreach (KeyValuePair<string, string> variable in environment)
TaskParameter.cs (13)
447foreach (KeyValuePair<string, string> entry in escapedGenericWrappedMetadata)
896foreach (KeyValuePair<string, string> entry in _customEscapedMetadata)
928foreach (KeyValuePair<string, string> metadatum in _customEscapedMetadata)
990public IEnumerable<KeyValuePair<string, string>> EnumerateMetadata()
1002private IEnumerable<KeyValuePair<string, string>> EnumerateMetadataEager()
1009var result = new KeyValuePair<string, string>[_customEscapedMetadata.Count];
1011foreach (var kvp in _customEscapedMetadata)
1013var 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)
mscorlib (1)
Mvc.Api.Analyzers.Test (1)
Mvc.RoutingWebSite (1)
NativeIISSample (1)
netstandard (1)
PrepareTests (1)
PresentationBuildTasks (1)
PresentationCore (43)
System\Windows\Media\CharacterMetricsDictionary.cs (14)
27public IEnumerator<KeyValuePair<int, CharacterMetrics>> GetEnumerator()
84public void Add(KeyValuePair<int, CharacterMetrics> item)
106public bool Contains(KeyValuePair<int, CharacterMetrics> item)
115public void CopyTo(KeyValuePair<int, CharacterMetrics>[] array, int index)
157public bool Remove(KeyValuePair<int, CharacterMetrics> item)
188foreach (KeyValuePair<int, CharacterMetrics> item in this)
204foreach (KeyValuePair<int, CharacterMetrics> item in this)
464foreach (KeyValuePair<int, CharacterMetrics> pair in this)
475foreach (KeyValuePair<int, CharacterMetrics> pair in this)
521private struct Enumerator : SC.IDictionaryEnumerator, IEnumerator<KeyValuePair<int, CharacterMetrics>>
558KeyValuePair<int, CharacterMetrics> entry = GetCurrentEntry();
564public KeyValuePair<int, CharacterMetrics> Current
572private KeyValuePair<int, CharacterMetrics> GetCurrentEntry()
584KeyValuePair<int, CharacterMetrics> entry = GetCurrentEntry();
System\Windows\Media\CultureSpecificStringDictionary.cs (11)
32public IEnumerator<KeyValuePair<XmlLanguage, string>> GetEnumerator()
81public void Add(KeyValuePair<XmlLanguage, string> item)
98public bool Contains(KeyValuePair<XmlLanguage, string> item)
107public void CopyTo(KeyValuePair<XmlLanguage, string>[] array, int index)
126public bool Remove(KeyValuePair<XmlLanguage, string> item)
157foreach (KeyValuePair<XmlLanguage, string> item in _innerDictionary)
173foreach (KeyValuePair<XmlLanguage, string> item in _innerDictionary)
353protected IEnumerator<KeyValuePair<XmlLanguage, string>> _enumerator;
385private KeyValuePair<XmlLanguage, string> GetCurrentEntry()
388KeyValuePair<XmlLanguage, string> entry = _enumerator.Current;
403KeyValuePair<XmlLanguage, string> entry = GetCurrentEntry();
PresentationFramework (94)
MS\Internal\Annotations\ObservableDictionary.cs (14)
128public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
130return ((IEnumerable<KeyValuePair<string, string>>)_nameValues).GetEnumerator();
152void ICollection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string> pair)
154((ICollection<KeyValuePair<string, string>>)_nameValues).Add(pair);
163bool ICollection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string> pair)
165return ((ICollection<KeyValuePair<string, string>>)_nameValues).Contains(pair);
174bool ICollection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string> pair)
176return ((ICollection<KeyValuePair<string, string>>)_nameValues).Remove(pair);
186void ICollection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[] target, int startIndex)
192((ICollection<KeyValuePair<string, string>>)_nameValues).CopyTo(target, startIndex);
MS\Internal\Helper.cs (23)
753List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item);
775List<KeyValuePair<int, object>> itemValues = EnsureItemValues(owner, item);
783KeyValuePair<int, object> keyValue = new KeyValuePair<int, object>(dpIndex, value);
806List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item);
827internal static List<KeyValuePair<int, object>> GetItemValues(DependencyObject owner, object item)
832internal static List<KeyValuePair<int, object>> GetItemValues(DependencyObject owner, object item,
833WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage)
836List<KeyValuePair<int, object>> itemValues = null;
844internal static List<KeyValuePair<int, object>> EnsureItemValues(DependencyObject owner, object item)
846WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage = EnsureItemValueStorage(owner);
847List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item, itemValueStorage);
851itemValues = new List<KeyValuePair<int, object>>(3); // So far the only use of this is to store three values.
859internal static WeakDictionary<object, List<KeyValuePair<int, object>>> EnsureItemValueStorage(DependencyObject owner)
861WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage = ItemValueStorageField.GetValue(owner);
865itemValueStorage = new WeakDictionary<object, List<KeyValuePair<int, object>>>();
880List<KeyValuePair<int, object>> itemValues = GetItemValues(owner, item) ?? new List<KeyValuePair<int, object>>();
1025private static void ClearItemValueStorageRecursive(WeakDictionary<object, List<KeyValuePair<int, object>>> itemValueStorage, int[] dpIndices)
1029foreach (List<KeyValuePair<int, object>> itemValuesList in itemValueStorage.Values)
1033KeyValuePair<int, object> itemValue = itemValuesList[i];
1036ClearItemValueStorageRecursive((WeakDictionary<object, List<KeyValuePair<int, object>>>)itemValue.Value, dpIndices);
1520private static readonly UncommonField<WeakDictionary<object, List<KeyValuePair<int, object>>>> ItemValueStorageField =
1521new UncommonField<WeakDictionary<object, List<KeyValuePair<int, object>>>>();
PresentationUI (1)
ReachFramework (2)
Roslyn.Compilers.Extension (1)
Roslyn.VisualStudio.Next.UnitTests (3)
RunTests (2)
ScenarioTests.Common.Tests (3)
SemanticSearch.BuildTask (1)
Shared (12)
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;
Shared.Tests (4)
SignalRSamples (1)
SocialSample (1)
SocialWeather (1)
Sockets.BindTests (1)
Sockets.FunctionalTests (1)
Stress.ApiService (2)
Stress.TelemetryService (3)
System.Collections (101)
System\Collections\Generic\OrderedDictionary.cs (47)
36IList<KeyValuePair<TKey, TValue>>, IReadOnlyList<KeyValuePair<TKey, TValue>>, IList
183public OrderedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection) : this(collection, null)
200public OrderedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> collection, IEqualityComparer<TKey>? comparer) :
201this((collection as ICollection<KeyValuePair<TKey, TValue>>)?.Count ?? 0, comparer)
246bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
298if (value is not KeyValuePair<TKey, TValue> tpair)
300throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value));
350KeyValuePair<TKey, TValue> IList<KeyValuePair<TKey, TValue>>.this[int index]
357KeyValuePair<TKey, TValue> IReadOnlyList<KeyValuePair<TKey, TValue>>.this[int index] => GetAt(index);
513private void AddRange(IEnumerable<KeyValuePair<TKey, TValue>> collection)
517if (collection is KeyValuePair<TKey, TValue>[] array)
519foreach (KeyValuePair<TKey, TValue> pair in array)
526foreach (KeyValuePair<TKey, TValue> pair in collection)
594public KeyValuePair<TKey, TValue> GetAt(int index)
1156IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() =>
1157Count == 0 ? EnumerableHelpers.GetEmptyEnumerator<KeyValuePair<TKey, TValue>>() :
1161IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator();
1167int IList<KeyValuePair<TKey, TValue>>.IndexOf(KeyValuePair<TKey, TValue> item)
1185void IList<KeyValuePair<TKey, TValue>>.Insert(int index, KeyValuePair<TKey, TValue> item) => Insert(index, item.Key, item.Value);
1188void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => Add(item.Key, item.Value);
1191bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
1201void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
1218bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) =>
1297if (array is KeyValuePair<TKey, TValue>[] tarray)
1299((ICollection<KeyValuePair<TKey, TValue>>)this).CopyTo(tarray, index);
1310foreach (KeyValuePair<TKey, TValue> pair in this)
1325if (value is not KeyValuePair<TKey, TValue> pair)
1327throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value));
1336value is KeyValuePair<TKey, TValue> pair &&
1343if (value is KeyValuePair<TKey, TValue> pair)
1345return ((IList<KeyValuePair<TKey, TValue>>)this).IndexOf(pair);
1354if (value is not KeyValuePair<TKey, TValue> pair)
1356throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value));
1365if (value is KeyValuePair<TKey, TValue> pair)
1367((ICollection<KeyValuePair<TKey, TValue>>)this).Remove(pair);
1386public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator
1406public 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)
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 : IEnumerator<KeyValuePair<TKey, TValue>>
888public KeyValuePair<TKey, TValue> Current { get; private set; }
1617/// <param name="keyValuePair">The <see cref="KeyValuePair{TKey,TValue}"/>
1627void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => ((IDictionary<TKey, TValue>)this).Add(keyValuePair.Key, keyValuePair.Value);
1633/// <param name="keyValuePair">The <see cref="KeyValuePair{TKey,TValue}"/>
1638bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair) =>
1649bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => false;
1655/// cref="KeyValuePair{TKey,TValue}"/>
1662bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair) =>
1912if (array is KeyValuePair<TKey, TValue>[] pairs)
2322private readonly IEnumerator<KeyValuePair<TKey, TValue>> _enumerator; // Enumerator over the dictionary.
2743var keyValuePairs = new KeyValuePair<TKey, TValue>[_dictionary.Count];
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 (182)
System\Collections\Frozen\FrozenDictionary.cs (26)
29public static FrozenDictionary<TKey, TValue> ToFrozenDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? comparer = null)
71IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? comparer,
91foreach (KeyValuePair<TKey, TValue> pair in source)
326/// <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>
329public void CopyTo(KeyValuePair<TKey, TValue>[] destination, int destinationIndex)
335/// <summary>Copies the elements of the dictionary to a span of type <see cref="KeyValuePair{TKey, TValue}"/>.</summary>
337public void CopyTo(Span<KeyValuePair<TKey, TValue>> destination)
379if (array is KeyValuePair<TKey, TValue>[] pairs)
381foreach (KeyValuePair<TKey, TValue> item in this)
388foreach (KeyValuePair<TKey, TValue> item in this)
402foreach (KeyValuePair<TKey, TValue> item in this)
415bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
556bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) =>
589IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() =>
590Count == 0 ? ((IList<KeyValuePair<TKey, TValue>>)Array.Empty<KeyValuePair<TKey, TValue>>()).GetEnumerator() :
595Count == 0 ? Array.Empty<KeyValuePair<TKey, TValue>>().GetEnumerator() :
606void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException();
615bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) => throw new NotSupportedException();
621void ICollection<KeyValuePair<TKey, TValue>>.Clear() => throw new NotSupportedException();
627public struct Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>
656public readonly KeyValuePair<TKey, TValue> Current
System\Collections\Immutable\ImmutableDictionary.cs (6)
62public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull
75public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull
89public static ImmutableDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull
231public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull
251public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? keyComparer) where TKey : notnull
263public 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.cs (29)
28private static readonly Action<KeyValuePair<int, HashBucket>> s_FreezeBucketAction = (kv) => kv.Value.Freeze();
170foreach (KeyValuePair<int, ImmutableDictionary<TKey, TValue>.HashBucket> bucket in _root)
172foreach (KeyValuePair<TKey, TValue> item in bucket.Value)
187foreach (KeyValuePair<int, ImmutableDictionary<TKey, TValue>.HashBucket> bucket in _root)
189foreach (KeyValuePair<TKey, TValue> item in bucket.Value)
269bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
309public ImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
332public ImmutableDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
399public bool Contains(KeyValuePair<TKey, TValue> pair)
476foreach (KeyValuePair<TKey, TValue> item in this)
522IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
530IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
594void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
599void ICollection<KeyValuePair<TKey, TValue>>.Clear()
604bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
609void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
615foreach (KeyValuePair<TKey, TValue> item in this)
755foreach (KeyValuePair<TKey, TValue> item in this)
799IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
802Enumerable.Empty<KeyValuePair<TKey, TValue>>().GetEnumerator() :
844private static bool TryCastToImmutableMap(IEnumerable<KeyValuePair<TKey, TValue>> sequence, [NotNullWhen(true)] out ImmutableDictionary<TKey, TValue>? other)
881private static bool Contains(KeyValuePair<TKey, TValue> keyValuePair, MutationInput origin)
950private static MutationResult AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items, MutationInput origin, KeyCollisionBehavior collisionBehavior = KeyCollisionBehavior.ThrowIfValueDifferent)
956foreach (KeyValuePair<TKey, TValue> pair in items)
1050private ImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs, bool avoidToHashMap)
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\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.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.NonGeneric (1)
System.ComponentModel.Annotations (3)
System.ComponentModel.Composition (28)
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\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.TypeConverter (2)
System.Composition.Hosting (6)
System.Composition.Runtime (3)
System.Composition.TypedParts (1)
System.Configuration.ConfigurationManager (1)
System.Console (1)
System.Data.Common (17)
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.Odbc (6)
System.Diagnostics.DiagnosticSource (316)
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);
636KeyValuePair<string, string?> kvp = new KeyValuePair<string, string?>(key, value);
660KeyValuePair<string, string?> kvp = new KeyValuePair<string, string?>(key, value);
1179IEnumerable<KeyValuePair<string, object?>>? tags, IEnumerable<ActivityLink>? links, DateTimeOffset startTime,
1202using (IEnumerator<KeyValuePair<string, object?>> enumerator = tags.GetEnumerator())
1554private sealed class BaggageLinkedList : IEnumerable<KeyValuePair<string, string?>>
1556private DiagNode<KeyValuePair<string, string?>>? _first;
1558public BaggageLinkedList(KeyValuePair<string, string?> firstValue, bool set = false) => _first = ((set && firstValue.Value == null) ? null : new DiagNode<KeyValuePair<string, string?>>(firstValue));
1560public DiagNode<KeyValuePair<string, string?>>? First => _first;
1562public void Add(KeyValuePair<string, string?> value)
1564DiagNode<KeyValuePair<string, string?>> newNode = new DiagNode<KeyValuePair<string, string?>>(value);
1573public void Set(KeyValuePair<string, string?> value)
1583DiagNode<KeyValuePair<string, string?>>? current = _first;
1595DiagNode<KeyValuePair<string, string?>> newNode = new DiagNode<KeyValuePair<string, string?>>(value);
1616DiagNode<KeyValuePair<string, string?>> previous = _first;
1630public DiagEnumerator<KeyValuePair<string, string?>> GetEnumerator() => new DiagEnumerator<KeyValuePair<string, string?>>(_first);
1631IEnumerator<KeyValuePair<string, string?>> IEnumerable<KeyValuePair<string, string?>>.GetEnumerator() => GetEnumerator();
1635internal sealed class TagsLinkedList : IEnumerable<KeyValuePair<string, object?>>
1637private DiagNode<KeyValuePair<string, object?>>? _first;
1638private DiagNode<KeyValuePair<string, object?>>? _last;
1642public TagsLinkedList(KeyValuePair<string, object?> firstValue, bool set = false) => _last = _first = ((set && firstValue.Value == null) ? null : new DiagNode<KeyValuePair<string, object?>>(firstValue));
1644public TagsLinkedList(IEnumerator<KeyValuePair<string, object?>> e)
1646_last = _first = new DiagNode<KeyValuePair<string, object?>>(e.Current);
1650_last.Next = new DiagNode<KeyValuePair<string, object?>>(e.Current);
1655public DiagNode<KeyValuePair<string, object?>>? First => _first;
1657public TagsLinkedList(IEnumerable<KeyValuePair<string, object?>> list) => Add(list);
1660public void Add(IEnumerable<KeyValuePair<string, object?>> list)
1662IEnumerator<KeyValuePair<string, object?>> e = list.GetEnumerator();
1670_last = _first = new DiagNode<KeyValuePair<string, object?>>(e.Current);
1674_last!.Next = new DiagNode<KeyValuePair<string, object?>>(e.Current);
1680_last.Next = new DiagNode<KeyValuePair<string, object?>>(e.Current);
1685public void Add(KeyValuePair<string, object?> value)
1687DiagNode<KeyValuePair<string, object?>> newNode = new DiagNode<KeyValuePair<string, object?>>(value);
1707DiagNode<KeyValuePair<string, object?>>? current = _first;
1739DiagNode<KeyValuePair<string, object?>> previous = _first;
1757public void Set(KeyValuePair<string, object?> value)
1767DiagNode<KeyValuePair<string, object?>>? current = _first;
1779DiagNode<KeyValuePair<string, object?>> newNode = new DiagNode<KeyValuePair<string, object?>>(value);
1793public DiagEnumerator<KeyValuePair<string, object?>> GetEnumerator() => new DiagEnumerator<KeyValuePair<string, object?>>(_first);
1794IEnumerator<KeyValuePair<string, object?>> IEnumerable<KeyValuePair<string, object?>>.GetEnumerator() => GetEnumerator();
1797public IEnumerable<KeyValuePair<string, string?>> EnumerateStringValues()
1799DiagNode<KeyValuePair<string, object?>>? current = _first;
1826DiagNode<KeyValuePair<string, object?>>? current = _first.Next;
System\Diagnostics\ActivitySource.cs (10)
37public ActivitySource(string name, string? version = "", IEnumerable<KeyValuePair<string, object?>>? tags = default)
46var tagList = new List<KeyValuePair<string, object?>>(tags);
85public IEnumerable<KeyValuePair<string, object?>>? Tags { get; }
125public Activity? CreateActivity(string name, ActivityKind kind, ActivityContext parentContext, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown)
141public Activity? CreateActivity(string name, ActivityKind kind, string? parentId, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown)
163public Activity? StartActivity(string name, ActivityKind kind, ActivityContext parentContext, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default)
176public Activity? StartActivity(string name, ActivityKind kind, string? parentId, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default)
189public Activity? StartActivity(ActivityKind kind, ActivityContext parentContext = default, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default, [CallerMemberName] string name = "")
192private Activity? CreateActivity(string name, ActivityKind kind, ActivityContext context, string? parentId, IEnumerable<KeyValuePair<string, object?>>? tags,
276foreach (KeyValuePair<string, object?> tag in atc)
System\Diagnostics\ActivityTagsCollection.cs (16)
24private readonly List<KeyValuePair<string, object?>> _list = new List<KeyValuePair<string, object?>>();
37public ActivityTagsCollection(IEnumerable<KeyValuePair<string, object?>> list)
44foreach (KeyValuePair<string, object?> kvp in list)
105foreach (KeyValuePair<string, object?> kvp in _list)
121foreach (KeyValuePair<string, object?> kvp in _list)
165public void Add(KeyValuePair<string, object?> item)
186public bool Contains(KeyValuePair<string, object?> item) => _list.Contains(item);
200public void CopyTo(KeyValuePair<string, object?>[] array, int arrayIndex) => _list.CopyTo(array, arrayIndex);
205IEnumerator<KeyValuePair<string, object?>> IEnumerable<KeyValuePair<string, object?>>.GetEnumerator() => new Enumerator(_list);
244public bool Remove(KeyValuePair<string, object?> item) => _list.Remove(item);
284public struct Enumerator : IEnumerator<KeyValuePair<string, object?>>, IEnumerator
286private List<KeyValuePair<string, object?>>.Enumerator _enumerator;
287internal Enumerator(List<KeyValuePair<string, object?>> list) => _enumerator = list.GetEnumerator();
289public KeyValuePair<string, object?> Current => _enumerator.Current;
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\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\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.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\Measurement.cs (26)
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();
103private static KeyValuePair<string, object?>[] ToArray(IEnumerable<KeyValuePair<string, object?>>? tags)
108KeyValuePair<string, object?>[] result;
111if (tags is ICollection<KeyValuePair<string, object?>> collection)
118result = new KeyValuePair<string, object?>[items];
127KeyValuePair<string, object?>[] array = ArrayPool<KeyValuePair<string, object?>>.Shared.Rent(32);
131foreach (KeyValuePair<string, object?> item in tags)
141ArrayPool<KeyValuePair<string, object?>>.Shared.Return(array);
145result = new KeyValuePair<string, object?>[count];
150ArrayPool<KeyValuePair<string, object?>>.Shared.Return(array);
154static void Grow(ref KeyValuePair<string, object?>[] array, ref int length)
156KeyValuePair<string, object?>[] newArray = ArrayPool<KeyValuePair<string, object?>>.Shared.Rent(length * 2);
158ArrayPool<KeyValuePair<string, object?>>.Shared.Return(array);
System\Diagnostics\Metrics\Meter.cs (21)
72public Meter(string name, string? version, IEnumerable<KeyValuePair<string, object?>>? tags, object? scope = null)
78private void Initialize(string name, string? version, IEnumerable<KeyValuePair<string, object?>>? tags, object? scope = null)
84var tagList = new List<KeyValuePair<string, object?>>(tags);
117public IEnumerable<KeyValuePair<string, object?>>? Tags { get; private set; }
147public Counter<T> CreateCounter<T>(string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct
171public Gauge<T> CreateGauge<T>(string name, string? unit = null, string? description = null, IEnumerable<KeyValuePair<string, object?>>? tags = null) where T : struct
208public Histogram<T> CreateHistogram<T>(string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct
222public 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
249public UpDownCounter<T> CreateUpDownCounter<T>(string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct
276public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
304public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
331public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
358public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
385public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
413public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
434public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
455public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
476public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
524private static Instrument? GetCachedInstrument(List<Instrument> instrumentList, Type instrumentType, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags)
530instrument.Description == description && DiagnosticsHelper.CompareTags(instrument.Tags as List<KeyValuePair<string, object?>>, tags))
540private Instrument GetOrCreateInstrument<T>(Type instrumentType, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags, Func<Instrument> instrumentCreator)
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\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 (27)
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()
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\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.Process (8)
System.Formats.Nrbf (1)
System.Formats.Tar (8)
System.IO.Packaging (5)
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.AsyncEnumerable (21)
System\Linq\AggregateBy.cs (12)
33public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(
47static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl(
79foreach (KeyValuePair<TKey, TAccumulate> countBy in dict)
108public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(
122static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl(
149foreach (KeyValuePair<TKey, TAccumulate> countBy in dict)
179public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(
193static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl(
225foreach (KeyValuePair<TKey, TAccumulate> countBy in dict)
255public static IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(
269static async IAsyncEnumerable<KeyValuePair<TKey, TAccumulate>> Impl(
299foreach (KeyValuePair<TKey, TAccumulate> countBy in dict)
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\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.Parallel (12)
System.Linq.Queryable (10)
System\Linq\Queryable.cs (10)
1659/// <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>
1662public static IQueryable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer = null) where TKey : notnull
1667return source.Provider.CreateQuery<KeyValuePair<TKey, int>>(
1670new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, int>>>(CountBy).Method,
2437public 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
2443return source.Provider.CreateQuery<KeyValuePair<TKey, TAccumulate>>(
2446new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, TAccumulate>>>(AggregateBy).Method,
2467public 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
2474return source.Provider.CreateQuery<KeyValuePair<TKey, TAccumulate>>(
2477new 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 (51)
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.Mail (3)
System.Net.NameResolution (11)
System\Net\Dns.cs (7)
367KeyValuePair<IPAddress, AddressFamily> t => t.Key,
581KeyValuePair<string, AddressFamily> t => GetHostAddressesCore(t.Key, t.Value, activity),
583KeyValuePair<IPAddress, AddressFamily> t => GetHostAddressesCore(t.Key, t.Value, activity),
592KeyValuePair<string, AddressFamily> t => GetHostEntryCore(t.Key, t.Value, activity),
594KeyValuePair<IPAddress, AddressFamily> t => GetHostEntryCore(t.Key, t.Value, activity),
713((ICollection<KeyValuePair<object, Task>>)s_tasks).Remove(new KeyValuePair<object, Task>(key!, task!));
726((ICollection<KeyValuePair<object, Task>>)s_tasks).Remove(new KeyValuePair<object, Task>(key!, task));
System.Net.NetworkInformation (2)
System.Net.Requests (3)
System.Net.Security (3)
System.Net.WebSockets.Client (6)
System.Private.CoreLib (125)
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\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\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)
System.Private.CoreLib.Generators (2)
System.Private.DataContractSerialization (13)
System.Private.Windows.Core (1)
System.Private.Windows.Core.TestUtilities (2)
System.Private.Xml (22)
System.Reflection.Emit (6)
System.Reflection.Metadata (19)
System.Resources.Extensions (3)
System.Resources.Writer (2)
System.Runtime (1)
System.Runtime.Caching (6)
System.Runtime.Serialization.Schema (4)
System.Security.Claims (1)
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.ServiceModel.NetFramingBase (1)
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)
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 (59)
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);
150foreach (KeyValuePair<string, JsonNode?> entry in Dictionary)
188foreach (KeyValuePair<string, JsonNode?> item in currentDict)
287private KeyValuePair<string, JsonNode?>? FindValue(JsonNode? value)
289foreach (KeyValuePair<string, JsonNode?> item in Dictionary)
322foreach (KeyValuePair<string, JsonNode?> item in _node)
System\Text\Json\Nodes\JsonObject.IDictionary.cs (9)
49public void Add(KeyValuePair<string, JsonNode?> property) => Add(property.Key, property.Value);
130bool ICollection<KeyValuePair<string, JsonNode?>>.Contains(KeyValuePair<string, JsonNode?> item) =>
150void ICollection<KeyValuePair<string, JsonNode?>>.CopyTo(KeyValuePair<string, JsonNode?>[] array, int index) =>
159public IEnumerator<KeyValuePair<string, JsonNode?>> GetEnumerator() => Dictionary.GetEnumerator();
170bool ICollection<KeyValuePair<string, JsonNode?>>.Remove(KeyValuePair<string, JsonNode?> item) => Remove(item.Key);
209bool 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);
32KeyValuePair<string, JsonNode?> existing = dictionary.GetAt(index);
46KeyValuePair<string, JsonNode?> existing = dictionary.GetAt(index);
89KeyValuePair<string, JsonNode?> existing = Dictionary.GetAt(index);
95KeyValuePair<string, JsonNode?> IList<KeyValuePair<string, JsonNode?>>.this[int index]
102int IList<KeyValuePair<string, JsonNode?>>.IndexOf(KeyValuePair<string, JsonNode?> item) => ((IList<KeyValuePair<string, JsonNode?>>)Dictionary).IndexOf(item);
105void IList<KeyValuePair<string, JsonNode?>>.Insert(int index, KeyValuePair<string, JsonNode?> item) => Insert(index, item.Key, item.Value);
108void IList<KeyValuePair<string, JsonNode?>>.RemoveAt(int index) => RemoveAt(index);
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.SourceGeneration (5)
System.Text.RegularExpressions (17)
System.Text.RegularExpressions.Generator (6)
System.Threading.Channels (2)
System.Threading.RateLimiting (5)
System.Threading.Tasks.Dataflow (120)
Blocks\BatchBlock.cs (59)
277internal readonly KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>[] PostponedMessagesTemp;
279internal readonly List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> ReservedSourcesTemp;
295PostponedMessagesTemp = new KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>[batchSize];
296ReservedSourcesTemp = new List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>>(batchSize);
761KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>[] postponedTemp = _nonGreedyState.PostponedMessagesTemp;
762List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
792KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage = postponedTemp[i];
795var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!);
796var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
806KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage;
813var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!);
814var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
879KeyValuePair<ISourceBlock<T>, DataflowMessageHeader>[] postponedTemp = _nonGreedyState.PostponedMessagesTemp;
880List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
909KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage = postponedTemp[i];
910var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!);
911var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
920KeyValuePair<ISourceBlock<T>, DataflowMessageHeader> sourceAndMessage;
926var reservedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value, default(T)!);
927var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
987List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
996KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>> sourceAndMessage = reserved[i];
997reserved[i] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>); // in case of exception from ConsumeMessage
1005for (int prev = 0; prev < i; prev++) reserved[prev] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>);
1009var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!);
1010var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, consumedMessage);
1019foreach (KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>> sourceAndMessage in reserved)
1039List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
1048KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>> sourceAndMessage = reserved[i];
1049reserved[i] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>); // in case of exception from ConsumeMessage
1054var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!);
1055var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, consumedMessage);
1068foreach (KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>> sourceAndMessage in reserved)
1091List<KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>> reserved = _nonGreedyState.ReservedSourcesTemp;
1094KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>> sourceAndMessage = reserved[i];
1095reserved[i] = default(KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>);
1097KeyValuePair<DataflowMessageHeader, T> message = sourceAndMessage.Value;
Blocks\TransformBlock.cs (4)
174private void ProcessMessage(Func<TInput, TOutput> transform, KeyValuePair<TInput, long> messageWithId)
226private void ProcessMessageWithTask(Func<TInput, Task<TOutput>> transform, KeyValuePair<TInput, long> messageWithId)
262var tuple = (Tuple<TransformBlock<TInput, TOutput>, KeyValuePair<TInput, long>>)state!;
271private 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)
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\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.Windows.Forms (12)
System.Windows.Forms.Design (8)
System.Windows.Forms.Tests (7)
System.Windows.Input.Manipulations (3)
System.Xaml (76)
System\Xaml\NameScope.cs (10)
101IEnumerator<KeyValuePair<string, object>> GetEnumerator() => new Enumerator(_nameMap);
105IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator() => GetEnumerator();
113public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
127public bool Remove(KeyValuePair<string, object> item)
142public void Add(KeyValuePair<string, object> item)
157public bool Contains(KeyValuePair<string, object> item)
259private class Enumerator : IEnumerator<KeyValuePair<string, object>>
270public KeyValuePair<string, object> Current
276return default(KeyValuePair<string, object>);
System\Xaml\NameScopeDictionary.cs (17)
128class Enumerator : IEnumerator<KeyValuePair<string, object>>
160public KeyValuePair<string, object> Current
176return default(KeyValuePair<string, object>);
225IEnumerator<KeyValuePair<string, object>> GetEnumerator()
238IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator()
245int ICollection<KeyValuePair<string, object>>.Count
253bool ICollection<KeyValuePair<string, object>>.IsReadOnly
261void ICollection<KeyValuePair<string, object>>.Clear()
266void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
271bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
276void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
281bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
System.Xaml.Tests (30)
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)
Templates.Blazor.Tests (2)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (4)
UnitTests.Common (3)
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)
XmlFileLogger (12)
XmlFormattersWebSite (2)
xunit.assert (4)
xunit.console (3)
Xunit.NetCore.Extensions (1)