6585 references to Key
aspire (44)
aspire-managed (1)
Aspire.Acquisition.Tests (2)
Aspire.Azure.Messaging.EventHubs.Tests (2)
Aspire.Azure.Security.KeyVault.Tests (2)
Aspire.Cli.EndToEnd.Tests (9)
Aspire.Cli.Tests (87)
Telemetry\AspireCliTelemetryTests.cs (37)
52var activityTags = activity.Tags.ToDictionary(t => t.Key, t => t.Value);
55Assert.True(activityTags.ContainsKey(tag.Key), $"Activity is missing tag '{tag.Key}'");
56Assert.Equal(tag.Value?.ToString(), activityTags[tag.Key]);
126var eventTags = exceptionEvent.Tags.ToDictionary(t => t.Key, t => t.Value);
137Assert.True(eventTags.ContainsKey(tag.Key), $"Error event is missing default tag '{tag.Key}'");
138Assert.Equal(tag.Value?.ToString(), eventTags[tag.Key]?.ToString());
225Assert.Contains(tags, t => t.Key == "machine.device_id" && (string?)t.Value == "test-device-id");
226Assert.Contains(tags, t => t.Key == "machine.mac_address_hash" && (string?)t.Value == "test-mac-hash");
238Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.OsName && (string?)t.Value == expectedOsName);
239Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.OsVersion && t.Value is string s && s == Environment.OSVersion.Version.ToString());
240Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.OsType && (string?)t.Value == expectedOsType);
265Assert.DoesNotContain(tags, t => t.Key == TelemetryConstants.Tags.CodingAgent);
286Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.InternalMicrosoft && t.Value is true);
287Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.InternalMicrosoftSource && (string?)t.Value == "test source");
288Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.InternalMicrosoftAlias && (string?)t.Value == "test.alias");
289Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.InternalMicrosoftDomain && (string?)t.Value == "TEST");
308Assert.Equal(TelemetryConstants.Tags.InternalMicrosoft, tag.Key);
313Assert.Equal(TelemetryConstants.Tags.InternalMicrosoftSource, tag.Key);
377Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.MacAddressHash && (string?)t.Value == "test-mac-hash");
378Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.DeviceId && (string?)t.Value == "test-device-id");
379Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.CliVersion);
380Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.OsName);
422var activityTags = activity.Tags.ToDictionary(t => t.Key, t => t.Value);
425Assert.True(activityTags.ContainsKey(tag.Key), $"Activity is missing tag '{tag.Key}'");
426Assert.Equal(tag.Value?.ToString(), activityTags[tag.Key]);
461return [.. tags.Where(t => t.Key == TelemetryConstants.Tags.InternalMicrosoft ||
462t.Key.StartsWith("aspire.cli.microsoft_internal", StringComparison.Ordinal))];
481Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.IdentityVersion && (string?)t.Value == "13.5.0-preview.1.26310.9");
482Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.IdentityChannel && (string?)t.Value == "daily");
483Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.IdentityCommit && (string?)t.Value == "95f0d2968");
487Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.CliVersion);
488Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.CliBuildId);
505Assert.Contains(tags, t => t.Key == TelemetryConstants.Tags.IdentityVersion && (string?)t.Value == "13.5.0");
506Assert.DoesNotContain(tags, t => t.Key == TelemetryConstants.Tags.IdentityCommit);
Aspire.Confluent.Kafka (2)
Aspire.Confluent.Kafka.Tests (60)
Aspire8MetricsTests.cs (60)
79Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
80Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
83Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
84Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
87Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
88Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
91Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
92Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
93Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
96Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
97Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
98Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
101Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
102Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
103Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
106Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
107Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
108Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
111Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
112Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
113Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
116Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
117Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
118Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
121Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
122Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
123Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
126Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
127Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
128Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
194Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
195Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
198Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
199Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
202Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
203Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
206Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
207Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
208Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
211Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
212Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
213Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
216Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
217Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
218Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
221Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
222Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
223Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
226Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
227Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
228Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
231Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
232Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
233Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
236Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
237Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
238Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
241Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka");
242Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1");
243Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
Aspire.Dashboard (61)
Aspire.Dashboard.Components.Tests (33)
Pages\ResourcesTests.cs (23)
58Assert.Collection(cut.Instance.PageViewModel.ResourceTypesToVisibility.OrderBy(kvp => kvp.Key),
61Assert.Equal("Type1", kvp.Key);
64Assert.Collection(cut.Instance.PageViewModel.ResourceStatesToVisibility.OrderBy(kvp => kvp.Key),
67Assert.Equal("Running", kvp.Key);
70Assert.Collection(cut.Instance.PageViewModel.ResourceHealthStatusesToVisibility.OrderBy(kvp => kvp.Key),
73Assert.Equal("Unhealthy", kvp.Key);
91Assert.Collection(cut.Instance.PageViewModel.ResourceTypesToVisibility.OrderBy(kvp => kvp.Key),
94Assert.Equal("Type1", kvp.Key);
99Assert.Equal("Type2", kvp.Key);
102Assert.Collection(cut.Instance.PageViewModel.ResourceStatesToVisibility.OrderBy(kvp => kvp.Key),
105Assert.Equal("Running", kvp.Key);
108Assert.Collection(cut.Instance.PageViewModel.ResourceHealthStatusesToVisibility.OrderBy(kvp => kvp.Key),
111Assert.Equal("Healthy", kvp.Key);
116Assert.Equal("Unhealthy", kvp.Key);
388Assert.Collection(cut.Instance.PageViewModel.ResourceTypesToVisibility.OrderBy(kvp => kvp.Key),
391Assert.Equal("Type1", kvp.Key);
396Assert.Equal("Type2", kvp.Key);
399Assert.Collection(cut.Instance.PageViewModel.ResourceStatesToVisibility.OrderBy(kvp => kvp.Key),
402Assert.Equal("Finished", kvp.Key);
407Assert.Equal("Running", kvp.Key);
412Assert.Collection(cut.Instance.PageViewModel.ResourceHealthStatusesToVisibility.OrderBy(kvp => kvp.Key),
415Assert.Equal(string.Empty, kvp.Key);
420Assert.Equal("Healthy", kvp.Key);
Aspire.Dashboard.Tests (105)
TelemetryRepositoryTests\LogTests.cs (11)
83Assert.Equal("Log", p.Key);
675Assert.Equal("Key0", p.Key);
680Assert.Equal("Key1", p.Key);
685Assert.Equal("Key2", p.Key);
690Assert.Equal("Key3", p.Key);
695Assert.Equal("Key4", p.Key);
942Assert.Equal("Log", p.Key);
965Assert.Equal("Log", p.Key);
1038Assert.Equal("key-1", p.Key);
1049Assert.Equal("key-2", p.Key);
1386Assert.DoesNotContain(resource.Attributes, a => a.Key == "logrecord.event.name");
TelemetryRepositoryTests\MetricsTests.cs (22)
163Assert.Equal("Meter_Key0", p.Key);
168Assert.Equal("Meter_Key1", p.Key);
173Assert.Equal("Meter_Key2", p.Key);
178Assert.Equal("Meter_Key3", p.Key);
183Assert.Equal("Meter_Key4", p.Key);
192Assert.Equal("Meter_Key0", p.Key);
197Assert.Equal("Meter_Key1", p.Key);
202Assert.Equal("Meter_Key2", p.Key);
207Assert.Equal("Meter_Key3", p.Key);
212Assert.Equal("Meter_Key4", p.Key);
279Assert.Equal("Meter_Key0", p.Key);
288Assert.Equal("Meter_Key0", p.Key);
293Assert.Equal("Metric_Key0", p.Key);
298Assert.Equal("Metric_Key1", p.Key);
303Assert.Equal("Metric_Key2", p.Key);
308Assert.Equal("Metric_Key3", p.Key);
380Assert.Collection(instrumentData.KnownAttributeValues.OrderBy(kvp => kvp.Key),
383Assert.Equal("key1", e.Key);
388Assert.Equal("key2", e.Key);
397Assert.Equal("key1", exemplar.Attributes[0].Key);
423exemplar.FilteredAttributes.Add(new KeyValue { Key = attribute.Key, Value = new AnyValue { StringValue = attribute.Value } });
620Assert.Equal("key-1", knownValues.Key);
TelemetryRepositoryTests\OtlpHelpersTests.cs (22)
181Assert.Equal("key1", a.Key);
211Assert.Equal("key1", a.Key);
216Assert.Equal("key2", a.Key);
221Assert.Equal("key3", a.Key);
255Assert.Equal("key1", a.Key);
260Assert.Equal("key2", a.Key);
265Assert.Equal("key3", a.Key);
294Assert.Equal("parentkey1", a.Key);
299Assert.Equal("key1", a.Key);
330Assert.Equal("parentkey1", a.Key);
335Assert.Equal("key1", a.Key);
340Assert.Equal("key2", a.Key);
373Assert.Equal("parentkey1", a.Key);
378Assert.Equal("parentkey2", a.Key);
383Assert.Equal("parentkey3", a.Key);
406Assert.Equal("key1", a.Key);
411Assert.Equal("key2", a.Key);
442Assert.Equal("key1", a.Key);
447Assert.Equal("key2", a.Key);
490Assert.Equal("key1", a.Key);
495Assert.Equal("key2", a.Key);
500Assert.Equal("key3", a.Key);
TelemetryRepositoryTests\TraceTests.cs (18)
573Assert.Equal("key1", a.Key);
650Assert.Equal("key2", a.Key);
661Assert.Equal("key1", a.Key);
675Assert.Equal("key2", a.Key);
686Assert.Equal("key1", a.Key);
816Assert.Equal("Key0", p.Key);
821Assert.Equal("Key1", p.Key);
826Assert.Equal("Key2", p.Key);
831Assert.Equal("Key3", p.Key);
836Assert.Equal("Key4", p.Key);
1632Assert.Equal("prop1", p.Key);
1641Assert.Equal("prop1", p.Key);
1646Assert.Equal("prop2", p.Key);
1667Assert.Equal("prop1", p.Key);
1677Assert.Equal("prop1", p.Key);
1682Assert.Equal("prop2", p.Key);
1692Assert.Equal("prop1", p.Key);
1697Assert.Equal("prop2", p.Key);
Aspire.EndToEnd.Tests (4)
Aspire.Hosting (55)
Aspire.Hosting.Analyzers (2)
Aspire.Hosting.Azure (15)
Aspire.Hosting.Azure.AppContainers (5)
Aspire.Hosting.Azure.AppService (3)
Aspire.Hosting.Azure.Kusto.Tests (8)
Aspire.Hosting.Azure.PostgreSQL (7)
Aspire.Hosting.Azure.ServiceBus (1)
Aspire.Hosting.Azure.Sql (6)
Aspire.Hosting.Azure.Tests (203)
AzureCosmosDBContainerConnectionPropertiesTests.cs (15)
20var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
26Assert.Equal("Uri", property.Key);
31Assert.Equal("DatabaseName", property.Key);
36Assert.Equal("ContainerName", property.Key);
50var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
56Assert.Equal("Uri", property.Key);
61Assert.Equal("AccountKey", property.Key);
66Assert.Equal("ConnectionString", property.Key);
71Assert.Equal("DatabaseName", property.Key);
76Assert.Equal("ContainerName", property.Key);
102Assert.Equal("Uri", property.Key);
107Assert.Equal("AccountKey", property.Key);
112Assert.Equal("ConnectionString", property.Key);
117Assert.Equal("DatabaseName", property.Key);
122Assert.Equal("ContainerName", property.Key);
AzureCosmosDBDatabaseConnectionPropertiesTests.cs (12)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
25Assert.Equal("Uri", property.Key);
30Assert.Equal("DatabaseName", property.Key);
43var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
49Assert.Equal("Uri", property.Key);
54Assert.Equal("AccountKey", property.Key);
59Assert.Equal("ConnectionString", property.Key);
64Assert.Equal("DatabaseName", property.Key);
89Assert.Equal("Uri", property.Key);
94Assert.Equal("AccountKey", property.Key);
99Assert.Equal("ConnectionString", property.Key);
104Assert.Equal("DatabaseName", property.Key);
AzureEnvironmentResourceExtensionsTests.cs (11)
194Assert.Contains(tenantInput.Options!, option => option.Key == "87654321-4321-4321-4321-210987654321");
204Assert.Contains(subscriptionInput.Options!, option => option.Key == "12345678-1234-1234-1234-123456789012");
213Assert.Contains(resourceGroupInput.Options!, option => option.Key == "rg-test-2");
248Assert.Contains(tenantInput.Options!, option => option.Key == AzureContextOptionsArmClient.SecondTenantId);
259Assert.DoesNotContain(subscriptionInput.Options!, option => option.Key == AzureContextOptionsArmClient.FirstSubscriptionId);
260Assert.Contains(subscriptionInput.Options!, option => option.Key == AzureContextOptionsArmClient.SecondSubscriptionId);
268Assert.Contains(resourceGroupInput.Options!, option => option.Key == "rg-second");
298Assert.Contains(locationInput.Options!, option => option.Key == "eastus");
299Assert.Contains(locationInput.Options!, option => option.Key == "westus2");
2189Assert.Contains(storage.Resource.Outputs, output => output.Key == "blobEndpoint");
2971Assert.Contains(options, option => option.Key == "westus2");
AzurePostgresFlexibleServerConnectionPropertiesTests.cs (13)
18var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
24Assert.Equal("Host", property.Key);
29Assert.Equal("Port", property.Key);
34Assert.Equal("Uri", property.Key);
39Assert.Equal("JdbcConnectionString", property.Key);
51var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
54properties.OrderBy(p => p.Key),
57Assert.Equal("Host", property.Key);
62Assert.Equal("JdbcConnectionString", property.Key);
67Assert.Equal("Password", property.Key);
72Assert.Equal("Port", property.Key);
77Assert.Equal("Uri", property.Key);
82Assert.Equal("Username", property.Key);
AzurePostgresFlexibleServerDatabaseConnectionPropertiesTests.cs (16)
19var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
22properties.OrderBy(p => p.Key),
25Assert.Equal("DatabaseName", property.Key);
30Assert.Equal("Host", property.Key);
35Assert.Equal("JdbcConnectionString", property.Key);
40Assert.Equal("Port", property.Key);
45Assert.Equal("Uri", property.Key);
58var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
61properties.OrderBy(p => p.Key),
64Assert.Equal("DatabaseName", property.Key);
69Assert.Equal("Host", property.Key);
74Assert.Equal("JdbcConnectionString", property.Key);
79Assert.Equal("Password", property.Key);
84Assert.Equal("Port", property.Key);
89Assert.Equal("Uri", property.Key);
94Assert.Equal("Username", property.Key);
AzureSqlDatabaseConnectionPropertiesTests.cs (30)
18var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
21properties.OrderBy(p => p.Key),
24Assert.Equal("Host", property.Key);
29Assert.Equal("JdbcConnectionString", property.Key);
34Assert.Equal("Port", property.Key);
39Assert.Equal("Uri", property.Key);
52var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
55properties.OrderBy(p => p.Key),
58Assert.Equal("DatabaseName", property.Key);
63Assert.Equal("Host", property.Key);
68Assert.Equal("JdbcConnectionString", property.Key);
73Assert.Equal("Port", property.Key);
78Assert.Equal("Uri", property.Key);
97var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
100properties.OrderBy(p => p.Key),
103Assert.Equal("Host", property.Key);
108Assert.Equal("JdbcConnectionString", property.Key);
113Assert.Equal("Password", property.Key);
118Assert.Equal("Port", property.Key);
123Assert.Equal("Uri", property.Key);
128Assert.Equal("Username", property.Key);
148var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToDictionary(x => x.Key, x => x.Value);
151properties.OrderBy(p => p.Key),
154Assert.Equal("DatabaseName", property.Key);
159Assert.Equal("Host", property.Key);
164Assert.Equal("JdbcConnectionString", property.Key);
169Assert.Equal("Password", property.Key);
174Assert.Equal("Port", property.Key);
179Assert.Equal("Uri", property.Key);
184Assert.Equal("Username", property.Key);
FoundryDeploymentConnectionPropertiesTests.cs (11)
30Assert.Equal("Uri", property.Key);
35Assert.Equal("AIInferenceUri", property.Key);
40Assert.Equal("Key", property.Key);
45Assert.Equal("ModelName", property.Key);
50Assert.Equal("Format", property.Key);
55Assert.Equal("Version", property.Key);
73Assert.Equal("Uri", property.Key);
78Assert.Equal("AIInferenceUri", property.Key);
83Assert.Equal("ModelName", property.Key);
89Assert.Equal("Format", property.Key);
94Assert.Equal("Version", property.Key);
Aspire.Hosting.Azure.WebPubSub (2)
Aspire.Hosting.Browsers (1)
Aspire.Hosting.Browsers.Tests (4)
Aspire.Hosting.CodeGeneration.Go (6)
AtsGoCodeGenerator.cs (6)
610foreach (var (name, node) in root.Children.OrderBy(pair => pair.Key, StringComparer.Ordinal))
624foreach (var (name, child) in node.Children.OrderBy(pair => pair.Key, StringComparer.Ordinal))
658foreach (var (name, child) in node.Children.OrderBy(pair => pair.Key, StringComparer.Ordinal))
700=> $"map[{MapTypeRefToGo(typeRef.KeyType, isOptional: false)}]{MapTypeRefToGo(typeRef.ValueType, isOptional: false)}{{{string.Join(", ", obj.Select(pair => $"{AtsJsonCodeWriter.ToRelaxedJsonString(pair.Key)}: {RenderGoExportedValue(pair.Value, typeRef.ValueType!, dtoTypesById)}"))}}}",
775.Where(kv => _isInterfaceType.TryGetValue(kv.Key, out var isI) && isI && !_implNames.ContainsKey(kv.Key))
Aspire.Hosting.CodeGeneration.Java (4)
AtsJavaCodeGenerator.cs (4)
807foreach (var (name, node) in root.Children.OrderBy(pair => pair.Key, StringComparer.Ordinal))
825foreach (var (name, child) in node.Children.OrderBy(pair => pair.Key, StringComparer.Ordinal))
872=> $"({MapTypeRefToJava(typeRef, false, useBoxedTypes: true)})(Object)new HashMap<>(Map.ofEntries({string.Join(", ", obj.Select(pair => $"Map.entry({AtsJsonCodeWriter.ToRelaxedJsonString(pair.Key)}, {RenderJavaExportedValue(pair.Value, typeRef.ValueType!, dtoTypesById)})"))}))",
1043foreach (var (className, optionalParameters) in _optionsClassesToGenerate.OrderBy(kvp => kvp.Key, StringComparer.Ordinal))
Aspire.Hosting.CodeGeneration.Java.Tests (7)
Aspire.Hosting.CodeGeneration.Python (4)
AtsPythonCodeGenerator.cs (3)
876foreach (var (name, node) in root.Children.OrderBy(pair => pair.Key, StringComparer.Ordinal))
890foreach (var (name, child) in node.Children.OrderBy(pair => pair.Key, StringComparer.Ordinal))
931=> "{" + string.Join(", ", obj.Select(pair => $"{AtsJsonCodeWriter.ToRelaxedJsonString(pair.Key)}: {RenderPythonExportedValue(pair.Value, typeRef.ValueType!, dtoTypesById, topLevel: false)}")) + "}",
Aspire.Hosting.CodeGeneration.Rust (2)
Aspire.Hosting.CodeGeneration.TypeScript (6)
AtsTypeScriptCodeGenerator.cs (6)
1275foreach (var (name, node) in root.Children.OrderBy(pair => pair.Key, StringComparer.Ordinal))
1291foreach (var (name, child) in node.Children.OrderBy(pair => pair.Key, StringComparer.Ordinal))
1331=> "{ " + string.Join(", ", obj.Select(pair => $"{RenderTypeScriptPropertyKey(pair.Key)}: {RenderTypeScriptExportedValue(pair.Value, typeRef.ValueType!, dtoTypesById)}")) + " }",
1651foreach (var (interfaceName, optionalParams) in _optionsInterfacesToGenerate.OrderBy(kvp => kvp.Key))
3287.Where(mapping => !string.Equals(mapping.Key, mapping.Value, StringComparison.Ordinal))
3288.Select(mapping => mapping.Key)
Aspire.Hosting.Containers.Tests (1)
Aspire.Hosting.Docker (6)
Aspire.Hosting.Docker.Tests (1)
Aspire.Hosting.EntityFrameworkCore (2)
Aspire.Hosting.EntityFrameworkCore.Tests (4)
Aspire.Hosting.Foundry (6)
Aspire.Hosting.Foundry.Tests (16)
Aspire.Hosting.Garnet.Tests (4)
Aspire.Hosting.GitHub.Models.Tests (8)
Aspire.Hosting.Integration.Analyzers (13)
Aspire.Hosting.Kafka.Tests (12)
Aspire.Hosting.Kubernetes (10)
Aspire.Hosting.Kubernetes.Tests (2)
Aspire.Hosting.Maui (3)
Aspire.Hosting.Maui.Tests (5)
Aspire.Hosting.Milvus.Tests (11)
Aspire.Hosting.MongoDB.Tests (24)
ConnectionPropertiesTests.cs (15)
24Assert.Equal("Host", property.Key);
29Assert.Equal("Port", property.Key);
34Assert.Equal("Username", property.Key);
39Assert.Equal("Password", property.Key);
44Assert.Equal("AuthenticationDatabase", property.Key);
49Assert.Equal("AuthenticationMechanism", property.Key);
54Assert.Equal("Uri", property.Key);
69Assert.Contains(properties, property => property.Key == "Host" && property.Value.ValueExpression == "{mongo.bindings.tcp.host}");
70Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{mongo.bindings.tcp.port}");
71Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "{user.value}");
72Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}");
73Assert.Contains(properties, property => property.Key == "AuthenticationDatabase" && property.Value.ValueExpression == "admin");
74Assert.Contains(properties, property => property.Key == "AuthenticationMechanism" && property.Value.ValueExpression == "SCRAM-SHA-256");
75Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Products");
78property => property.Key == "Uri" &&
Aspire.Hosting.MySql.Tests (19)
ConnectionPropertiesTests.cs (13)
23Assert.Equal("Host", property.Key);
28Assert.Equal("Port", property.Key);
33Assert.Equal("Username", property.Key);
38Assert.Equal("Password", property.Key);
43Assert.Equal("Uri", property.Key);
48Assert.Equal("JdbcConnectionString", property.Key);
62Assert.Contains(properties, property => property.Key == "Host" && property.Value.ValueExpression == "{mysql.bindings.tcp.host}");
63Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{mysql.bindings.tcp.port}");
64Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "root");
65Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}");
66Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Orders");
69property => property.Key == "Uri" &&
73property => property.Key == "JdbcConnectionString" &&
Aspire.Hosting.Nats.Tests (5)
Aspire.Hosting.OpenAI.Tests (7)
Aspire.Hosting.Oracle.Tests (15)
ConnectionPropertiesTests.cs (12)
23Assert.Equal("Host", property.Key);
28Assert.Equal("Port", property.Key);
33Assert.Equal("Username", property.Key);
38Assert.Equal("Password", property.Key);
43Assert.Equal("Uri", property.Key);
48Assert.Equal("JdbcConnectionString", property.Key);
62Assert.Contains(properties, property => property.Key == "Host" && property.Value.ValueExpression == "{oracle.bindings.tcp.host}");
63Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{oracle.bindings.tcp.port}");
64Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "system");
65Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}");
66Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Orders");
69property => property.Key == "JdbcConnectionString" &&
Aspire.Hosting.PostgreSQL.Tests (29)
AddPostgresTests.cs (15)
77Assert.Equal("POSTGRES_HOST_AUTH_METHOD", env.Key);
82Assert.Equal("POSTGRES_INITDB_ARGS", env.Key);
87Assert.Equal("POSTGRES_USER", env.Key);
92Assert.Equal("POSTGRES_PASSWORD", env.Key);
131Assert.Equal("POSTGRES_HOST_AUTH_METHOD", env.Key);
136Assert.Equal("POSTGRES_INITDB_ARGS", env.Key);
141Assert.Equal("POSTGRES_USER", env.Key);
146Assert.Equal("POSTGRES_PASSWORD", env.Key);
247Assert.Equal("POSTGRES_HOST_AUTH_METHOD", env.Key);
252Assert.Equal("POSTGRES_INITDB_ARGS", env.Key);
257Assert.Equal("POSTGRES_USER", env.Key);
262Assert.Equal("POSTGRES_PASSWORD", env.Key);
729Assert.True(config2.ContainsKey(kvp.Key), $"Key {kvp.Key} should exist in second call");
730Assert.Equal(kvp.Value, config2[kvp.Key]);
ConnectionPropertiesTests.cs (13)
23Assert.Equal("Host", property.Key);
28Assert.Equal("Port", property.Key);
33Assert.Equal("Username", property.Key);
38Assert.Equal("Password", property.Key);
43Assert.Equal("Uri", property.Key);
48Assert.Equal("JdbcConnectionString", property.Key);
63Assert.Contains(properties, property => property.Key == "Host" && property.Value.ValueExpression == "{postgres.bindings.tcp.host}");
64Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{postgres.bindings.tcp.port}");
65Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "{user.value}");
66Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}");
67Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Customers");
70property => property.Key == "Uri" &&
74property => property.Key == "JdbcConnectionString" &&
Aspire.Hosting.Qdrant.Tests (13)
Aspire.Hosting.RabbitMQ.Tests (5)
Aspire.Hosting.Radius (7)
Aspire.Hosting.Radius.Tests (1)
Aspire.Hosting.Redis.Tests (19)
AddRedisTests.cs (15)
301Assert.Equal("RI_REDIS_HOST1", item.Key);
306Assert.Equal("RI_REDIS_PORT1", item.Key);
311Assert.Equal("RI_REDIS_ALIAS1", item.Key);
316Assert.Equal("RI_REDIS_PASSWORD1", item.Key);
323Assert.Equal("RI_REDIS_HOST2", item.Key);
328Assert.Equal("RI_REDIS_PORT2", item.Key);
333Assert.Equal("RI_REDIS_ALIAS2", item.Key);
338Assert.Equal("RI_REDIS_PASSWORD2", item.Key);
345Assert.Equal("RI_REDIS_HOST3", item.Key);
350Assert.Equal("RI_REDIS_PORT3", item.Key);
355Assert.Equal("RI_REDIS_ALIAS3", item.Key);
775Assert.Contains(config1, kvp => kvp.Key == "RI_REDIS_HOST1");
776Assert.Contains(config2, kvp => kvp.Key == "RI_REDIS_HOST1");
778config1.First(kvp => kvp.Key == "RI_REDIS_HOST1").Value,
779config2.First(kvp => kvp.Key == "RI_REDIS_HOST1").Value);
Aspire.Hosting.RemoteHost (7)
Aspire.Hosting.RemoteHost.Tests (3)
Aspire.Hosting.Rust (4)
Aspire.Hosting.Seq.Tests (3)
Aspire.Hosting.SqlServer.Tests (17)
ConnectionPropertiesTests.cs (15)
19properties.OrderBy(p => p.Key),
22Assert.Equal("Host", property.Key);
27Assert.Equal("JdbcConnectionString", property.Key);
32Assert.Equal("Password", property.Key);
37Assert.Equal("Port", property.Key);
42Assert.Equal("Uri", property.Key);
47Assert.Equal("Username", property.Key);
62properties.OrderBy(p => p.Key),
65Assert.Equal("DatabaseName", property.Key);
70Assert.Equal("Host", property.Key);
75Assert.Equal("JdbcConnectionString", property.Key);
80Assert.Equal("Password", property.Key);
85Assert.Equal("Port", property.Key);
90Assert.Equal("Uri", property.Key);
95Assert.Equal("Username", property.Key);
Aspire.Hosting.Testing (6)
Aspire.Hosting.Testing.Tests (4)
Aspire.Hosting.Tests (130)
Dashboard\DashboardResourceTests.cs (30)
120.OrderBy(c => c.Key)
126Assert.Equal(KnownConfigNames.DashboardApiEnabled, e.Key);
131Assert.Equal(KnownConfigNames.DashboardOtlpGrpcEndpointUrl, e.Key);
136Assert.Equal(KnownConfigNames.ResourceServiceEndpointUrl, e.Key);
141Assert.Equal(KnownAspNetCoreConfigNames.Environment, e.Key);
146Assert.Equal(KnownAspNetCoreConfigNames.Urls, e.Key);
151Assert.Equal("DASHBOARD__API__AUTHMODE", e.Key);
156Assert.Equal("DASHBOARD__FRONTEND__AUTHMODE", e.Key);
161Assert.Equal("DASHBOARD__FRONTEND__PUBLICURL", e.Key);
166Assert.Equal("DASHBOARD__OTLP__AUTHMODE", e.Key);
171Assert.Equal("DASHBOARD__RESOURCESERVICECLIENT__AUTHMODE", e.Key);
176Assert.Equal("LOGGING__CONSOLE__FORMATTERNAME", e.Key);
384Assert.Equal("BrowserToken", config.Single(e => e.Key == DashboardConfigNames.DashboardFrontendAuthModeName.EnvVarName).Value);
385Assert.Equal("TestBrowserToken!", config.Single(e => e.Key == DashboardConfigNames.DashboardFrontendBrowserTokenName.EnvVarName).Value);
387Assert.Equal("ApiKey", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpAuthModeName.EnvVarName).Value);
388Assert.Equal("TestOtlpApiKey!", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpPrimaryApiKeyName.EnvVarName).Value);
424Assert.Equal("Unsecured", config.Single(e => e.Key == DashboardConfigNames.DashboardFrontendAuthModeName.EnvVarName).Value);
425Assert.Equal("Unsecured", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpAuthModeName.EnvVarName).Value);
460Assert.Equal("http://localhost:5000", config.Single(e => e.Key == DashboardConfigNames.ResourceServiceUrlName.EnvVarName).Value);
505Assert.Equal("http://localhost:5002", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpHttpUrlName.EnvVarName).Value);
506Assert.Equal(expectedAllowedOrigins, config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpCorsAllowedOriginsKeyName.EnvVarName).Value);
507Assert.Equal("*", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpCorsAllowedHeadersKeyName.EnvVarName).Value);
508Assert.DoesNotContain(config, e => e.Key == corsAllowedOriginsKey);
551Assert.Equal("https://localhost:5001", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpGrpcUrlName.EnvVarName).Value);
552Assert.Equal("https://localhost:5002", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpHttpUrlName.EnvVarName).Value);
553Assert.Equal(expectedAllowedOrigins, config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpCorsAllowedOriginsKeyName.EnvVarName).Value);
554Assert.Equal("*", config.Single(e => e.Key == DashboardConfigNames.DashboardOtlpCorsAllowedHeadersKeyName.EnvVarName).Value);
555Assert.DoesNotContain(config, e => e.Key == corsAllowedOriginsKey);
593Assert.DoesNotContain(config, e => e.Key == DashboardConfigNames.DashboardOtlpCorsAllowedOriginsKeyName.EnvVarName);
594Assert.DoesNotContain(config, e => e.Key == DashboardConfigNames.DashboardOtlpCorsAllowedHeadersKeyName.EnvVarName);
ExternalServiceTests.cs (10)
119Assert.Contains(config, kvp => kvp.Key == "services__nuget__https__0" && kvp.Value == "https://nuget.org/");
120Assert.Contains(config, kvp => kvp.Key == "NUGET" && kvp.Value == "https://nuget.org/");
136Assert.Contains(config, kvp => kvp.Key == "services__nuget__http__0" && kvp.Value == "http://nuget.org/");
137Assert.Contains(config, kvp => kvp.Key == "NUGET" && kvp.Value == "http://nuget.org/");
155Assert.Contains(config, kvp => kvp.Key == "services__nuget__https__0" && kvp.Value == "https://nuget.org/");
156Assert.Contains(config, kvp => kvp.Key == "NUGET_HTTPS" && kvp.Value == "https://nuget.org/");
175Assert.Contains(config, kvp => kvp.Key == "services__nuget__default__0");
178Assert.Contains(config, kvp => kvp.Key == "NUGET" && kvp.Value == urlValue);
563Assert.Contains(config, kvp => kvp.Key == "services__gateway__https__0" && kvp.Value == "https://gateway.example.com/orders-service/");
564Assert.Contains(config, kvp => kvp.Key == "GATEWAY" && kvp.Value == "https://gateway.example.com/orders-service/");
ProjectResourceTests.cs (16)
142Assert.Equal("OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY", env.Key);
147Assert.Equal("OTEL_DOTNET_EXPERIMENTAL_ASPNETCORE_DISABLE_URL_QUERY_REDACTION", env.Key);
152Assert.Equal("OTEL_DOTNET_EXPERIMENTAL_HTTPCLIENT_DISABLE_URL_QUERY_REDACTION", env.Key);
157Assert.Equal("OTEL_EXPORTER_OTLP_ENDPOINT", env.Key);
162Assert.Equal("OTEL_EXPORTER_OTLP_PROTOCOL", env.Key);
167Assert.Equal("OTEL_RESOURCE_ATTRIBUTES", env.Key);
172Assert.Equal("OTEL_SERVICE_NAME", env.Key);
177Assert.Equal("OTEL_EXPORTER_OTLP_HEADERS", env.Key);
184Assert.Equal("OTEL_BLRP_SCHEDULE_DELAY", env.Key);
189Assert.Equal("OTEL_BSP_SCHEDULE_DELAY", env.Key);
194Assert.Equal("OTEL_METRIC_EXPORT_INTERVAL", env.Key);
199Assert.Equal("OTEL_TRACES_SAMPLER", env.Key);
204Assert.Equal("OTEL_METRICS_EXEMPLAR_FILTER", env.Key);
209Assert.Equal("OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT", env.Key);
214Assert.Equal("DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION", env.Key);
219Assert.Equal("LOGGING__CONSOLE__FORMATTERNAME", env.Key);
WithReferenceTests.cs (36)
416Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "123");
520Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__bob" && kvp.Value == "123");
544Assert.Contains(config, kvp => kvp.Key == "services__petstore__default__0" && kvp.Value == "https://petstore.swagger.io/v2");
545Assert.Contains(config, kvp => kvp.Key == "petstore" && kvp.Value == "https://petstore.swagger.io/v2");
561Assert.Contains(config, kvp => kvp.Key == "services__petstore__default__0" && kvp.Value == "https://petstore.swagger.io/");
562Assert.Contains(config, kvp => kvp.Key == "petstore" && kvp.Value == "https://petstore.swagger.io/");
583Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb");
586Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST" && kvp.Value == "localhost");
587Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT" && kvp.Value == "5432");
608Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb");
611Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST" && kvp.Value == "localhost");
612Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT" && kvp.Value == "5432");
633Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb");
636Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST" && kvp.Value == "localhost");
637Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT" && kvp.Value == "5432");
660Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb");
663Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST" && kvp.Value == "localhost");
664Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT" && kvp.Value == "5432");
685Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb");
688Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST");
689Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT");
712Assert.DoesNotContain(config, kvp => kvp.Key == "ConnectionStrings__resource");
715Assert.Contains(config, kvp => kvp.Key == "RESOURCE_HOST" && kvp.Value == "localhost");
716Assert.Contains(config, kvp => kvp.Key == "RESOURCE_PORT" && kvp.Value == "5432");
741Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__resource" && kvp.Value == "Server=localhost;Database=mydb");
744Assert.DoesNotContain(config, kvp => kvp.Key == "RESOURCE_HOST");
745Assert.DoesNotContain(config, kvp => kvp.Key == "RESOURCE_PORT");
763Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__bob" && kvp.Value == "Server=localhost;Database=mydb");
764Assert.Contains(config, kvp => kvp.Key == "BOB_HOST" && kvp.Value == "localhost");
765Assert.Contains(config, kvp => kvp.Key == "BOB_PORT" && kvp.Value == "5432");
766Assert.DoesNotContain(config, kvp => kvp.Key == "RESOURCE_HOST");
767Assert.DoesNotContain(config, kvp => kvp.Key == "RESOURCE_PORT");
785Assert.Contains(config, kvp => kvp.Key == "RESOURCE_WITH_DASH_HOST" && kvp.Value == "localhost");
786Assert.Contains(config, kvp => kvp.Key == "RESOURCE_WITH_DASH_PORT" && kvp.Value == "5432");
787Assert.DoesNotContain(config, kvp => kvp.Key == "RESOURCE-WITH-DASH_HOST");
788Assert.DoesNotContain(config, kvp => kvp.Key == "RESOURCE-WITH-DASH_PORT");
Aspire.Hosting.TestUtilities (4)
Aspire.Hosting.Valkey.Tests (4)
Aspire.Hosting.Yarp (2)
Aspire.Hosting.Yarp.Tests (1)
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests (2)
Aspire.Milvus.Client.Tests (1)
Aspire.MongoDB.Driver.Tests (2)
Aspire.MongoDB.Driver.v2.Tests (2)
Aspire.NATS.Net.Tests (2)
Aspire.Oracle.EntityFrameworkCore.Tests (2)
Aspire.Playground.Tests (4)
Aspire.Qdrant.Client.Tests (1)
Aspire.RabbitMQ.Client.Tests (7)
Aspire.RabbitMQ.Client.v6.Tests (7)
Aspire.StackExchange.Redis (2)
Aspire.StackExchange.Redis.DistributedCaching.Tests (3)
Aspire.StackExchange.Redis.OutputCaching.Tests (3)
Aspire.StackExchange.Redis.Tests (1)
Aspire.Templates.Tests (4)
Binding.Http.IntegrationTests (4)
BlazorHosted.ClientServiceDefaults (2)
BlazorStandalone.ClientServiceDefaults (2)
Client.ClientBase.IntegrationTests (1)
ConfigurationSchemaGenerator (2)
crossgen2 (9)
Program.cs (9)
126if (String.Compare(inputFile.Key, "System.Private.CoreLib", StringComparison.OrdinalIgnoreCase) == 0)
137if (String.Compare(inputFile.Key, "System.Private.CoreLib", StringComparison.OrdinalIgnoreCase) == 0)
185_allInputFilePaths.Add(inputFile.Key, inputFile.Value);
186inputFilePaths.Add(inputFile.Key, inputFile.Value);
204if (!_allInputFilePaths.ContainsKey(unrootedInputFile.Key))
206_allInputFilePaths.Add(unrootedInputFile.Key, unrootedInputFile.Value);
207unrootedInputFilePaths.Add(unrootedInputFile.Key, unrootedInputFile.Value);
287singleCompilationInputFilePaths.Add(inputFile.Key, inputFile.Value);
292bool singleCompilationVersionBubbleIncludesCoreLib = versionBubbleIncludesCoreLib || (String.Compare(inputFile.Key, "System.Private.CoreLib", StringComparison.OrdinalIgnoreCase) == 0);
csc (4)
dotnet (67)
dotnet-aot (16)
dotnet-format (2)
dotnet-openapi (2)
dotnet-svcutil-lib (68)
dotnet-svcutil-lib.Tests (1)
dotnet-user-jwts (5)
dotnet-user-secrets (5)
dotnet-watch (3)
DotNetWatchTasks (1)
EventSourceGenerator (1)
GenerateDocumentationAndConfigFiles (60)
GetDocument.Insider (4)
ILAssembler (1)
ILCompiler.Compiler (62)
src\runtime\src\coreclr\tools\Common\Compiler\Win32Resources\ResourceData.cs (12)
138return _resTypeHeadID.SelectMany(typeIdPair => SelectResType(typeIdPair.Key, typeIdPair.Value))
139.Concat(_resTypeHeadName.SelectMany(typeNamePair => SelectResType(typeNamePair.Key, typeNamePair.Value)));
143return resType.NameHeadID.SelectMany(nameIdPair => SelectResName(type, nameIdPair.Key, nameIdPair.Value))
145SelectResName(type, nameNamePair.Key, nameNamePair.Value)));
150return resType.Languages.Select((lang) => (name, type, lang.Key, lang.Value.DataEntry));
206resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable)));
210resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key)));
220resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable)));
224resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key)));
234resLanguages.Add(new Tuple<ResLanguage, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key)));
247dataBuilder.EmitUShort(checked((ushort)name.Key.Length));
248foreach (char c in name.Key)
ILCompiler.MetadataTransform (2)
ILCompiler.ReadyToRun (72)
Compiler\PettisHansenSort\PettisHansen.cs (16)
46AddEdge(i, kvp.Key.Index, kvp.Value);
47AddEdge(kvp.Key.Index, i, kvp.Value);
55Debug.Assert(phEdges[kvp.Key][i] == phEdges[i][kvp.Key]);
64if (kvp.Key > i)
66queue.Enqueue((i, kvp.Key), -kvp.Value); // PriorityQueue gives lowest prio first
123Debug.Assert(phEdges[loser].Count(e => unionFind.FindSet(e.Key) == winner) == 1);
133bool removed = phEdges[edge.Key].Remove(loser);
137AddEdge(winner, edge.Key, edge.Value);
138AddEdge(edge.Key, winner, edge.Value);
140long weight = phEdges[winner][edge.Key];
141queue.Enqueue((winner, edge.Key), -weight); // Priority queue gives lowest priority first
152Debug.Assert(unionFind.FindSet(i) == i && unionFind.FindSet(edge.Key) == edge.Key);
153Debug.Assert(phEdges[edge.Key][i] == phEdges[i][edge.Key]);
src\runtime\src\coreclr\tools\Common\Compiler\Win32Resources\ResourceData.cs (12)
138return _resTypeHeadID.SelectMany(typeIdPair => SelectResType(typeIdPair.Key, typeIdPair.Value))
139.Concat(_resTypeHeadName.SelectMany(typeNamePair => SelectResType(typeNamePair.Key, typeNamePair.Value)));
143return resType.NameHeadID.SelectMany(nameIdPair => SelectResName(type, nameIdPair.Key, nameIdPair.Value))
145SelectResName(type, nameNamePair.Key, nameNamePair.Value)));
150return resType.Languages.Select((lang) => (name, type, lang.Key, lang.Value.DataEntry));
206resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable)));
210resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key)));
220resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable)));
224resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key)));
234resLanguages.Add(new Tuple<ResLanguage, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key)));
247dataBuilder.EmitUShort(checked((ushort)name.Key.Length));
248foreach (char c in name.Key)
ILCompiler.RyuJit (21)
src\runtime\src\coreclr\tools\aot\ILCompiler.ReadyToRun\Compiler\PettisHansenSort\PettisHansen.cs (16)
46AddEdge(i, kvp.Key.Index, kvp.Value);
47AddEdge(kvp.Key.Index, i, kvp.Value);
55Debug.Assert(phEdges[kvp.Key][i] == phEdges[i][kvp.Key]);
64if (kvp.Key > i)
66queue.Enqueue((i, kvp.Key), -kvp.Value); // PriorityQueue gives lowest prio first
123Debug.Assert(phEdges[loser].Count(e => unionFind.FindSet(e.Key) == winner) == 1);
133bool removed = phEdges[edge.Key].Remove(loser);
137AddEdge(winner, edge.Key, edge.Value);
138AddEdge(edge.Key, winner, edge.Value);
140long weight = phEdges[winner][edge.Key];
141queue.Enqueue((winner, edge.Key), -weight); // Priority queue gives lowest priority first
152Debug.Assert(unionFind.FindSet(i) == i && unionFind.FindSet(edge.Key) == edge.Key);
153Debug.Assert(phEdges[edge.Key][i] == phEdges[i][edge.Key]);
illink (13)
ILLink.RoslynAnalyzer (11)
ILLink.Tasks (3)
Infrastructure.Tests (10)
installer.tasks (4)
Microsoft.Analyzers.Extra (3)
Microsoft.Analyzers.Local (4)
Microsoft.Arcade.Common (1)
Microsoft.AspNetCore (1)
Microsoft.AspNetCore.Analyzers (1)
Microsoft.AspNetCore.App.Analyzers (5)
Microsoft.AspNetCore.App.CodeFixes (5)
Microsoft.AspNetCore.Authentication (2)
Microsoft.AspNetCore.Authentication.Cookies (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (6)
OpenIdConnectHandler.cs (6)
121message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
136message = new OpenIdConnectMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
325var message = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
464message.Parameters.Add(additionalParameter.Key, additionalParameter.Value);
648authorizationResponse = new OpenIdConnectMessage(Request.Query.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
675authorizationResponse = new OpenIdConnectMessage(form.Select(pair => new KeyValuePair<string, string[]>(pair.Key, pair.Value.ToArray())));
Microsoft.AspNetCore.Authentication.Twitter (5)
Microsoft.AspNetCore.Authentication.WsFederation (2)
Microsoft.AspNetCore.Authorization (1)
Microsoft.AspNetCore.Components (29)
src\aspnetcore\src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (8)
258Add(kvp.Key, kvp.Value);
328keys[i] = array[i].Key;
360Add(item.Key, item.Value);
411return TryGetValue(item.Key, out var value) && EqualityComparer<object>.Default.Equals(value, item.Value);
493var index = FindIndex(item.Key);
715if (string.Equals(array[i].Key, key, StringComparison.OrdinalIgnoreCase))
735if (string.Equals(array[i].Key, key, StringComparison.OrdinalIgnoreCase))
758if (string.Equals(array[i].Key, key, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Components.AI.SourceGenerators (1)
Microsoft.AspNetCore.Components.Analyzers (2)
Microsoft.AspNetCore.Components.Endpoints (28)
Microsoft.AspNetCore.Components.Media (2)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
Microsoft.AspNetCore.Components.Server (6)
Microsoft.AspNetCore.Components.Testing (6)
Microsoft.AspNetCore.Components.Web (3)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.Components.WebAssembly.Authentication (1)
Microsoft.AspNetCore.Components.WebView (5)
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
Microsoft.AspNetCore.Components.WebView.Wpf (1)
Microsoft.AspNetCore.Connections.Abstractions (3)
Microsoft.AspNetCore.CookiePolicy (2)
Microsoft.AspNetCore.Cors (1)
Microsoft.AspNetCore.DataProtection (3)
Microsoft.AspNetCore.Diagnostics (17)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Microsoft.AspNetCore.Diagnostics.Middleware.PerformanceTests (4)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (127)
Logging\AcceptanceTests.cs (91)
230Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.RequestBody);
231Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix));
232Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix));
233Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
234Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == TelemetryConstants.Unknown);
235Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
236Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString());
237Assert.Single(state, x => x.Key == HttpLoggingTagNames.Duration &&
243Assert.Single(state, x => x.Key == HttpLoggingTagNames.ResponseBody && x.Value == "Server: hello!Server: world!");
248Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.ResponseBody);
290Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.ResponseBody);
291Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix));
292Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix));
293Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
294Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == TelemetryConstants.Unknown);
295Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
296Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString());
297Assert.Single(state, x => x.Key == HttpLoggingTagNames.Duration &&
303Assert.Single(state, x => x.Key == HttpLoggingTagNames.RequestBody && x.Value == Content);
308Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.RequestBody);
343Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.ResponseBody);
344Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix));
345Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix));
346Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
347Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == "/myroute/123");
348Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
349Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString());
350Assert.Single(state, x => x.Key == HttpLoggingTagNames.Duration &&
403Assert.DoesNotContain(requestState, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix));
404Assert.DoesNotContain(requestState, x => x.Key == HttpLoggingTagNames.StatusCode);
405Assert.DoesNotContain(requestState, x => x.Key == HttpLoggingTagNames.Duration);
406Assert.Single(requestState, x => x.Key == HttpLoggingTagNames.RequestHeaderPrefix + NormalizedRequestHeader);
407Assert.Single(requestState, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
408Assert.Single(requestState, x => x.Key == HttpLoggingTagNames.Path && x.Value == TelemetryConstants.Unknown);
409Assert.Single(requestState, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString());
410Assert.Single(requestState, x => x.Key == "Protocol" && x.Value == "HTTP/1.1");
413Assert.Single(requestBodyState, x => x.Key == "Body" && x.Value == Content);
416Assert.Single(responseState, x => x.Key == HttpLoggingTagNames.ResponseHeaderPrefix + NormalizedResponseHeader);
417Assert.Single(responseState, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
420Assert.Single(responseBodyState, x => x.Key == "Body" && x.Value == "Server: hello!Server: world!");
423Assert.Single(durationState, x => x.Key == HttpLoggingTagNames.Duration && x.Value != null);
461Assert.Single(state, x => x.Key == HttpLoggingTagNames.RequestHeaderPrefix + NormalizedRequestHeader);
462Assert.Single(state, x => x.Key == HttpLoggingTagNames.ResponseHeaderPrefix + NormalizedResponseHeader);
463Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
464Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == TelemetryConstants.Unknown);
465Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
466Assert.Single(state, x => x.Key == HttpLoggingTagNames.Duration &&
470Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString());
471Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.RequestBody);
472Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.ResponseBody);
474x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix) && !x.Key.EndsWith(NormalizedRequestHeader));
477x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix) && !x.Key.EndsWith(NormalizedResponseHeader));
507Assert.Single(state, x => x.Key == TestHttpLogEnricher.Key1 && x.Value == TestHttpLogEnricher.Value1);
508Assert.Single(state, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.InvariantCulture));
509Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Delete.ToString());
510Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.RequestBody);
511Assert.DoesNotContain(state, x => x.Key == HttpLoggingTagNames.ResponseBody);
512Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix));
513Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix));
549Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == RequestPath);
581Assert.DoesNotContain(firstState, x => x.Key == TestHttpLogEnricher.Key1 && x.Value == TestHttpLogEnricher.Value1);
582Assert.DoesNotContain(firstState, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.InvariantCulture));
585Assert.Single(secondState, x => x.Key == TestHttpLogEnricher.Key1 && x.Value == TestHttpLogEnricher.Value1);
586Assert.Single(secondState, x => x.Key == TestHttpLogEnricher.Key2 && x.Value == TestHttpLogEnricher.Value2.ToString(CultureInfo.InvariantCulture));
626Assert.DoesNotContain(firstRecord, x => x.Key == HttpLoggingTagNames.StatusCode);
627Assert.DoesNotContain(firstRecord, x => x.Key == HttpLoggingTagNames.Duration);
628Assert.DoesNotContain(secondRecord!, x => x.Key == HttpLoggingTagNames.Duration);
629Assert.DoesNotContain(fourthRecord, x => x.Key == HttpLoggingTagNames.StatusCode);
630Assert.DoesNotContain(fourthRecord, x => x.Key == HttpLoggingTagNames.Duration);
631Assert.DoesNotContain(fithRecord!, x => x.Key == HttpLoggingTagNames.Duration);
635Assert.Single(secondRecord!, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
636Assert.Single(fithRecord!, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
640Assert.Single(thirdRecord, x => x.Key == HttpLoggingTagNames.Duration && x.Value != null);
641Assert.Single(sixthRecord, x => x.Key == HttpLoggingTagNames.Duration && x.Value != null);
666Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix));
667Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix));
668Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString());
669Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
670Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == TelemetryConstants.Unknown);
671Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == expectedStatus);
672Assert.Single(state, x => x.Key == HttpLoggingTagNames.Duration &&
707Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix));
708Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix));
709Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Put.ToString());
710Assert.Single(state, x => x.Key == HttpLoggingTagNames.RequestBody && x.Value == Content);
711Assert.Single(state, x => x.Key == HttpLoggingTagNames.ResponseBody && x.Value == "test body");
741Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.RequestHeaderPrefix));
742Assert.DoesNotContain(state, x => x.Key.StartsWith(HttpLoggingTagNames.ResponseHeaderPrefix));
743Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Put.ToString());
Logging\AcceptanceTests.Mvc.cs (33)
80Assert.DoesNotContain(state, x => x.Key == QueryParamName);
81Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
82Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == redactedPath);
83Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
84Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString());
85Assert.Single(state, x => x.Key == HttpLoggingTagNames.Duration &&
116Assert.Single(state, x => x.Key == UserIdParamName && x.Value == redactedUserId);
117Assert.Single(state, x => x.Key == NoDataClassParamName && x.Value == TelemetryConstants.Redacted);
118Assert.DoesNotContain(state, x => x.Key == QueryParamName);
119Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
120Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == ActionRouteTemplate);
121Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
122Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString());
123Assert.Single(state, x => x.Key == HttpLoggingTagNames.Duration &&
165Assert.Single(state, x => x.Key == UserIdParamName && x.Value == redactedUserId);
166Assert.Single(state, x => x.Key == NoDataClassParamName && x.Value == NoDataClassParamValue);
169Assert.DoesNotContain(state, x => x.Key == QueryParamName);
170Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
172Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == expectedPath);
173Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
174Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString());
175Assert.Single(state, x => x.Key == HttpLoggingTagNames.Duration &&
205Assert.DoesNotContain(state, x => x.Key == QueryParamName);
206Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
207Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == $"/api/users/testUserId/someTestData");
208Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
209Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString());
210Assert.Single(state, x => x.Key == HttpLoggingTagNames.Duration &&
248Assert.DoesNotContain(state, x => x.Key == QueryParamName);
249Assert.Single(state, x => x.Key == HttpLoggingTagNames.Host && !string.IsNullOrEmpty(x.Value));
250Assert.Single(state, x => x.Key == HttpLoggingTagNames.Path && x.Value == expectedPath);
251Assert.Single(state, x => x.Key == HttpLoggingTagNames.StatusCode && x.Value == responseStatus);
252Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString());
Microsoft.AspNetCore.Grpc.JsonTranscoding (10)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.Hosting (12)
Microsoft.AspNetCore.Hosting.Abstractions (1)
Microsoft.AspNetCore.Http (21)
Microsoft.AspNetCore.Http.Abstractions (16)
Routing\RouteValueDictionary.cs (11)
75if (items[start].Key != null)
79else if (items[end].Key != null)
219Add(kvp.Key, kvp.Value);
258Add(kvp.Key, kvp.Value);
328keys[i] = array[i].Key;
360Add(item.Key, item.Value);
411return TryGetValue(item.Key, out var value) && EqualityComparer<object>.Default.Equals(value, item.Value);
493var index = FindIndex(item.Key);
715if (string.Equals(array[i].Key, key, StringComparison.OrdinalIgnoreCase))
735if (string.Equals(array[i].Key, key, StringComparison.OrdinalIgnoreCase))
758if (string.Equals(array[i].Key, key, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Connections.Client (8)
Microsoft.AspNetCore.Http.Extensions (5)
Microsoft.AspNetCore.Http.Features (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
Microsoft.AspNetCore.Http.Results (2)
Microsoft.AspNetCore.HttpLogging (2)
Microsoft.AspNetCore.InternalTesting (5)
Microsoft.AspNetCore.Mvc.Abstractions (3)
Microsoft.AspNetCore.Mvc.Analyzers (2)
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
Microsoft.AspNetCore.Mvc.Core (33)
Microsoft.AspNetCore.Mvc.Formatters.Xml (3)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (10)
Microsoft.AspNetCore.Mvc.Razor (2)
Microsoft.AspNetCore.Mvc.RazorPages (4)
Microsoft.AspNetCore.Mvc.TagHelpers (7)
Microsoft.AspNetCore.Mvc.Testing (10)
Microsoft.AspNetCore.Mvc.ViewFeatures (36)
Microsoft.AspNetCore.OpenApi (7)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
Microsoft.AspNetCore.OutputCaching (8)
Microsoft.AspNetCore.Owin (10)
Microsoft.AspNetCore.RateLimiting (1)
Microsoft.AspNetCore.Razor.Runtime (1)
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Microsoft.AspNetCore.ResponseCaching (8)
Microsoft.AspNetCore.Routing (87)
Patterns\DefaultRoutePatternTransformer.cs (12)
56if (original.GetParameter(kvp.Key) != null)
65else if (original.Defaults.TryGetValue(kvp.Key, out var defaultValue) &&
83if (original.GetParameter(kvp.Key) == null &&
84original.Defaults.TryGetValue(kvp.Key, out var defaultValue) &&
98else if ((parameter = original.GetParameter(kvp.Key)) != null)
102if (!MatchesConstraints(original, parameter, kvp.Key, requiredValues))
115else if (original.Defaults.TryGetValue(kvp.Key, out var defaultValue) &&
121if (!MatchesConstraints(original, parameter: null, kvp.Key, requiredValues))
159var parameter = original.GetParameter(kvp.Key);
168original.Defaults.TryGetValue(kvp.Key, out var defaultValue) &&
178updatedDefaults.Remove(kvp.Key);
185requiredValues.TryAdd(kvp.Key, kvp.Value);
Template\TemplateBinder.cs (13)
176var key = slots[i].Key;
257var key = slots[i].Key;
358var key = filters[i].Key;
391if (!_defaults!.ContainsKey(kvp.Key))
396if (!acceptedValues.ContainsKey(kvp.Key))
398acceptedValues.Add(kvp.Key, kvp.Value);
596if (_defaults != null && _defaults.ContainsKey(kvp.Key))
607wroteFirst |= AddQueryKeyValueToContext(context, kvp.Key, value, wroteFirst);
612wroteFirst |= AddQueryKeyValueToContext(context, kvp.Key, kvp.Value, wroteFirst);
711var parameter = _pattern.GetParameter(kvp.Key);
712if (parameter == null && !acceptedValues.ContainsKey(kvp.Key))
714combinedValues.Add(kvp.Key, kvp.Value);
731slots[i + pattern.Parameters.Count] = new KeyValuePair<string, object?>(filters[i].Key, null);
Microsoft.AspNetCore.Routing.Abstractions (5)
Microsoft.AspNetCore.Server.HttpSys (14)
Microsoft.AspNetCore.Server.IIS (17)
Microsoft.AspNetCore.Server.IntegrationTesting (4)
Microsoft.AspNetCore.Server.Kestrel.Core (34)
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (4)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (3)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (8)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (3)
Microsoft.AspNetCore.Session (1)
Microsoft.AspNetCore.SignalR.Client.Core (2)
Microsoft.AspNetCore.SignalR.Core (2)
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.SpaServices.Extensions (9)
Microsoft.AspNetCore.TestHost (11)
Microsoft.AspNetCore.WebUtilities (3)
Microsoft.Build (299)
BackEnd\Components\RequestBuilder\Lookup.cs (15)
340if (SecondaryModifyTable.TryGetValue(entry.Key, out modifiesOfType))
350SecondaryModifyTable.Add(entry.Key, entry.Value);
382_baseItems.ImportItemsOfType(kvp.Key, kvp.Value);
390_baseItems.RemoveItemsOfType(kvp.Key, kvp.Value);
398ApplyModificationsToTable(_baseItems, entry.Key, entry.Value);
941if (modificationsToApply[m.Key].Remove)
943taskItem.RemoveMetadata(m.Key);
953taskItem.RemoveMetadata(modificationPair.Key);
957taskItem.SetMetadata(modificationPair.Key, modificationPair.Value.NewValue);
1009if (modifiesOfType.TryGetValue(modify.Key, out existingMetadataChanges))
1025if (!existingMetadataChanges.ContainsExplicitModification(metadataChange.Key))
1027existingMetadataChanges[metadataChange.Key] = metadataChange.Value;
1034modifiesOfType.Add(modify.Key, modify.Value);
1196if (modificationPair.Value.KeepValue && _modifications.TryGetValue(modificationPair.Key, out existingModification))
1207_modifications[modificationPair.Key] = modificationPair.Value;
BackEnd\Components\Scheduler\SchedulingPlan.cs (6)
114configurationsInOrder.Sort((l, r) => Comparer<int>.Default.Compare(l.Key, r.Key));
117file.WriteLine(String.Format(CultureInfo.InvariantCulture, "{0} {1} {2}", configuration.Key, configuration.Value, _configCache[configuration.Key].ProjectFullPath));
241Console.WriteLine("{0}: {1} ({2} referrers) {3}", configuration.Key, config.TotalPlanTime, config.ReferrerCount, config.ConfigFullPath);
263Console.WriteLine("{0}: {1} {2}", configuration.Key, configuration.Value.ReferencesCount, configuration.Value.ConfigFullPath);
Instance\ProjectInstance.cs (9)
408_globalProperties.Set(ProjectPropertyInstance.Create(property.Key, property.Value));
609_globalProperties[property.Key] = ProjectPropertyInstance.Create(property.Key, property.Value, false /* may not be reserved */, _isImmutable);
885foreach (var actualItem in that.GetItems(itemFilter.Key))
1049=> new KeyValuePair<string, string>(directMetadatum.Key, directMetadatum.Value.EvaluatedValueEscaped));
1987_sdkResolvedEnvironmentVariableProperties.Set(ProjectPropertyInstance.Create(environmentVariable.Key, environmentVariable.Value, importElement.Location, isImmutable: true));
3322if (String.Equals(globalProperty.Key, Constants.SubToolsetVersionPropertyName, StringComparison.OrdinalIgnoreCase) && explicitSubToolsetVersion != null)
3327_globalProperties.Set(ProjectPropertyInstance.Create(globalProperty.Key, explicitSubToolsetVersion, false /* may not be reserved */, _isImmutable));
3331_globalProperties.Set(ProjectPropertyInstance.Create(globalProperty.Key, globalProperty.Value, false /* may not be reserved */, _isImmutable));
Instance\ProjectItemInstance.cs (22)
981names.Add(metadatum.Key);
1183ProjectMetadataInstance.VerifyThrowReservedNameAllowItemSpecModifiers(metadatum.Key);
1220yield return new KeyValuePair<string, string>(projectMetadataInstance.Key, EscapingUtilities.UnescapeAll(projectMetadataInstance.Value));
1266builder[kvp.Key] = kvp.Value;
1275builder[kvp.Key] = kvp.Value;
1289yield return new ProjectMetadataInstance(metadatum.Key, metadatum.Value, allowItemSpecModifiers: true);
1560string destinationValue = destinationItem.GetMetadata(metadatum.Key);
1564destinationItem.SetMetadata(metadatum.Key, GetMetadataEscaped(metadatum.Key));
1595.Where(metadatum => string.IsNullOrEmpty(destinationItem.GetMetadataValueEscaped(metadatum.Key)));
1602.Select(metadatum => new KeyValuePair<string, string>(metadatum.Key, GetMetadataEscaped(metadatum.Key)));
1637clonedMetadata[metadatum.Key] = EscapingUtilities.UnescapeAll(metadatum.Value);
1654clonedMetadata[metadatum.Key] = metadatum.Value;
1778thisNames.Add(metadatum.Key);
1791string name = metadatum.Key;
1849SetMetadata(metadataEntry.Key, metadataEntry.Value);
1908int key = interner.Intern(metadatum.Key);
2038.Where(item => !ItemSpecModifiers.IsDerivableItemSpecModifier(item.Key));
2060ProjectMetadataInstance.VerifyThrowReservedNameAllowItemSpecModifiers(item.Key);
2181Current = _metadataCollectionEnumerator.Current.Key;
2304IEnumerable<KeyValuePair<string, string>> projectMetadataInstances = metadataList.Select(metadatum => new KeyValuePair<string, string>(metadatum.Key.Name, metadatum.Value));
Microsoft.Build.Framework (56)
Microsoft.Build.Tasks.CodeAnalysis (4)
Microsoft.Build.Tasks.Core (64)
AssemblyDependency\GenerateBindingRedirects.cs (11)
101new XAttribute("name", redirect.Key.Name),
102new XAttribute("publicKeyToken", ResolveAssemblyReference.ByteArrayToString(redirect.Key.GetPublicKeyToken())),
103new XAttribute("culture", String.IsNullOrEmpty(redirect.Key.CultureName) ? "neutral" : redirect.Key.CultureName)),
286if (IsMatch(entry.Key, nameValue, cultureValue, publicKeyTokenValue))
294var newName = entry.Key.Name;
295var newCulture = entry.Key.CultureName;
296var newPublicKeyToken = entry.Key.GetPublicKeyToken();
297var newProcessorArchitecture = entry.Key.ProcessorArchitecture;
318redirects.Remove(entry.Key);
320Log.LogWarningWithCodeFromResources("GenerateBindingRedirects.OverlappingBindingRedirect", entry.Key.ToString(), bindingRedirect.ToString());
Microsoft.Build.Tasks.Git (17)
Microsoft.Build.Utilities.Core (27)
ToolLocationHelper.cs (8)
410extensionSDKs[extension.Key] = extension.Value;
457extensionSDKsAndVersions[extension.Key] = Tuple.Create<string, string>(extension.Value, moniker.TargetPlatformVersion.ToString());
627ExtensionSDK extensionSDK = new ExtensionSDK(sdk.Key, sdk.Value);
632filteredExtensionSdks.Add(sdk.Key, sdk.Value);
2614if (rootPathWithIdentifier.Name.Equals(uapDirectoryName, StringComparison.OrdinalIgnoreCase) && directoryUnderRoot.Key.Major == uapVersion)
2616platformSDKKey = new TargetPlatformSDK(uapRegistryName, directoryUnderRoot.Key, null);
2620platformSDKKey = new TargetPlatformSDK(rootPathWithIdentifier.Name, directoryUnderRoot.Key, null);
2719TargetPlatformSDK platformSDKKey = new TargetPlatformSDK(platformIdentifier, registryVersions.Key, null);
Microsoft.CodeAnalysis (145)
Symbols\Attributes\CommonAttributeData.cs (6)
182if (string.Equals(namedArguments[i].Key, name, StringComparison.Ordinal))
450if (namedArg.Key == "MethodCodeType")
506switch (namedArg.Key)
522messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, attribute.AttributeClass, namedArg.Key);
535messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, attribute.AttributeClass, namedArg.Key);
545messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, attribute.AttributeClass, namedArg.Key);
Symbols\Attributes\MarshalAsAttributeDecoder.cs (13)
128switch (namedArg.Key)
134messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, arguments.Attribute.AttributeClass, namedArg.Key);
150messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, arguments.Attribute.AttributeClass, namedArg.Key);
184switch (namedArg.Key)
190messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, arguments.Attribute.AttributeClass, namedArg.Key);
219switch (namedArg.Key)
230messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, arguments.Attribute.AttributeClass, namedArg.Key);
240messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, arguments.Attribute.AttributeClass, namedArg.Key);
255messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, arguments.Attribute.AttributeClass, namedArg.Key);
308switch (namedArg.Key)
314messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, arguments.Attribute.AttributeClass, namedArg.Key);
376switch (namedArg.Key)
382messageProvider.ReportInvalidNamedArgument(arguments.Diagnostics, arguments.AttributeSyntaxOpt, position, arguments.Attribute.AttributeClass, namedArg.Key);
Microsoft.CodeAnalysis.Analyzers (67)
Microsoft.CodeAnalysis.AnalyzerUtilities (109)
src\2e2796bccd1466f6\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (1)
51kvp.Key,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysis.CopyDataFlowOperationVisitor.cs (1)
527var key = kvp.Key;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (1)
676var entity = kvp.Key;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResultBuilder.cs (1)
65var block = kvp.Key;
Microsoft.CodeAnalysis.CodeStyle (44)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
912Key: "Name" or "Type",
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp (63)
Microsoft.CodeAnalysis.CSharp.CodeStyle (14)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.CSharp.Features (7)
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
Microsoft.CodeAnalysis.Extensions.Package (28)
Microsoft.CodeAnalysis.ExternalAccess.HotReload (1)
Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler (1)
Microsoft.CodeAnalysis.Features (60)
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (1)
146kvp => kvp.Key,
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingAsyncWorkItemQueue.cs (1)
255return pair.Key;
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
912Key: "Name" or "Type",
Microsoft.CodeAnalysis.Features.ExternalAccess (1)
Microsoft.CodeAnalysis.NetAnalyzers (142)
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJsonNetWithoutBinder.cs (1)
243kvp.Key.Location));
Microsoft.NetCore.Analyzers\Security\DoNotUseWeakKDFInsufficientIterationCount.cs (1)
224kvp.Key.Location,
src\40daf5e1cab76dff\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (1)
49kvp.Key,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\KeyValuePairExtensions.cs (1)
12key = pair.Key;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResultBuilder.cs (1)
64var block = kvp.Key;
Microsoft.CodeAnalysis.Razor.Compiler (9)
Microsoft.CodeAnalysis.ResxSourceGenerator (56)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.VisualBasic (26)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces (85)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
Microsoft.CSharp (2)
Microsoft.Data.Analysis (10)
Microsoft.Data.Analysis.Interactive (1)
Microsoft.Diagnostics.DataContractReader (6)
Microsoft.Diagnostics.DataContractReader.Contracts (1)
Microsoft.Diagnostics.DataContractReader.DataGenerator (5)
Microsoft.Diagnostics.NETCore.Client (4)
Microsoft.DotNet.ApiCompatibility (5)
Microsoft.DotNet.Arcade.Sdk (6)
Microsoft.DotNet.Build.Manifest (9)
Microsoft.DotNet.Build.Tasks.Installers (3)
Microsoft.DotNet.Build.Tasks.Packaging (42)
Microsoft.DotNet.Cli.Definitions (1)
Microsoft.DotNet.Cli.Telemetry (7)
Microsoft.DotNet.Cli.Utils (12)
Microsoft.DotNet.HotReload.Watch (15)
Microsoft.DotNet.ProjectTools (2)
Microsoft.DotNet.SharedFramework.Sdk (3)
Microsoft.DotNet.TemplateLocator (25)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (11)
148if (_manifests.TryGetValue(dependency.Key, out var t))
153throw new WorkloadManifestCompositionException(Strings.ManifestDependencyVersionTooLow, dependency.Key, resolvedDependency.Version, dependency.Value, manifest.Id, manifest.ManifestPath);
158throw new WorkloadManifestCompositionException(Strings.ManifestDependencyMissing, dependency.Key, manifest.Id, manifest.ManifestPath);
171if (!_workloads.TryAdd(workload.Key, ((WorkloadDefinition)workload.Value, manifest)))
173WorkloadManifest conflictingManifest = _workloads[workload.Key].manifest;
174throw new WorkloadManifestCompositionException(Strings.ConflictingWorkloadDefinition, workload.Key, manifest.Id, manifest.ManifestPath, conflictingManifest.Id, conflictingManifest.ManifestPath);
181if (!_packs.TryAdd(pack.Key, (pack.Value, manifest)))
183WorkloadManifest conflictingManifest = _packs[pack.Key].manifest;
184throw new WorkloadManifestCompositionException(Strings.ConflictingWorkloadPack, pack.Key, manifest.Id, manifest.ManifestPath, conflictingManifest.Id, conflictingManifest.ManifestPath);
397throw new Exception($"Workload not found: {workloadId}. Known workloads: {string.Join(" ", _workloads.Select(workload => workload.Key.ToString()))}");
642overlayResolver._manifests.TryAdd(manifest.Key, manifest.Value);
Microsoft.DotNet.XliffTasks (1)
Microsoft.Extensions.AI (14)
Microsoft.Extensions.AI.Abstractions (18)
Microsoft.Extensions.AI.Abstractions.Tests (26)
Contents\FunctionCallContentTests.cs (9)
247""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value);
268""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value);
287""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value));
323""", TestJsonSerializerContext.Default.Options)!.ToDictionary(k => k.Key, k => (object?)k.Value));
357Assert.Equal("Key1", kvp.Key);
362Assert.Equal("Key2", kvp.Key);
367Assert.Equal("Key3", kvp.Key);
372Assert.Equal("Key4", kvp.Key);
377Assert.Equal("Key5", kvp.Key);
Microsoft.Extensions.AI.Evaluation (1)
Microsoft.Extensions.AI.Evaluation.Console (1)
Microsoft.Extensions.AI.Evaluation.NLP (9)
Microsoft.Extensions.AI.Evaluation.Reporting (4)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (4)
Microsoft.Extensions.AI.Integration.Tests (5)
Microsoft.Extensions.AI.OpenAI (6)
Microsoft.Extensions.AI.OpenAI.Tests (5)
Microsoft.Extensions.AI.Stabilization.Tests (1)
Microsoft.Extensions.AI.Tests (25)
Microsoft.Extensions.Caching.Hybrid.Tests (2)
Microsoft.Extensions.Caching.Memory (2)
Microsoft.Extensions.Compliance.Redaction (1)
Microsoft.Extensions.Configuration (6)
Microsoft.Extensions.Configuration.CommandLine (5)
Microsoft.Extensions.DataIngestion (3)
Microsoft.Extensions.DataIngestion.Tests (3)
Microsoft.Extensions.DependencyInjection (3)
Microsoft.Extensions.Diagnostics (6)
Microsoft.Extensions.Diagnostics.HealthChecks (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (3)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (5)
Windows\Disk\WindowsDiskMetrics.cs (5)
141measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionWriteTag, new(DeviceKey, pair.Key) }));
150measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionReadTag, new(DeviceKey, pair.Key) }));
166measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionWriteTag, new(DeviceKey, pair.Key) }));
175measurements.Add(new Measurement<long>(pair.Value, new TagList { _directionReadTag, new(DeviceKey, pair.Key) }));
190measurements.Add(new Measurement<double>(pair.Value, new TagList { new(DeviceKey, pair.Key) }));
Microsoft.Extensions.Diagnostics.Testing (6)
Microsoft.Extensions.Diagnostics.Testing.Tests (2)
Microsoft.Extensions.Features (4)
Microsoft.Extensions.FileProviders.Physical (5)
Microsoft.Extensions.FileSystemGlobbing (1)
Microsoft.Extensions.Hosting.Testing.Tests (12)
HostingFakesExtensionsTests.cs (10)
146Assert.Equal("testKey", item.Key);
172Assert.Equal("testKey1", item.Key);
177Assert.Equal("testKey2", item.Key);
201Assert.Equal("testKey", item.Key);
206Assert.Equal("anotherTestKey", item.Key);
232Assert.Equal("testKey", item.Key);
258Assert.Equal("testKey1", item.Key);
263Assert.Equal("testKey2", item.Key);
287Assert.Equal("testKey", item.Key);
292Assert.Equal("anotherTestKey", item.Key);
Microsoft.Extensions.Http (3)
Microsoft.Extensions.Http.Diagnostics (6)
Microsoft.Extensions.Http.Diagnostics.Tests (68)
Logging\HttpClientLoggerTest.cs (21)
254logRecordState.Contains(testEnricher.KvpRequest.Key, expectedLogRecord.GetEnrichmentProperty(testEnricher.KvpRequest.Key));
347logRecordRequest.NotContains(testEnricher.KvpRequest.Key);
360logRecordFull.Contains(testEnricher.KvpRequest.Key, expectedLogRecord.GetEnrichmentProperty(testEnricher.KvpRequest.Key));
361logRecordFull.Contains(testEnricher.KvpResponse.Key, expectedLogRecord.GetEnrichmentProperty(testEnricher.KvpResponse.Key));
455logRecordState.Contains(testEnricher.KvpRequest.Key, expectedLogRecord.GetEnrichmentProperty(testEnricher.KvpRequest.Key));
456logRecordState.NotContains(testEnricher.KvpResponse.Key);
458Assert.DoesNotContain(logRecordState, kvp => kvp.Key.StartsWith(HttpClientLoggingTagNames.ResponseHeaderPrefix));
571logRecordState.Contains(testEnricher.KvpRequest.Key, expectedLogRecord.GetEnrichmentProperty(testEnricher.KvpRequest.Key));
572logRecordState.Contains(testEnricher.KvpResponse.Key, expectedLogRecord.GetEnrichmentProperty(testEnricher.KvpResponse.Key));
574Assert.DoesNotContain(logRecordState, kvp => kvp.Key.StartsWith(HttpClientLoggingTagNames.ResponseHeaderPrefix));
664logRecordState.Contains(testEnricher.KvpRequest.Key, expectedLogRecord.GetEnrichmentProperty(testEnricher.KvpRequest.Key));
939logRecordState.Contains(testEnricher.KvpRequest.Key, expectedLogRecord.GetEnrichmentProperty(testEnricher.KvpRequest.Key));
1039Assert.Equal("{OriginalFormat}", pair.Key);
Logging\HttpRequestReaderTest.cs (31)
64RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData }, { header3.Key, FakeTaxonomy.PrivateData } },
65ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData }, { header3.Key, FakeTaxonomy.PrivateData } },
90httpRequestMessage.Headers.Add(header1.Key, header1.Value);
91httpRequestMessage.Headers.Add(header3.Key, header3.Value);
99httpResponseMessage.Headers.Add(header2.Key, header2.Value);
100httpResponseMessage.Headers.Add(header3.Key, header3.Value);
194RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
195ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
220httpRequestMessage.Headers.Add(header1.Key, header1.Value);
232httpResponseMessage.Headers.Add(header2.Key, header2.Value);
269RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
270ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
296httpRequestMessage.Headers.Add(header1.Key, header1.Value);
308httpResponseMessage.Headers.Add(header2.Key, header2.Value);
344RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
369httpRequestMessage.Headers.Add(header1.Key, header1.Value);
403RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
404ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
429httpRequestMessage.Headers.Add(header1.Key, header1.Value);
441httpResponseMessage.Headers.Add(header2.Key, header2.Value);
476RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
477ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
502httpRequestMessage.Headers.Add(header1.Key, header1.Value);
510httpResponseMessage.Headers.Add(header2.Key, header2.Value);
545RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
546ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
571httpRequestMessage.Headers.Add(header1.Key, header1.Value);
580httpResponseMessage.Headers.Add(header2.Key, header2.Value);
820tag => tag.Key == "url.query" && (tag.Value!).Contains("userId=REDACTED"));
Microsoft.Extensions.Http.Resilience (1)
Microsoft.Extensions.Http.Resilience.Tests (4)
Microsoft.Extensions.Identity.Core (1)
Microsoft.Extensions.Logging (6)
Microsoft.Extensions.Logging.Configuration (1)
Microsoft.Extensions.Logging.Console (1)
Microsoft.Extensions.Logging.EventLog (1)
Microsoft.Extensions.Logging.EventSource (2)
Microsoft.Extensions.Logging.Generators (11)
Microsoft.Extensions.Logging.MSBuild (4)
Microsoft.Extensions.Options.SourceGeneration (16)
Emitter.cs (13)
633var attributesData = _optionsSourceGenContext.AttributesToGenerate.OrderBy(static kvp => kvp.Key, StringComparer.Ordinal).ToArray();
640if (attributeData.Key == _symbolHolder.MaxLengthAttributeSymbol.Name)
643EmitMaxLengthAttribute(_optionsSourceGenContext.ClassModifier, Emitter.StaticAttributeClassNamePrefix, attributeData.Key, linesToInsert, _optionsSourceGenContext.Suffix);
645else if (attributeData.Key == _symbolHolder.MinLengthAttributeSymbol.Name)
648EmitMinLengthAttribute(_optionsSourceGenContext.ClassModifier, Emitter.StaticAttributeClassNamePrefix, attributeData.Key, linesToInsert, _optionsSourceGenContext.Suffix);
650else if (_symbolHolder.LengthAttributeSymbol is not null && attributeData.Key == _symbolHolder.LengthAttributeSymbol.Name)
653EmitLengthAttribute(_optionsSourceGenContext.ClassModifier, Emitter.StaticAttributeClassNamePrefix, attributeData.Key, linesToInsert, _optionsSourceGenContext.Suffix);
655else if (attributeData.Key == _symbolHolder.CompareAttributeSymbol.Name && attributeData.Value is not null)
658EmitCompareAttribute(_optionsSourceGenContext.ClassModifier, Emitter.StaticAttributeClassNamePrefix, attributeData.Key, linesToInsert: linesToInsert, _optionsSourceGenContext.Suffix);
660else if (attributeData.Key == _symbolHolder.RangeAttributeSymbol.Name)
662EmitRangeAttribute(_optionsSourceGenContext.ClassModifier, Emitter.StaticAttributeClassNamePrefix, attributeData.Key, _optionsSourceGenContext.Suffix, attributeData.Value is not null);
1209.OrderBy(p => p.Key)
1216attrInstantiationStatementLines.Add($"{GetPaddingString(1)}{prop.Key} = {prop.Value}{(notLast ? "," : string.Empty)}");
Microsoft.Extensions.Resilience.Tests (1)
Microsoft.Extensions.ServiceDiscovery (3)
Microsoft.Extensions.ServiceDiscovery.Abstractions (3)
Microsoft.Extensions.Telemetry (11)
Microsoft.Extensions.Telemetry.Abstractions (3)
Microsoft.Extensions.Telemetry.Abstractions.Tests (15)
Logging\LoggerMessageStateTests.cs (15)
26Assert.Equal(PropName, lms.TagArray[0].Key);
38Assert.Equal(PropName, lms.TagArray[0].Key);
45Assert.Equal(PropName, lms.TagArray[0].Key);
59Assert.Equal(PropName, lms.TagArray[0].Key);
61Assert.Equal(PropName + "X", lms.TagArray[1].Key);
79Assert.Equal("K1", lms.TagArray[0].Key);
97Assert.Equal(PropertyNamPrefix + "." + PropName, lms.TagArray[0].Key);
102Assert.Equal(PropertyNamPrefix + "." + PropName, lms.TagArray[0].Key);
115Assert.Equal(PropName, lms.TagArray[0].Key);
120Assert.Equal(PropName, lms.TagArray[0].Key);
142Assert.Equal(PropName, list[0].Key);
152Assert.Equal(PropName, list[0].Key);
158Assert.Equal(PropName, list[0].Key);
168Assert.Equal(current.Key, list[count].Key);
Microsoft.Extensions.Telemetry.Tests (9)
Microsoft.Extensions.Validation (1)
Microsoft.Extensions.Validation.ValidationsGenerator (4)
Microsoft.Gen.ComplianceReports (1)
Microsoft.Gen.ContextualOptions (2)
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
Microsoft.Gen.Logging (5)
Microsoft.Gen.Logging.Generated.Tests (17)
Microsoft.Gen.MetadataExtractor (5)
Microsoft.Gen.Metrics (8)
Microsoft.Gen.Metrics.Generated.Tests (33)
MetricTests.cs (22)
71Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
154Assert.Equal(new (string, object?)[] { ("s1", "val_1"), ("s2", "val_2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
174var tags = measurements[0].Tags.Select(x => (x.Key, x.Value));
177tags = measurements[1].Tags.Select(x => (x.Key, x.Value));
198var tags = measurements[0].Tags.Select(x => (x.Key, x.Value));
201tags = measurements[1].Tags.Select(x => (x.Key, x.Value));
253Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
259Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
266Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val4") }, measurement.Tags.Select(x => (x.Key, x.Value)));
278Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
284Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
291Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val4") }, measurement.Tags.Select(x => (x.Key, x.Value)));
329Assert.Equal(new (string, object?)[] { ("Dim1", "val1"), ("Dim_2", "val2"), ("Dim_3", "val3") }, measurement.Tags.Select(x => (x.Key, x.Value)));
342Assert.Equal(new (string, object?)[] { ("Dim1", "val1"), ("Dim_2", "val2"), ("Dim_3", "val3") }, measurement.Tags.Select(x => (x.Key, x.Value)));
372measurement.Tags.Select(x => (x.Key, x.Value)));
421measurement.Tags.Select(x => (x.Key, x.Value)));
444measurement.Tags.Select(x => (x.Key, x.Value)));
467measurement.Tags.Select(x => (x.Key, x.Value)));
515measurement.Tags.Select(x => (x.Key, x.Value)));
564measurement.Tags.Select(x => (x.Key, x.Value)));
587measurement.Tags.Select(x => (x.Key, x.Value)));
609measurement.Tags.Select(x => (x.Key, x.Value)));
MetricTests.Ext.cs (8)
55Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
135Assert.Equal(new (string, object?)[] { ("s1", "val_1"), ("s2", "val_2") }, measurement.Tags.Select(x => (x.Key, x.Value)));
184measurement.Tags.Select(x => (x.Key, x.Value)));
206measurement.Tags.Select(x => (x.Key, x.Value)));
228measurement.Tags.Select(x => (x.Key, x.Value)));
277measurement.Tags.Select(x => (x.Key, x.Value)));
299measurement.Tags.Select(x => (x.Key, x.Value)));
321measurement.Tags.Select(x => (x.Key, x.Value)));
Microsoft.Gen.MetricsReports (4)
Microsoft.Interop.ComInterfaceGenerator (3)
Microsoft.Interop.LibraryImportGenerator (4)
Microsoft.Interop.SourceGeneration (12)
Microsoft.Maui (3)
Microsoft.Maui.Controls (70)
Microsoft.Maui.Controls.Build.Tasks (11)
Microsoft.Maui.Controls.SourceGen (2)
Microsoft.Maui.Controls.Xaml (10)
Microsoft.Maui.Essentials (2)
Microsoft.Maui.Graphics (3)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (1)
Microsoft.Maui.Resizetizer (5)
Microsoft.ML.AutoML (21)
Microsoft.ML.AutoML.Tests (3)
Microsoft.ML.CodeGenerator (7)
Microsoft.ML.Core (20)
Microsoft.ML.Core.Tests (17)
Microsoft.ML.CpuMath.UnitTests (1)
Microsoft.ML.Data (126)
EntryPoints\InputBuilder.cs (5)
505if (!inputBuilder.TrySetValueJson(pair.Key, pair.Value))
506throw ectx.Except($"Unexpected value for component '{type}', field '{pair.Key}': '{pair.Value}'");
566if (!inputBuilder.TrySetValueJson(pair.Key, pair.Value))
567throw ectx.Except($"Unexpected value for component '{name}', field '{pair.Key}': '{pair.Value}'");
595dict[pair.Key] = (T)GetFieldAssignableValue(ectx, typeof(T), ParseJsonValue(ectx, typeof(T), attributes, pair.Value, catalog));
Microsoft.ML.Ensemble (8)
Microsoft.ML.EntryPoints (14)
Microsoft.ML.Fairlearn (1)
Microsoft.ML.FastTree (41)
FastTree.cs (31)
1684rowHasMissing.Set(kv.Key, true);
1875_instanceList[kvp.Key].Add(index, kvp.Value);
1968int irow = kvEnums[i].Current.Key;
1969int jrow = kvEnums[j].Current.Key;
1995ch.Assert(kvp.Key >= last);
1997while (kvp.Key - last > Byte.MaxValue)
2003ch.Assert(kvp.Key - last <= Byte.MaxValue);
2006delta.Add((byte)(kvp.Key - last));
2008ch.Assert(kvp.Key > last || values.Count == 1 || values[values.Count - 1] > values[values.Count - 2]);
2009last = kvp.Key;
2440Contracts.Assert(_sparse.Count == 0 || _sparse[_sparse.Count - 1].Key < length);
2464Contracts.Assert(_sparse.Count == 0 || _sparse[_sparse.Count - 1].Key < lim);
2471Contracts.Assert(prev < kvp.Key);
2472while (++prev < kvp.Key)
2475yield return kvp.Key;
2487yield return kvp.Key;
2537editor.Indices[i] = _sparse[i].Key;
2576Contracts.Assert(kvp.Key < length);
2579yield return new KeyValuePair<int, int>(kvp.Key, binned);
2588Contracts.Assert(kvp.Key < length);
2589while (++last < kvp.Key)
2593yield return new KeyValuePair<int, int>(kvp.Key, binned);
2661Contracts.Assert(sp.Count == 0 || sp[last].Key > lastRow);
2666if (s.Key < rowIndex)
2668if (s.Key > rowIndex)
2675Contracts.Assert(s.Key == rowIndex);
3142writer.WriteLine("\t{0}\t{1}", pair.Key, (double)pair.Value);
3157var name = names.GetItemOrDefault(pair.Key).ToString();
3159name = $"f{pair.Key}";
3171results.Add(new KeyValuePair<string, object>(pair.Key, pair.Value));
3251bldr.AddFeature(pair.Key, (float)(Math.Sqrt(pair.Value) * normFactor));
Microsoft.ML.GenAI.Core (6)
Microsoft.ML.GenAI.Phi.Tests (1)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.LightGbm (2)
Microsoft.ML.OnnxConverter (1)
Microsoft.ML.OnnxTransformer (5)
Microsoft.ML.OnnxTransformerTest (2)
Microsoft.ML.Predictor.Tests (6)
Microsoft.ML.ResultProcessor (19)
ResultProcessor.cs (19)
100SettingHeaderNames.Add(setting.Key.StartsWith("/") ? setting.Key : "/" + setting.Key);
118ResultHeaderNames.Add(resultEntity.Key);
173.GroupBy(kvp => kvp.Key, kvp => kvp.Value)
296settings.Add(entity.Key + ":" + entity.Value);
537GroupBy(kvp => kvp.Key, kvp => kvp.Value).ToDictionary(g => "/" + g.Key, g => string.Join(",", g));
910if (thisFoldResults.Key < 0 || thisFoldResults.Value == null)
914if (foldResults.ContainsKey(thisFoldResults.Key))
916Console.Error.WriteLine("Fold {0} results have already been added, not adding.", thisFoldResults.Key);
918foldResults[thisFoldResults.Key] = thisFoldResults.Value;
932int foldIdx = kvp.Key;
936if (!metricToFoldValuesDict.TryGetValue(kvp1.Key, out metricDict))
939metricToFoldValuesDict[kvp1.Key] = metricDict;
947perFoldMetrics[metricValues.Key] = new ResultMetric(float.NaN)
950orderby kvp.Key ascending
1078srcFiles.Add(new KeyValuePair<string, string>(taggedPattern.Key, src));
1093resultValue.CustomizedTag = fileWithTag.Key;
1157outStream.Write("\t" + kvp.Key + ":"
Microsoft.ML.Samples (5)
Microsoft.ML.SearchSpace (17)
Microsoft.ML.StandardTrainers (7)
Microsoft.ML.Sweeper (29)
Microsoft.ML.Sweeper.Tests (1)
Microsoft.ML.Tests (7)
Microsoft.ML.TimeSeries (18)
Microsoft.ML.TimeSeries.Tests (5)
Microsoft.ML.Tokenizers (37)
Microsoft.ML.Tokenizers.Tests (16)
Microsoft.ML.TorchSharp (4)
Microsoft.ML.Transforms (29)
Microsoft.NET.Build.Containers (5)
Microsoft.NET.Build.Extensions.Tasks (3)
Microsoft.NET.Build.Tasks (50)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (11)
148if (_manifests.TryGetValue(dependency.Key, out var t))
153throw new WorkloadManifestCompositionException(Strings.ManifestDependencyVersionTooLow, dependency.Key, resolvedDependency.Version, dependency.Value, manifest.Id, manifest.ManifestPath);
158throw new WorkloadManifestCompositionException(Strings.ManifestDependencyMissing, dependency.Key, manifest.Id, manifest.ManifestPath);
171if (!_workloads.TryAdd(workload.Key, ((WorkloadDefinition)workload.Value, manifest)))
173WorkloadManifest conflictingManifest = _workloads[workload.Key].manifest;
174throw new WorkloadManifestCompositionException(Strings.ConflictingWorkloadDefinition, workload.Key, manifest.Id, manifest.ManifestPath, conflictingManifest.Id, conflictingManifest.ManifestPath);
181if (!_packs.TryAdd(pack.Key, (pack.Value, manifest)))
183WorkloadManifest conflictingManifest = _packs[pack.Key].manifest;
184throw new WorkloadManifestCompositionException(Strings.ConflictingWorkloadPack, pack.Key, manifest.Id, manifest.ManifestPath, conflictingManifest.Id, conflictingManifest.ManifestPath);
397throw new Exception($"Workload not found: {workloadId}. Known workloads: {string.Join(" ", _workloads.Select(workload => workload.Key.ToString()))}");
642overlayResolver._manifests.TryAdd(manifest.Key, manifest.Value);
Microsoft.NET.HostModel (16)
src\runtime\src\coreclr\tools\Common\Compiler\Win32Resources\ResourceData.cs (12)
138return _resTypeHeadID.SelectMany(typeIdPair => SelectResType(typeIdPair.Key, typeIdPair.Value))
139.Concat(_resTypeHeadName.SelectMany(typeNamePair => SelectResType(typeNamePair.Key, typeNamePair.Value)));
143return resType.NameHeadID.SelectMany(nameIdPair => SelectResName(type, nameIdPair.Key, nameIdPair.Value))
145SelectResName(type, nameNamePair.Key, nameNamePair.Value)));
150return resType.Languages.Select((lang) => (name, type, lang.Key, lang.Value.DataEntry));
206resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable)));
210resTypes.Add(new Tuple<ResType, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key)));
220resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key, nameTable)));
224resNames.Add(new Tuple<ResName, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key)));
234resLanguages.Add(new Tuple<ResLanguage, ObjectDataBuilder.Reservation>(res.Value, IMAGE_RESOURCE_DIRECTORY_ENTRY.Write(ref dataBuilder, res.Key)));
247dataBuilder.EmitUShort(checked((ushort)name.Key.Length));
248foreach (char c in name.Key)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (5)
Microsoft.NET.Sdk.Publish.Tasks (6)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (32)
Microsoft.NET.Sdk.WorkloadManifestReader (25)
WorkloadResolver.cs (11)
148if (_manifests.TryGetValue(dependency.Key, out var t))
153throw new WorkloadManifestCompositionException(Strings.ManifestDependencyVersionTooLow, dependency.Key, resolvedDependency.Version, dependency.Value, manifest.Id, manifest.ManifestPath);
158throw new WorkloadManifestCompositionException(Strings.ManifestDependencyMissing, dependency.Key, manifest.Id, manifest.ManifestPath);
171if (!_workloads.TryAdd(workload.Key, ((WorkloadDefinition)workload.Value, manifest)))
173WorkloadManifest conflictingManifest = _workloads[workload.Key].manifest;
174throw new WorkloadManifestCompositionException(Strings.ConflictingWorkloadDefinition, workload.Key, manifest.Id, manifest.ManifestPath, conflictingManifest.Id, conflictingManifest.ManifestPath);
181if (!_packs.TryAdd(pack.Key, (pack.Value, manifest)))
183WorkloadManifest conflictingManifest = _packs[pack.Key].manifest;
184throw new WorkloadManifestCompositionException(Strings.ConflictingWorkloadPack, pack.Key, manifest.Id, manifest.ManifestPath, conflictingManifest.Id, conflictingManifest.ManifestPath);
397throw new Exception($"Workload not found: {workloadId}. Known workloads: {string.Join(" ", _workloads.Select(workload => workload.Key.ToString()))}");
642overlayResolver._manifests.TryAdd(manifest.Key, manifest.Value);
Microsoft.NET.StringTools (5)
Microsoft.TemplateEngine.Abstractions (1)
Microsoft.TemplateEngine.Cli (43)
Microsoft.TemplateEngine.Core (7)
Microsoft.TemplateEngine.Edge (36)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (43)
ConfigModel\TemplateConfigModel.cs (16)
104if (!symbols.ContainsKey(tagInfo.Key))
106symbols[tagInfo.Key] = ParameterSymbol.FromDeprecatedConfigTag(tagInfo.Key, tagInfo.Value);
115if (string.IsNullOrWhiteSpace(prop.Key))
123baseline.DefaultOverrides.TryGetValue(prop.Key, out defaultOverride);
126BaseSymbol? modelForSymbol = SymbolModelConverter.GetModelForObject(prop.Key, obj, logger, defaultOverride);
131if (string.Equals(prop.Key, NameSymbolName, StringComparison.Ordinal)
132&& symbols.TryGetValue(prop.Key, out BaseSymbol existingSymbol)
137symbols[prop.Key] = new ParameterSymbol(modelForParameterSymbol, existingParameterSymbol.Forms);
142symbols[prop.Key] = modelForSymbol;
170string globName = globConfigKeyValue.Key;
373_forms[kvp.Key] = kvp.Value;
532formMap[builtInForm.Key] = builtInForm.Value.Create();
548formMap[form.Key] = ValueFormRegistry.GetForm(form.Key, o);
567allBaselines[property.Key] = baseline;
Microsoft.TemplateEngine.Utils (27)
Microsoft.TemplateSearch.Common (33)
Microsoft.TestPlatform.CommunicationUtilities (14)
Microsoft.TestPlatform.CrossPlatEngine (36)
Microsoft.TestPlatform.Filter.Source (1)
Microsoft.TestPlatform.PlatformAbstractions (2)
Microsoft.TestPlatform.TestHostRuntimeProvider (4)
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (2)
Microsoft.VisualStudio.TestPlatform.Client (4)
Microsoft.VisualStudio.TestPlatform.Common (32)
Microsoft.VisualStudio.TestPlatform.ObjectModel (47)
Mono.Cecil (11)
MSBuild (42)
OutOfProcTaskHostNode.cs (18)
553targetOutputsPerProject[i].Add(output.Key, output.Value);
1437if (_pendingCallbackRequests.TryRemove(kvp.Key, out TaskCompletionSource<INodePacket> tcs))
1447if (contextKvp.Value.PendingCallbackRequests.TryRemove(reqKvp.Key, out TaskCompletionSource<INodePacket> ctxTcs))
1664string oldValue = variable.Value.Key;
1671environment.TryGetValue(variable.Key, out environmentValue);
1689LogMessageFromResource(MessageImportance.Low, "ModifyingTaskHostEnvironmentVariable", variable.Key, newValue, environmentValue ?? String.Empty);
1692updatedEnvironment[variable.Key] = newValue;
1696updatedEnvironment.Remove(variable.Key);
1732string newValue = variable.Value.Key;
1738environment.TryGetValue(variable.Key, out environmentValue);
1746updatedEnvironment[variable.Key] = newValue;
1750updatedEnvironment.Remove(variable.Key);
1787if (!environment.TryGetValue(variable.Key, out newValue))
1789s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(null, oldValue);
1795s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue);
1804if (!_savedEnvironment.TryGetValue(variable.Key, out oldValue))
1806s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, null);
1812s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue);
NuGet.Build.Tasks (5)
NuGet.Build.Tasks.Console (2)
NuGet.Build.Tasks.Pack (5)
NuGet.CommandLine.XPlat (6)
NuGet.Commands (45)
NuGet.Configuration (32)
NuGet.Credentials (1)
NuGet.DependencyResolver.Core (2)
NuGet.Frameworks (31)
FrameworkNameProvider.cs (25)
129if (StringComparer.OrdinalIgnoreCase.Equals(item.Key, key))
131value = item.Key;
305foreach (var optional in GetOptionalFrameworks(pair.Key))
328profileNumber = pair.Key;
709if (!_shortNameRewrites.ContainsKey(mapping.Key))
711_shortNameRewrites.Add(mapping.Key, mapping.Value);
723if (!_fullNameRewrites.ContainsKey(mapping.Key))
725_fullNameRewrites.Add(mapping.Key, mapping.Value);
760subSets.Add(mapping.Key);
776var profile1 = profileMapping.Mapping.Key;
814remaining.Push(pair.Key);
864if (!_identifierSynonyms.ContainsKey(pair.Key))
866_identifierSynonyms.Add(pair.Key, pair.Value);
879var longName = pair.Key;
883_identifierSynonyms.Add(pair.Value, pair.Key);
899_profilesToShortName.Add(profileMapping.Mapping.Value, profileMapping.Mapping.Key);
900_profileShortToLong.Add(profileMapping.Mapping.Key, profileMapping.Mapping.Value);
912if (!_portableFrameworks.TryGetValue(pair.Key, out HashSet<NuGetFramework>? frameworks))
915_portableFrameworks.Add(pair.Key, frameworks);
933if (!_portableOptionalFrameworks.TryGetValue(pair.Key, out HashSet<NuGetFramework>? frameworks))
936_portableOptionalFrameworks.Add(pair.Key, frameworks);
953if (!_portableCompatibilityMappings.TryGetValue(mapping.Key, out HashSet<FrameworkRange>? entries))
956_portableCompatibilityMappings.Add(mapping.Key, entries);
1126string.Format(NumberFormatInfo.InvariantInfo, "Profile{0}", pair.Key));
1138.SelectMany(p => p.Value.Select(subset => new { Superset = p.Key, Subset = subset }))
NuGet.LibraryModel (1)
NuGet.PackageManagement (9)
NuGet.Packaging (45)
NuGet.ProjectModel (11)
NuGet.Protocol (14)
NuGet.Resolver (2)
NuGet.Versioning (1)
PresentationBuildTasks (1)
PresentationCore (19)
PresentationFramework (47)
ReachFramework (2)
RepoTasks (3)
Roslyn.Diagnostics.Analyzers (57)
Roslyn.Diagnostics.CSharp.Analyzers (10)
rzc (1)
ScenarioTests.Common.Tests (1)
sdk-tasks (10)
SelectTests (8)
Shared (1)
Shared.Tests (6)
Stress.TelemetryService (1)
System.Collections (34)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
22Key = keyValue.Key;
System\Collections\Generic\OrderedDictionary.cs (21)
297SetAt(index, tpair.Key, tpair.Value);
347set => SetAt(index, value.Key, value.Value);
515Add(pair.Key, pair.Value);
522Add(pair.Key, pair.Value);
1172ArgumentNullException.ThrowIfNull(item.Key, nameof(item));
1174int index = IndexOf(item.Key);
1188void IList<KeyValuePair<TKey, TValue>>.Insert(int index, KeyValuePair<TKey, TValue> item) => Insert(index, item.Key, item.Value);
1191void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) => Add(item.Key, item.Value);
1196ArgumentNullException.ThrowIfNull(item.Key, nameof(item));
1199TryGetValue(item.Key, out TValue? value) &&
1223if (TryGetValue(item.Key, out TValue? value, out int index) && EqualityComparer<TValue>.Default.Equals(value, item.Value))
1334Add(pair.Key, pair.Value);
1341TryGetValue(pair.Key, out TValue? v) &&
1363Insert(index, pair.Key, pair.Value);
1414new DictionaryEntry(Current.Key, Current.Value) :
1418readonly DictionaryEntry IDictionaryEnumerator.Entry => new(Current.Key, Current.Value);
1421readonly object IDictionaryEnumerator.Key => Current.Key;
1572get => _dictionary.GetAt(index).Key;
1579get => _dictionary.GetAt(index).Key;
1584TKey IReadOnlyList<TKey>.this[int index] => _dictionary.GetAt(index).Key;
1644public TKey Current => _enumerator.Current.Key;
System.Collections.Concurrent (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
22Key = keyValue.Key;
System.Collections.Immutable (59)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
22Key = keyValue.Key;
System\Collections\Immutable\ImmutableDictionary_2.cs (12)
176yield return item.Key;
764array.SetValue(new DictionaryEntry(item.Key, item.Value), arrayIndex++);
890int hashCode = origin.KeyComparer.GetHashCode(keyValuePair.Key);
895return bucket.TryGetValue(keyValuePair.Key, origin.Comparers, out value!)
965Requires.NotNullAllowStructs(pair.Key, nameof(pair.Key));
966int hashCode = origin.KeyComparer.GetHashCode(pair.Key);
969ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Add(pair.Key, pair.Value, origin.KeyOnlyComparer, origin.ValueComparer, collisionBehavior, out result);
989Requires.NotNullAllowStructs(pair.Key, nameof(pair.Key));
990int hashCode = origin.KeyComparer.GetHashCode(pair.Key);
993ImmutableDictionary<TKey, TValue>.HashBucket newBucket = bucket.Add(pair.Key, pair.Value, origin.KeyOnlyComparer, origin.ValueComparer, collisionBehavior, out result);
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (6)
795? result.SetItem(item.Key, item.Value, _keyComparer, _valueComparer, out replacedExistingValue, out mutated)
796: result.Add(item.Key, item.Value, _keyComparer, _valueComparer, out mutated);
856dictionary[item.Key] = item.Value;
861if (dictionary.TryGetValue(item.Key, out value!))
865throw new ArgumentException(SR.Format(SR.DuplicateKey, item.Key));
870dictionary.Add(item.Key, item.Value);
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (6)
136get { return Linq.Enumerable.Select(this, p => p.Key); }
222array.SetValue(new DictionaryEntry(item.Key, item.Value), arrayIndex++);
415Requires.NotNullAllowStructs(pair.Key, nameof(pair.Key));
419ImmutableSortedDictionary<TKey, TValue>.Node matchingNode = this.Search(pair.Key, keyComparer);
605return new Node(item.Key, item.Value, left, right, true);
System.Collections.NonGeneric (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
22Key = keyValue.Key;
System.CommandLine (2)
System.ComponentModel.Annotations (9)
System.ComponentModel.Composition (9)
System.ComponentModel.TypeConverter (7)
System.Composition.Hosting (1)
System.Composition.Runtime (3)
System.Composition.TypedParts (7)
System.Configuration.ConfigurationManager (1)
System.Console (4)
System.Data.Common (7)
System.Data.Odbc (4)
System.Data.OleDb (3)
System.Diagnostics.DiagnosticSource (55)
System.Diagnostics.EventLog (1)
System.Diagnostics.PerformanceCounter (4)
System.Diagnostics.Process (7)
System.DirectoryServices.AccountManagement (4)
System.Formats.Nrbf (1)
System.Formats.Tar (9)
System.IO.Packaging (5)
System.Linq.AsyncEnumerable (1)
System.Linq.Expressions (17)
System.Linq.Parallel (3)
System.Net.Http (13)
System.Net.Http.WinHttpHandler (1)
System.Net.Mail (1)
System.Net.NameResolution (7)
System\Net\Dns.cs (5)
368KeyValuePair<IPAddress, AddressFamily> t => t.Key,
766KeyValuePair<string, AddressFamily> t => GetHostAddressesCore(t.Key, t.Value, activity),
768KeyValuePair<IPAddress, AddressFamily> t => GetHostAddressesCore(t.Key, t.Value, activity),
777KeyValuePair<string, AddressFamily> t => GetHostEntryCore(t.Key, t.Value, activity),
779KeyValuePair<IPAddress, AddressFamily> t => GetHostEntryCore(t.Key, t.Value, activity),
System.Net.NetworkInformation (2)
System.Net.Requests (2)
System.Net.Security (5)
System.Net.WebSockets.Client (2)
System.Private.CoreLib (82)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (9)
338if (pair.Key is null)
343if (!TryAddInternal(_tables, pair.Key, null, pair.Value, updateIfExists: false, acquireLock: false, out _))
419/// The <see cref="KeyValuePair{TKey, TValue}.Key"/> property of <paramref name="item"/> is a null reference.
423if (item.Key is null)
428return TryRemoveInternal(item.Key, out _, matchValue: true, item.Value);
1602void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => ((IDictionary<TKey, TValue>)this).Add(keyValuePair.Key, keyValuePair.Value);
1614TryGetValue(keyValuePair.Key, out TValue? value) &&
2296public DictionaryEntry Entry => new DictionaryEntry(_enumerator.Current.Key, _enumerator.Current.Value);
2298public object Key => _enumerator.Current.Key;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\DebugViewDictionaryItem.cs (1)
22Key = keyValue.Key;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (37)
155return ReferenceEquals(key, _item0.Key) ?
163return ReferenceEquals(key, _item0.Key) ?
171if (ReferenceEquals(key, _item0.Key))
206ReferenceEquals(key, _item0.Key) ? new TwoElementAsyncLocalValueMap(newItem, _item1) :
207ReferenceEquals(key, _item1.Key) ? new TwoElementAsyncLocalValueMap(_item0, newItem) :
215ReferenceEquals(key, _item0.Key) ? new OneElementAsyncLocalValueMap(_item1) :
216ReferenceEquals(key, _item1.Key) ? new OneElementAsyncLocalValueMap(_item0) :
223if (ReferenceEquals(key, _item0.Key))
228else if (ReferenceEquals(key, _item1.Key))
266ReferenceEquals(key, _item0.Key) ? new ThreeElementAsyncLocalValueMap(newItem, _item1, _item2) :
267ReferenceEquals(key, _item1.Key) ? new ThreeElementAsyncLocalValueMap(_item0, newItem, _item2) :
268ReferenceEquals(key, _item2.Key) ? new ThreeElementAsyncLocalValueMap(_item0, _item1, newItem) :
276ReferenceEquals(key, _item0.Key) ? new TwoElementAsyncLocalValueMap(_item1, _item2) :
277ReferenceEquals(key, _item1.Key) ? new TwoElementAsyncLocalValueMap(_item0, _item2) :
278ReferenceEquals(key, _item2.Key) ? new TwoElementAsyncLocalValueMap(_item0, _item1) :
285if (ReferenceEquals(key, _item0.Key))
290else if (ReferenceEquals(key, _item1.Key))
295else if (ReferenceEquals(key, _item2.Key))
335ReferenceEquals(key, _item0.Key) ? new FourElementAsyncLocalValueMap(newItem, _item1, _item2, _item3) :
336ReferenceEquals(key, _item1.Key) ? new FourElementAsyncLocalValueMap(_item0, newItem, _item2, _item3) :
337ReferenceEquals(key, _item2.Key) ? new FourElementAsyncLocalValueMap(_item0, _item1, newItem, _item3) :
338ReferenceEquals(key, _item3.Key) ? new FourElementAsyncLocalValueMap(_item0, _item1, _item2, newItem) :
346ReferenceEquals(key, _item0.Key) ? new ThreeElementAsyncLocalValueMap(_item1, _item2, _item3) :
347ReferenceEquals(key, _item1.Key) ? new ThreeElementAsyncLocalValueMap(_item0, _item2, _item3) :
348ReferenceEquals(key, _item2.Key) ? new ThreeElementAsyncLocalValueMap(_item0, _item1, _item3) :
349ReferenceEquals(key, _item3.Key) ? new ThreeElementAsyncLocalValueMap(_item0, _item1, _item2) :
356if (ReferenceEquals(key, _item0.Key))
361else if (ReferenceEquals(key, _item1.Key))
366else if (ReferenceEquals(key, _item2.Key))
371else if (ReferenceEquals(key, _item3.Key))
401if (ReferenceEquals(key, _keyValues[i].Key))
458many[pair.Key] = pair.Value;
468if (ReferenceEquals(key, pair.Key))
496map[pair.Key] = pair.Value;
517if (!ReferenceEquals(key, pair.Key))
530if (!ReferenceEquals(key, pair.Key))
532map[pair.Key] = pair.Value;
System.Private.CoreLib.Generators (1)
System.Private.DataContractSerialization (6)
System.Private.Reflection.Execution (2)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.MappingTables.cs (2)
508if (TryGetMethodForOriginalLdFtnResult_InvokeMap_Inner(perModuleLookup.Key, forStartAddress: false, canonOriginalLdFtnResult, instantiationArgument, parserOffset, ref declaringTypeHandle, out methodHandle, out genericMethodTypeArgumentHandles))
532if (TryGetMethodForOriginalLdFtnResult_InvokeMap_Inner(perModuleLookup.Key, forStartAddress: true, methodStartAddress, IntPtr.Zero, parserOffset, ref declaringTypeHandle, out methodHandle, out _))
System.Private.TypeLoader (1)
System.Private.Xml (24)
System.Reflection.Emit (6)
System.Reflection.Metadata (13)
System.Resources.Extensions (4)
System.Resources.Writer (3)
System.Runtime.Serialization.Schema (5)
System.Security.Claims (1)
System.Security.Cryptography.Cose (4)
System.ServiceModel.Http (1)
System.ServiceModel.NetFramingBase (1)
System.ServiceModel.Primitives (12)
System.ServiceModel.Primitives.Tests (1)
System.Speech (13)
System.Text.Json (27)
System.Text.Json.SourceGeneration (6)
System.Text.RegularExpressions (16)
System.Text.RegularExpressions.Generator (7)
System.Threading.Channels (22)
System.Threading.RateLimiting (1)
System.Threading.Tasks.Dataflow (58)
Blocks\BatchBlock.cs (18)
790if (sourceAndMessage.Key.ReserveMessage(sourceAndMessage.Value, _owningBatch))
793var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
808if (sourceAndMessage.Key.ReserveMessage(sourceAndMessage.Value, _owningBatch))
811var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
908var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
924var reservedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, reservedMessage);
996T? consumedValue = sourceAndMessage.Key.ConsumeMessage(sourceAndMessage.Value.Key, _owningBatch, out consumed);
1006var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!);
1007var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, consumedMessage);
1048T? consumedValue = sourceAndMessage.Key.ConsumeMessage(sourceAndMessage.Value.Key, _owningBatch, out consumed);
1051var consumedMessage = new KeyValuePair<DataflowMessageHeader, T>(sourceAndMessage.Value.Key, consumedValue!);
1052var consumedSourceAndMessage = new KeyValuePair<ISourceBlock<T>, KeyValuePair<DataflowMessageHeader, T>>(sourceAndMessage.Key, consumedMessage);
1068if (sourceAndMessage.Key != null) _messages.Enqueue(sourceAndMessage.Value.Value);
1093ISourceBlock<T> source = sourceAndMessage.Key;
1095if (source != null && message.Key.IsValid)
1097try { source.ReleaseReservation(message.Key, _owningBatch); }
Blocks\JoinBlock.cs (12)
524Debug.Assert(_nonGreedy!.ConsumedMessage.Key, "A message must have been consumed by this point.");
554return _nonGreedy!.ConsumedMessage.Key;
620if (next.Key.ReserveMessage(next.Value, this))
642Debug.Assert(_nonGreedy!.ReservedMessage.Key != null, "This target must have a reserved message");
645T? consumedValue = _nonGreedy.ReservedMessage.Key.ConsumeMessage(_nonGreedy.ReservedMessage.Value, this, out consumed);
668Debug.Assert(!_nonGreedy.ConsumedMessage.Key, "There must be no other consumed message");
706T? consumedValue = next.Key.ConsumeMessage(next.Value, this, out consumed);
731_nonGreedy!.ConsumedMessage.Key ? 1 : 0;
756if (_nonGreedy != null && _nonGreedy.ReservedMessage.Key != null)
759try { _nonGreedy.ReservedMessage.Key.ReleaseReservation(_nonGreedy.ReservedMessage.Value, this); }
779Debug.Assert(_nonGreedy == null || _nonGreedy.ReservedMessage.Key == null,
938private int InputCountForDebugger { get { return _messages != null ? _messages.Count : _nonGreedy!.ConsumedMessage.Key ? 1 : 0; } }
System.Threading.Tasks.Parallel (1)
System.Windows.Forms (12)
System.Windows.Forms.Design (8)
System.Xaml (37)
TypeScriptApiCompat (2)
UnitTests.Common (1)
vbc (4)
VBCSCompiler (4)
vstest.console (8)
vstest.console.arm64 (8)
WindowsFormsIntegration (2)