132 implementations of
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (1)
56public object this[string name]
InMemory.FunctionalTests (2)
Http2\Http2ConnectionTests.cs (1)
293public StringValues this[string key] { get => _innerHeaders[key]; set => _innerHeaders[key] = value; }
Http3\Http3ConnectionTests.cs (1)
828public StringValues this[string key] { get => _innerHeaders[key]; set => _innerHeaders[key] = value; }
Microsoft.AspNetCore.Components (1)
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
263public object? this[string key]
Microsoft.AspNetCore.Connections.Abstractions (1)
ConnectionItems.cs (1)
41object? IDictionary<object, object?>.this[object key]
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.AspNetCore.Hosting.Tests (1)
WebHostTests.cs (1)
1376public StringValues this[string key]
Microsoft.AspNetCore.Http (4)
HeaderDictionary.cs (1)
100StringValues IDictionary<string, StringValues>.this[string key]
Internal\ItemsDictionary.cs (1)
28object? IDictionary<object, object?>.this[object key]
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
87public TValue this[TKey key]
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
98public TValue this[TKey key]
Microsoft.AspNetCore.Http.Abstractions (1)
Routing\RouteValueDictionary.cs (1)
263public object? this[string key]
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\Validation\ValidationStateDictionary.cs (1)
46ValidationStateEntry IDictionary<object, ValidationStateEntry>.this[object key]
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
87public TValue this[TKey key]
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
DictionaryModelBinderIntegrationTest.cs (2)
1520string IDictionary<string, string>.this[string key] 1625TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
AttributeDictionary.cs (1)
22public string? this[string key]
TempDataDictionary.cs (1)
85public object? this[string key]
ViewDataDictionary.cs (1)
306public object? this[string index]
Microsoft.AspNetCore.Owin (3)
DictionaryStringArrayWrapper.cs (1)
26string[] IDictionary<string, string[]>.this[string key]
DictionaryStringValuesWrapper.cs (1)
37StringValues IDictionary<string, StringValues>.this[string key]
OwinEnvironment.cs (1)
191object IDictionary<string, object>.this[string key]
Microsoft.AspNetCore.Razor.Runtime (1)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
87public TValue this[TKey key]
Microsoft.AspNetCore.Server.HttpSys (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
90StringValues IDictionary<string, StringValues>.this[string key]
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
44StringValues IDictionary<string, StringValues>.this[string key]
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
90StringValues IDictionary<string, StringValues>.this[string key]
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
44StringValues IDictionary<string, StringValues>.this[string key]
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpHeaders.cs (1)
78StringValues IDictionary<string, StringValues>.this[string key]
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Http1\Http1ConnectionTests.cs (1)
1198public StringValues this[string key] { get => _innerHeaders[key]; set => _innerHeaders[key] = value; }
Microsoft.AspNetCore.Shared.Tests (5)
ClosedGenericMatcherTest.cs (1)
238object IDictionary<string, object>.this[string key]
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
87public TValue this[TKey key]
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
98public TValue this[TKey key]
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
90StringValues IDictionary<string, StringValues>.this[string key]
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
44StringValues IDictionary<string, StringValues>.this[string key]
Microsoft.Build (9)
Collections\ArrayDictionary.cs (1)
38public TValue this[TKey key]
Collections\CopyOnWritePropertyDictionary.cs (1)
94public T this[string name]
Collections\PropertyDictionary.cs (1)
170T IDictionary<string, T>.this[string name]
Collections\ReadOnlyConvertingDictionary.cs (1)
78public N this[K key]
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (1)
296T IDictionary<string, T>.this[string name]
CopyOnWriteDictionary.cs (1)
178public V this[string key]
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (1)
33public T this[string key]
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (1)
46public ProjectPropertyInstance this[string key]
ReadOnlyEmptyDictionary.cs (1)
166public V this[K key]
Microsoft.Build.Framework (3)
ImmutableSegmentedDictionary`2.cs (1)
120TValue IDictionary<TKey, TValue>.this[TKey key]
ImmutableSegmentedDictionary`2+Builder.cs (1)
84public TValue this[TKey key]
SegmentedDictionary`2.cs (1)
179public TValue this[TKey key]
Microsoft.Build.Tasks.Core (2)
CopyOnWriteDictionary.cs (1)
178public V this[string key]
ReadOnlyEmptyDictionary.cs (1)
166public V this[K key]
Microsoft.Build.Utilities.Core (2)
CopyOnWriteDictionary.cs (1)
178public V this[string key]
ReadOnlyEmptyDictionary.cs (1)
166public V this[K key]
Microsoft.CodeAnalysis (5)
InternalUtilities\SpecializedCollections.Empty.Dictionary.cs (1)
69public TValue this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (1)
120TValue IDictionary<TKey, TValue>.this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (1)
61public TValue this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
82public TValue this[TKey key]
src\Dependencies\Collections\SegmentedDictionary`2.cs (1)
242public TValue this[TKey key]
Microsoft.CodeAnalysis.CodeStyle (5)
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Dictionary.cs (1)
69public TValue this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (1)
120TValue IDictionary<TKey, TValue>.this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (1)
61public TValue this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
82public TValue this[TKey key]
src\Dependencies\Collections\SegmentedDictionary`2.cs (1)
242public TValue this[TKey key]
Microsoft.CodeAnalysis.Collections.Package (4)
ImmutableSegmentedDictionary`2.cs (1)
120TValue IDictionary<TKey, TValue>.this[TKey key]
ImmutableSegmentedDictionary`2+Builder.cs (1)
61public TValue this[TKey key]
ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
82public TValue this[TKey key]
SegmentedDictionary`2.cs (1)
242public TValue this[TKey key]
Microsoft.CodeAnalysis.Workspaces (5)
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Dictionary.cs (1)
69public TValue this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (1)
120TValue IDictionary<TKey, TValue>.this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (1)
61public TValue this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
82public TValue this[TKey key]
src\Dependencies\Collections\SegmentedDictionary`2.cs (1)
242public TValue this[TKey key]
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
src\Compilers\Core\Portable\InternalUtilities\SpecializedCollections.Empty.Dictionary.cs (1)
69public TValue this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (1)
120TValue IDictionary<TKey, TValue>.this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+Builder.cs (1)
61public TValue this[TKey key]
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
82public TValue this[TKey key]
src\Dependencies\Collections\SegmentedDictionary`2.cs (1)
242public TValue this[TKey key]
Microsoft.Extensions.AI (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Extensions.AI.Abstractions (2)
AdditionalPropertiesDictionary{TValue}.cs (1)
64public TValue this[string key]
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Extensions.AI.AzureAIInference (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Extensions.AI.Ollama (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Extensions.Configuration (1)
ConfigurationManager.cs (1)
273public object this[string key]
Microsoft.Extensions.Http.Diagnostics (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Gen.Logging.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Gen.Metrics.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Gen.MetricsReports.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
Microsoft.Interop.SourceGeneration (1)
ValueEqualityImmutableDictionary.cs (1)
46public U this[T key] { get => ((IDictionary<T, U>)Map)[key]; set => ((IDictionary<T, U>)Map)[key] = value; }
Microsoft.Maui.Controls (3)
OrderedDictionary.cs (1)
188 public TValue this[TKey key]
ResourceDictionary.cs (1)
212 public object this[string index]
Shell\ShellNavigationQueryParameters.cs (1)
41 public object this[string key]
Microsoft.ML.Core (1)
Utilities\Tree.cs (1)
50public Tree<TKey, TValue> this[TKey key]
Microsoft.ML.SearchSpace (3)
Option\NestOption.cs (1)
21public OptionBase this[string key] { get => ((IDictionary<string, OptionBase>)_options)[key]; set => ((IDictionary<string, OptionBase>)_options)[key] = value; }
Parameter.cs (1)
270public Parameter this[string key]
SearchSpace.cs (1)
106public OptionBase this[string key] { get => ((IDictionary<string, OptionBase>)_options)[key]; set => ((IDictionary<string, OptionBase>)_options)[key] = value; }
Microsoft.ML.TorchSharp (1)
Utils\DefaultDictionary.cs (1)
30public TValue this[TKey key]
MSBuild (2)
CopyOnWriteDictionary.cs (1)
178public V this[string key]
ReadOnlyEmptyDictionary.cs (1)
166public V this[K key]
MSBuildTaskHost (3)
CopyOnWriteDictionary.cs (1)
178public V this[string key]
Immutable\ImmutableDictionary.cs (1)
251V IDictionary<K, V>.this[K key]
ReadOnlyEmptyDictionary.cs (1)
166public V this[K key]
PresentationCore (4)
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
681ushort IDictionary<int, ushort>.this[int i]
System\Windows\Media\CharacterMetricsDictionary.cs (1)
242public CharacterMetrics this[int key]
System\Windows\Media\CultureSpecificStringDictionary.cs (1)
211public string this[XmlLanguage key]
System\Windows\Media\GlyphTypeface.cs (1)
1775public double this[ushort key]
PresentationFramework (2)
MS\Internal\Annotations\ObservableDictionary.cs (1)
234public string this[string key]
MS\Internal\WeakDictionary.cs (1)
246public TValue this[TKey key]
Shared (1)
EmptyCollections\EmptyReadonlyDictionary.cs (1)
33TValue IDictionary<TKey, TValue>.this[TKey key]
System.Collections (3)
System\Collections\Generic\OrderedDictionary.cs (1)
365public TValue this[TKey key]
System\Collections\Generic\SortedDictionary.cs (1)
106public TValue this[TKey key]
System\Collections\Generic\SortedList.cs (1)
570public TValue this[TKey key]
System.Collections.Immutable (5)
System\Collections\Frozen\FrozenDictionary.cs (1)
532TValue IDictionary<TKey, TValue>.this[TKey key]
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (1)
407public TValue this[TKey key]
System\Collections\Immutable\ImmutableDictionary_2.cs (1)
261TValue IDictionary<TKey, TValue>.this[TKey key]
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (1)
176public TValue this[TKey key]
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (1)
217TValue IDictionary<TKey, TValue>.this[TKey key]
System.Composition.Hosting (1)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (1)
63public object this[string key]
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\ActivityTagsCollection.cs (1)
61public object? this[string key]
System.Diagnostics.Process (1)
System\Collections\Specialized\DictionaryWrapper.cs (1)
17public string? this[string key]
System.Linq.Expressions (1)
System\Dynamic\ExpandoObject.cs (1)
621object? IDictionary<string, object?>.this[string key]
System.Net.Http (1)
System\Net\Http\HttpRequestOptions.cs (1)
22object? IDictionary<string, object?>.this[string key]
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (1)
228public TValue this[TKey key]
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (1)
65TValue IDictionary<TKey, TValue>.this[TKey key]
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (1)
28public object? this[string key]
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
71public CoseHeaderValue this[CoseHeaderLabel key]
System.ServiceModel.Primitives (1)
netstandard.cs (1)
1729public object this[string name] { get { return default; } set { } }
System.Speech (1)
artifacts\obj\System.Speech\Debug\net10.0\System.Speech.notsupported.cs (1)
302public System.Speech.Recognition.SemanticValue this[string key] { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } set { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } }
System.Xaml (2)
System\Xaml\NameScope.cs (1)
167public object this[string key]
System\Xaml\NameScopeDictionary.cs (1)
289object IDictionary<string, object>.this[string key]
System.Xaml.Tests (2)
System\Xaml\XamlTypeTests.cs (2)
3138int IDictionary<string, int>.this[string key] { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } 3140string IDictionary<int, string>.this[int key] { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
1081 writes to
ApplicationModelWebSite (6)
Conventions\ActionDescriptionAttribute.cs (1)
19model.Properties["description"] = _value;
Conventions\ApplicationDescription.cs (1)
19application.Properties["description"] = _description;
Conventions\ControllerDescriptionAttribute.cs (1)
19model.Properties["description"] = _value;
Conventions\ControllerLicenseConvention.cs (1)
12controller.Properties["license"] = @"Licensed to the .NET Foundation under one or more agreements.
Conventions\FromHeaderConvention.cs (1)
17param.Action.Properties["source"] = "From Header";
Conventions\MultipleAreasControllerConvention.cs (1)
21controllerCopy.RouteValues["area"] = areaNames[i];
Aspire.Azure.AI.OpenAI (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Azure.Data.Tables (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Azure.Messaging.EventHubs (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Azure.Messaging.ServiceBus (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Azure.Messaging.WebPubSub (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Azure.Search.Documents (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Azure.Security.KeyVault (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Azure.Storage.Blobs (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Azure.Storage.Queues (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Confluent.Kafka (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Elastic.Clients.Elasticsearch (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.EndToEnd.Tests (19)
IntegrationServicesFixture.cs (3)
44BuildEnvironment.EnvVars["TestsRunningOutsideOfRepo"] = "true"; 45BuildEnvironment.EnvVars["RestoreAdditionalProjectSources"] = BuildEnvironment.BuiltNuGetsPath; 46BuildEnvironment.EnvVars["SkipAspireWorkloadManifest"] = "true";
tests\Shared\WorkloadTesting\AspireProject.cs (1)
173AppHostProcess.StartInfo.Environment[item.Key] = item.Value;
tests\Shared\WorkloadTesting\BuildEnvironment.cs (12)
147EnvVars["DOTNET_ROOT"] = sdkForWorkloadPath; 148EnvVars["DOTNET_INSTALL_DIR"] = sdkForWorkloadPath; 149EnvVars["DOTNET_MULTILEVEL_LOOKUP"] = "0"; 150EnvVars["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1"; 151EnvVars["PATH"] = $"{sdkForWorkloadPath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}"; 153EnvVars["NUGET_PACKAGES"] = NuGetPackagesPath!; 154EnvVars["BUILT_NUGETS_PATH"] = BuiltNuGetsPath; 155EnvVars["TreatWarningsAsErrors"] = "true"; 158EnvVars["DEBUG_SESSION_PORT"] = ""; 161EnvVars["_MSBUILDTLENABLED"] = "0"; 163EnvVars["VsTestUseMSBuildOutput"] = "false"; 164EnvVars["SkipAspireWorkloadManifest"] = "true";
tests\Shared\WorkloadTesting\ToolCommand.cs (3)
220psi.Environment["DOTNET_MULTILEVEL_LOOKUP"] = "0"; 221psi.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1"; 250psi.Environment[item.Key] = item.Value;
Aspire.Hosting (5)
Dcp\DcpHost.cs (1)
210dcpProcessSpec.EnvironmentVariables[key] = val;
Dcp\Model\ExecutableReplicaSet.cs (1)
31Annotations[annotationName] = value;
Dcp\Model\ModelCommon.cs (2)
45Metadata.Annotations[annotationName] = value; 116annotations[annotationName] = newAnnotationVal;
Dcp\Process\ProcessUtil.cs (1)
44process.StartInfo.Environment[key] = value;
Aspire.Hosting.Azure (1)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
44process.StartInfo.Environment[key] = value;
Aspire.Hosting.Azure.CosmosDB (4)
AzureCosmosDBResource.cs (4)
74target[connectionName] = ConnectionStringExpression; 76target[$"Aspire__Microsoft__Azure__Cosmos__{connectionName}__ConnectionString"] = ConnectionStringExpression; 81target[$"{connectionName}__accountEndpoint"] = ConnectionStringExpression; 83target[$"Aspire__Microsoft__Azure__Cosmos__{connectionName}__AccountEndpoint"] = ConnectionStringExpression;
Aspire.Hosting.Azure.EventHubs (4)
AzureEventHubsResource.cs (4)
58target[connectionName] = ConnectionStringExpression; 62target[$"{ConnectionKeyPrefix}__{clientName}__{connectionName}__ConnectionString"] = ConnectionStringExpression; 68target[$"{connectionName}__fullyQualifiedNamespace"] = EventHubsEndpoint; 72target[$"{ConnectionKeyPrefix}__{clientName}__{connectionName}__FullyQualifiedNamespace"] = EventHubsEndpoint;
Aspire.Hosting.Azure.ServiceBus (4)
AzureServiceBusResource.cs (4)
45target[$"{connectionName}"] = ConnectionStringExpression; 47target[$"Aspire__Azure__Messaging__ServiceBus__{connectionName}__ConnectionString"] = ConnectionStringExpression; 52target[$"{connectionName}__fullyQualifiedNamespace"] = ServiceBusEndpoint; 54target[$"Aspire__Azure__Messaging__ServiceBus__{connectionName}__FullyQualifiedNamespace"] = ServiceBusEndpoint;
Aspire.Hosting.Azure.Storage (16)
AzureBlobStorageResource.cs (5)
34target[connectionName] = connectionString; 36target[$"{AzureStorageResource.BlobsConnectionKeyPrefix}__{connectionName}__ConnectionString"] = connectionString; 43target[$"{connectionName}__blobServiceUri"] = Parent.BlobEndpoint; 44target[$"{connectionName}__queueServiceUri"] = Parent.QueueEndpoint; 48target[$"{AzureStorageResource.BlobsConnectionKeyPrefix}__{connectionName}__ServiceUri"] = Parent.BlobEndpoint;
AzureQueueStorageResource.cs (4)
34target[connectionName] = connectionString; 35target[$"{AzureStorageResource.QueuesConnectionKeyPrefix}__{connectionName}__ConnectionString"] = connectionString; 40target[$"{connectionName}__queueServiceUri"] = Parent.QueueEndpoint; 42target[$"{AzureStorageResource.QueuesConnectionKeyPrefix}__{connectionName}__ServiceUri"] = Parent.QueueEndpoint;
AzureStorageResource.cs (7)
71target[connectionName] = connectionString; 73target[$"{BlobsConnectionKeyPrefix}__{connectionName}__ConnectionString"] = connectionString; 74target[$"{QueuesConnectionKeyPrefix}__{connectionName}__ConnectionString"] = connectionString; 79target[$"{connectionName}__blobServiceUri"] = BlobEndpoint; 80target[$"{connectionName}__queueServiceUri"] = QueueEndpoint; 82target[$"{BlobsConnectionKeyPrefix}__{connectionName}__ServiceUri"] = BlobEndpoint; 83target[$"{QueuesConnectionKeyPrefix}__{connectionName}__ServiceUri"] = QueueEndpoint;
Aspire.Microsoft.Data.SqlClient (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Milvus.Client (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.MongoDB.Driver (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.MySqlConnector (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.NATS.Net (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Npgsql (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Oracle.EntityFrameworkCore (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Qdrant.Client (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.RabbitMQ.Client (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Seq (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.StackExchange.Redis (1)
src\Components\Common\HealthChecksExtensions.cs (1)
28builder.Properties[healthCheckKey] = true;
Aspire.Workload.Tests (17)
BuildAndRunTemplateTests.cs (1)
150testSpecificBuildEnvironment.EnvVars["ASPIRE_ALLOW_UNSECURED_TRANSPORT"] = "true";
tests\Shared\WorkloadTesting\AspireProject.cs (1)
173AppHostProcess.StartInfo.Environment[item.Key] = item.Value;
tests\Shared\WorkloadTesting\BuildEnvironment.cs (12)
147EnvVars["DOTNET_ROOT"] = sdkForWorkloadPath; 148EnvVars["DOTNET_INSTALL_DIR"] = sdkForWorkloadPath; 149EnvVars["DOTNET_MULTILEVEL_LOOKUP"] = "0"; 150EnvVars["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1"; 151EnvVars["PATH"] = $"{sdkForWorkloadPath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}"; 153EnvVars["NUGET_PACKAGES"] = NuGetPackagesPath!; 154EnvVars["BUILT_NUGETS_PATH"] = BuiltNuGetsPath; 155EnvVars["TreatWarningsAsErrors"] = "true"; 158EnvVars["DEBUG_SESSION_PORT"] = ""; 161EnvVars["_MSBUILDTLENABLED"] = "0"; 163EnvVars["VsTestUseMSBuildOutput"] = "false"; 164EnvVars["SkipAspireWorkloadManifest"] = "true";
tests\Shared\WorkloadTesting\ToolCommand.cs (3)
220psi.Environment["DOTNET_MULTILEVEL_LOOKUP"] = "0"; 221psi.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1"; 250psi.Environment[item.Key] = item.Value;
BasicWebSite (14)
Controllers\TempDataController.cs (10)
20TempData["key"] = value; 26TempData["key"] = value; 55TempData["key1"] = value; 56TempData["key2"] = intValue; 57TempData["key3"] = listValues; 58TempData["key4"] = datetimeValue; 59TempData["key5"] = guidValue; 65TempData["value1"] = "steve"; 95TempData["LargeValue"] = new string(character, size); 109TempData[nameof(UnhandledExceptionAndSettingTempData)] = "James";
Controllers\TestingController.cs (1)
137TempData["Value"] = value + 1;
Conventions\ApplicationDescription.cs (1)
19application.Properties["description"] = _description;
Filters\TraceResourceFilter.cs (1)
16context.HttpContext.Items[nameof(TraceResourceFilter)] = $"This value was set by {nameof(TraceResourceFilter)}";
StoreIntoTempDataActionResult.cs (1)
17tempDataDictionary["Name"] = "Michael";
dotnet-svcutil-lib (37)
AppInsightsTelemetryClient.cs (3)
120context.GlobalProperties["SvcUtil.Version"] = Tool.PackageVersion; 121context.GlobalProperties["Dotnet.Version"] = string.IsNullOrEmpty(sdkVersion) ? "unknown" : sdkVersion; 122context.GlobalProperties["TestMode"] = testMode.ToString();
FrameworkFork\Microsoft.CodeDom\Configuration\CodeDomCompilationConfiguration.cs (1)
39compilerInfo._providerOptions[RedistVersionInfo.NameTag] = RedistVersionInfo.DefaultVersion;
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenRequirement.cs (1)
125this.Properties[KeySizeProperty] = value;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AsymmetricSecurityBindingElement.cs (2)
71binding.OperationSupportingTokenParameters[requestAction] = requirements; 85binding.OptionalOperationSupportingTokenParameters[requestAction] = optionalRequirements;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (2)
30properties[MessageHeadersPropertyKey] = message.Headers; 62properties[key] = value;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportSecurityHelpers.cs (7)
152sspiRequirement.Properties[ServiceModelSecurityTokenRequirement.HttpAuthenticationSchemeProperty] = authenticationScheme; 155sspiRequirement.Properties[ServiceModelSecurityTokenRequirement.ChannelParametersCollectionProperty] = channelParameters; 196digestTokenRequirement.Properties[ServiceModelSecurityTokenRequirement.HttpAuthenticationSchemeProperty] = authenticationScheme; 199digestTokenRequirement.Properties[ServiceModelSecurityTokenRequirement.ChannelParametersCollectionProperty] = channelParameters; 220certificateTokenRequirement.Properties[ServiceModelSecurityTokenRequirement.ChannelParametersCollectionProperty] = channelParameters; 268usernameRequirement.Properties[ServiceModelSecurityTokenRequirement.HttpAuthenticationSchemeProperty] = authenticationScheme; 271usernameRequirement.Properties[ServiceModelSecurityTokenRequirement.ChannelParametersCollectionProperty] = channelParameters;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (4)
862requirement.Properties[ServiceModelSecurityTokenRequirement.ExtendedProtectionPolicy] = _extendedProtectionPolicy; 871requirement.Properties[ServiceModelSecurityTokenRequirement.MessageDirectionProperty] = MessageDirection.Input; 872requirement.Properties[ServiceModelSecurityTokenRequirement.SupportingTokenAttachmentModeProperty] = attachmentMode; 873requirement.Properties[ServiceModelSecurityTokenRequirement.ExtendedProtectionPolicy] = _extendedProtectionPolicy;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\InitiatorServiceModelSecurityTokenRequirement.cs (4)
27this.Properties[TargetAddressProperty] = value; 39this.Properties[ViaProperty] = value; 51this.Properties[IsOutOfBandTokenProperty] = value; 63this.Properties[PreferSslCertificateAuthenticatorProperty] = value;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\RecipientServiceModelSecurityTokenRequirement.cs (1)
23this.Properties[ListenUriProperty] = value;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\ServiceModelSecurityTokenRequirement.cs (11)
52this.Properties[SupportSecurityContextCancellationProperty] = defaultSupportSecurityContextCancellation; 102this.Properties[SecurityAlgorithmSuiteProperty] = value; 114this.Properties[SecurityBindingElementProperty] = value; 126this.Properties[IssuerAddressProperty] = value; 138this.Properties[IssuerBindingProperty] = value; 150this.Properties[SecureConversationSecurityBindingElementProperty] = value; 162this.Properties[MessageSecurityVersionProperty] = value; 175this.Properties[DefaultMessageSecurityVersionProperty] = (object)value; 187this.Properties[TransportSchemeProperty] = value; 199this.Properties[SupportSecurityContextCancellationProperty] = value; 211this.Properties[duplexClientLocalAddressProperty] = value;
ImportModule.cs (1)
326dcOptions.Namespaces[namespaceMapping.Key] = namespaceMapping.Value;
dotnet-user-secrets (1)
Internal\SecretsStore.cs (1)
59public void Set(string key, string value) => _secrets[key] = value;
GenericHostWebSite (1)
Controllers\TestingController.cs (1)
123TempData["Value"] = value + 1;
HttpAbstractions.SampleApp (2)
Program.cs (2)
38context.Items["Item1"] = "Value1"; 39context.Items["Item2"] = "Value2";
IIS.FunctionalTests (22)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (3)
60deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_PORT"] = port.ToString(CultureInfo.InvariantCulture); 75deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_PORT"] = string.Empty; 91deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_PORT"] = port;
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (4)
48deploymentParameters.HandlerSettings["handlerVersion"] = _handlerVersion20; 68deploymentParameters.EnvironmentVariables["ASPNETCORE_MODULE_OUTOFPROCESS_HANDLER"] = temporaryFile; 95deploymentParameters.HandlerSettings["handlerVersion"] = version; 114deploymentParameters.HandlerSettings["handlerVersion"] = version;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (1)
27parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (1)
142deploymentParameters.HandlerSettings["debugLevel"] = "";
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (8)
113deploymentParameters.HandlerSettings["debugLevel"] = "file"; 114deploymentParameters.HandlerSettings["debugFile"] = "subdirectory\\debug.txt"; 128deploymentParameters.HandlerSettings["debugLevel"] = "file"; 143deploymentParameters.EnvironmentVariables["ASPNETCORE_MODULE_DEBUG"] = "file"; 145deploymentParameters.HandlerSettings["debugFile"] = ""; 164deploymentParameters.EnvironmentVariables["ASPNETCORE_MODULE_DEBUG_FILE"] = firstTempFile; 190deploymentParameters.HandlerSettings["debugLevel"] = "file,eventlog"; 257deploymentParameters.HandlerSettings["enableOutOfProcessConsoleRedirection"] = "false";
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (1)
143deploymentParameters.HandlerSettings["debugLevel"] = "";
src\Servers\IIS\IIS\test\IIS.Shared.FunctionalTests\ApplicationInitializationTests.cs (1)
55baseDeploymentParameters.HandlerSettings["shutdownDelay"] = delayShutdown ? "1000" : "0";
src\Servers\IIS\IIS\test\IIS.Shared.FunctionalTests\StdOutRedirectionTests.cs (3)
93deploymentParameters.EnvironmentVariables["COREHOST_TRACE"] = "1"; 120deploymentParameters.EnvironmentVariables["COREHOST_TRACE"] = "1"; 145deploymentParameters.EnvironmentVariables["COREHOST_TRACE"] = "1";
IIS.LongTests (44)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (1)
27parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
485deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true"; 505deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true"; 526deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true";
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (40)
49deploymentParameters.EnvironmentVariables["DotnetPath"] = _dotnetLocation; 115deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(_dotnetLocation); 136deploymentParameters.EnvironmentVariables["PATH"] = "."; 210deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(DotNetCommands.GetDotNetExecutable(deploymentParameters.RuntimeArchitecture)); 385deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 421deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 509deploymentParameters.HandlerSettings["suppressRecycleOnStartupTimeout"] = "true"; 709deploymentParameters.HandlerSettings["SetCurrentDirectory"] = "false"; 727deploymentParameters.EnvironmentVariables["ASPNETCORE_STARTUP_SUSPEND_EVENT"] = "ANCM_TestEvent"; 769deploymentParameters.EnvironmentVariables[environmentVariable] = value; 793deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 839deploymentParameters.EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = ""; 840deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Development"; 841deploymentParameters.HandlerSettings["callStartupHook"] = "false"; 863deploymentParameters.EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = ""; 884deploymentParameters.WebConfigBasedEnvironmentVariables["DOTNET_STARTUP_HOOKS"] = "InProcessWebSite"; 901deploymentParameters.WebConfigBasedEnvironmentVariables["DOTNET_STARTUP_HOOKS"] = "InProcessWebSite"; 902deploymentParameters.HandlerSettings["callStartupHook"] = "false"; 927deploymentParameters.HandlerSettings["stackSize"] = "10000000"; 944deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_PATH"] = _dotnetLocation; 961deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll"); 1111deploymentParameters.HandlerSettings["handlerVersion"] = "88.93"; 1112deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example"; 1135deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example"; 1162deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_INPROCESS_TESTING_LONG_VALUE"] = expectedValue; 1181deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_INPROCESS_TESTING_LONG_VALUE"] = expectedValue; 1198deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_IIS_HTTPAUTH"] = "shouldberemoved"; 1216deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Development"; 1217deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Production"; 1234deploymentParameters.EnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm1"; 1258deploymentParameters.EnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm1"; 1259deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm2"; 1276deploymentParameters.EnvironmentVariables["TestVariable"] = "World"; 1277deploymentParameters.WebConfigBasedEnvironmentVariables["OtherVariable"] = "%TestVariable%;Hello"; 1292deploymentParameters.EnvironmentVariables["ANCM_PREFER_ENVIRONMENT_VARIABLES"] = "true"; 1293deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = environment; 1339deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_ANCM_HTTPS_PORT"] = "123"; 1354deploymentParameters.WebConfigBasedEnvironmentVariables["ENABLE_HTTPS_REDIRECTION"] = "true"; 1433deploymentParameters.HandlerSettings["forwardResponseConnectionHeader"] = "true"; 1496deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example";
IIS.NewHandler.FunctionalTests (44)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (1)
27parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
485deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true"; 505deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true"; 526deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true";
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (40)
49deploymentParameters.EnvironmentVariables["DotnetPath"] = _dotnetLocation; 115deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(_dotnetLocation); 136deploymentParameters.EnvironmentVariables["PATH"] = "."; 210deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(DotNetCommands.GetDotNetExecutable(deploymentParameters.RuntimeArchitecture)); 385deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 421deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 509deploymentParameters.HandlerSettings["suppressRecycleOnStartupTimeout"] = "true"; 709deploymentParameters.HandlerSettings["SetCurrentDirectory"] = "false"; 727deploymentParameters.EnvironmentVariables["ASPNETCORE_STARTUP_SUSPEND_EVENT"] = "ANCM_TestEvent"; 769deploymentParameters.EnvironmentVariables[environmentVariable] = value; 793deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 839deploymentParameters.EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = ""; 840deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Development"; 841deploymentParameters.HandlerSettings["callStartupHook"] = "false"; 863deploymentParameters.EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = ""; 884deploymentParameters.WebConfigBasedEnvironmentVariables["DOTNET_STARTUP_HOOKS"] = "InProcessWebSite"; 901deploymentParameters.WebConfigBasedEnvironmentVariables["DOTNET_STARTUP_HOOKS"] = "InProcessWebSite"; 902deploymentParameters.HandlerSettings["callStartupHook"] = "false"; 927deploymentParameters.HandlerSettings["stackSize"] = "10000000"; 944deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_PATH"] = _dotnetLocation; 961deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll"); 1111deploymentParameters.HandlerSettings["handlerVersion"] = "88.93"; 1112deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example"; 1135deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example"; 1162deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_INPROCESS_TESTING_LONG_VALUE"] = expectedValue; 1181deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_INPROCESS_TESTING_LONG_VALUE"] = expectedValue; 1198deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_IIS_HTTPAUTH"] = "shouldberemoved"; 1216deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Development"; 1217deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Production"; 1234deploymentParameters.EnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm1"; 1258deploymentParameters.EnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm1"; 1259deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm2"; 1276deploymentParameters.EnvironmentVariables["TestVariable"] = "World"; 1277deploymentParameters.WebConfigBasedEnvironmentVariables["OtherVariable"] = "%TestVariable%;Hello"; 1292deploymentParameters.EnvironmentVariables["ANCM_PREFER_ENVIRONMENT_VARIABLES"] = "true"; 1293deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = environment; 1339deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_ANCM_HTTPS_PORT"] = "123"; 1354deploymentParameters.WebConfigBasedEnvironmentVariables["ENABLE_HTTPS_REDIRECTION"] = "true"; 1433deploymentParameters.HandlerSettings["forwardResponseConnectionHeader"] = "true"; 1496deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example";
IIS.NewShim.FunctionalTests (44)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (1)
27parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
485deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true"; 505deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true"; 526deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true";
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (40)
49deploymentParameters.EnvironmentVariables["DotnetPath"] = _dotnetLocation; 115deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(_dotnetLocation); 136deploymentParameters.EnvironmentVariables["PATH"] = "."; 210deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(DotNetCommands.GetDotNetExecutable(deploymentParameters.RuntimeArchitecture)); 385deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 421deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 509deploymentParameters.HandlerSettings["suppressRecycleOnStartupTimeout"] = "true"; 709deploymentParameters.HandlerSettings["SetCurrentDirectory"] = "false"; 727deploymentParameters.EnvironmentVariables["ASPNETCORE_STARTUP_SUSPEND_EVENT"] = "ANCM_TestEvent"; 769deploymentParameters.EnvironmentVariables[environmentVariable] = value; 793deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 839deploymentParameters.EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = ""; 840deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Development"; 841deploymentParameters.HandlerSettings["callStartupHook"] = "false"; 863deploymentParameters.EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = ""; 884deploymentParameters.WebConfigBasedEnvironmentVariables["DOTNET_STARTUP_HOOKS"] = "InProcessWebSite"; 901deploymentParameters.WebConfigBasedEnvironmentVariables["DOTNET_STARTUP_HOOKS"] = "InProcessWebSite"; 902deploymentParameters.HandlerSettings["callStartupHook"] = "false"; 927deploymentParameters.HandlerSettings["stackSize"] = "10000000"; 944deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_PATH"] = _dotnetLocation; 961deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll"); 1111deploymentParameters.HandlerSettings["handlerVersion"] = "88.93"; 1112deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example"; 1135deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example"; 1162deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_INPROCESS_TESTING_LONG_VALUE"] = expectedValue; 1181deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_INPROCESS_TESTING_LONG_VALUE"] = expectedValue; 1198deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_IIS_HTTPAUTH"] = "shouldberemoved"; 1216deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Development"; 1217deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Production"; 1234deploymentParameters.EnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm1"; 1258deploymentParameters.EnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm1"; 1259deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm2"; 1276deploymentParameters.EnvironmentVariables["TestVariable"] = "World"; 1277deploymentParameters.WebConfigBasedEnvironmentVariables["OtherVariable"] = "%TestVariable%;Hello"; 1292deploymentParameters.EnvironmentVariables["ANCM_PREFER_ENVIRONMENT_VARIABLES"] = "true"; 1293deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = environment; 1339deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_ANCM_HTTPS_PORT"] = "123"; 1354deploymentParameters.WebConfigBasedEnvironmentVariables["ENABLE_HTTPS_REDIRECTION"] = "true"; 1433deploymentParameters.HandlerSettings["forwardResponseConnectionHeader"] = "true"; 1496deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example";
IIS.ShadowCopy.Tests (21)
ShadowCopyTests.cs (20)
22deploymentParameters.HandlerSettings["enableShadowCopy"] = "true"; 23deploymentParameters.HandlerSettings["shadowCopyDirectory"] = directory.DirectoryPath; 48deploymentParameters.HandlerSettings["enableShadowCopy"] = "true"; 49deploymentParameters.HandlerSettings["shadowCopyDirectory"] = directoryName; 78deploymentParameters.HandlerSettings["enableShadowCopy"] = "true"; 79deploymentParameters.HandlerSettings["shadowCopyDirectory"] = $"..\\{directory.DirectoryInfo.Name}"; 111deploymentParameters.HandlerSettings["enableShadowCopy"] = "true"; 112deploymentParameters.HandlerSettings["shadowCopyDirectory"] = directory.DirectoryPath; 146deploymentParameters.HandlerSettings["enableShadowCopy"] = "true"; 147deploymentParameters.HandlerSettings["shadowCopyDirectory"] = directory.DirectoryPath; 177deploymentParameters.HandlerSettings["enableShadowCopy"] = "true"; 178deploymentParameters.HandlerSettings["shadowCopyDirectory"] = directory.DirectoryPath; 203deploymentParameters.HandlerSettings["enableShadowCopy"] = "true"; 204deploymentParameters.HandlerSettings["shadowCopyDirectory"] = directory.DirectoryPath; 243deploymentParameters.HandlerSettings["enableShadowCopy"] = "true"; 244deploymentParameters.HandlerSettings["shadowCopyDirectory"] = directory.DirectoryPath; 288deploymentParameters.HandlerSettings["enableShadowCopy"] = "true"; 289deploymentParameters.HandlerSettings["shadowCopyDirectory"] = "./ShadowCopy/../ShadowCopy/"; 318deploymentParameters.HandlerSettings["enableShadowCopy"] = "true"; 319deploymentParameters.HandlerSettings["shadowCopyDirectory"] = "./ShadowCopy";
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (1)
27parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
IISExpress.FunctionalTests (61)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (3)
60deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_PORT"] = port.ToString(CultureInfo.InvariantCulture); 75deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_PORT"] = string.Empty; 91deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_PORT"] = port;
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (4)
48deploymentParameters.HandlerSettings["handlerVersion"] = _handlerVersion20; 68deploymentParameters.EnvironmentVariables["ASPNETCORE_MODULE_OUTOFPROCESS_HANDLER"] = temporaryFile; 95deploymentParameters.HandlerSettings["handlerVersion"] = version; 114deploymentParameters.HandlerSettings["handlerVersion"] = version;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (1)
27parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (1)
142deploymentParameters.HandlerSettings["debugLevel"] = "";
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (8)
113deploymentParameters.HandlerSettings["debugLevel"] = "file"; 114deploymentParameters.HandlerSettings["debugFile"] = "subdirectory\\debug.txt"; 128deploymentParameters.HandlerSettings["debugLevel"] = "file"; 143deploymentParameters.EnvironmentVariables["ASPNETCORE_MODULE_DEBUG"] = "file"; 145deploymentParameters.HandlerSettings["debugFile"] = ""; 164deploymentParameters.EnvironmentVariables["ASPNETCORE_MODULE_DEBUG_FILE"] = firstTempFile; 190deploymentParameters.HandlerSettings["debugLevel"] = "file,eventlog"; 257deploymentParameters.HandlerSettings["enableOutOfProcessConsoleRedirection"] = "false";
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (1)
143deploymentParameters.HandlerSettings["debugLevel"] = "";
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
485deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true"; 505deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true"; 526deploymentParameters.HandlerSettings["disallowRotationOnConfigChange"] = "true";
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (40)
49deploymentParameters.EnvironmentVariables["DotnetPath"] = _dotnetLocation; 115deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(_dotnetLocation); 136deploymentParameters.EnvironmentVariables["PATH"] = "."; 210deploymentParameters.EnvironmentVariables["PATH"] = Path.GetDirectoryName(DotNetCommands.GetDotNetExecutable(deploymentParameters.RuntimeArchitecture)); 385deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 421deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 509deploymentParameters.HandlerSettings["suppressRecycleOnStartupTimeout"] = "true"; 709deploymentParameters.HandlerSettings["SetCurrentDirectory"] = "false"; 727deploymentParameters.EnvironmentVariables["ASPNETCORE_STARTUP_SUSPEND_EVENT"] = "ANCM_TestEvent"; 769deploymentParameters.EnvironmentVariables[environmentVariable] = value; 793deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "TRUE"; 839deploymentParameters.EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = ""; 840deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Development"; 841deploymentParameters.HandlerSettings["callStartupHook"] = "false"; 863deploymentParameters.EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = ""; 884deploymentParameters.WebConfigBasedEnvironmentVariables["DOTNET_STARTUP_HOOKS"] = "InProcessWebSite"; 901deploymentParameters.WebConfigBasedEnvironmentVariables["DOTNET_STARTUP_HOOKS"] = "InProcessWebSite"; 902deploymentParameters.HandlerSettings["callStartupHook"] = "false"; 927deploymentParameters.HandlerSettings["stackSize"] = "10000000"; 944deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_PATH"] = _dotnetLocation; 961deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll"); 1111deploymentParameters.HandlerSettings["handlerVersion"] = "88.93"; 1112deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example"; 1135deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example"; 1162deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_INPROCESS_TESTING_LONG_VALUE"] = expectedValue; 1181deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_INPROCESS_TESTING_LONG_VALUE"] = expectedValue; 1198deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_IIS_HTTPAUTH"] = "shouldberemoved"; 1216deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Development"; 1217deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = "Production"; 1234deploymentParameters.EnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm1"; 1258deploymentParameters.EnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm1"; 1259deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_HOSTINGSTARTUPASSEMBLIES"] = "Asm2"; 1276deploymentParameters.EnvironmentVariables["TestVariable"] = "World"; 1277deploymentParameters.WebConfigBasedEnvironmentVariables["OtherVariable"] = "%TestVariable%;Hello"; 1292deploymentParameters.EnvironmentVariables["ANCM_PREFER_ENVIRONMENT_VARIABLES"] = "true"; 1293deploymentParameters.EnvironmentVariables["ASPNETCORE_ENVIRONMENT"] = environment; 1339deploymentParameters.WebConfigBasedEnvironmentVariables["ASPNETCORE_ANCM_HTTPS_PORT"] = "123"; 1354deploymentParameters.WebConfigBasedEnvironmentVariables["ENABLE_HTTPS_REDIRECTION"] = "true"; 1433deploymentParameters.HandlerSettings["forwardResponseConnectionHeader"] = "true"; 1496deploymentParameters.EnvironmentVariables["ANCM_ADDITIONAL_ERROR_PAGE_LINK"] = "http://example";
InMemory.FunctionalTests (2)
Http2\Http2ConnectionTests.cs (1)
509persistentStateCollection["Counter"] = requestCount;
RequestTests.cs (1)
2145persistentStateCollection["Counter"] = requestCount;
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
840persistentStateCollection["Counter"] = requestCount;
Kestrel.SampleApp (1)
ClientCertBufferingFeature.cs (1)
72connectionItems.Items["tls.clientcert.negotiated"] = true;
Microsoft.Analyzers.Local (1)
ApiLifecycle\Json\JsonObject.cs (1)
47set => _properties[key] = value;
Microsoft.Arcade.Common (1)
Command.cs (1)
124_process.StartInfo.Environment[name] = value;
Microsoft.AspNetCore (3)
WebApplication.cs (1)
38Properties[GlobalEndpointRouteBuilderKey] = this;
WebApplicationBuilder.cs (2)
426app.Properties[EndpointRouteBuilderKey] = localRouteBuilder; 478app.Properties[EndpointRouteBuilderKey] = priorRouteBuilder;
Microsoft.AspNetCore.Antiforgery (2)
AntiforgeryApplicationBuilderExtensions.cs (1)
26builder.Properties[AntiforgeryMiddlewareSetKey] = true;
src\Shared\HttpExtensions.cs (1)
54context.Items[OriginalEndpointKey] = endpoint;
Microsoft.AspNetCore.Authentication (3)
AuthAppBuilderExtensions.cs (1)
24app.Properties[AuthenticationMiddlewareSetKey] = true;
RemoteAuthenticationHandler.cs (2)
154ticketContext.Properties!.Items[AuthSchemeKey] = Scheme.Name; 236properties.Items[CorrelationProperty] = correlationId;
Microsoft.AspNetCore.Authentication.Abstractions (8)
AuthenticationOptions.cs (1)
45SchemeMap[name] = builder;
AuthenticationProperties.cs (4)
138Items[key] = value; 162=> Parameters[key] = value; 187Items[key] = value.GetValueOrDefault().ToString(); 219Items[key] = value.GetValueOrDefault().ToString(UtcDateTimeFormat, CultureInfo.InvariantCulture);
TokenExtensions.cs (3)
44properties.Items[TokenKeyPrefix + token.Name] = token.Value; 49properties.Items[TokenNamesKey] = string.Join(';', tokenNames); 86properties.Items[tokenKey] = tokenValue;
Microsoft.AspNetCore.Authentication.Cookies (1)
CookieAuthenticationHandler.cs (1)
144newProperties.Items[item.Key] = item.Value;
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationSchemeProvider.cs (1)
154_schemes[scheme.Name] = scheme;
Microsoft.AspNetCore.Authentication.Core.Test (10)
AuthenticationPropertiesTests.cs (8)
32props.Items["change"] = "good"; 33props.Parameters["something"] = "bad"; 260props.Items["foo"] = dateTimeOffset.ToString("r", CultureInfo.InvariantCulture); 266props.Items["foo"] = "BAR"; 291props.Items["foo"] = true.ToString(); 294props.Items["foo"] = false.ToString(); 297props.Items["foo"] = null; 300props.Items["foo"] = "BAR";
AuthenticationTicketTests.cs (2)
36props.Items["change"] = "good"; 37props.Parameters["something"] = "bad";
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
110queryStrings[name] = value;
Microsoft.AspNetCore.Authentication.Negotiate (1)
NegotiateHandler.cs (1)
404items[AuthPersistenceKey] = persistence;
Microsoft.AspNetCore.Authentication.OpenIdConnect (4)
OpenIdConnectHandler.cs (4)
265properties.Items[OpenIdConnectDefaults.UserstatePropertiesKey] = message.State; 474properties.Items[OpenIdConnectDefaults.UserstatePropertiesKey] = message.State; 969properties.Items[OpenIdConnectSessionProperties.SessionState] = message.SessionState; 974properties.Items[OpenIdConnectSessionProperties.CheckSessionIFrame] = _configuration.CheckSessionIframe;
Microsoft.AspNetCore.Authentication.Test (18)
CookieTests.cs (1)
684ctx.Properties.Items["updated"] = "yes";
OAuthChallengePropertiesTest.cs (7)
27properties.Parameters["scope"] = new string[] { "foo", "bar" }; 57properties.Parameters["max_age"] = TimeSpan.FromSeconds(500); 79properties.Parameters["prompt"] = "consent"; 110properties.Parameters["access_type"] = "offline"; 111properties.Parameters["approval_prompt"] = "force"; 112properties.Parameters["login_hint"] = "test@example.com"; 113properties.Parameters["prompt"] = "login";
OpenIdConnect\OpenIdConnectChallengeTests.cs (1)
992PushedParameters[key] = query[key];
TwitterTests.cs (3)
203properties.Items["testkey"] = "testvalue"; 253properties.Items["testkey"] = "testvalue"; 359properties.Items["testkey"] = "testvalue";
WsFederation\WsFederationTest.cs (3)
309context.HttpContext.Items["MessageReceived"] = true; 324context.HttpContext.Items["SecurityTokenReceived"] = true; 344context.HttpContext.Items["AuthenticationFailed"] = true;
WsFederation\WsFederationTest_Handler.cs (3)
305context.HttpContext.Items["MessageReceived"] = true; 320context.HttpContext.Items["SecurityTokenReceived"] = true; 340context.HttpContext.Items["AuthenticationFailed"] = true;
Microsoft.AspNetCore.Authentication.WsFederation (1)
WsFederationHandler.cs (1)
131properties.Items[WsFederationDefaults.UserstatePropertiesKey] = wsFederationMessage.Wctx;
Microsoft.AspNetCore.Authorization.Policy (2)
AuthorizationAppBuilderExtensions.cs (1)
32app.Properties[AuthorizationMiddlewareSetKey] = true;
AuthorizationMiddleware.cs (1)
102context.Items[AuthorizationMiddlewareInvokedWithEndpointKey] = AuthorizationMiddlewareWithEndpointInvokedValue;
Microsoft.AspNetCore.Components (2)
src\Http\Routing\src\RouteOptions.cs (2)
154_constraintTypeMap[token] = typeof(T); 170_constraintTypeMap[token] = type;
Microsoft.AspNetCore.Components.Endpoints (4)
Builder\RazorComponentEndpointDataSource.cs (1)
141builder.Properties[ResourceCollectionKey] = resourceCollection;
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
243httpContext.Items[ComponentSequenceKey] = result;
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (1)
173httpContext.Items[InvokedRenderModesKey] = new InvokedRenderModes(currentInvocation);
src\Shared\PropertyHelper\PropertyHelper.cs (1)
335dictionary[helper.Name] = helper.GetValue(value);
Microsoft.AspNetCore.Components.Server (1)
Circuits\CircuitHandleRegistry.cs (1)
30circuitHandles[circuitKey] = circuitHost?.Handle;
Microsoft.AspNetCore.Components.Server.Tests (1)
src\SignalR\common\SignalR.Common\test\Internal\Protocol\HubMessageHelpers.cs (1)
21hubMessage.Headers[header.Key] = header.Value;
Microsoft.AspNetCore.Components.WebAssembly (1)
Http\WebAssemblyHttpRequestMessageExtensions.cs (1)
130fetchOptions[name] = value;
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
Hosting\WebAssemblyHostConfigurationTest.cs (1)
214Data[key] = value;
Microsoft.AspNetCore.Components.WebView.Maui (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
74 responseHeaders["Content-Type"] = values.ContentType;
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
74 responseHeaders["Content-Type"] = values.ContentType;
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
74 responseHeaders["Content-Type"] = values.ContentType;
Microsoft.AspNetCore.Connections.Abstractions (1)
ConnectionItems.cs (1)
51set { Items[key] = value; }
Microsoft.AspNetCore.Cors (3)
Infrastructure\CorsMiddleware.cs (1)
104context.Items[CorsMiddlewareWithEndpointInvokedKey] = CorsMiddlewareWithEndpointInvokedValue;
Infrastructure\CorsOptions.cs (2)
62PolicyMap[name] = (policy, Task.FromResult(policy)); 79PolicyMap[name] = (policy, Task.FromResult(policy));
Microsoft.AspNetCore.Diagnostics (6)
DeveloperExceptionPage\DeveloperExceptionPageExtensions.cs (2)
26app.Properties["analysis.NextMiddlewareName"] = "Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware"; 46app.Properties["analysis.NextMiddlewareName"] = "Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware";
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
262problemDetails.Extensions["exception"] = JsonSerializer.SerializeToElement(new ExceptionExtensionData
ExceptionHandler\ExceptionHandlerExtensions.cs (1)
111app.Properties["analysis.NextMiddlewareName"] = "Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware";
src\Shared\HttpExtensions.cs (1)
54context.Items[OriginalEndpointKey] = endpoint;
src\Shared\Reroute.cs (1)
21builder.Properties[GlobalRouteBuilderKey] = routeBuilder;
Microsoft.AspNetCore.Diagnostics.Tests (2)
ExceptionHandlerMiddlewareTest.cs (2)
184context.Items["ExceptionHandler"] = true; 476httpContext.Items[_name] = true;
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonTranscodingServerCallContext.cs (1)
57HttpContext.Items["__HttpContext"] = HttpContext;
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
UnaryServerCallHandlerTests.cs (1)
1422context.UserState["IntercepterRun"] = true;
Microsoft.AspNetCore.HeaderParsing.Tests (1)
HeaderParsingExtensionsTests.cs (1)
44.AddHeaderParsing(options => options.MaxCachedValuesPerHeader["Date"] = -1)
Microsoft.AspNetCore.Hosting (5)
GenericHost\GenericWebHostBuilder.cs (2)
236context.Properties[_startupKey] = instance; 250_builder.Properties[typeof(ConfigureContainerBuilder)] = configureContainerBuilder;
GenericHost\WebHostBuilderBase.cs (2)
86context.Properties[typeof(WebHostBuilderContext)] = webHostBuilderContext; 87context.Properties[typeof(WebHostOptions)] = options;
src\Shared\HttpExtensions.cs (1)
54context.Items[OriginalEndpointKey] = endpoint;
Microsoft.AspNetCore.Hosting.FunctionalTests (1)
ShutdownTests.cs (1)
63deploymentParameters.EnvironmentVariables["ASPNETCORE_STARTMECHANIC"] = shutdownMechanic;
Microsoft.AspNetCore.Http (5)
Builder\ApplicationBuilder.cs (1)
190context.Items[RequestUnhandledKey] = true;
Internal\ItemsDictionary.cs (1)
41_items[key] = value;
src\Http\Shared\CookieHeaderParserShared.cs (1)
45store[parsedName.Value.Value!] = Uri.UnescapeDataString(parsedValue.Value.Value!);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
95WriteDictionary[key] = value;
Timeouts\RequestTimeoutOptions.cs (1)
45Policies[policyName] = policy;
Microsoft.AspNetCore.Http.Abstractions (2)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
335dictionary[helper.Name] = helper.GetValue(value);
src\Shared\Reroute.cs (1)
21builder.Properties[GlobalRouteBuilderKey] = routeBuilder;
Microsoft.AspNetCore.Http.Abstractions.Tests (10)
HttpValidationProblemDetailsJsonConverterTest.cs (1)
24problemDetails.Extensions["traceId"] = "|37dd3dd5-4a9619f953c40a16.";
MapPathMiddlewareTests.cs (2)
15context.Items["test.PathBase"] = context.Request.PathBase.Value; 16context.Items["test.Path"] = context.Request.Path.Value;
UseMiddlewareTest.cs (2)
286context.Items["before"] = true; 288context.Items["after"] = true;
UsePathBaseExtensionsTests.cs (2)
215context.Items["test.Path"] = context.Request.Path; 216context.Items["test.PathBase"] = context.Request.PathBase;
UseWhenExtensionsTests.cs (3)
129context.Items[key] = 1; 137context.Items[key] = 1 + (int)item; 141context.Items[key] = 1;
Microsoft.AspNetCore.Http.Extensions (1)
DefaultProblemDetailsWriter.cs (1)
60context.ProblemDetails.Extensions[traceIdKeyName] = traceId;
Microsoft.AspNetCore.Http.Extensions.Tests (30)
ProblemDetailsDefaultWriterTest.cs (5)
465expectedProblem.Extensions["Extension1"] = "Extension1-Value"; 466expectedProblem.Extensions["Extension2"] = "Extension2-Value"; 512expectedProblem.Extensions["Extension"] = customExtensionData; 578context.ProblemDetails.Extensions["new-extension"] = new { TraceId = Guid.NewGuid() }; 579context.ProblemDetails.Extensions["traceId"] = expectedTraceId;
RequestDelegateFactoryTests.cs (22)
246httpContext.Items["input"] = id; 302httpContext.Items["tryParsable"] = tryParsable; 354httpContext.Items["tryParsable"] = tryParsable; 611httpContext.Items["tryParsable"] = tryParsable; 645context.Items["headers"] = headerValues; 646context.Items["query"] = queryValues; 647context.Items["form"] = formValues; 673context.Items["headers"] = headerValues; 674context.Items["query"] = queryValues; 675context.Items["form"] = formValues; 697httpContext.Items["myAwaitedBindAsyncRecord"] = myAwaitedBindAsyncRecord; 698httpContext.Items["myAwaitedBindAsyncStruct"] = myAwaitedBindAsyncStruct; 1602context.Items["uri"] = myBindAsyncRecord.Uri; 1606context.Items["uri"] = myBindAsyncRecord?.Uri; 1610context.Items["uri"] = myBindAsyncRecord?.Uri; 1614context.Items["uri"] = mySimpleBindAsyncRecord.Uri; 1619context.Items["uri"] = myNullableBindAsyncStruct.Uri; 1623context.Items["uri"] = myNullableBindAsyncStruct?.Uri; 1627context.Items["uri"] = myNullableBindAsyncStruct?.Uri; 1631context.Items["uri"] = mySimpleBindAsyncStruct.Uri; 2206context.Items["invoked"] = true; 3589httpContext.Items["calls"] = _calls;
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (2)
368httpContext.Items["invoked"] = false; 872httpContext.Items["invoked"] = false;
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (1)
400httpContext.Items[structToBeZeroedKey] = new BodyStruct { Id = 42 };
Microsoft.AspNetCore.Http.Results.Tests (1)
ResultsOfTTests.Generated.cs (1)
1852httpContext.Items[nameof(ChecksumResult.Checksum)] = Checksum;
Microsoft.AspNetCore.Http.Tests (6)
ApplicationBuilderTests.cs (2)
160builder1.Properties["test"] = "value1"; 163builder2.Properties["test"] = "value2";
DefaultHttpContextTests.cs (1)
117context.Items["foo"] = item;
Timeouts\RequestTimeoutsMiddlewareTests.cs (3)
293context.Items["SetFrom"] = "default"; 304context.Items["SetFrom"] = "policy1"; 314context.Items["SetFrom"] = "policy2";
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersExtensions.cs (1)
33builder.Properties[ForwardedHeadersAdded] = true;
Microsoft.AspNetCore.Identity (2)
SignInManager.cs (2)
760properties.Items[LoginProviderKey] = provider; 763properties.Items[XsrfKey] = userId;
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
src\Identity\test\Shared\PriorityOrderer.cs (1)
78dictionary[key] = result;
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Infrastructure\HtmlPageContext.cs (1)
28_properties[key] = value;
Microsoft.AspNetCore.Identity.InMemory.Test (1)
src\Identity\test\Shared\PriorityOrderer.cs (1)
78dictionary[key] = result;
Microsoft.AspNetCore.Identity.Test (5)
SignInManagerTest.cs (4)
1040properties.Items["LoginProvider"] = "blah"; 1071properties.Items["LoginProvider"] = "blah"; 1102properties.Items["LoginProvider"] = "blah"; 1103properties.Items["CustomValue"] = "fizzbuzz";
src\Identity\test\Shared\PriorityOrderer.cs (1)
78dictionary[key] = result;
Microsoft.AspNetCore.JsonPatch (2)
Internal\DictionaryAdapterOfTU.cs (2)
39dictionary[convertedKey] = convertedValue; 127dictionary[convertedKey] = convertedValue;
Microsoft.AspNetCore.JsonPatch.Tests (26)
IntegrationTests\DictionaryIntegrationTest.cs (26)
17model.DictionaryOfStringToInteger["one"] = 1; 18model.DictionaryOfStringToInteger["two"] = 2; 31model.DictionaryOfStringToInteger["one"] = 1; 32model.DictionaryOfStringToInteger["two"] = 2; 51model.DictionaryOfStringToInteger["one"] = 1; 52model.DictionaryOfStringToInteger["two"] = 2; 69model.DictionaryOfStringToInteger["one"] = 1; 70model.DictionaryOfStringToInteger["two"] = 2; 87model.DictionaryOfStringToInteger["one"] = 1; 88model.DictionaryOfStringToInteger["two"] = 2; 106model.DictionaryOfStringToInteger["one"] = 1; 107model.DictionaryOfStringToInteger["two"] = 2; 148model.DictionaryOfStringToCustomer[key1] = value1; 163model.DictionaryOfStringToCustomer[key1] = value1; 186model.DictionaryOfStringToCustomer[key1] = value1; 187model.DictionaryOfStringToCustomer[key2] = value2; 210model.DictionaryOfStringToCustomer[key1] = value1; 211model.DictionaryOfStringToCustomer[key2] = value2; 232model.DictionaryOfStringToCustomer[key1] = value1; 233model.DictionaryOfStringToCustomer[key2] = value2; 255model.DictionaryOfStringToCustomer[key1] = value1; 256model.DictionaryOfStringToCustomer[key2] = value2; 279model.DictionaryOfStringToCustomer[key1] = value1; 280model.DictionaryOfStringToCustomer[key2] = value2; 303model.DictionaryOfStringToInteger[key1] = value1; 304model.DictionaryOfStringToInteger[key2] = value2;
Microsoft.AspNetCore.Mvc.Abstractions (1)
Abstractions\ActionDescriptorExtensions.cs (1)
48actionDescriptor.Properties[typeof(T)] = value;
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
ApiDescriptionExtensions.cs (1)
48apiDescription.Properties[typeof(T)] = value;
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (20)
ApiResponseTypeProviderTest.cs (20)
23actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new[] 145actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new[] 235actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new IApiResponseMetadataProvider[] 291actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new IApiResponseMetadataProvider[] 332actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new IApiResponseMetadataProvider[] 339actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(errorType); 385actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new IApiResponseMetadataProvider[] 391actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(errorType); 427actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new IApiResponseMetadataProvider[] 434actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(errorType); 478actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new IApiResponseMetadataProvider[] 485actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(typeof(InvalidTimeZoneException)); 524actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new IApiResponseMetadataProvider[] 531actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(typeof(void)); 571actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new IApiResponseMetadataProvider[] 577actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(typeof(ProblemDetails)); 621actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new IApiResponseMetadataProvider[] 627actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(typeof(ProblemDetails)); 653actionDescriptor.Properties[typeof(ApiConventionResult)] = new ApiConventionResult(new IApiResponseMetadataProvider[] 657actionDescriptor.Properties[typeof(ProducesErrorResponseTypeAttribute)] = new ProducesErrorResponseTypeAttribute(typeof(ProblemDetails));
Microsoft.AspNetCore.Mvc.Core (12)
ApplicationModels\ApiConventionApplicationModelConvention.cs (2)
72action.Properties[typeof(ApiConventionResult)] = result; 84action.Properties[typeof(ProducesErrorResponseTypeAttribute)] = errorTypeAttribute;
ApplicationModels\ControllerActionDescriptorBuilder.cs (3)
153actionDescriptor.Properties[item.Key] = item.Value; 158actionDescriptor.Properties[item.Key] = item.Value; 163actionDescriptor.Properties[item.Key] = item.Value;
DependencyInjection\ApiBehaviorOptionsSetup.cs (1)
57options.ClientErrorMapping[statusCode] = new()
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
68problemDetails.Extensions[extension.Key] = extension.Value;
Infrastructure\DefaultProblemDetailsFactory.cs (1)
108problemDetails.Extensions["traceId"] = traceId;
ModelBinding\Binders\DictionaryModelBinder.cs (1)
208model[convertedKey] = ModelBindingHelper.CastOrDefault<TValue>(valueResult.Model);
Routing\UrlHelperFactory.cs (1)
60httpContext.Items[typeof(IUrlHelper)] = urlHelper;
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
95WriteDictionary[key] = value;
src\Shared\PropertyHelper\PropertyHelper.cs (1)
335dictionary[helper.Name] = helper.GetValue(value);
Microsoft.AspNetCore.Mvc.Core.Test (15)
ApplicationModels\ControllerActionDescriptorBuilderTest.cs (6)
64applicationModel.Properties["test"] = "application"; 89applicationModel.Properties["test"] = "application"; 94controller.Properties["test"] = "controller"; 115applicationModel.Properties["test"] = "application"; 120controller.Properties["test"] = "controller"; 127actionModel.Properties["test"] = "action";
Filters\FilterFactoryTest.cs (2)
231actionContext.HttpContext.Items["name"] = "foo"; 243actionContext.HttpContext.Items["name"] = "bar";
Infrastructure\ControllerActionInvokerTest.cs (1)
1961context.HttpContext.Items["Result"] = Value;
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (2)
101expectedProblem.Extensions["Extension1"] = "Extension1-Value"; 102expectedProblem.Extensions["Extension2"] = "Extension2-Value";
Routing\ActionEndpointDataSourceBaseTest.cs (1)
144options.ConstraintMap["upper-case"] = typeof(UpperCaseParameterTransform);
Routing\ActionEndpointFactoryTest.cs (2)
25options.ConstraintMap["upper-case"] = typeof(UpperCaseParameterTransform); 465actionDescriptor.RouteValues[kvp.Key] = kvp.Value?.ToString();
Routing\ControllerActionEndpointDataSourceTest.cs (1)
569action.RouteValues[kvp.Key] = kvp.Value?.ToString();
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
DictionaryModelBinderIntegrationTest.cs (2)
1529_data[key] = value; 1634_data[key] = value;
Microsoft.AspNetCore.Mvc.NewtonsoftJson (4)
AnnotatedProblemDetails.cs (2)
25Extensions[kvp.Key] = kvp.Value; 57problemDetails.Extensions[kvp.Key] = kvp.Value;
ValidationProblemDetailsConverter.cs (2)
61Errors[kvp.Key] = kvp.Value; 74problemDetails.Errors[kvp.Key] = kvp.Value;
Microsoft.AspNetCore.Mvc.Razor (3)
LanguageViewLocationExpander.cs (1)
48context.Values[ValueKey] = CultureInfo.CurrentUICulture.Name;
RazorPage.cs (1)
64SectionWriters[name] = section;
RazorPageBase.cs (1)
389SectionWriters[name] = section;
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (1)
51routeModel.RouteValues["area"] = areaResult.areaName;
Microsoft.AspNetCore.Mvc.Razor.Test (10)
LanguageViewLocationExpanderTest.cs (2)
142viewLocationExpanderContext.Values["language"] = "en-GB"; 195viewLocationExpanderContext.Values["language"] = "!-invalid-culture-!";
RazorViewEngineTest.cs (7)
678c.Values["expander-key"] = expander1.ToString(); 746c.Values["expander-key"] = expander1.ToString(); 963expanderContext.Values["somekey"] = "somevalue"; 1022expanderContext.Values["somekey"] = "somevalue"; 1162c.Values["expander-key"] = expander.ToString(); 1221c.Values["expander-key"] = expander.ToString(); 1893context.ActionDescriptor.RouteValues["page"] = "MyPage";
TagHelpers\TagHelperComponentTagHelperTest.cs (1)
354context.Items["Key"] = "Value";
Microsoft.AspNetCore.Mvc.RazorPages (4)
ApplicationModels\PageRouteModelFactory.cs (1)
51routeModel.RouteValues["area"] = areaResult.areaName;
Builder\PageActionEndpointConventionBuilderResourceCollectionExtensions.cs (1)
39builder.Items[ResourceCollectionResolverKey] = resolver;
Builder\RazorPagesEndpointRouteBuilderExtensions.cs (1)
36builder.Items[EndpointRouteBuilderKey] = endpoints;
Infrastructure\PageBinderFactory.cs (1)
157arguments[parameter.Name] = result.Model;
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\PageActionEndpointDataSourceTest.cs (1)
277action.RouteValues[kvp.Key] = kvp.Value?.ToString();
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (1)
144options.ConstraintMap["upper-case"] = typeof(UpperCaseParameterTransform);
Microsoft.AspNetCore.Mvc.TagHelpers (5)
InputTagHelper.cs (3)
421htmlAttributes["type"] = inputType; 428htmlAttributes["multiple"] = "multiple"; 466htmlAttributes["type"] = "hidden";
SelectTagHelper.cs (2)
80context.Items[typeof(SelectTagHelper)] = null; 106context.Items[typeof(SelectTagHelper)] = currentValues;
Microsoft.AspNetCore.Mvc.TagHelpers.Test (2)
OptionTagHelperTest.cs (2)
425tagHelperContext.Items[typeof(SelectTagHelper)] = currentValues == null ? null : new CurrentValues(currentValues); 497tagHelperContext.Items[typeof(SelectTagHelper)] = currentValues == null ? null : new CurrentValues(currentValues);
Microsoft.AspNetCore.Mvc.Testing (1)
DeferredHostBuilder.cs (1)
32b.Properties[pair.Key] = pair.Value;
Microsoft.AspNetCore.Mvc.ViewFeatures (8)
DefaultEditorTemplates.cs (2)
202htmlAttributes["class"] = htmlClassName; 409htmlAttributes["multiple"] = "multiple";
Filters\SaveTempDataPropertyFilterBase.cs (2)
54tempData[property.Key] = newValue; 77OriginalValues[property.PropertyInfo] = value;
HtmlHelper.cs (1)
170dictionary[helper.Name] = helper.GetValue(htmlAttributes);
NameAndIdProvider.cs (2)
64items[PreviousNameAndIdKey] = previousNameAndId; 156items[PreviousNameAndIdKey] = previousNameAndId;
ViewDataDictionary.cs (1)
315_data[index] = value;
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (5)
ControllerTest.cs (1)
379controller.TempData["key"] = input;
Filters\AntiforgeryMiddlewareAuthorizationFilterTest.cs (2)
20httpContext.Items[AntiforgeryMiddlewareAuthorizationFilter.AntiforgeryMiddlewareWithEndpointInvokedKey] = new object(); 38httpContext.Items[AntiforgeryMiddlewareAuthorizationFilter.AntiforgeryMiddlewareWithEndpointInvokedKey] = new object();
Filters\SaveTempDataFilterTest.cs (2)
102httpContext.Items[SaveTempDataFilter.SaveTempDataFilterContextKey] = new SaveTempDataFilter.SaveTempDataContext() { TempDataSaved = true }; 124httpContext.Items[SaveTempDataFilter.SaveTempDataFilterContextKey] = new SaveTempDataFilter.SaveTempDataContext() { RequestHasUnhandledException = true };
Microsoft.AspNetCore.OpenApi (9)
Extensions\OpenApiDocumentExtensions.cs (1)
23document.Components.Schemas[schemaId] = schema;
Services\OpenApiDocumentService.cs (7)
385response.Content[contentType] = new OpenApiMediaType { Schema = schema }; 558schema.Properties[description.Name] = parameterSchema; 605schema.Properties[description.Name] = parameterSchema; 617propertySchema.Properties[description.Name] = await _componentService.GetOrCreateSchemaAsync(document, description.Type, scopedServiceProvider, schemaTransformers, description, cancellationToken: cancellationToken); 625schema.Properties[description.Name] = await _componentService.GetOrCreateSchemaAsync(document, description.Type, scopedServiceProvider, schemaTransformers, description, cancellationToken: cancellationToken); 634requestBody.Content[contentType] = new OpenApiMediaType 677requestBody.Content[contentType] = new OpenApiMediaType { Schema = await _componentService.GetOrCreateSchemaAsync(document, bodyParameter.Type, scopedServiceProvider, schemaTransformers, bodyParameter, cancellationToken: cancellationToken) };
Services\Schemas\OpenApiSchemaService.cs (1)
164schema.Properties[property.Key] = ResolveReferenceForSchema(document, property.Value);
Microsoft.AspNetCore.OpenApi.Microbenchmarks (4)
TransformersBenchmark.cs (4)
107schema.Extensions["x-my-extension"] = new OpenApiAny(context.ParameterDescription.Name); 111schema.Extensions["x-my-extension"] = new OpenApiAny("response"); 180schema.Extensions["x-my-extension"] = new OpenApiAny(context.ParameterDescription.Name); 184schema.Extensions["x-my-extension"] = new OpenApiAny("response");
Microsoft.AspNetCore.OpenApi.Tests (18)
Services\OpenApiDocumentServiceTestsBase.cs (2)
71routeOptions.ConstraintMap["regex"] = typeof(RegexInlineRouteConstraint); 150options.ConstraintMap["regex"] = typeof(RegexInlineRouteConstraint);
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (1)
283schema.Extensions["x-my-extension"] = new OpenApiAny(context.ParameterDescription.Name);
Transformers\SchemaTransformerTests.cs (14)
156schema.Extensions["x-my-extension"] = new OpenApiAny("1"); 163schema.Extensions["x-my-extension"] = new OpenApiAny("2"); 188schema.Extensions["x-my-extension"] = new OpenApiAny("1"); 218schema.Extensions["x-my-extension"] = new OpenApiAny(context.ParameterDescription.Name); 497schema.Extensions["x-my-extension"] = new OpenApiAny("this-is-a-triangle"); 567schema.Extensions["x-my-extension"] = new OpenApiAny("this-is-a-triangle"); 571schema.Extensions["x-my-extension"] = new OpenApiAny("this-is-a-square"); 608schema.Extensions["x-my-extension"] = new OpenApiAny("this-is-a-triangle"); 612schema.Extensions["x-my-extension"] = new OpenApiAny("this-is-a-square"); 649schema.Extensions["x-my-extension"] = new OpenApiAny("this-is-a-triangle"); 653schema.Extensions["x-my-extension"] = new OpenApiAny("this-is-a-square"); 735schema.Extensions["modified-by-not-schema-transformer"] = new OpenApiAny(true); 861schema.Extensions["x-my-extension"] = new OpenApiAny("1"); 909schema.Extensions["x-my-extension"] = new OpenApiAny(Dependency.InstantiationCount.ToString(CultureInfo.InvariantCulture));
Transformers\TypeBasedTransformerLifetimeTests.cs (1)
351schema.Extensions["x-my-extension"] = new OpenApiAny("1");
Microsoft.AspNetCore.OutputCaching (1)
Policies\VaryByValuePolicy.cs (1)
23rules.VaryByValues[result.Key] = result.Value;
Microsoft.AspNetCore.OutputCaching.Tests (2)
OutputCacheKeyProviderTests.cs (2)
133context.CacheVaryByRules.VaryByValues["b"] = "ValueB"; 134context.CacheVaryByRules.VaryByValues["a"] = "ValueA";
Microsoft.AspNetCore.Owin (23)
DictionaryStringValuesWrapper.cs (3)
34set { Inner[key] = value; } 40set { Inner[key] = value; } 68Inner[HeaderNames.ContentLength] = (StringValues)HeaderUtilities.FormatNonNegativeInt64(value.GetValueOrDefault());
OwinEnvironment.cs (6)
106_entries[OwinConstants.CallCancelled] = new FeatureMap<IHttpRequestLifetimeFeature>(feature => feature.RequestAborted); 110_context.Items[OwinConstants.CallCancelled] = CancellationToken.None; 116_context.Items[OwinConstants.OwinVersion] = "1.0"; 132_context.Items[typeof(HttpContext).FullName] = _context; // Store for lookup when we transition back out of OWIN 221_context.Items[key] = value; 233_context.Items[key] = value;
OwinExtensions.cs (1)
51env[typeof(HttpContext).FullName] = httpContext;
OwinFeatureCollection.cs (1)
72Environment[key] = value;
WebSockets\OwinWebSocketAcceptAdapter.cs (1)
123environment[OwinConstants.WebSocket.AcceptAlt] = new WebSocketAcceptAlt(adapter.AcceptWebSocketAsync);
WebSockets\OwinWebSocketAcceptContext.cs (1)
49_options[OwinConstants.WebSocket.SubProtocol] = value;
WebSockets\WebSocketAcceptAdapter.cs (2)
53_env[OwinConstants.ResponseStatusCode] = 101; 70environment[OwinConstants.WebSocket.Accept] = new WebSocketAccept(adapter.AcceptWebSocket);
WebSockets\WebSocketAdapter.cs (8)
46_environment[OwinConstants.WebSocket.SendAsync] = new WebSocketSendAsync(SendAsync); 47_environment[OwinConstants.WebSocket.ReceiveAsync] = new WebSocketReceiveAsync(ReceiveAsync); 48_environment[OwinConstants.WebSocket.CloseAsync] = new WebSocketCloseAsync(CloseAsync); 49_environment[OwinConstants.WebSocket.CallCancelled] = ct; 50_environment[OwinConstants.WebSocket.Version] = OwinConstants.WebSocket.VersionValue; 52_environment[typeof(WebSocket).FullName] = webSocket; 82_environment[OwinConstants.WebSocket.ClientCloseStatus] = (int)(nativeResult.CloseStatus ?? WebSocketCloseStatus.NormalClosure); 83_environment[OwinConstants.WebSocket.ClientCloseDescription] = nativeResult.CloseStatusDescription ?? string.Empty;
Microsoft.AspNetCore.Owin.Tests (14)
OwinEnvironmentTests.cs (13)
63env["owin.RequestMethod"] = "SomeMethod"; 64env["server.User"] = new ClaimsPrincipal(new ClaimsIdentity("Foo")); 67env["owin.RequestUser"] = new ClaimsPrincipal(new ClaimsIdentity("Bar")); 69env["owin.RequestBody"] = Stream.Null; 72requestHeaders["CustomRequestHeader"] = new[] { "CustomRequestValue" }; 73env["owin.RequestPath"] = "/path"; 74env["owin.RequestPathBase"] = "/pathBase"; 75env["owin.RequestProtocol"] = "http/1.0"; 76env["owin.RequestQueryString"] = "key=value"; 77env["owin.RequestScheme"] = "http"; 78env["owin.ResponseBody"] = Stream.Null; 81responseHeaders["CustomResponseHeader"] = new[] { "CustomResponseValue" }; 82env["owin.ResponseStatusCode"] = 201;
OwinExtensionTests.cs (1)
22static readonly AppFunc notFound = env => new Task(() => { env["owin.ResponseStatusCode"] = 404; });
Microsoft.AspNetCore.Razor.Runtime (1)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
95WriteDictionary[key] = value;
Microsoft.AspNetCore.Razor.Runtime.Test (7)
Runtime\TagHelpers\TagHelperScopeManagerTest.cs (7)
19executionContext.Items["test-entry"] = 1234; 33parentExecutionContext.Items["test-entry"] = 1234; 51parentExecutionContext.Items["test-entry"] = parentComplexObject; 72parentExecutionContext.Items["test-entry"] = 1234; 76executionContext.Items["test-entry"] = 2222; 96executionContext.Items["new-entry"] = 2222; 111parentExecutionContext.Items["test-entry"] = 1234;
Microsoft.AspNetCore.ResponseCaching.Tests (1)
TestUtils.cs (1)
389_storage[key] = entry;
Microsoft.AspNetCore.Rewrite (3)
ApacheModRewrite\Flags.cs (2)
31FlagDictionary[flag] = value; 57FlagDictionary[flag] = value ?? string.Empty;
src\Shared\Reroute.cs (1)
21builder.Properties[GlobalRouteBuilderKey] = routeBuilder;
Microsoft.AspNetCore.Routing (6)
Builder\EndpointRoutingApplicationBuilderExtensions.cs (2)
50builder.Properties[EndpointRouteBuilder] = endpointRouteBuilder; 55builder.Properties[EndpointRouteBuilder] = endpointRouteBuilder;
RouteOptions.cs (2)
154_constraintTypeMap[token] = typeof(T); 170_constraintTypeMap[token] = type;
src\Shared\HttpExtensions.cs (1)
54context.Items[OriginalEndpointKey] = endpoint;
src\Shared\PropertyHelper\PropertyHelper.cs (1)
335dictionary[helper.Name] = helper.GetValue(value);
Microsoft.AspNetCore.Routing.Abstractions (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
335dictionary[helper.Name] = helper.GetValue(value);
Microsoft.AspNetCore.Routing.Tests (29)
Builder\GroupTest.cs (5)
30httpContext.Items["id"] = id; 61httpContext.Items["org"] = org; 62httpContext.Items["id"] = id; 95httpContext.Items["org"] = org; 96httpContext.Items["id"] = id;
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (6)
186context.Items["ExecutedEndpoint"] = true; 196httpContext.Items["First"] = true; 206httpContext.Items["Second"] = true; 309httpContext.Items["CurrentOrder"] = order; 314httpContext.Items["CurrentOrder"] = order; 316httpContext.Items[$"{_name}-Order"] = order;
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (8)
140httpContext.Items["input"] = id; 178httpContext.Items["input"] = id; 513httpContext.Items["input"] = id; 555httpContext.Items["input"] = id; 606httpContext.Items["value"] = id; 629httpContext.Items["value"] = id; 1084context.HttpContext.Items["loggerErrorIsEnabled"] = _logger.IsEnabled(LogLevel.Error); 1085context.HttpContext.Items["parentName"] = _routeHandlerContext.MethodInfo.DeclaringType?.Name;
DefaultLinkGeneratorTest.cs (4)
179o.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer); 205o.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer); 317o.ConstraintMap["upper-case"] = typeof(UpperCaseParameterTransform); 343o.ConstraintMap["upper-case"] = typeof(UpperCaseParameterTransform);
EndpointMiddlewareTest.cs (3)
171httpContext.Items[EndpointMiddleware.AuthorizationMiddlewareInvokedKey] = true; 268httpContext.Items[EndpointMiddleware.CorsMiddlewareInvokedKey] = true; 366httpContext.Items[EndpointMiddleware.AntiforgeryMiddlewareWithEndpointInvokedKey] = true;
Matching\DfaMatcherTest.cs (1)
34options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer);
RouteTest.cs (1)
1863options.ConstraintMap["test-policy"] = typeof(TestPolicy);
TestConstants.cs (1)
13context.Items["ShortCircuit"] = true;
Microsoft.AspNetCore.Server.HttpSys (7)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (3)
85Store[key] = value; 99Store[key] = value; 191Store[key] = StringValues.Concat(values, value);
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
618unknownHeaders[headerName] = headerValue;
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
56Extra[key] = value; 234Extra[key] = value;
UrlPrefixCollection.cs (1)
228_prefixes[key] = newPrefix;
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (1)
DelegateOutOfProcTests.cs (1)
43deploymentParameters.EnvironmentVariables["queue"] = queueName;
Microsoft.AspNetCore.Server.IIS (6)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (3)
85Store[key] = value; 99Store[key] = value; 191Store[key] = StringValues.Concat(values, value);
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
618unknownHeaders[headerName] = headerValue;
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
56Extra[key] = value; 234Extra[key] = value;
Microsoft.AspNetCore.Server.IntegrationTesting (5)
Common\DeploymentParameters.cs (3)
16EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "true"; 27EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "true"; 66EnvironmentVariables["ASPNETCORE_DETAILEDERRORS"] = "true";
Deployers\SelfHostDeployer.cs (1)
100DeploymentParameters.EnvironmentVariables["ASPNETCORE_CONTENTROOT"] = DeploymentParameters.ApplicationPath;
ProcessHelpers.cs (1)
31environment[name] = value;
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (8)
IISDeployer.cs (3)
91IISDeploymentParameters.WebConfigBasedEnvironmentVariables[DetailedErrorsEnvironmentVariable] = 101IISDeploymentParameters.HandlerSettings["debugLevel"] = "file"; 102IISDeploymentParameters.HandlerSettings["debugFile"] = _debugLogFile;
IISDeploymentParameterExtensions.cs (2)
12parameters.HandlerSettings["debugLevel"] = "file"; 13parameters.HandlerSettings["debugFile"] = filename;
IISExpressDeployer.cs (3)
85DeploymentParameters.EnvironmentVariables["LAUNCHER_PATH"] = executableName; 86DeploymentParameters.EnvironmentVariables["LAUNCHER_ARGS"] = executableArgs; 90DeploymentParameters.EnvironmentVariables["ASPNETCORE_CONTENTROOT"] = DeploymentParameters.ApplicationPath;
Microsoft.AspNetCore.Server.Kestrel.Core (1)
KestrelConfigurationLoader.cs (1)
87EndpointConfigurations[name] = configureOptions ?? throw new ArgumentNullException(nameof(configureOptions));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (20)
HttpRequestHeadersTests.cs (18)
34headers["custom"] = new[] { "value" }; 45headers["host"] = new[] { "value" }; 46headers["content-length"] = new[] { "0" }; 59headers["host"] = new[] { "value" }; 60headers["custom"] = new[] { "value" }; 61headers["Content-Length"] = new[] { "0" }; 76headers["host"] = new[] { "value" }; 81headers["custom"] = new[] { "value" }; 86headers["Content-Length"] = new[] { "0" }; 197headers["host"] = v1; 198headers["Content-Length"] = v2; 199headers["custom"] = v3; 217headers["host"] = v1; 218headers["Content-Length"] = v2; 219headers["custom"] = v3; 248headers["host"] = kv1.Value; 259headers["custom"] = kv2.Value; 270headers["Content-Length"] = kv3.Value;
HttpResponseHeadersTests.cs (2)
287Assert.Throws<InvalidOperationException>(() => dictionary["my-header"] = "other-value"); 361dictionary["Content-Length"] = contentLength;
Microsoft.AspNetCore.Shared.Tests (8)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
95WriteDictionary[key] = value;
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (3)
85Store[key] = value; 99Store[key] = value; 191Store[key] = StringValues.Concat(values, value);
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
618unknownHeaders[headerName] = headerValue;
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (2)
56Extra[key] = value; 234Extra[key] = value;
src\Shared\PropertyHelper\PropertyHelper.cs (1)
335dictionary[helper.Name] = helper.GetValue(value);
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1202invocationMessage.Headers[key] = value;
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (6)
HubConnectionTests.cs (6)
1573options.Headers["X-test"] = "42"; 1574options.Headers["X-42"] = "test"; 1604options.Headers["X-test"] = "42"; 1605options.Headers["X-42"] = "test"; 1646options.Headers["User-Agent"] = ""; 1681options.Headers["User-Agent"] = "User Value";
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\HubMessageHelpers.cs (1)
21hubMessage.Headers[header.Key] = header.Value;
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (1)
60Connection.Items["ConnectedTask"] = new TaskCompletionSource();
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
RedisEndToEnd.cs (1)
224httpConnectionOptions.Headers["UserName"] = userName;
Microsoft.AspNetCore.SignalR.Tests (3)
HubConnectionHandlerTestUtils\Hubs.cs (3)
309Context.Items[nameof(UploadDoesWorkOnComplete)] = tcs.Task; 1240Context.Items[nameof(OnConnectedAsync)] = true; 1252Context.Items[nameof(OnDisconnectedAsync)] = true;
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
TestClient.cs (1)
60Connection.Items["ConnectedTask"] = new TaskCompletionSource();
Microsoft.AspNetCore.SpaServices.Extensions (1)
Npm\NodeScriptRunner.cs (1)
56processStartInfo.Environment[keyValuePair.Key] = keyValuePair.Value;
Microsoft.AspNetCore.Tests (6)
WebApplicationTests.cs (6)
1344builder.Host.Properties["lowercase"] = nameof(WebApplicationTests); 2018((IApplicationBuilder)app).Properties["didsomething"] = true; 2183builder.Host.Properties["hello"] = "world"; 2499app.Properties["__AuthenticationMiddlewareSet"] = true; 2519builder.Host.Properties["MyProp"] = 1; 2896Data["Random"] = Guid.NewGuid().ToString();
Microsoft.Build (19)
BackEnd\BuildManager\LegacyThreadingData.cs (1)
93_legacyThreadingEventsById[submissionId] = new Tuple<AutoResetEvent, ManualResetEvent>(
BackEnd\Components\Logging\LoggingService.cs (1)
762warningsByProject[key] = new HashSet<string>(codes, StringComparer.OrdinalIgnoreCase);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
1019results[i] = new BuildResult(new BuildRequest(), new BuildAbortedException());
Collections\PropertyDictionary.cs (1)
483_properties[projectProperty.Key] = projectProperty;
Evaluation\LazyItemEvaluator.cs (1)
496referencedItemLists[itemType] = itemList;
Graph\GraphBuilder.cs (2)
466nodeState[node] = NodeVisitationState.InProcess; 520nodeState[node] = NodeVisitationState.Processed;
Instance\ProjectItemDefinitionInstance.cs (1)
202_metadata[xml.Name] = metadatum;
Instance\TaskFactories\AssemblyTaskFactory.cs (4)
353mergedParameters[XMakeAttributes.runtime] = XMakeAttributes.GetCurrentMSBuildRuntime(); 358mergedParameters[XMakeAttributes.architecture] = XMakeAttributes.GetCurrentMSBuildArchitecture(); 572mergedParameters[XMakeAttributes.runtime] = XMakeAttributes.GetExplicitMSBuildRuntime(mergedRuntime); 573mergedParameters[XMakeAttributes.architecture] = XMakeAttributes.GetExplicitMSBuildArchitecture(mergedArchitecture);
Instance\TaskFactories\TaskHostTask.cs (2)
203_setParameters[property.Name] = value; 497_setParameters[outputParam.Key] = outputParam.Value?.WrappedParameter;
Logging\ProfilerLogger.cs (5)
187aggregatedLocations[originalKey] = profiledLocation; 189mergeMap[pairToMerge.Key.Id] = originalKey.Id; 199aggregatedLocations[pairToMerge.Key.WithParentId(mergedParent)] = pairToMerge.Value; 204aggregatedLocations[pairToMerge.Key] = pairToMerge.Value; 210originalLocations[pairToMerge.Key] = pairToMerge.Key;
Microsoft.Build.Engine.UnitTests (10)
BackEnd\BuildManager_Tests.cs (1)
3655metadata["AdditionalProperties"] = String.Format(CultureInfo.InvariantCulture, "p={0}", i);
BackEnd\KnownTelemetry_Tests.cs (2)
92properties["BuildDurationInMilliseconds"] = (finishedAt - startAt).TotalMilliseconds.ToString(CultureInfo.InvariantCulture); 93properties["InnerBuildDurationInMilliseconds"] = (finishedAt - innerStartAt).TotalMilliseconds.ToString(CultureInfo.InvariantCulture);
BackEnd\RequestedProjectState_Tests.cs (2)
195state2.ItemFilters["item1"] = ["metadatum2"]; 201state1.ItemFilters["item1"] = [];
Construction\SolutionProjectGenerator_Tests.cs (1)
1860globalProperties["Configuration"] = "Nonexistent";
Evaluation\Evaluator_Tests.cs (2)
1959allEvaluatedPropertiesWithNoBackingXmlAndNoDuplicates[property.Name] = property; 2123allEvaluatedPropertiesWithNoBackingXmlAndNoDuplicates[property.Name] = property;
Evaluation\ToolsetConfigurationNet5_Tests.cs (2)
37toolsetProperties[properties.Value.Name] = properties.Value.EvaluatedValue; 64toolsetProperties[properties.Value.Name] = properties.Value.EvaluatedValue;
Microsoft.Build.Framework (9)
BinaryTranslator.cs (4)
664dictionary[key] = value; 688dictionary[key] = value; 745dictionary[key] = value; 775dictionary[key] = value;
BuildCheck\EnumerableExtensions.cs (4)
91dict[pair.Key] = pair.Value; 95dict[pair.Key] = mergeValues(value, pair.Value); 120dict[key] = mergeValue; 124dict[key] = mergeValues(value, mergeValue);
BuildException\BuildExceptionBase.cs (1)
140customKeyedSerializedData[reader.ReadString()] = reader.ReadOptionalString();
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (2)
44builder[name] = value; 48builder[feature] = "true";
Microsoft.Build.Tasks.Core (1)
Telemetry.cs (1)
50properties[item[0]] = item[1];
Microsoft.Build.Utilities.Core (2)
ToolTask.cs (2)
677startInfo.Environment[entry.Key] = entry.Value; 687startInfo.Environment[variable.Key] = variable.Value;
Microsoft.CodeAnalysis (3)
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
307builder[info.Id] = info;
InternalUtilities\CompilerOptionParseUtilities.cs (2)
44builder[name] = value; 48builder[feature] = "true";
Microsoft.CodeAnalysis.CodeStyle (10)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (2)
44builder[name] = value; 48builder[feature] = "true";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (2)
197entryWriter: (name, value) => builder[name] = value, 203builder[option.Definition.ConfigName] = option.Definition.Serializer.Serialize(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (6)
109dictionary[key] = updated; 114dictionary[key] = ImmutableHashSet.Create(comparer, value); 128dictionary[key] = existingArray.Add(value); 140dictionary[key] = existingArray.IsEmpty && value.Equals(defaultArray[0]) ? defaultArray : existingArray.Add(value); 195dictionary[key] = collection; 223dictionary[key] = collection.Remove(value);
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Source\SourceAssemblySymbol.cs (1)
2844forwardedTypesFromSource[fullEmittedName] = originalDefinition;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Diagnostics\DiagnosticTest.cs (3)
586warnings[MessageProvider.Instance.GetIdForErrorCode(420)] = ReportDiagnostic.Error; 627warnings[MessageProvider.Instance.GetIdForErrorCode(168)] = ReportDiagnostic.Error; 1788warnings[MessageProvider.Instance.GetIdForErrorCode(168)] = ReportDiagnostic.Suppress;
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
QuickInfo\OnTheFlyDocsView.xaml.cs (1)
211telemetryEvent.Properties["vs.copilot.source"] = "CSharpOnTheFlyDocs";
Microsoft.CodeAnalysis.Features (7)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
226cache[key] = cacheEntry;
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
281cacheService.ProjectItemsCache[project.Id] = cacheEntry;
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (4)
6301runtimeRudeEditsBuilder[newLambda] = diagnosticContext.CreateRudeEdit(RudeEditKind.SwitchBetweenLambdaAndLocalFunction, cancellationToken); 6311runtimeRudeEditsBuilder[newLambda] = diagnosticContext.CreateRudeEdit(RudeEditKind.ChangingLambdaParameters, cancellationToken); 6317runtimeRudeEditsBuilder[newLambda] = diagnosticContext.CreateRudeEdit(RudeEditKind.ChangingLambdaReturnType, cancellationToken); 6324runtimeRudeEditsBuilder[newLambda] = diagnosticContext.CreateRudeEdit(RudeEditKind.ChangingTypeParameters, cancellationToken);
ExtractMethod\MethodExtractor.Analyzer.cs (1)
744sortedMap[typeParameter.Ordinal] = typeParameter;
Microsoft.CodeAnalysis.LanguageServer (1)
DotnetCliHelper.cs (1)
98startInfo.Environment["DOTNET_CLI_UI_LANGUAGE"] = "en-US";
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
186map[groupKey] = suggestedActions;
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Utilities\AbstractLanguageServerClientTests.TestLspClient.cs (1)
91processStartInfo.Environment["DOTNET_ROLL_FORWARD_TO_PRERELEASE"] = "1";
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (1)
175faultEvent.Properties[CustomFaultDescriptionPropertyName] = description;
Microsoft.CodeAnalysis.Test.Utilities (1)
FX\ProcessUtilities.cs (1)
54startInfo.Environment[entry.Key] = entry.Value;
Microsoft.CodeAnalysis.UnitTests (4)
Collections\ImmutableDictionaryBuilderTestBase.cs (3)
64builder["five"] = 5; 66builder["five"] = 5; 70builder["five"] = 50;
Collections\ImmutableDictionaryTestBase.cs (1)
159Assert.Throws<NotSupportedException>(() => dictionary["a"] = 2);
Microsoft.CodeAnalysis.Workspaces (10)
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (2)
44builder[name] = value; 48builder[feature] = "true";
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (2)
197entryWriter: (name, value) => builder[name] = value, 203builder[option.Definition.ConfigName] = option.Definition.Serializer.Serialize(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (6)
109dictionary[key] = updated; 114dictionary[key] = ImmutableHashSet.Create(comparer, value); 128dictionary[key] = existingArray.Add(value); 140dictionary[key] = existingArray.IsEmpty && value.Equals(defaultArray[0]) ? defaultArray : existingArray.Add(value); 195dictionary[key] = collection; 223dictionary[key] = collection.Remove(value);
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\BuildHostProcessManager.cs (1)
174processStartInfo.Environment["DOTNET_ROLL_FORWARD_TO_PRERELEASE"] = "1";
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
MSBuild\ProjectFile\ProjectFile.cs (1)
315_documents[GetAbsolutePathRelativeToProject(item.EvaluatedInclude)] = item;
src\Compilers\Core\Portable\InternalUtilities\CompilerOptionParseUtilities.cs (2)
44builder[name] = value; 48builder[feature] = "true";
Microsoft.DotNet.Build.Tasks.Feed (1)
src\BuildModelFactory.cs (1)
247attributes[attribute.Key] = NormalizeAzureDevOpsUrl(attribute.Value);
Microsoft.DotNet.Helix.Sdk (6)
GetHelixWorkItems.cs (6)
58metadata["JobName"] = jobName; 59metadata["WorkItemName"] = name; 61metadata["ConsoleOutputUri"] = consoleUri; 83metadata["Failed"] = "false"; 93metadata["Failed"] = "true"; 109metadata["UploadedFiles"] = JsonConvert.SerializeObject(files);
Microsoft.DotNet.VersionTools (17)
BuildManifest\Model\BlobArtifactModel.cs (3)
24set { Attributes[nameof(Id)] = value; } 43set => Attributes[nameof(RepoOrigin)] = value; 66Attributes[nameof(Visibility)] = value.ToString();
BuildManifest\Model\BuildIdentity.cs (9)
40set { Attributes[nameof(Name)] = value; } 46set { Attributes[nameof(BuildId)] = value; } 52set { Attributes[nameof(ProductVersion)] = value; } 58set { Attributes[nameof(Branch)] = value; } 64set { Attributes[nameof(Commit)] = value; } 85Attributes[nameof(IsStable)] = value.ToString().ToLower(); 107Attributes[nameof(IsReleaseOnlyPackageVersion)] = value.ToString().ToLower(); 114set { Attributes[nameof(VersionStamp)] = value; } 133Attributes[nameof(PublishingVersion)] = ((int)value).ToString();
BuildManifest\Model\PackageArtifactModel.cs (5)
30set { Attributes[nameof(Id)] = value; } 36set { Attributes[nameof(Version)] = value; } 42set { Attributes[nameof(OriginBuildName)] = value; } 78Attributes[nameof(Visibility)] = value.ToString(); 85set => Attributes[nameof(RepoOrigin)] = value;
Microsoft.Extensions.AI.AzureAIInference (3)
AzureAIInferenceChatClient.cs (2)
317result.AdditionalProperties["top_k"] = new BinaryData(JsonSerializer.SerializeToUtf8Bytes(topK, AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(int)))); 331result.AdditionalProperties[prop.Key] = new BinaryData(data);
AzureAIInferenceEmbeddingGenerator.cs (1)
177result.AdditionalProperties[prop.Key] = new BinaryData(data);
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
140arguments[kvp.Key] = jsonElement.ValueKind switch
Microsoft.Extensions.AI.OpenAI (2)
OpenAIModelMapper.ChatCompletion.cs (2)
281result.LogitBiases[kvp.Key] = kvp.Value; 299result.Metadata[kvp.Key] = kvp.Value;
Microsoft.Extensions.Configuration (1)
ConfigurationProvider.cs (1)
47=> Data[key] = value;
Microsoft.Extensions.Configuration.FileExtensions (2)
FileConfigurationExtensions.cs (2)
28builder.Properties[FileProviderKey] = fileProvider; 73builder.Properties[FileLoadExceptionHandlerKey] = handler;
Microsoft.Extensions.Http.Polly (2)
HttpRequestMessageExtensions.cs (1)
57request.Properties[PolicyExecutionContextKey] = context;
PolicyHttpMessageHandler.cs (1)
172request.Properties[PriorResponseKey] = result;
Microsoft.Extensions.Http.Polly.Tests (3)
HttpRequestMessageExtensionsTest.cs (3)
19request.Properties[HttpRequestMessageExtensions.PolicyExecutionContextKey] = expected; 50request.Properties[HttpRequestMessageExtensions.PolicyExecutionContextKey] = null; 89request.Properties[HttpRequestMessageExtensions.PolicyExecutionContextKey] = new Context(Guid.NewGuid().ToString());
Microsoft.Extensions.Http.Resilience.Tests (1)
Resilience\RequestMessageSnapshotTests.cs (1)
48request.Properties["some-new-prop"] = "ABC";
Microsoft.Extensions.ServiceDiscovery (1)
ServiceDiscoveryHttpClientBuilderExtensions.cs (1)
81socketsHttpHandler.Properties["__GrpcLoadBalancingDisabled"] = true;
Microsoft.Maui.Controls (2)
DataTemplate.cs (2)
56 Bindings[property] = binding ?? throw new ArgumentNullException(nameof(binding)); 63 Values[property] = value;
Microsoft.Maui.Controls.SourceGen (1)
CodeBehindGenerator.cs (1)
519 typeCache[xmlType] = returnType;
Microsoft.ML.AutoML (2)
TrainerExtensions\TrainerExtensionUtil.cs (2)
113ovaNode.Properties["BinaryTrainer"] = binaryNode; 126properties[property.Key] = property.Value;
Microsoft.Net.Http.Headers (1)
src\Http\Shared\CookieHeaderParserShared.cs (1)
45store[parsedName.Value.Value!] = Uri.UnescapeDataString(parsedValue.Value.Value!);
Microsoft.VisualStudio.LanguageServices (1)
Watson\FaultReporter.cs (1)
175faultEvent.Properties[CustomFaultDescriptionPropertyName] = description;
MiddlewareAnalysisSample (1)
Startup.cs (1)
57app.Properties["analysis.NextMiddlewareName"] = "HomePage";
MSBuild (9)
OutOfProcTaskAppDomainWrapperBase.cs (2)
368finalParameterValues[value.Name] = value.GetValue(wrappedTask, null); 375finalParameterValues[value.Name] = e;
OutOfProcTaskHostNode.cs (6)
1051updatedEnvironment[variable.Key] = newValue; 1105updatedEnvironment[variable.Key] = newValue; 1148s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(null, oldValue); 1154s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue); 1165s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, null); 1171s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue);
XMake.cs (1)
1616entryPoint.GlobalProperties[PropertyNames.IsGraphBuild] = "true";
MSBuildTaskHost (13)
BinaryTranslator.cs (4)
664dictionary[key] = value; 688dictionary[key] = value; 745dictionary[key] = value; 775dictionary[key] = value;
BuildExceptionBase.cs (1)
140customKeyedSerializedData[reader.ReadString()] = reader.ReadOptionalString();
OutOfProcTaskAppDomainWrapperBase.cs (2)
368finalParameterValues[value.Name] = value.GetValue(wrappedTask, null); 375finalParameterValues[value.Name] = e;
OutOfProcTaskHostNode.cs (6)
1051updatedEnvironment[variable.Key] = newValue; 1105updatedEnvironment[variable.Key] = newValue; 1148s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(null, oldValue); 1154s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue); 1165s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, null); 1171s_mismatchedEnvironmentValues[variable.Key] = new KeyValuePair<string, string>(newValue, oldValue);
Mvc.RoutingWebSite (12)
Startup.cs (1)
112services.AddRouting(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForDynamic.cs (1)
24services.Configure<RouteOptions>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForDynamicAndRazorPages.cs (1)
19services.Configure<RouteOptions>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForDynamicOrder.cs (1)
39services.Configure<RouteOptions>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForEndpointFilters.cs (4)
17services.Configure<RouteOptions>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer)); 32ic.HttpContext.Items[nameof(IEndpointFilter)] = true; 33ic.HttpContext.Items[nameof(EndpointFilterFactoryContext.MethodInfo.Name)] = context.MethodInfo.Name; 48ic.HttpContext.Items[nameof(EndpointFilterInvocationContext.Arguments)] = firstArg;
StartupForFallback.cs (1)
22services.Configure<RouteOptions>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForGroups.cs (1)
17services.Configure<RouteOptions>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForLinkGenerator.cs (1)
30options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer);
StartupRoutingDifferentBranches.cs (1)
87services.AddRouting(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
PresentationCore (3)
System\Windows\Media\CultureSpecificStringDictionary.cs (2)
214set { _innerDictionary[key] = ValidateValue(value); } 253_innerDictionary[ConvertKey(key)] = ConvertValue(value);
System\Windows\Media\GlyphTypeface.cs (1)
391adjustedLanguageFaceNames[XmlLanguage.GetLanguage(pair.Key.IetfLanguageTag)] = pair.Value;
PresentationFramework (3)
System\Windows\Controls\DatePicker.cs (1)
880_isHandlerSuspended[property] = true;
System\Windows\Documents\DocumentSequence.cs (1)
299_asyncOps[userState] = asyncRequest;
System\Windows\Documents\FixedDocument.cs (1)
379_asyncOps[userState] = asyncRequest;
PresentationUI (3)
MS\Internal\Documents\RightsManagementProvider.cs (3)
517grantDictionary[user] = new List<ContentGrant>(); 533grantDictionary[owner] = new List<ContentGrant>(1); 555dictionary[user] = currentLicense;
RazorPagesWebSite (2)
ModelAsFilter.cs (1)
23context.HandlerArguments["message"] = "Hello from OnPageHandlerExecuting";
TempData\SetTempDataOnPageModelAndRedirect.cs (1)
13TempData["Message"] = message;
RoutingSandbox (1)
UseEndpointRoutingStartup.cs (1)
18options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer);
ServerComparison.FunctionalTests (1)
HelloWorldTest.cs (1)
56deploymentParameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
ServerComparison.TestSites (1)
OneTransformPerRequest.cs (1)
28context.Items["Transformed"] = true;
SocialWeather (2)
PersistentConnectionLifeTimeManager.cs (2)
22connection.Items["groups"] = new HashSet<string>(); 24connection.Items["format"] = format;
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\Hosting\CompositionServices.cs (1)
328dictionary[key] = list.ToArray();
System.Composition.Hosting (1)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (1)
71ActualMetadata[key] = value;
System.Composition.TypedParts (2)
System\Composition\TypedParts\Discovery\TypeInspector.cs (2)
137metadata[name] = newArray; 144metadata[name] = newArray;
System.Private.Windows.Core (1)
System\Private\Windows\BinaryFormat\Deserializer\PendingSerializationInfo.cs (1)
56objects[ObjectId] = populated;
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\Deserializer\PendingSerializationInfo.cs (1)
58objects[ObjectId] = populated;
System.ServiceModel.Federation.Tests (3)
WSTrustChannelSecurityTokenProviderTest.cs (3)
55tokenRequirement.Properties["http://schemas.microsoft.com/ws/2006/05/servicemodel/securitytokenrequirement/IssuedSecurityTokenParameters"] = tokenParams; 56tokenRequirement.Properties["http://schemas.microsoft.com/ws/2006/05/servicemodel/securitytokenrequirement/TargetAddress"] = targetAddress; 57tokenRequirement.Properties["http://schemas.microsoft.com/ws/2006/05/servicemodel/securitytokenrequirement/SecurityAlgorithmSuite"] = System.ServiceModel.Security.SecurityAlgorithmSuite.Default;
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (1)
276serverCertRequirement.Properties[PreferSslCertificateAuthenticatorProperty] = true;
System.Text.Json (5)
System\Text\Json\Serialization\Converters\Collection\IDictionaryOfTKeyTValueConverter.cs (1)
24collection[key] = value;
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (1)
243dict[dataExtKey] = (JsonElement)propValue!;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (3)
860dictionaryObjectValue[state.Current.JsonPropertyNameAsString!] = null; 866dictionaryObjectValue[state.Current.JsonPropertyNameAsString!] = value; 873dictionaryElementValue[state.Current.JsonPropertyNameAsString!] = value;
System.Xaml (2)
System\Xaml\MS\Impl\XmlNsInfo.cs (2)
445dict[key] = new ReadOnlyCollection<string>(dict[key]); 584_subsumeCount[ns] = currentCount;
xunit.console (2)
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (1)
469_stringPool[s] = s;
common\DictionaryExtensions.cs (1)
28dictionary[key] = result;
1572 references to
ApplicationModelWebSite (5)
Controllers\ApplicationModelController.cs (2)
14return ControllerContext.ActionDescriptor.Properties["description"].ToString(); 20return ControllerContext.ActionDescriptor.Properties["description"].ToString();
Controllers\HomeController.cs (2)
13return ControllerContext.ActionDescriptor.Properties["description"].ToString(); 19return ControllerContext.ActionDescriptor.Properties["source"].ToString() + " - " + helloWorld;
Controllers\LicenseController.cs (1)
13return ControllerContext.ActionDescriptor.Properties["license"].ToString();
Aspire.RabbitMQ.Client (4)
RabbitMQEventSourceLogForwarder.cs (4)
1150 => new("exception.type", exData["Type"]), 1161 => new("exception.message", exData["Message"]), 1172 => new("exception.stacktrace", exData["StackTrace"]), 1183 => new("exception.innerexception", exData["InnerException"]),
BasicWebSite (13)
Controllers\HomeController.cs (1)
107return ControllerContext.ActionDescriptor.Properties["description"].ToString();
Controllers\TempDataController.cs (10)
32var value = TempData["key"]; 38var value = TempData["key"]; 72var value1 = TempData["key1"].ToString(); 73var value2 = Convert.ToInt32(TempData["key2"], CultureInfo.InvariantCulture); 74var value3 = (IList<string>)TempData["key3"]; 75var value4 = (DateTime)TempData["key4"]; 76var value5 = (Guid)TempData["key5"]; 89return TempData["Name"]?.ToString(); 102return TempData["LargeValue"]?.ToString(); 116return TempData[nameof(UnhandledExceptionAndSettingTempData)]?.ToString();
Controllers\TestingController.cs (1)
148TempDataValue = (int)TempData["Value"],
Filters\TraceOutputResultFilter.cs (1)
13var trace = context.HttpContext.Items[nameof(TraceResourceFilter)];
Diagnostics.FunctionalTests (1)
DeveloperExceptionPageSampleTest.cs (1)
54var exceptionNode = (JsonElement)body.Extensions["exception"];
dotnet-svcutil-lib (5)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SecurityBindingElement.cs (2)
1434sb.AppendLine(" " + this.OperationSupportingTokenParameters[requestAction].ToString().Trim().Replace("\n", "\n ")); 1446sb.AppendLine(" " + this.OptionalOperationSupportingTokenParameters[requestAction].ToString().Trim().Replace("\n", "\n "));
FrameworkFork\System.ServiceModel\System\ServiceModel\Configuration\SecurityElementBase.cs (1)
164SupportingTokenParameters stp2 = b2.OperationSupportingTokenParameters[operation1.Key];
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ClientCredentialsSecurityTokenManager.cs (1)
63AuthenticationSchemes authScheme = (AuthenticationSchemes)requirement.Properties[ServiceModelSecurityTokenRequirement.HttpAuthenticationSchemeProperty];
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\ServiceModelSecurityTokenRequirement.cs (1)
232object propertyValue = this.Properties[propertyName];
dotnet-user-secrets (1)
Internal\SecretsStore.cs (1)
44return _secrets[key];
GenericHostWebSite (1)
Controllers\TestingController.cs (1)
134TempDataValue = (int)TempData["Value"],
Identity.DefaultUI.WebSite (1)
Pages\Contoso\Login.cshtml.cs (1)
59state["LoginProvider"],
IIS.FunctionalTests (11)
Http2TrailersResetTests.cs (5)
206Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 266Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 327Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 440Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 470Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (6)
83Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 120Assert.Equal("411", decodedHeaders[InternalHeaderNames.Status]); 173Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 242Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 287Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 343Assert.Equal("500", decodedHeaders[InternalHeaderNames.Status]);
IISExpress.FunctionalTests (6)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (6)
83Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 120Assert.Equal("411", decodedHeaders[InternalHeaderNames.Status]); 173Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 242Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 287Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 343Assert.Equal("500", decodedHeaders[InternalHeaderNames.Status]);
InMemory.FunctionalTests (2)
Http3\Http3ConnectionTests.cs (2)
472var http3Stream1 = (Http3Stream)streamContext1.Features.Get<IPersistentStateFeature>().State[Http3Connection.StreamPersistentStateKey]; 479var http3Stream2 = (Http3Stream)streamContext2.Features.Get<IPersistentStateFeature>().State[Http3Connection.StreamPersistentStateKey];
Microsoft.AspNetCore (2)
WebApplicationBuilder.cs (2)
210var webHostContext = (WebHostBuilderContext)bootstrapHostBuilder.Properties[typeof(WebHostBuilderContext)]; 421_builtApplication.Properties[UseRoutingKey] = app.Properties[UseRoutingKey];
Microsoft.AspNetCore.App.Analyzers.Test (6)
WebApplicationBuilder\UseTopLevelRouteRegistrationInsteadOfUseEndpointsTest.cs (6)
164AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MM1"], diagnostic1.Location); 168AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MM2"], diagnostic2.Location); 172AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MM3"], diagnostic3.Location); 176AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MM4"], diagnostic4.Location); 264AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MM1"], diagnostic1.Location); 268AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MM2"], diagnostic2.Location);
Microsoft.AspNetCore.Authentication.Core.Test (17)
AuthenticationPropertiesTests.cs (17)
84Assert.Equal("foo bar", props.Items["foo"]); 89Assert.Equal("foo baz", props.Items["foo"]); 94Assert.Equal("xy", props.Items["bar"]); 99Assert.Equal(string.Empty, props.Items["bar"]); 119Assert.Equal("foo bar", props.Parameters["foo"]); 124Assert.Null(props.Parameters["foo"]); 137Assert.Equal(123, props.Parameters["foo"]); 142Assert.Null(props.Parameters["foo"]); 156Assert.Same(list, props.Parameters["foo"]); 161Assert.Null(props.Parameters["foo"]); 245Assert.Equal("Mon, 19 Mar 2018 12:34:56 GMT", props.Items["foo"]); 268Assert.Equal("BAR", props.Items["foo"]); 277Assert.Equal(true.ToString(), props.Items["foo"]); 280Assert.Equal(false.ToString(), props.Items["foo"]); 302Assert.Equal("BAR", props.Items["foo"]); 340Assert.Equal(props.Items["foo"], deserialized.Items["foo"]);
Microsoft.AspNetCore.Authentication.Negotiate (1)
NegotiateHandler.cs (1)
94persistence = (AuthPersistence)connectionItems[AuthPersistenceKey]!;
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectHandler.cs (1)
1265RedirectUri = properties.Items[OpenIdConnectDefaults.RedirectUriForCodePropertiesKey]
Microsoft.AspNetCore.Authentication.Test (29)
OAuthChallengePropertiesTest.cs (9)
20Assert.Equal(new string[] { "foo", "bar" }, properties.Parameters["scope"]); 40Assert.Equal(new string[] { "foo", "bar" }, properties.Parameters["scope"]); 72Assert.Equal("login", properties.Parameters["prompt"]); 97Assert.Equal("offline", properties.Parameters["access_type"]); 99Assert.Equal("force", properties.Parameters["approval_prompt"]); 101Assert.Equal("test@example.com", properties.Parameters["login_hint"]); 103Assert.Equal("login", properties.Parameters["prompt"]); 140Assert.Equal(true, properties.Parameters["include_granted_scopes"]); 144Assert.Equal(false, properties.Parameters["include_granted_scopes"]);
OAuthTests.cs (3)
336Assert.Equal("testvalue", context.Properties.Items["testkey"]); 372Assert.Equal("testvalue", context.Properties.Items["testkey"]); 408Assert.Equal("testvalue", context.Properties.Items["testkey"]);
OpenIdConnect\OpenIdConnectChallengeTests.cs (5)
201var actualState = values[OpenIdConnectParameterNames.State]; 204Assert.Equal(userState ?? string.Empty, actualProperties.Items[OpenIdConnectDefaults.UserstatePropertiesKey]); 236var actualState = values[OpenIdConnectParameterNames.State]; 241Assert.Equal(userState, actualProperties.Items[OpenIdConnectDefaults.UserstatePropertiesKey]); 923Assert.Equal("login", mockBackchannel.PushedParameters["prompt"]);
OpenIdConnect\OpenIdConnectEventTests.cs (2)
815Assert.Equal("testvalue", context.Properties.Items["testkey"]); 886Assert.Equal("testvalue", context.Properties.Items["testkey"]);
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (2)
815Assert.Equal("testvalue", context.Properties.Items["testkey"]); 886Assert.Equal("testvalue", context.Properties.Items["testkey"]);
TicketSerializerTests.cs (2)
117var property1 = readClaim.Properties["property-1"]; 120var property2 = readClaim.Properties["property-2"];
TwitterTests.cs (2)
243Assert.Equal("testvalue", context.Properties.Items["testkey"]); 349Assert.Equal("testvalue", context.Properties.Items["testkey"]);
WsFederation\WsFederationTest.cs (2)
329Assert.True((bool)context.HttpContext.Items["MessageReceived"], "MessageReceived notification not invoked"); 330Assert.True((bool)context.HttpContext.Items["SecurityTokenReceived"], "SecurityTokenReceived notification not invoked");
WsFederation\WsFederationTest_Handler.cs (2)
325Assert.True((bool)context.HttpContext.Items["MessageReceived"], "MessageReceived notification not invoked"); 326Assert.True((bool)context.HttpContext.Items["SecurityTokenReceived"], "SecurityTokenReceived notification not invoked");
Microsoft.AspNetCore.Components.Analyzers.Tests (11)
ComponentInternalUsageDiagnosticsAnalyzerTest.cs (11)
35AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMBaseClass"], diagnostic.Location); 40AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMField"], diagnostic.Location); 45AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMInvocation"], diagnostic.Location); 50AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMProperty"], diagnostic.Location); 55AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMParameter"], diagnostic.Location); 60AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMReturnType"], diagnostic.Location); 79AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMField"], diagnostic.Location); 84AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMNewObject"], diagnostic.Location); 89AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMProperty"], diagnostic.Location); 94AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMNewObject2"], diagnostic.Location); 99AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMInvocation"], diagnostic.Location);
Microsoft.AspNetCore.Components.Authorization.Tests (13)
AuthorizeViewTest.cs (7)
213var diff = batch.DiffsByComponentId[authorizeViewComponentId].Single(); 268var diff1 = batch1.DiffsByComponentId[authorizeViewComponentId].Single(); 280var diff2 = batch2.DiffsByComponentId[authorizeViewComponentId].Single(); 311var diff1 = Assert.Single(batch1.DiffsByComponentId[authorizeViewComponentId]); 329var diff2 = Assert.Single(batch2.DiffsByComponentId[authorizeViewComponentId]); 369var diff1 = batch1.DiffsByComponentId[authorizeViewComponentId].Single(); 387var diff2 = batch2.DiffsByComponentId[authorizeViewComponentId].Single();
CascadingAuthenticationStateTest.cs (4)
54var receiveAuthStateDiff = batch.DiffsByComponentId[receiveAuthStateId].Single(); 89var receiveAuthStateDiff1 = batch1.DiffsByComponentId[receiveAuthStateId].Single(); 107var receiveAuthStateDiff2 = batch2.DiffsByComponentId[receiveAuthStateId].Single(); 143var receiveAuthStateDiff = batch.DiffsByComponentId[receiveAuthStateId].Single();
src\Components\Shared\test\CapturedBatch.cs (2)
23=> GetComponentFrames<T>().SelectMany(f => DiffsByComponentId[f.ComponentId]); 39DiffsByComponentId[componentId].Add(diffClone);
Microsoft.AspNetCore.Components.Forms.Tests (2)
src\Components\Shared\test\CapturedBatch.cs (2)
23=> GetComponentFrames<T>().SelectMany(f => DiffsByComponentId[f.ComponentId]); 39DiffsByComponentId[componentId].Add(diffClone);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (11)
ComponentInternalUsageDiagnosticsAnalyzerTest.cs (11)
35AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMBaseClass"], diagnostic.Location); 40AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMField"], diagnostic.Location); 45AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMInvocation"], diagnostic.Location); 50AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMProperty"], diagnostic.Location); 55AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMParameter"], diagnostic.Location); 60AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMReturnType"], diagnostic.Location); 79AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMField"], diagnostic.Location); 84AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMNewObject"], diagnostic.Location); 89AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMProperty"], diagnostic.Location); 94AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMNewObject2"], diagnostic.Location); 99AnalyzerAssert.DiagnosticLocation(source.MarkerLocations["MMInvocation"], diagnostic.Location);
Microsoft.AspNetCore.Components.Server.Tests (5)
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (5)
217var testData = BaseTestData[testDataName]; 265var testData = BaseTestData[testDataName]; 354var testData = BaseInvalidPayloads[invalidPayloadName]; 392var testData = ArgumentBindingErrors[argumentBindingErrorName]; 443var testData = MessageSizeData[testDataName];
Microsoft.AspNetCore.Components.Tests (35)
CascadingParameterTest.cs (7)
467var diff = batch.DiffsByComponentId[componentId].Single(); 503var diff = batch.DiffsByComponentId[componentId].Single(); 585var diff = firstBatch.DiffsByComponentId[componentId].Single(); 602var diff2 = secondBatch.DiffsByComponentId[componentId].Single(); 618var diff3 = thirdBatch.DiffsByComponentId[componentId].Single(); 655var diff = firstBatch.DiffsByComponentId[componentId].Single(); 670var diff2 = secondBatch.DiffsByComponentId[componentId].Single();
RendererTest.cs (26)
46var diff = batch.DiffsByComponentId[componentId].Single(); 77var nestedComponentDiff = batch.DiffsByComponentId[nestedComponentId].Single(); 107var firstDiff = batch.DiffsByComponentId[componentId].Single(); 120var secondDiff = secondBatch.DiffsByComponentId[componentId].Single(); 152var firstDiff = batch.DiffsByComponentId[nestedComponentId].Single(); 165var secondDiff = secondBatch.DiffsByComponentId[nestedComponentId].Single(); 195var diff = create.DiffsByComponentId[componentId].Single(); 210var updateDiff = update.DiffsByComponentId[componentId].Single(); 289var diff = batch.DiffsByComponentId[componentId].Single(); 305var diff2 = batch2.DiffsByComponentId[componentId].Single(); 2011var renderer1Diff = renderer1Batch.DiffsByComponentId[renderer1ComponentId].Single(); 2021var renderer2Diff = renderer2Batch.DiffsByComponentId[renderer2ComponentId].Single(); 2058var diff = batch.DiffsByComponentId[rootComponentId].Single(); 2132var diff = renderer.Batches[1].DiffsByComponentId[childComponentId].Single(); 2170var diff = renderer.Batches[1].DiffsByComponentId[childComponentId].Single(); 2238var rootComponentDiff = batch.DiffsByComponentId[rootComponentId].Single(); 2640var rootComponentDiff = batch.DiffsByComponentId[rootComponentId].Single(); 2647var childComponentDiff = batch.DiffsByComponentId[childComponentFrame.ComponentId].Single(); 2767var rootComponentDiff = batch.DiffsByComponentId[rootComponentId].Single(); 2774var childComponentDiff = batch.DiffsByComponentId[childComponentFrame.ComponentId].Single(); 2945var edit1 = batch1.DiffsByComponentId[componentId].Single().Edits.Single(); 2954var edit2 = batch2.DiffsByComponentId[componentId].Single().Edits.Single(); 3070Assert.Collection(newBatch.DiffsByComponentId[componentId].Single().Edits, 3420var parentComponentEdits1 = batch1.DiffsByComponentId[parentComponentId].Single().Edits; 5762var renderFactory = WhatToRender[TestId]; 5783var entries = EventActions[TestId];
src\Components\Shared\test\CapturedBatch.cs (2)
23=> GetComponentFrames<T>().SelectMany(f => DiffsByComponentId[f.ComponentId]); 39DiffsByComponentId[componentId].Add(diffClone);
Microsoft.AspNetCore.Components.Web.Tests (2)
src\Components\Shared\test\CapturedBatch.cs (2)
23=> GetComponentFrames<T>().SelectMany(f => DiffsByComponentId[f.ComponentId]); 39DiffsByComponentId[componentId].Add(diffClone);
Microsoft.AspNetCore.Components.WebView.Maui (1)
iOS\BlazorWebViewHandler.iOS.cs (1)
298 contentType = headers["Content-Type"];
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
51var counter = (string)payload["Name"];
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (6)
HealthCheckMiddlewareTests.cs (6)
904Assert.Equal(StatusCodes.Status200OK, options.ResultStatusCodes[HealthStatus.Healthy]); 905Assert.Equal(StatusCodes.Status200OK, options.ResultStatusCodes[HealthStatus.Degraded]); 906Assert.Equal(StatusCodes.Status503ServiceUnavailable, options.ResultStatusCodes[HealthStatus.Unhealthy]); 914Assert.Equal(StatusCodes.Status200OK, options.ResultStatusCodes[HealthStatus.Healthy]); 915Assert.Equal(StatusCodes.Status200OK, options.ResultStatusCodes[HealthStatus.Degraded]); 916Assert.Equal(StatusCodes.Status503ServiceUnavailable, options.ResultStatusCodes[HealthStatus.Unhealthy]);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (6)
Logging\HttpLoggingServiceExtensionsTests.cs (6)
81Assert.Equal("Taxonomy1", options.RouteParameterDataClasses["one"].TaxonomyName); 82Assert.Equal("Value1", options.RouteParameterDataClasses["one"].Value); 85Assert.Equal("Taxonomy2", options.RequestHeadersDataClasses["two"].TaxonomyName); 86Assert.Equal("Value2", options.RequestHeadersDataClasses["two"].Value); 89Assert.Equal("Taxonomy3", options.ResponseHeadersDataClasses["three"].TaxonomyName); 90Assert.Equal("Value3", options.ResponseHeadersDataClasses["three"].Value);
Microsoft.AspNetCore.Diagnostics.Tests (10)
DeveloperExceptionPageMiddlewareTest.cs (9)
70var originalExceptionMessage = ((JsonElement)body.Extensions["OriginalExceptionMessage"]).GetString(); 123var originalExceptionMessage = ((JsonElement)body.Extensions["OriginalExceptionMessage"]).GetString(); 124var endpointDisplayName = ((JsonElement)body.Extensions["EndpointDisplayName"]).GetString(); 125var routeValue = ((JsonElement)body.Extensions["RouteValue"]).GetString(); 126var path = ((JsonElement)body.Extensions["Path"]).GetString(); 182var originalExceptionMessage = ((JsonElement)body.Extensions["OriginalExceptionMessage"]).GetString(); 183var endpointDisplayName = ((JsonElement)body.Extensions["EndpointDisplayName"]).GetString(); 184var routeValue = ((JsonElement)body.Extensions["RouteValue"]).GetString(); 185var path = ((JsonElement)body.Extensions["Path"]).GetString();
ExceptionHandlerMiddlewareTest.cs (1)
76var originalExceptionMessage = ((JsonElement)body.Extensions["OriginalExceptionMessage"]).GetString();
Microsoft.AspNetCore.Grpc.Swagger (1)
Internal\XmlComments\GrpcXmlCommentsDocumentFilter.cs (1)
32.GroupBy(actionDesc => actionDesc.RouteValues["controller"]!)
Microsoft.AspNetCore.Grpc.Swagger.Tests (36)
Binding\BodyTests.cs (4)
30var bodySchema = operation.RequestBody.Content["application/json"].Schema; 49var bodySchema = operation.RequestBody.Content["application/json"].Schema; 65var bodySchema = operation.RequestBody.Content["application/json"].Schema; 79var bodySchema = operation.RequestBody.Content["application/json"].Schema;
Binding\ParametersTests.cs (2)
70Assert.Single(swagger.Components.Schemas["RequestBody"].Properties); 87Assert.Equal(4, swagger.Components.Schemas["RequestTwo"].Properties.Count);
Binding\ResponseBodyTests.cs (4)
31var bodySchema = operation.Responses["200"].Content["application/json"].Schema; 45var bodySchema = operation.Responses["200"].Content["application/json"].Schema; 61var bodySchema = operation.Responses["200"].Content["application/json"].Schema; 86var bodySchema = operation.Responses["200"].Content["application/json"].Schema;
SchemaGeneratorIntegrationTests.cs (15)
43var enumSchema = repository.Schemas[schema.Properties["enumValue"].Reference.Id]; 86Assert.Equal("string", schema.Properties["message"].Type); 87var valuesSchema = schema.Properties["values"]; 103Assert.Equal("RecursiveMessage", schema.Properties["child"].Reference.Id); 116Assert.Equal("string", schema.Properties["bytesValue"].Type); 117Assert.Equal("string", schema.Properties["bytesNullableValue"].Type); 163Assert.Equal("string", schema.Properties["@type"].Type); 176Assert.Equal("string", schema.Properties["firstOne"].Type); 177Assert.Equal("string", schema.Properties["firstTwo"].Type); 178Assert.Equal("string", schema.Properties["secondOne"].Type); 179Assert.Equal("string", schema.Properties["secondTwo"].Type); 193Assert.Equal("object", schema.Properties["mapValue"].Type); 194Assert.Equal("number", schema.Properties["mapValue"].AdditionalProperties.Type); 195Assert.Equal("double", schema.Properties["mapValue"].AdditionalProperties.Format); 208Assert.Equal("string", schema.Properties["fieldMaskValue"].Type);
XmlComments\XmlDocumentationIntegrationTests.cs (11)
51Assert.Equal("Name field!", path.Operations[OperationType.Get].Parameters[0].Description); 62Assert.Equal("BasicGet XML summary!", path.Operations[OperationType.Get].Summary); 63Assert.Equal("BasicGet XML remarks!", path.Operations[OperationType.Get].Description); 74Assert.Equal("BasicGet!", path.Operations[OperationType.Get].Summary); 75Assert.Null(path.Operations[OperationType.Get].Description); 86Assert.Equal("Request XML param!", path.Operations[OperationType.Post].RequestBody.Description); 97Assert.Null(path.Operations[OperationType.Post].RequestBody.Description); 108Assert.Equal("Detail field!", path.Operations[OperationType.Post].RequestBody.Description); 119Assert.Collection(path.Operations[OperationType.Get].Parameters, 141var helloReplyMessage = swagger.Components.Schemas["StringReply"]; 143Assert.Equal("Message field!", helloReplyMessage.Properties["message"].Description);
Microsoft.AspNetCore.HeaderPropagation.Tests (6)
HeaderPropagationMiddlewareTest.cs (6)
47Assert.Equal(new[] { "test" }, CapturedHeaders["in"].ToArray()); 90Assert.Equal(new[] { "test" }, CapturedHeaders["in"].ToArray()); 92Assert.Equal(new[] { "test2" }, CapturedHeaders["another"].ToArray()); 135Assert.Equal(expectedValues, CapturedHeaders["in"].ToArray()); 153Assert.Equal("test", CapturedHeaders["in"]); 196Assert.Equal("Test", CapturedHeaders["in"]);
Microsoft.AspNetCore.Hosting (5)
GenericHost\GenericWebHostBuilder.cs (4)
55var webHostOptions = (WebHostOptions)context.Properties[typeof(WebHostOptions)]; 218var webHostOptions = (WebHostOptions)context.Properties[typeof(WebHostOptions)]; 307var instance = context.Properties[_startupKey]; 308var builder = (ConfigureContainerBuilder)context.Properties[typeof(ConfigureContainerBuilder)];
GenericHost\SlimWebHostBuilder.cs (1)
31var webHostOptions = (WebHostOptions)context.Properties[typeof(WebHostOptions)];
Microsoft.AspNetCore.Hosting.Tests (1)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
51var counter = (string)payload["Name"];
Microsoft.AspNetCore.Http (1)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
91return ReadDictionary[key];
Microsoft.AspNetCore.Http.Abstractions.Tests (13)
HttpValidationProblemDetailsJsonConverterTest.cs (1)
40Assert.Equal((string)problemDetails.Extensions["traceId"]!, document.RootElement.GetProperty("traceId").GetString());
MapPathMiddlewareTests.cs (6)
65Assert.Equal(expectedPathBase, (string)context.Items["test.PathBase"]!); 66Assert.Equal(expectedPath, context.Items["test.Path"]); 93Assert.Equal(string.Concat(basePath, requestPath.AsSpan(0, matchPath.Length)), (string)context.Items["test.PathBase"]!); 94Assert.Equal(requestPath.Substring(matchPath.Length), context.Items["test.Path"]); 121Assert.Equal(basePath, (string)context.Items["test.PathBase"]!); 122Assert.Equal(requestPath, context.Items["test.Path"]);
UseMiddlewareTest.cs (2)
273Assert.True(Assert.IsType<bool>(context.Items["before"])); 274Assert.True(Assert.IsType<bool>(context.Items["after"]));
UsePathBaseExtensionsTests.cs (2)
222Assert.Equal(expectedPath, ((PathString?)requestContext.Items["test.Path"])!.Value.Value); 223Assert.Equal(expectedPathBase, ((PathString?)requestContext.Items["test.PathBase"])!.Value.Value);
UseWhenExtensionsTests.cs (2)
133var item = context.Items[key]; 156var item = context.Items[key];
Microsoft.AspNetCore.Http.Extensions.Tests (178)
ProblemDetailsDefaultWriterTest.cs (11)
56Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 161Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 201Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 241Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 281Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 324Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 367Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 410Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 453Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 564Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 601Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString());
RequestDelegateFactoryTests.cs (25)
122Assert.True(httpContext.Items["invoked"] as bool?); 145Assert.True(httpContext.Items["invoked"] as bool?); 191Assert.Equal(1, httpContext.Items["invoked"]); 197Assert.Equal(2, httpContext.Items["invoked"]); 263Assert.Equal(42, httpContext.Items["input"]); 280Assert.Equal(1, context.Items["calls"]); 284Assert.Equal(1, context.Items["calls"]); 594Assert.Null(httpContext.Items["tryParsable"]); 621Assert.Null(httpContext.Items["tryParsable"]); 654Assert.Equal(new StringValues(new[] { "1", "2", "3" }), httpContext.Items["query"]); 655Assert.Equal(new StringValues(new[] { "4", "5", "6" }), httpContext.Items["headers"]); 656Assert.Equal(new StringValues(new[] { "7", "8", "9" }), httpContext.Items["form"]!); 682Assert.Null(httpContext.Items["query"]); 683Assert.Null(httpContext.Items["headers"]); 684Assert.Null(httpContext.Items["form"]); 704Assert.Equal(new MyAwaitedBindAsyncRecord(new Uri("https://example.org")), httpContext.Items["myAwaitedBindAsyncRecord"]); 705Assert.Equal(new MyAwaitedBindAsyncStruct(new Uri("https://example.org")), httpContext.Items["myAwaitedBindAsyncStruct"]); 877var deserializedRequestBody = httpContext.Items["body"]; 1189Assert.Same(myOriginalService, httpContext.Items["service"]); 1699Assert.Equal(new Uri("https://example.org"), httpContext.Items["uri"]); 1703Assert.Null(httpContext.Items["uri"]); 2225var invokedInContext = Assert.IsType<bool>(httpContext.Items["invoked"]); 3154Assert.Null(httpContext.Items["RequiredRouteParam"]); 3155Assert.Null(httpContext.Items["RequiredQueryParam"]); 3156Assert.Null(httpContext.Items["RequiredHeaderParam"]);
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (4)
180Assert.Equal(expectedParameterValue, httpContext.Items["tryParsable"]); 774Assert.Equal(new[] { 1, 2, 3 }, (int[])httpContext.Items["query"]!); 775Assert.Equal(new[] { 4, 5, 6 }, (int[])httpContext.Items["headers"]!); 776Assert.Equal(new[] { 7, 8, 9 }, (int[])httpContext.Items["form"]!);
RequestDelegateGenerator\RequestDelegateCreationTests.AsParameters.cs (12)
32Assert.Equal(originalRouteParam, httpContext.Items["input"]); 72Assert.Equal(originalQueryParam, httpContext.Items["input"]); 73Assert.Equal(originalCustomQueryParam, httpContext.Items["customInput"]); 74Assert.Equal(originalAnotherCustomQueryParam, httpContext.Items["anotherCustomInput"]); 100Assert.Equal(originalHeaderParam, httpContext.Items["input"]); 204Assert.Equal(originalRouteParam, httpContext.Items["input"]); 225Assert.Equal(expectedValue, httpContext.Items["input"]); 287var input = Assert.IsType<ParameterListWithReadOnlyProperties>(httpContext.Items["input"]); 318Assert.Equal(foo, httpContext.Items["foo"]); 319Assert.Equal(bar, httpContext.Items["bar"]); 344var value = Assert.IsType<InheritBindAsync>(httpContext.Items["value"]); 345var anotherValue = Assert.IsType<MyBindAsyncRecord>(httpContext.Items["anotherValue"]);
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (10)
60Assert.Equal(new Uri("https://example.org"), httpContext.Items["uri"]); 81Assert.Equal(new Uri("https://example.org"), httpContext.Items["uri"]); 110Assert.Null(httpContext.Items["uri"]); 139Assert.Null(httpContext.Items["uri"]); 248Assert.True(httpContext.Items["invoked"] as bool?); 249var arg = httpContext.Items["myBindAsyncParam"] as MyBindAsyncRecord; 252var todo = httpContext.Items["todo"] as Todo; 304Assert.True(httpContext.Items["invoked"] as bool?); 305var todo0 = httpContext.Items["customTodo"] as Todo; 308var todo1 = httpContext.Items["todo"] as Todo;
RequestDelegateGenerator\RequestDelegateCreationTests.cs (9)
439Assert.Equal(42, httpContext.Items["id"]); 465Assert.Equal(42, httpContext.Items["id"]); 487Assert.Null(httpContext.Items["id"]); 512Assert.Equal(42, httpContext.Items["id"]); 537Assert.Equal(42, httpContext.Items["id"]); 562Assert.Equal(42, httpContext.Items["id"]); 598Assert.Equal(new[] { 1, 2, 3 }, (int[])httpContext.Items["query"]!); 599Assert.Equal(new[] { 4, 5, 6 }, (int[])httpContext.Items["headers"]!); 600Assert.Equal(new[] { 7, 8, 9 }, (int[])httpContext.Items["form"]!);
RequestDelegateGenerator\RequestDelegateCreationTests.Filters.cs (5)
37Assert.Null(httpContext.Items["invoked"]); 38Assert.True(httpContext.Items["filterInvoked"] as bool?); 71Assert.True(httpContext.Items["invoked"] as bool?); 72Assert.True(httpContext.Items["filterInvoked"] as bool?); 152Assert.Equal(2, httpContext.Items["loggerInvoked"]);
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (56)
41Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]); 42var formFilesArgument = Assert.IsAssignableFrom<IFormFileCollection>(httpContext.Items["formFiles"]); 76Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]); 77var formFiles = Assert.IsAssignableFrom<IFormFileCollection>(httpContext.Items["formFiles"]); 111Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]); 112var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["formFiles"]); 149Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]); 150var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["formFiles"]); 187Assert.Equal(httpContext.Request.Form.Files["file1"], httpContext.Items["file1"]); 188var file1Argument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["file1"]); 192Assert.Equal(httpContext.Request.Form.Files["file2"], httpContext.Items["file2"]); 193var file2Argument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["file2"]); 228Assert.Equal(httpContext.Request.Form.Files["file1"], httpContext.Items["file1"]); 229Assert.NotNull(httpContext.Items["file1"]); 231Assert.Equal(httpContext.Request.Form.Files["file2"], httpContext.Items["file2"]); 232Assert.Null(httpContext.Items["file2"]); 265Assert.Equal(httpContext.Request.Form.Files["my_file"], httpContext.Items["formFiles"]); 266var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["formFiles"]); 302Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]); 303var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["formFiles"]); 307var traceIdArgument = Assert.IsType<TraceIdentifier>(httpContext.Items["traceId"]); 375Assert.False((bool)httpContext.Items["invoked"]); 408Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]); 409var formFilesArgument = Assert.IsType<FormFileCollection>(httpContext.Items["formFiles"]); 412Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]); 413var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["file"]); 459Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]); 460var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["file"]); 464var traceIdArgument = Assert.IsAssignableFrom<TraceIdentifier>(httpContext.Items["traceId"]); 504Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]); 505var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["file"]); 509var traceIdArgument = Assert.IsAssignableFrom<TraceIdentifier>(httpContext.Items["traceId"]); 556Assert.Equal(httpContext.Request.Form, httpContext.Items["formFiles"]); 557var formArgument = Assert.IsAssignableFrom<IFormCollection>(httpContext.Items["formFiles"]); 603Assert.Equal(httpContext.Request.Form, httpContext.Items["formFiles"]); 604var formArgument = Assert.IsAssignableFrom<IFormCollection>(httpContext.Items["formFiles"]); 650Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]); 679Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]); 680Assert.NotNull(httpContext.Items["message"]); 682Assert.Equal(httpContext.Request.Form["name"][0], httpContext.Items["name"]); 683Assert.NotNull(httpContext.Items["name"]); 712Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]); 713Assert.NotNull(httpContext.Items["message"]); 714Assert.Null(httpContext.Items["additionalMessage"]); 742Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]); 743Assert.NotNull(httpContext.Items["message"]); 772Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]); 773Assert.NotNull(httpContext.Items["message"]); 775var traceIdArgument = Assert.IsType<TraceIdentifier>(httpContext.Items["traceId"]); 835var formFilesArgument = Assert.IsAssignableFrom<FormFileCollection>(httpContext.Items["FormFilesArgument"]); 836var formArgument = Assert.IsAssignableFrom<IFormCollection>(httpContext.Items["FormArgument"]); 879Assert.False((bool)httpContext.Items["invoked"]); 904var content = Assert.IsType<MyTryParseRecord>(httpContext.Items["tryParsable"]); 937Assert.Null(httpContext.Items["invoked"]); 969Assert.Null(httpContext.Items["invoked"]); 1006Assert.Null(httpContext.Items["invoked"]);
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (6)
254var rawRequestBody = httpContext.Items["body"]; 295var rawRequestBody = httpContext.Items["body"]; 336var rawRequestBody = httpContext.Items["body"]; 377var rawRequestBody = httpContext.Items["body"]; 404Assert.Equal(default(BodyStruct), httpContext.Items[structToBeZeroedKey]); 436var resultStruct = Assert.IsType<BodyStruct>(httpContext.Items["targetStruct"]);
RequestDelegateGenerator\RequestDelegateCreationTests.KeyServices.cs (11)
28Assert.Same(myOriginalService, httpContext.Items["arg"]); 76Assert.Same(myOriginalService1, httpContext1.Items["arg"]); 77Assert.Same(myOriginalService2, httpContext2.Items["arg"]); 94Assert.Same(myOriginalService, httpContext.Items["arg"]); 114Assert.Same(myOriginalService, httpContext.Items["arg"]); 146Assert.Null(httpContext.Items["arg"]); 171Assert.Same(myOriginalService1, httpContext.Items["arg1"]); 172Assert.IsType<TestService>(httpContext.Items["arg2"]); 200Assert.Same(myOriginalService1, httpContext.Items["arg1"]); 201Assert.IsType<TestService>(httpContext.Items["arg2"]); 202Assert.Same(myOriginalService2, httpContext.Items["arg3"]);
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (12)
40Assert.Null(httpContext.Items["invoked"]); 103Assert.Null(httpContext.Items["invoked"]); 154Assert.Null(httpContext.Items["invoked"]); 224Assert.Null(httpContext.Items["invoked"]); 271Assert.Null(httpContext.Items["invoked"]); 304Assert.Null(httpContext.Items["invoked"]); 350Assert.Null(httpContext.Items["invoked"]); 488Assert.Null(httpContext.Items["invoked"]); 524Assert.Null(httpContext.Items["invoked"]); 565Assert.Null(httpContext.Items["invoked"]); 604Assert.Null(httpContext.Items["invoked"]); 644Assert.Null(httpContext.Items["invoked"]);
RequestDelegateGenerator\RequestDelegateCreationTests.RouteParameter.cs (1)
232Assert.Equal(originalRouteParam, httpContext.Items["input"]);
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (13)
40Assert.Same(httpContext, httpContext.Items["arg"]); 63Assert.Equal(httpContext.RequestAborted, httpContext.Items["arg"]); 84Assert.Same(user, httpContext.Items["arg"]); 103Assert.Equal(httpContext.Request, httpContext.Items["arg"]); 122Assert.Equal(httpContext.Response, httpContext.Items["arg"]); 147Assert.Same(httpContext, httpContext.Items["input"]); 148Assert.Same(httpContext.User, httpContext.Items["user"]); 149Assert.Same(httpContext.Request, httpContext.Items["request"]); 150Assert.Same(httpContext.Response, httpContext.Items["response"]); 251Assert.Equal(expectedValue, httpContext.Items["parameterWithDefault"]); 254Assert.Equal(expectedValue, httpContext.Items["parameterWithConst"]); 283Assert.Equal(2.15m, httpContext.Items["parameterWithDefault"]); 284Assert.Equal(3.15m, httpContext.Items["parameterWithConst"]);
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (3)
83Assert.Equal(expectedParameterValue, httpContext.Items["tryParsable"]); 215var p = httpContext.Items["p"]; 262Assert.Equal(expectedParameterValue, httpContext.Items["tryParsable"]);
Microsoft.AspNetCore.Http.Results.Tests (45)
ResultsOfTTests.Generated.cs (45)
59Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 122Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 147Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 174Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 201Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 274Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 339Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 366Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 393Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 422Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 451Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 480Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 558Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 625Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 654Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 683Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 712Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 743Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 774Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 805Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 836Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 919Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 988Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1019Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1050Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1081Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1112Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1145Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1178Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1211Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1244Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1277Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1365Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1436Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1469Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1502Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1535Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1568Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1601Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1636Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1671Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1706Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1741Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1776Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]); 1811Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
Microsoft.AspNetCore.Http.Tests (9)
ApplicationBuilderTests.cs (1)
165Assert.Equal("value1", builder1.Properties["test"]);
DefaultHttpContextTests.cs (2)
118Assert.Same(item, context.Items["foo"]); 146Assert.Same(item, context.Items["foo"]);
HeaderDictionaryTests.cs (1)
133Assert.Throws<KeyNotFoundException>(() => asIDictionary["Header1"]);
Timeouts\RequestTimeoutOptionsTests.cs (3)
16var policy = options.Policies["policy1"]; 31var policy = options.Policies["policy1"]; 42Assert.Equal(TimeSpan.FromSeconds(47), options.Policies["policy1"].Timeout);
Timeouts\RequestTimeoutsMiddlewareTests.cs (2)
215Assert.Equal("default", context.Items["SetFrom"]); 235Assert.Equal("policy1", context.Items["SetFrom"]);
Microsoft.AspNetCore.Identity.Test (1)
SignInManagerTest.cs (1)
1119var customValue = externalProperties?.Items["CustomValue"];
Microsoft.AspNetCore.JsonPatch.Tests (16)
IntegrationTests\DictionaryIntegrationTest.cs (16)
41Assert.Equal(1, model.DictionaryOfStringToInteger["one"]); 42Assert.Equal(2, model.DictionaryOfStringToInteger["two"]); 43Assert.Equal(3, model.DictionaryOfStringToInteger["three"]); 61Assert.Equal(1, model.DictionaryOfStringToInteger["one"]); 79Assert.Equal(1, model.DictionaryOfStringToInteger["two"]); 97Assert.Equal(1, model.DictionaryOfStringToInteger["one"]); 98Assert.Equal(20, model.DictionaryOfStringToInteger["two"]); 116Assert.Equal(1, model.DictionaryOfStringToInteger["one"]); 117Assert.Equal(1, model.DictionaryOfStringToInteger["two"]); 196var actualValue1 = model.DictionaryOfStringToCustomer[key1]; 219var actualValue1 = model.DictionaryOfStringToCustomer[key1]; 241var actualValue2 = model.DictionaryOfStringToCustomer[key2]; 265var actualValue2 = model.DictionaryOfStringToCustomer[key2]; 289var actualValue1 = model.DictionaryOfStringToCustomer[key1]; 313var actualValue1 = model.DictionaryOfStringToInteger[key1]; 314var actualValue2 = model.DictionaryOfStringToInteger[key2];
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
EndpointMetadataApiDescriptionProviderTest.cs (2)
51Assert.Equal(declaringTypeName, apiDescription.ActionDescriptor.RouteValues["controller"]); 59Assert.Equal(nameof(EndpointMetadataApiDescriptionProviderTest), apiDescription.ActionDescriptor.RouteValues["controller"]);
Microsoft.AspNetCore.Mvc.Core (6)
ModelBinding\Binders\ComplexObjectModelBinder.cs (2)
341var propertyBinder = _propertyBinders[property]; 392var propertyBinder = _propertyBinders[property];
ModelBinding\Binders\ComplexTypeModelBinder.cs (3)
117if (_propertyBinders[property] is PlaceholderBinder) 167if (_propertyBinders[property] is PlaceholderBinder) 308var binder = _propertyBinders[bindingContext.ModelMetadata];
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
91return ReadDictionary[key];
Microsoft.AspNetCore.Mvc.Core.Test (26)
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (3)
41var value = actionModel.Properties[typeof(ApiConventionResult)]; 57var value = actionModel.Properties[typeof(ApiConventionResult)]; 158return Assert.IsType<TValue>(action.Properties[typeof(TValue)]);
ApplicationModels\ControllerActionDescriptorBuilderTest.cs (3)
81Assert.Equal("application", descriptors.Single().Properties["test"]); 107Assert.Equal("controller", descriptors.Single().Properties["test"]); 134Assert.Equal("action", descriptors.Single().Properties["test"]);
ApplicationModels\ControllerActionDescriptorProviderTests.cs (5)
261var anonymousAction = Assert.Single(descriptors, a => a.RouteValues["action"] == "AllowAnonymousAction"); 269var authorizeAction = Assert.Single(descriptors, a => a.RouteValues["action"] == "AuthorizeAction"); 1316Assert.Null(context.Results[0].RouteValues["page"]); 1319Assert.Null(context.Results[1].RouteValues["controller"]); 1321Assert.Null(context.Results[1].RouteValues["action"]);
ControllerBaseTest.cs (7)
2361Assert.Equal("some-trace", problemDetails.Extensions["traceId"]); 2362Assert.Equal(new[] { "error1" }, problemDetails.Errors["key1"]); 2449Assert.Equal(1, problemDetails.Extensions["ext1"]); 2450Assert.Equal(2, problemDetails.Extensions["ext2"]); 2480Assert.Equal("some-trace", problemDetails.Extensions["traceId"]); 2526Assert.Equal(1, problemDetails.Extensions["ext1"]); 2527Assert.Equal(2, problemDetails.Extensions["ext2"]);
DependencyInjection\ApiBehaviorOptionsSetupTest.cs (2)
110Assert.Equal(Activity.Current.Id, problemDetails.Extensions["traceId"]); 127Assert.Equal("42", problemDetails.Extensions["traceId"]);
Filters\FilterFactoryTest.cs (1)
213var filter = new TestFilter(providerContext.ActionContext.HttpContext.Items["name"] as string);
Infrastructure\ControllerActionInvokerTest.cs (1)
1445Assert.Equal(5, context.Object.Items["Result"]);
Infrastructure\ProblemDetalsClientErrorFactoryTest.cs (2)
91Assert.Equal(Activity.Current.Id, problemDetails.Extensions["traceId"]); 117Assert.Equal("42", problemDetails.Extensions["traceId"]);
Routing\UrlHelperTestBase.cs (2)
921Assert.Same(urlHelper, actionContext.HttpContext.Items[typeof(IUrlHelper)] as IUrlHelper); 944Assert.Same(urlHelper, actionContext.HttpContext.Items[typeof(IUrlHelper)] as IUrlHelper);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (22)
BsonTempDataSerializerTest.cs (7)
107var roundTripValue = Assert.IsType<int[]>(values[key]); 128var roundTripValue = Assert.IsType<DateTime>(values[key]); 149var roundTripValue = Assert.IsType<Guid>(values[key]); 171var roundTripValue = Assert.IsType<long>(values[key]); 192var roundTripValue = (double)values[key]; 222var roundTripValue = Assert.IsType<string>(values[key]); 249var roundTripValue = Assert.IsType<DateTime[]>(values[key]);
src\Mvc\Mvc.ViewFeatures\test\Infrastructure\TempDataSerializerTestBase.cs (15)
41Assert.Null(values[key]); 64var roundTripValue = Assert.IsType<int>(values[key]); 86var roundTripValue = (int?)values[key]; 107var roundTripValue = Assert.IsType<string>(values[key]); 128var roundTripValue = (DayOfWeek)values[key]; 149var roundTripValue = Assert.IsType<DateTime>(values[key]); 170var roundTripValue = Assert.IsType<Guid>(values[key]); 192var roundTripValue = Assert.IsType<string>(values[key]); 214var roundTripValue = Assert.IsType<string>(values[key]); 236var roundTripValue = Assert.IsType<Guid>(values[key]); 257var roundTripValue = Assert.IsType<int[]>(values[key]); 278var roundTripValue = Assert.IsType<string[]>(values[key]); 299var roundTripValue = Assert.IsType<string[]>(values[key]); 324var roundTripValue = Assert.IsType<Dictionary<string, string>>(values[key]); 349var roundTripValue = Assert.IsType<Dictionary<string, int>>(values[key]);
Microsoft.AspNetCore.Mvc.Razor.Test (4)
RazorPageTest.cs (1)
920var renderAsyncDelegate = page.SectionWriters["test-section"];
RazorViewEngineTest.cs (2)
1174Assert.Equal(expander.ToString(), c.Values["expander-key"]); 1233Assert.Equal(expander.ToString(), c.Values["expander-key"]);
TagHelpers\TagHelperComponentTagHelperTest.cs (1)
150Assert.Equal("Value", tagHelperContext.Items["Key"]);
Microsoft.AspNetCore.Mvc.RazorPages.Test (3)
Infrastructure\PageActionDescriptorProviderTest.cs (3)
63Assert.Equal("/Test", descriptor.RouteValues["page"]); 332Assert.Equal("/Catalog/Details/Index", descriptor.RouteValues["page"]); 339Assert.Equal("/Catalog/Details/Index", descriptor.RouteValues["page"]);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Filters\SaveTempDataPropertyFilterBase.cs (1)
75var value = tempData[property.Key];
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (22)
ControllerTest.cs (1)
380var result = controller.TempData["key"];
ExpressionHelperTest.cs (5)
80(Expression<Func<IDictionary<string, TestModel>, string>>)(model => model[key].SelectedCategory.CategoryName.MainCategory), 215(Expression<Func<IDictionary<string, TestModel>, string>>)(model => model[key].SelectedCategory.CategoryName.MainCategory), 338(Expression<Func<IDictionary<string, TestModel>, string>>)(model => model[key].SelectedCategory.CategoryName.MainCategory), 342(Expression<Func<IDictionary<string, TestModel>, string>>)(model => model[key].SelectedCategory.CategoryName.MainCategory), 343(Expression<Func<IDictionary<string, LowerModel>, string>>)(model => model[key].selectedcategory.CategoryName.MainCategory)
Infrastructure\DefaultTempDataSerializerTest.cs (1)
30var roundTripValue = Assert.IsType<string>(values[key]);
Infrastructure\TempDataSerializerTestBase.cs (15)
41Assert.Null(values[key]); 64var roundTripValue = Assert.IsType<int>(values[key]); 86var roundTripValue = (int?)values[key]; 107var roundTripValue = Assert.IsType<string>(values[key]); 128var roundTripValue = (DayOfWeek)values[key]; 149var roundTripValue = Assert.IsType<DateTime>(values[key]); 170var roundTripValue = Assert.IsType<Guid>(values[key]); 192var roundTripValue = Assert.IsType<string>(values[key]); 214var roundTripValue = Assert.IsType<string>(values[key]); 236var roundTripValue = Assert.IsType<Guid>(values[key]); 257var roundTripValue = Assert.IsType<int[]>(values[key]); 278var roundTripValue = Assert.IsType<string[]>(values[key]); 299var roundTripValue = Assert.IsType<string[]>(values[key]); 324var roundTripValue = Assert.IsType<Dictionary<string, string>>(values[key]); 349var roundTripValue = Assert.IsType<Dictionary<string, int>>(values[key]);
Microsoft.AspNetCore.OpenApi (1)
Services\OpenApiDocumentService.cs (1)
322var controllerName = description.ActionDescriptor.RouteValues["controller"];
Microsoft.AspNetCore.OpenApi.Tests (290)
Services\CreateSchemaReferenceIdTests.cs (7)
36var operation = document.Paths["/api"].Operations[OperationType.Post]; 55Assert.Equal("triangle", triangleSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 57Assert.Equal("square", squareSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 74var operation = document.Paths["/"].Operations[OperationType.Post]; 123var operation = document.Paths["/"].Operations[OperationType.Post]; 180var operation = document.Paths["/"].Operations[OperationType.Post]; 223var operation = document.Paths["/"].Operations[OperationType.Post];
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Operations.cs (11)
26var operation = document.Paths["/api/todos"].Operations[OperationType.Get]; 44var operation = document.Paths["/api/todos"].Operations[OperationType.Get]; 62var operation = document.Paths["/api/todos"].Operations[OperationType.Get]; 80var operation = document.Paths["/api/todos"].Operations[OperationType.Get]; 97var operation = document.Paths["/api/todos"].Operations[OperationType.Get]; 121var operation = document.Paths["/api/todos"].Operations[OperationType.Get]; 145var operation = document.Paths["/api/todos"].Operations[OperationType.Get]; 229var operation = document.Paths["/api/todos"].Operations[OperationType.Get]; 253var operation = document.Paths["/api/todos"].Operations[OperationType.Get]; 271var operation = document.Paths["/api/todos"].Operations[OperationType.Get]; 286var operation = document.Paths["/api/todos"].Operations[OperationType.Get];
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Parameters.cs (24)
26var pathParameter = Assert.Single(document.Paths["/api/todos/{id}"].Operations[OperationType.Get].Parameters); 30var queryParameter = Assert.Single(document.Paths["/api/todos"].Operations[OperationType.Get].Parameters); 34var headerParameter = Assert.Single(document.Paths["/api"].Operations[OperationType.Get].Parameters); 55var pathParameter = Assert.Single(document.Paths["/api/todos/{id}"].Operations[OperationType.Get].Parameters!); 58var guidParameter = Assert.Single(document.Paths["/api/todos/{guid}"].Operations[OperationType.Get].Parameters!); 61var isCompletedParameter = Assert.Single(document.Paths["/api/todos/{isCompleted}"].Operations[OperationType.Get].Parameters!); 81var queryParameter = Assert.Single(document.Paths["/api/todos"].Operations[OperationType.Get].Parameters!); 84var nullableQueryParameter = Assert.Single(document.Paths["/api/users"].Operations[OperationType.Get].Parameters!); 87var defaultQueryParameter = Assert.Single(document.Paths["/api/projects"].Operations[OperationType.Get].Parameters!); 107var headerParameter = Assert.Single(document.Paths["/api/todos"].Operations[OperationType.Get].Parameters!); 110var nullableHeaderParameter = Assert.Single(document.Paths["/api/users"].Operations[OperationType.Get].Parameters!); 113var defaultHeaderParameter = Assert.Single(document.Paths["/api/projects"].Operations[OperationType.Get].Parameters!); 136var pathParameter = Assert.Single(document.Paths["/api/todos/{id}"].Operations[OperationType.Get].Parameters); 139var guidParameter = Assert.Single(document.Paths["/api/todos/{guid}"].Operations[OperationType.Get].Parameters); 142var isCompletedParameter = Assert.Single(document.Paths["/api/todos/{isCompleted}"].Operations[OperationType.Get].Parameters); 162var usersOperation = document.Paths["/api/users"].Operations[OperationType.Post]; 164var todosOperation = document.Paths["/api/todos"].Operations[OperationType.Post]; 186Assert.Null(document.Paths["/api/accept"].Operations[OperationType.Get].Parameters); 187Assert.Null(document.Paths["/api/accept-lower"].Operations[OperationType.Get].Parameters); 188Assert.Null(document.Paths["/api/authorization"].Operations[OperationType.Get].Parameters); 189Assert.Null(document.Paths["/api/authorization-lower"].Operations[OperationType.Get].Parameters); 190Assert.Null(document.Paths["/api/content-type"].Operations[OperationType.Get].Parameters); 191Assert.Null(document.Paths["/api/content-type-lower"].Operations[OperationType.Get].Parameters); 202var operation = document.Paths["/custom-binding"].Operations[OperationType.Get];
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.RequestBody.cs (36)
35var operation = paths.Operations[OperationType.Post]; 44var formFileProperty = content.Value.Schema.Properties["formFile"]; 73var operation = paths.Operations[OperationType.Post]; 76var schema = operation.RequestBody.Content["multipart/form-data"].Schema; 112var operation = paths.Operations[OperationType.Post]; 121var formFileProperty = content.Value.Schema.Properties["formFileCollection"]; 151var operation = paths.Operations[OperationType.Post]; 154var schema = operation.RequestBody.Content["multipart/form-data"].Schema; 181var operation = paths.Operations[OperationType.Post]; 193var formFile1Property = allOfItem.Properties["formFile1"]; 201var formFile2Property = allOfItem.Properties["formFile2"]; 221var operation = paths.Operations[OperationType.Post]; 229var formFileProperty = content.Value.Schema.Properties["formFile"]; 248var operation = paths.Operations[OperationType.Post]; 256var formFileProperty = content.Value.Schema.Properties["formFile"]; 275var operation = paths.Operations[OperationType.Post]; 307var operation = paths.Operations[OperationType.Post]; 328var operation = paths.Operations[OperationType.Post]; 350var operation = paths.Operations[OperationType.Post]; 371var operation = paths.Operations[OperationType.Post]; 392var operation = paths.Operations[OperationType.Post]; 411var operation = paths.Operations[OperationType.Post]; 468var operation = paths.Operations[OperationType.Post]; 488Assert.Equal(JsonSchemaType.Integer, subSchema.Properties["id"].Type); 493Assert.Equal(JsonSchemaType.String, subSchema.Properties["date"].Type); 494Assert.Equal("date-time", subSchema.Properties["date"].Format); 499Assert.Equal(JsonSchemaType.Integer, subSchema.Properties["value"].Type); 515var operation = paths.Operations[OperationType.Get]; 570var operation = paths.Operations[OperationType.Post]; 636var operation = paths.Operations[OperationType.Get]; 704var operation = paths.Operations[OperationType.Get]; 744var operation = paths.Operations[OperationType.Get]; 786var operation = paths.Operations[OperationType.Get]; 828var operation = paths.Operations[OperationType.Get]; 869var operation = paths.Operations[OperationType.Get]; 1120var operation = path.Value.Operations[OperationType.Get];
Services\OpenApiGeneratorTests.cs (2)
818var requestFormat0 = content["application/custom0"]; 821var requestFormat1 = content["application/custom1"];
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (3)
619var operation = document.Paths["/api/with-enum"].Operations[OperationType.Get]; 621var response = Assert.Single(operation.Responses).Value.Content["application/json"].Schema; 686var operation = document.Paths["/api/{student}"].Operations[OperationType.Get];
Services\OpenApiSchemaService\OpenApiSchemaService.PolymorphicSchemas.cs (22)
22var operation = document.Paths["/api"].Operations[OperationType.Post]; 41Assert.Equal("triangle", triangleSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 43Assert.Equal("square", squareSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 59var operation = document.Paths["/api"].Operations[OperationType.Post]; 80Assert.Equal(0, citySchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<int>()); 84Assert.Equal(1, timeSeriesSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<int>()); 88Assert.Equal(2, newsSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<int>()); 104var operation = document.Paths["/api"].Operations[OperationType.Post]; 123Assert.Equal("student", citySchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 127Assert.Equal("teacher", timeSeriesSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 143var operation = document.Paths["/api"].Operations[OperationType.Post]; 159Assert.Equal("paint", paintSchema.Properties["$type"].Enum.First().GetValue<string>()); 163Assert.Equal("fabric", fabricSchema.Properties["$type"].Enum.First().GetValue<string>()); 182var operation = document.Paths["/api"].Operations[OperationType.Post]; 211Assert.Equal("dog", dogSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 215Assert.Equal("cat", catSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 219Assert.Equal("pet", petSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 235var operation = document.Paths["/api"].Operations[OperationType.Post]; 270var operation = document.Paths["/api"].Operations[OperationType.Post]; 292Assert.Equal("manager", managerSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 294Assert.Equal("employee", employeeSchema.Properties[schema.Discriminator.PropertyName].Enum.First().GetValue<string>()); 296Assert.Equal("Employee", employeeSchema.Properties["manager"].Reference.Id);
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (29)
29var operation = document.Paths["/"].Operations[OperationType.Post]; 86var operation = document.Paths["/"].Operations[OperationType.Post]; 90var content = requestBody.Content[targetContentType]; 146var operation = document.Paths[path].Operations[OperationType.Post]; 163var operation = document.Paths["/required-properties"].Operations[OperationType.Post]; 190var operation = document.Paths[$"/{path}"].Operations[OperationType.Post]; 193var effectiveSchema = requestBody.Content["application/octet-stream"].Schema; 213var operation = document.Paths[$"/proposal"].Operations[OperationType.Post]; 215var schema = requestBody.Content["application/json"].Schema; 246var enumerableTodo = document.Paths["/enumerable-todo"].Operations[OperationType.Post]; 247var arrayTodo = document.Paths["/array-todo"].Operations[OperationType.Post]; 248var arrayParsable = document.Paths["/array-parsable"].Operations[OperationType.Get]; 254var enumerableTodoSchema = enumerableTodo.RequestBody.Content["application/json"].Schema; 255var arrayTodoSchema = arrayTodo.RequestBody.Content["application/json"].Schema; 307var operation = document.Paths["/api"].Operations[OperationType.Post]; 347var operation = document.Paths["/api"].Operations[OperationType.Post]; 395var operation = document.Paths["/api"].Operations[OperationType.Post]; 413var operation = document.Paths["/api"].Operations[OperationType.Post]; 465var operation = document.Paths["/api"].Operations[OperationType.Post]; 510var operation = document.Paths["/api"].Operations[OperationType.Post]; 575var operation = document.Paths["/api"].Operations[OperationType.Post]; 576Assert.Collection(operation.RequestBody.Content["application/x-www-form-urlencoded"].Schema.AllOf, 579var property = schema.Properties["name"]; 585var property = schema.Properties["number"]; 591var property = schema.Properties["ids"]; 610var operation = document.Paths["/api"].Operations[OperationType.Post]; 636var operation = document.Paths["/api"].Operations[OperationType.Post]; 674var operation = document.Paths["/api"].Operations[OperationType.Post]; 677var schema = document.Components.Schemas[content.Value.Schema.Reference.Id];
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (64)
29var operation = document.Paths["/api"].Operations[OperationType.Post]; 30var parameter = operation.RequestBody.Content["multipart/form-data"]; 33var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; 34var parameter2 = operation2.RequestBody.Content["multipart/form-data"]; 62var effectivePropertySchema = effectiveSchema.Properties["value"]; 80var operation = document.Paths["/api"].Operations[OperationType.Post]; 81var requestBody = operation.RequestBody.Content["application/json"]; 85var responseContent = response.Content["application/json"]; 110var effectiveIdSchema = effectiveSchema.Properties["id"]; 112var effectiveTitleSchema = effectiveSchema.Properties["title"]; 114var effectiveCompletedSchema = effectiveSchema.Properties["completed"]; 116var effectiveCreatedAtSchema = effectiveSchema.Properties["createdAt"]; 134var operation = document.Paths["/api"].Operations[OperationType.Post]; 135var requestBody = operation.RequestBody.Content["application/json"]; 138var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; 139var requestBody2 = operation2.RequestBody.Content["application/json"]; 191var operation = document.Paths["/api"].Operations[OperationType.Post]; 192var requestBody = operation.RequestBody.Content["multipart/form-data"]; 195var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; 196var requestBody2 = operation2.RequestBody.Content["multipart/form-data"]; 204Assert.Equal(JsonSchemaType.String, requestBodySchema.AllOf[0].Properties["resume"].Type); 205Assert.Equal("binary", requestBodySchema.AllOf[0].Properties["resume"].Format); 209Assert.Null(requestBodySchema.AllOf[1].Properties["title"].Reference); 210Assert.Null(requestBodySchema2.AllOf[1].Properties["title"].Reference); 227var operation = document.Paths["/api"].Operations[OperationType.Post]; 228var requestBody = operation.RequestBody.Content["application/json"]; 231var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; 232var requestBody2 = operation2.RequestBody.Content["application/json"]; 291var postOperation = path.Operations[OperationType.Post]; 292var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 293var getOperation = path.Operations[OperationType.Get]; 294var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 297Assert.Equal("todo", ((OpenApiAny)requestSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 319var operation = document.Paths["/api"].Operations[OperationType.Post]; 320var requestBody = operation.Responses["200"].Content["application/json"]; 323var operation2 = document.Paths["/api-2"].Operations[OperationType.Post]; 324var requestBody2 = operation2.Responses["200"].Content["application/json"]; 353var todosProperty = effectiveSchema.Properties["todos"]; 376var operation = document.Paths["/"].Operations[OperationType.Post]; 377var requestSchema = operation.RequestBody.Content["application/json"].Schema; 384Assert.Equal("Level2", level1Schema.Properties["item2"].Reference.Id); 387var level2Schema = level1Schema.Properties["item2"]; 388Assert.Equal("Level3", level2Schema.Properties["item3"].Reference.Id); 391var level3Schema = level2Schema.Properties["item3"]; 392Assert.Null(level3Schema.Properties["terminate"].Reference); 440var operation = document.Paths["/"].Operations[OperationType.Post]; 441var requestSchema = operation.RequestBody.Content["application/json"].Schema; 450Assert.Equal($"DeeplyNestedLevel{level}", levelSchema.Properties[$"item{level}"].Reference.Id); 451levelSchema = levelSchema.Properties[$"item{level}"]; 475var operation = document.Paths["/todo"].Operations[OperationType.Get]; 476var response = operation.Responses["200"].Content["application/json"]; 493var operation = document.Paths["/"].Operations[OperationType.Post]; 494var requestSchema = operation.RequestBody.Content["application/json"].Schema; 509document.Components.Schemas["LocationContainer"].SerializeAsV31(openApiWriter); 524document.Components.Schemas["LocationDto"].SerializeAsV31(openApiWriter); 542document.Components.Schemas["AddressDto"].SerializeAsV31(openApiWriter); 570var operation = document.Paths["/"].Operations[OperationType.Post]; 571var requestSchema = operation.RequestBody.Content["application/json"].Schema; 585document.Components.Schemas["ParentObject"].SerializeAsV31(openApiWriter); 607document.Components.Schemas["ChildObject"].SerializeAsV31(openApiWriter); 639var operation = document.Paths["/"].Operations[OperationType.Post]; 640var requestSchema = operation.RequestBody.Content["application/json"].Schema; 646Assert.Equal("Item", requestSchema.Properties["item1"].Reference.Id); 649Assert.Equal("Item", requestSchema.Properties["item2"].Reference.Id);
Transformers\SchemaTransformerTests.cs (92)
162Assert.Equal("1", ((OpenApiAny)schema.Extensions["x-my-extension"]).Node.GetValue<string>()); 170var schema = operation.RequestBody.Content["application/json"].Schema; 171Assert.Equal("2", ((OpenApiAny)schema.Extensions["x-my-extension"]).Node.GetValue<string>()); 196var postOperation = path.Operations[OperationType.Post]; 197var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 198Assert.Equal("1", ((OpenApiAny)requestSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 199var getOperation = path.Operations[OperationType.Get]; 200var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 201Assert.Equal("1", ((OpenApiAny)responseSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 226var postOperation = path.Operations[OperationType.Post]; 227var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 228Assert.Equal("todo", ((OpenApiAny)requestSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 229var getOperation = path.Operations[OperationType.Get]; 230var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 249var postOperation = path.Operations[OperationType.Post]; 250var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 251Assert.Equal("1", ((OpenApiAny)requestSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 252var getOperation = path.Operations[OperationType.Get]; 253var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 254Assert.Equal("1", ((OpenApiAny)responseSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 272var postOperation = path.Operations[OperationType.Post]; 273var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 274Assert.Equal("1", ((OpenApiAny)requestSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 275var getOperation = path.Operations[OperationType.Get]; 276var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 277Assert.Equal("1", ((OpenApiAny)responseSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 299var postOperation = path.Operations[OperationType.Post]; 300var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 301value = ((OpenApiAny)requestSchema.Extensions["x-my-extension"]).Node.GetValue<string>(); 303var getOperation = path.Operations[OperationType.Get]; 304var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 305Assert.Equal(value, ((OpenApiAny)responseSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 310var postOperation = path.Operations[OperationType.Post]; 311var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 312Assert.Equal(value, ((OpenApiAny)requestSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 313var getOperation = path.Operations[OperationType.Get]; 314var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 315Assert.Equal(value, ((OpenApiAny)responseSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 335var postOperation = path.Operations[OperationType.Post]; 336var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 338var getOperation = path.Operations[OperationType.Get]; 339var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 345var postOperation = path.Operations[OperationType.Post]; 346var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 348var getOperation = path.Operations[OperationType.Get]; 349var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 372var postOperation = path.Operations[OperationType.Post]; 373var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 375var getOperation = path.Operations[OperationType.Get]; 376var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 398var postOperation = path.Operations[OperationType.Post]; 399var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 401var getOperation = path.Operations[OperationType.Get]; 402var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 431var getOperation = path.Operations[OperationType.Get]; 436var postOperation = path.Operations[OperationType.Post]; 437var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 438Assert.Equal("modified-number-format", requestSchema.Properties["id"].Format); 466var getOperation = path.Operations[OperationType.Get]; 467var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 472getOperation = path.Operations[OperationType.Get]; 473responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 478getOperation = path.Operations[OperationType.Get]; 479responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 506var postOperation = path.Operations[OperationType.Post]; 507var requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 513postOperation = path.Operations[OperationType.Post]; 514requestSchema = postOperation.RequestBody.Content["application/json"].Schema; 515Assert.Equal("this-is-a-triangle", ((OpenApiAny)requestSchema.Extensions["x-my-extension"]).Node.GetValue<string>()); 541var getOperation = path.Operations[OperationType.Get]; 542var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 544Assert.Equal("modified-number-format", itemSchema.Properties["id"].Format); 548var otherGetOperation = otherPath.Operations[OperationType.Get]; 549var otherResponseSchema = otherGetOperation.Responses["200"].Content["application/json"].Schema; 580var getOperation = path.Operations[OperationType.Get]; 581var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 621var getOperation = path.Operations[OperationType.Get]; 622var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 623var someShapeSchema = responseSchema.Properties["someShape"]; 662var getOperation = path.Operations[OperationType.Get]; 663var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 664var someShapeSchema = responseSchema.Items.Properties["someShape"]; 702var postOperation = path.Operations[OperationType.Post]; 703var requestSchema = postOperation.RequestBody.Content["application/x-www-form-urlencoded"].Schema; 707Assert.Equal("modified-number-format", todoSchema.Properties["id"].Format); 708Assert.Equal("modified-number-format", errorSchema.Properties["code"].Format); 743var getOperation = path.Operations[OperationType.Get]; 744var responseSchema = getOperation.Responses["200"].Content["application/json"].Schema; 745Assert.True(((OpenApiAny)responseSchema.Not.Extensions["modified-by-not-schema-transformer"]).Node.GetValue<bool>()); 748var shapeOperation = shapePath.Operations[OperationType.Post]; 749var shapeRequestSchema = shapeOperation.RequestBody.Content["application/json"].Schema; 751Assert.True(((OpenApiAny)triangleSchema.Not.Extensions["modified-by-not-schema-transformer"]).Node.GetValue<bool>());
Microsoft.AspNetCore.OutputCaching.Tests (3)
OutputCachePolicyBuilderTests.cs (3)
231Assert.Equal("circle", context.CacheVaryByRules.VaryByValues["shape"]); 232Assert.Equal("blue", context.CacheVaryByRules.VaryByValues["color"]); 233Assert.Equal("1m", context.CacheVaryByRules.VaryByValues["size"]);
Microsoft.AspNetCore.Owin (7)
DictionaryStringValuesWrapper.cs (1)
39get { return Inner[key]; }
OwinExtensions.cs (1)
40return next1((HttpContext)env[typeof(HttpContext).FullName]);
WebSockets\OwinWebSocketAdapter.cs (3)
48_sendAsync = (WebSocketSendAsync)websocketContext[OwinConstants.WebSocket.SendAsync]; 49_receiveAsync = (WebSocketReceiveAsync)websocketContext[OwinConstants.WebSocket.ReceiveAsync]; 50_closeAsync = (WebSocketCloseAsync)websocketContext[OwinConstants.WebSocket.CloseAsync];
WebSockets\WebSocketAcceptAdapter.cs (2)
72if ((int)environment[OwinConstants.ResponseStatusCode] == 101 && adapter._callback != null) 86var webSocketAdapter = new WebSocketAdapter(webSocket, (CancellationToken)environment[OwinConstants.CallCancelled]);
Microsoft.AspNetCore.Owin.Tests (5)
OwinEnvironmentTests.cs (5)
43Assert.Equal("CustomRequestValue", requestHeaders["CustomRequestHeader"].First()); 53Assert.Equal("CustomResponseValue", responseHeaders["CustomResponseHeader"].First()); 108Assert.Throws<KeyNotFoundException>(() => env[key]); 124Assert.Equal(CancellationToken.None, env["owin.CallCancelled"]); 125Assert.Equal("1.0", env["owin.Version"]);
Microsoft.AspNetCore.Razor.Runtime (1)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
91return ReadDictionary[key];
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Runtime\TagHelpers\TagHelperScopeManagerTest.cs (1)
55((Dictionary<string, int>)executionContext.Items["test-entry"]).Add("from-child", 1234);
Microsoft.AspNetCore.ResponseCaching.Tests (1)
TestUtils.cs (1)
378return _storage[key];
Microsoft.AspNetCore.Routing (1)
RegexInlineRouteConstraintSetup.cs (1)
14var existingRegexConstraintType = options.TrimmerSafeConstraintMap["regex"];
Microsoft.AspNetCore.Routing.Tests (45)
Builder\GroupTest.cs (5)
50Assert.Equal(42, httpContext.Items["id"]); 83Assert.Equal("dotnet", httpContext.Items["org"]); 84Assert.Equal(42, httpContext.Items["id"]); 117Assert.Equal("dotnet", httpContext.Items["org"]); 118Assert.Equal(42, httpContext.Items["id"]);
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (6)
172Assert.Equal(1, (int)httpContext.Items["First-Order"]!); 173Assert.Equal(2, (int)httpContext.Items["Second-Order"]!); 220Assert.True((bool)httpContext.Items["First"]!); 221Assert.True((bool)httpContext.Items["Second"]!); 305if (httpContext.Items["CurrentOrder"] is int) 307order = (int)httpContext.Items["CurrentOrder"]!;
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (10)
167Assert.Null(httpContext.Items["input"]); 207Assert.Equal(41, httpContext.Items["input"]); 542Assert.Equal(13, httpContext.Items["input"]); 587Assert.Null(httpContext.Items["input"]); 620Assert.Equal(42, httpContext.Items["value"]); 644Assert.Null(httpContext.Items["value"]); 963string? PrintLogger(HttpContext context) => $"loggerErrorIsEnabled: {context.Items["loggerErrorIsEnabled"]}, parentName: {context.Items["parentName"]}"; 996string? PrintLogger(HttpContext context) => $"loggerErrorIsEnabled: {context.Items["loggerErrorIsEnabled"]}, parentName: {context.Items["parentName"]}";
Patterns\RoutePatternMatcherTest.cs (1)
1124Assert.Equal(expected[key], values[key]);
RouteOptionsTests.cs (1)
25Assert.Equal("TestRouteConstraint", accessor.Value.ConstraintMap["foo"].Name);
RouteTest.cs (20)
91Assert.Equal("USA", routeValues["country"]); 93Assert.Equal("5", routeValues["id"]); 147Assert.Equal("USA", routeValues["country"]); 149Assert.Equal("5", routeValues["id"]); 152Assert.Equal("USA", constraint.Values["country"]); 154Assert.Equal("5", constraint.Values["id"]); 193Assert.IsType<OptionalRouteConstraint>(route.Constraints["id"]); 201Assert.Equal("5", routeValues["id"]); 235Assert.IsType<RegexInlineRouteConstraint>(route.Constraints["ssn"]); 243Assert.Equal("123-456-7890", routeValues["ssn"]); 277Assert.IsType<OptionalRouteConstraint>(route.Constraints["id"]); 320Assert.IsType<OptionalRouteConstraint>(route.Constraints["id"]); 321var innerConstraint = ((OptionalRouteConstraint)route.Constraints["id"]).InnerConstraint; 335Assert.Equal("5", routeValues["id"]); 369Assert.IsType<OptionalRouteConstraint>(route.Constraints["id"]); 1582Assert.Equal(expectedDictionary[expectedKey], templateRoute.DataTokens[expectedKey]); 1643Assert.IsType<RegexRouteConstraint>(constraints["controller"]); 1644Assert.Equal(mockConstraint, constraints["action"]); 1662var constraint = (CompositeRouteConstraint)constraints["id"]; 1683Assert.IsType<IntRouteConstraint>(constraints["id"]);
RoutingServiceCollectionExtensionsTests.cs (1)
80var regexRouteConstraintType = options.Value.ConstraintMap["regex"];
Template\TemplateMatcherTests.cs (1)
1123Assert.Equal(expected[key], values[key]);
Microsoft.AspNetCore.Server.HttpSys (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
92get { return Store[key]; }
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
49return PropertiesTryGetValue(key, out value) ? value : Extra[key];
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (20)
Http2Tests.cs (20)
53Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 94Assert.Equal("411", decodedHeaders[InternalHeaderNames.Status]); 144Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 204Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 268Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 303Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 341Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 352Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 388Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 427Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 467Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 484Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 503Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 534Assert.Equal("500", decodedHeaders[InternalHeaderNames.Status]); 568Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 600Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 730Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 777Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 829Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 982Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]);
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
92get { return Store[key]; }
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
49return PropertiesTryGetValue(key, out value) ? value : Extra[key];
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISDeployer.cs (1)
92IISDeploymentParameters.EnvironmentVariables[DetailedErrorsEnvironmentVariable];
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (14)
CertificatePathWatcherTests.cs (8)
41Assert.Equal(dir, messageProps["Directory"]); 44Assert.Equal(filePath, messageProps["Path"]); 53Assert.Equal(filePath, messageProps["Path"]); 56Assert.Equal(dir, messageProps["Directory"]); 228Assert.Equal(dir, messageProps["Directory"]); 262Assert.Equal(filePath, messageProps["Path"]); 303Assert.Equal(filePath, messageProps["Path"]); 332Assert.Equal(filePath, messageProps["Path"]);
HttpRequestHeadersTests.cs (6)
36var header = Assert.Single(headers["custom"]); 48var host = Assert.Single(headers["host"]); 49var contentLength = Assert.Single(headers["content-length"]); 97Assert.Throws<KeyNotFoundException>(() => headers["custom"]); 98Assert.Throws<KeyNotFoundException>(() => headers["host"]); 99Assert.Throws<KeyNotFoundException>(() => headers["Content-Length"]);
Microsoft.AspNetCore.Shared.Tests (12)
CopyOnWriteDictionaryTest.cs (1)
37.Setup(d => d["key2"])
PropertyHelperTest.cs (8)
668Assert.Equal(4, dictValues["Length"]); 683Assert.Equal("value", dictValues["test"]); 684Assert.Equal(1, dictValues["other"]); 699Assert.Equal("value", dictValues["test"]); 700Assert.Equal(1, dictValues["other"]); 715Assert.Equal(5, dictValues["X"]); 716Assert.Equal(10, dictValues["Y"]); 717Assert.Equal(17, dictValues["Z"]);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
91return ReadDictionary[key];
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
92get { return Store[key]; }
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
49return PropertiesTryGetValue(key, out value) ? value : Extra[key];
Microsoft.AspNetCore.SignalR.Client.Tests (3)
HubConnectionTests.ConnectionLifecycle.cs (3)
194var method = MethodsThatRequireActiveConnection[name]; 208var method = MethodsThatRequireActiveConnection[name]; 459var method = MethodsThatRequireActiveConnection[methodName];
Microsoft.AspNetCore.SignalR.Common.Tests (17)
Internal\Protocol\JsonHubProtocolTests.cs (2)
62var testData = CustomProtocolTestData[protocolTestDataName]; 85var testData = CustomProtocolTestData[protocolTestDataName];
Internal\Protocol\JsonHubProtocolTestsBase.cs (5)
117var testData = ProtocolTestData[protocolTestDataName]; 140var testData = ProtocolTestData[protocolTestDataName]; 216var testData = OutOfOrderJsonTestData[outOfOrderJsonTestDataName]; 391var testData = MessageSizeData[testDataName]; 437var testData = ClientResultData[testDataName];
Internal\Protocol\MessagePackHubProtocolTestBase.cs (5)
217var testData = BaseTestData[testDataName]; 265var testData = BaseTestData[testDataName]; 354var testData = BaseInvalidPayloads[invalidPayloadName]; 392var testData = ArgumentBindingErrors[argumentBindingErrorName]; 443var testData = MessageSizeData[testDataName];
Internal\Protocol\MessagePackHubProtocolTests.cs (3)
187var testData = TestData[testDataName]; 196var testData = TestData[testDataName]; 216var testData = ClientResultData[testDataName];
Internal\Protocol\NewtonsoftJsonHubProtocolTests.cs (2)
60var testData = CustomProtocolTestData[protocolTestDataName]; 84var testData = CustomProtocolTestData[protocolTestDataName];
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (1)
34public Task Connected => ((TaskCompletionSource)Connection.Items["ConnectedTask"]).Task;
Microsoft.AspNetCore.SignalR.Tests (7)
HubConnectionHandlerTests.cs (3)
134var firedOnConnected = (bool)client.Connection.Items[nameof(ErrorInAbortedTokenHub.OnConnectedAsync)]; 135var firedOnDisconnected = (bool)client.Connection.Items[nameof(ErrorInAbortedTokenHub.OnDisconnectedAsync)]; 4583var task = (Task<int>)client.Connection.Items[nameof(MethodHub.UploadDoesWorkOnComplete)];
HubConnectionHandlerTestUtils\Hubs.cs (4)
400var tcs = (TaskCompletionSource)Context.Items["ConnectedTask"]; 410var tcs = (TaskCompletionSource)Context.Items["ConnectedTask"]; 490var tcs = (TaskCompletionSource)Context.Items["ConnectedTask"]; 1337var tcs = (TaskCompletionSource)Context.Items["ConnectedTask"];
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
TestClient.cs (1)
34public Task Connected => ((TaskCompletionSource)Connection.Items["ConnectedTask"]).Task;
Microsoft.AspNetCore.Tests (7)
WebApplicationTests.cs (6)
1346Assert.Equal(nameof(WebApplicationTests), builder.Host.Properties["lowercase"]); 2189Assert.Equal("world", context.Properties["hello"]); 2195Assert.Equal("world", context.Properties["hello"]); 2201Assert.Equal("world", context.Properties["hello"]); 2520Assert.Equal(1, iHostApplicationBuilder.Properties["MyProp"]); 2940var val = app.Properties["didsomething"];
WebHostTests.cs (1)
124Assert.Equal(typeof(RegexInlineRouteConstraint), routeOptions.Value.ConstraintMap["regex"]);
Microsoft.AspNetCore.WebUtilities.Tests (4)
FormPipeReaderTests.cs (4)
563Assert.Equal("bar", values["fo"]); 565Assert.Equal("", values["ba"]); 584Assert.Equal("bar", values["fo"]); 586Assert.Equal("", values["b"]);
Microsoft.Build (34)
BackEnd\BuildManager\GlobalPropertiesLookup.cs (1)
57public string? this[string key] => ExtractEscapedValue(_backingProperties[key]);
BackEnd\BuildManager\LegacyThreadingData.cs (2)
110_legacyThreadingEventsById[submissionId].Item1?.Dispose(); 111_legacyThreadingEventsById[submissionId].Item2?.Dispose();
BackEnd\Components\Caching\ConfigCache.cs (3)
63return _configurations[configId]; 96BuildRequestConfiguration config = _configurations[configId]; 129return _configurations[configId];
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
1243var proxyTargetResult = resultFromTargetBuilder.ResultsByTarget[proxyTarget];
BackEnd\Components\SdkResolution\SdkResult.cs (2)
130if (result._propertiesToAdd[propertyToAdd.Key] != propertyToAdd.Value) 141if (!result._itemsToAdd[itemToAdd.Key].Equals(itemToAdd.Value))
BackEnd\Shared\BuildAbortedException.cs (1)
87ErrorCode = state[nameof(ErrorCode)];
Collections\ReadOnlyConvertingDictionary.cs (1)
80get => _converter(_backing[key]);
Construction\Solution\SolutionProjectGenerator.cs (1)
1017if (traversalInstance.Targets[targetName].Location.File == traversalProject.FullPath)
Definition\Toolset.cs (2)
671property = subToolset.Properties[propertyName]; 674return property ?? (Properties[propertyName]);
Errors\InternalLoggerException.cs (3)
157errorCode = state[nameof(errorCode)]; 158helpKeyword = state[nameof(helpKeyword)]; 159initializationException = bool.Parse(state[nameof(initializationException)]);
Errors\InvalidProjectFileException.cs (9)
150file = state[nameof(file)]; 151lineNumber = int.Parse(state[nameof(lineNumber)]); 152columnNumber = int.Parse(state[nameof(columnNumber)]); 153endLineNumber = int.Parse(state[nameof(endLineNumber)]); 154endColumnNumber = int.Parse(state[nameof(endColumnNumber)]); 155errorSubcategory = state[nameof(errorSubcategory)]; 156errorCode = state[nameof(errorCode)]; 157helpKeyword = state[nameof(helpKeyword)]; 158hasBeenLogged = bool.Parse(state[nameof(hasBeenLogged)]);
Errors\InvalidToolsetDefinitionException.cs (1)
123errorCode = state[nameof(errorCode)];
Instance\ProjectInstance.cs (1)
3335inheritedItemDefinitions.Add(_itemDefinitions[inheritedItemDefinition.ItemType]);
Instance\ProjectItemInstance.cs (1)
1817value = _directMetadata[name];
Instance\TaskFactories\TaskHostTask.cs (2)
254string runtime = _taskHostParameters[XMakeAttributes.runtime]; 255string architecture = _taskHostParameters[XMakeAttributes.architecture];
Logging\ProfilerLogger.cs (3)
186var originalKey = originalLocations[pairToMerge.Key]; 249var pair = idTable[parentId.Value]; 256pair = idTable[pair.Key.ParentId.Value];
Microsoft.Build.Engine.OM.UnitTests (55)
Definition\DefinitionEditing_Tests.cs (1)
2049ProjectItemDefinition definition = project.ItemDefinitions["i"];
Definition\Project_Tests.cs (8)
817project.GlobalProperties["g1"].ShouldBe("v1"); 818project.GlobalProperties["g2"].ShouldBe("v2"); 835project.GlobalProperties["g1"].ShouldBe("v1"); 868project.GlobalProperties["g"].ShouldBe("v1"); 973project.GlobalProperties["p0"].ShouldBe("v0"); 974project.GlobalProperties["p1"].ShouldBe("v1b"); 1002collection.GlobalProperties["p0"].ShouldBe("v0"); 1003collection.GlobalProperties["p1"].ShouldBe("v1");
Definition\ProjectCollection_Tests.cs (20)
170Assert.Equal("v", project.GlobalProperties["p"]); 201Assert.Equal("v", project.GlobalProperties["p"]); 232Assert.Equal("v", project.GlobalProperties["p"]); 256Assert.Equal("v", project.GlobalProperties["p"]); 272Assert.Equal("v", project.GlobalProperties["p"]); 286Assert.Equal("v", project.GlobalProperties["p"]); 392Assert.Equal("Debug", project.GlobalProperties["Configuration"]); 449Assert.Equal("Debug", project.GlobalProperties["Configuration"]); 460Assert.Equal("Release", project2.GlobalProperties["Configuration"]); 465Assert.Equal("X64", project.GlobalProperties["Platform"]); 466Assert.Equal("X64", project2.GlobalProperties["Platform"]); 470Assert.Equal("Itanium", project2.GlobalProperties["Platform"]); 599Assert.Equal("v1", project2.GlobalProperties["g1"]); 602Assert.Equal("v1", project2.GlobalProperties["g1"]); 622Assert.Equal("v1", project1.GlobalProperties["g1"]); 623Assert.Equal("v2", project1.GlobalProperties["g2"]); // Got overwritten 650Assert.Equal("v1", project2.GlobalProperties["g1"]); 653Assert.Equal("v1", project2.GlobalProperties["g1"]); 813Assert.Equal("Debug", project.GlobalProperties["Configuration"]); 817Assert.Equal("Debug", project.GlobalProperties["Configuration"]);
Definition\ProjectItem_Tests.cs (5)
168ProjectItemDefinition definition = project.ItemDefinitions["i"]; 1252project.ItemDefinitions["i"].SetMetadataValue("m", "m2"); 1266Assert.Equal("m2", project.ItemDefinitions["i"].GetMetadataValue("m")); // Should not have been affected 1301project.ItemDefinitions["i"].SetMetadataValue("m", "m2"); 1313Assert.Equal("m2", project.ItemDefinitions["i"].GetMetadataValue("m")); // Should not have been affected
Definition\ProjectItemDefinition_Tests.cs (6)
36project.ItemDefinitions["i"].SetMetadataValue("n", "n0"); 66ProjectMetadata metadatum = project.ItemDefinitions["i"].GetMetadata("m"); 83ProjectItemDefinition itemDefinition = project.ItemDefinitions["i"]; 104IEnumerable<ProjectMetadata> metadataCollection = project.ItemDefinitions["i"].Metadata; 135ProjectItemDefinition definition = project.ItemDefinitions["i"]; 165ProjectItemDefinition definition = project.ItemDefinitions["i"];
Instance\ProjectOnErrorInstance_Tests.cs (1)
49ProjectOnErrorInstance onError = (ProjectOnErrorInstance)instance.Targets["t"].OnErrorChildren[0];
Instance\ProjectTargetInstance_Tests.cs (5)
59ProjectTargetInstance target = instance.Targets["t"]; 79ProjectTargetInstance target = instance.Targets["t;"]; 99ProjectTargetInstance target = instance.Targets["t;"]; 122ProjectTargetInstance target = project.Targets["t"]; 149ProjectTargetInstance target = instance.Targets["t"];
Instance\ProjectTaskInstance_Tests.cs (3)
34Assert.Equal("a1", parameters["a"]); 35Assert.Equal("b1", parameters["b"]); 79ProjectTaskInstance task = (ProjectTaskInstance)(instance.Targets["t"].Children[0]);
Instance\ProjectTaskOutputItemInstance_Tests.cs (1)
52ProjectTaskInstance task = (ProjectTaskInstance)instance.Targets["t"].Children[0];
Instance\ProjectTaskOutputPropertyInstance_Tests.cs (1)
52ProjectTaskInstance task = (ProjectTaskInstance)instance.Targets["t"].Children[0];
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (2)
668Assert.Equal(realParams[k], viewParams[k]);
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (2)
272Assert.Equal(paramValue.Ver(i), newTask.View.Parameters[paramName.Ver(i)]); 281Assert.Equal(paramValue.Ver(i), newTask.View.Parameters[paramName.Ver(i)]);
Microsoft.Build.Engine.UnitTests (241)
BackEnd\BuildManager_Tests.cs (6)
449TargetResult targetresult = result.ResultsByTarget["test"]; 3483Assert.Equal(TargetResultCode.Success, buildResult.ResultsByTarget["target1"].ResultCode); 3484Assert.Equal(TargetResultCode.Success, buildResult.ResultsByTarget["target2"].ResultCode); 3725Assert.Equal("InitialValue", results.ResultsByTarget["BuildOther"].Items.First().ItemSpec); 3747Assert.Equal(newPropertyValue, results.ResultsByTarget["Foo"].Items.First().ItemSpec); 3811string.Join(";", result.ResultsByTarget["MainTarget"].Items.Select(i => i.ItemSpec)));
BackEnd\BuildRequestConfiguration_Tests.cs (4)
371Assert.Equal("3", instance.GlobalProperties["ThreeIn"]); 372Assert.Equal("bazfile", instance.GlobalProperties["BazIn"]); 399Assert.Equal("3", instance.GlobalProperties["ThreeIn"]); 400Assert.Equal("bazfile", instance.GlobalProperties["BazIn"]);
BackEnd\BuildRequestEntry_Tests.cs (1)
78Assert.Equal(results[requiredResult.NodeRequestId], requiredResult);
BackEnd\IntrinsicTask_Tests.cs (4)
3955ProjectTargetInstanceChild targetChild = projectInstance.Targets["t"].Children.First(); 3962nodeContext.LogProjectStarted(entry).LogTargetBatchStarted(projectInstance.FullPath, projectInstance.Targets["t"], null, TargetBuiltReason.None), 3990var targetChild = projectInstance.Targets["t"].Children.First(); 3997nodeContext.LogProjectStarted(entry).LogTargetBatchStarted(projectInstance.FullPath, projectInstance.Targets["t"], null, TargetBuiltReason.None),
BackEnd\KnownTelemetry_Tests.cs (9)
81properties["BuildEngineDisplayVersion"].ShouldBe("Some Display Version"); 82properties["BuildEngineFrameworkName"].ShouldBe("new .NET"); 83properties["BuildEngineHost"].ShouldBe("Host description"); 84properties["InitialMSBuildServerState"].ShouldBe("hot"); 85properties["ProjectPath"].ShouldBe(@"C:\\dev\\theProject"); 86properties["ServerFallbackReason"].ShouldBe("busy"); 87properties["BuildSuccess"].ShouldBe("True"); 88properties["BuildTarget"].ShouldBe("clean"); 89properties["BuildEngineVersion"].ShouldBe("1.2.3.4");
BackEnd\LoggingConfigurationTelemetry_Tests.cs (14)
68properties["TerminalLogger"].ShouldBe(bool.TrueString); 69properties["TerminalLoggerUserIntent"].ShouldBe("on"); 70properties["TerminalLoggerUserIntentSource"].ShouldBe("arg"); 71properties["TerminalLoggerDefault"].ShouldBe("auto"); 72properties["TerminalLoggerDefaultSource"].ShouldBe("sdk"); 73properties["ConsoleLogger"].ShouldBe(bool.TrueString); 74properties["ConsoleLoggerType"].ShouldBe("serial"); 75properties["ConsoleLoggerVerbosity"].ShouldBe("minimal"); 76properties["FileLogger"].ShouldBe(bool.TrueString); 77properties["FileLoggerType"].ShouldBe("serial"); 78properties["FileLoggersCount"].ShouldBe("2"); 79properties["FileLoggerVerbosity"].ShouldBe("normal"); 80properties["BinaryLogger"].ShouldBe(bool.TrueString); 81properties["BinaryLoggerUsedDefaultName"].ShouldBe(bool.TrueString);
BackEnd\MSBuild_Tests.cs (20)
160Assert.Equal(7, targetOutputs["Build"].Items.Length); 161ObjectModelHelpers.AssertItemsMatch(expectedItemOutputs, targetOutputs["Build"].Items, false /* order of items not enforced */); 569Assert.Equal(4, targetOutputs["Build"].Items.Length); 570ObjectModelHelpers.AssertItemsMatch(expectedItemOutputs, targetOutputs["Build"].Items, false /* order of items not enforced */); 636Assert.Equal(2, targetOutputs["Build"].Items.Length); 637ObjectModelHelpers.AssertItemsMatch(expectedItemOutputs, targetOutputs["Build"].Items, false /* order of items not enforced */); 942Assert.Single(targetOutputs["Build"].Items); 943ObjectModelHelpers.AssertItemsMatch(expectedItemOutputs, targetOutputs["Build"].Items, false /* order of items not enforced */); 1064Assert.Equal(3, targetOutputs["Build"].Items.Length); 1065ObjectModelHelpers.AssertItemsMatch(expectedItemOutputs, targetOutputs["Build"].Items, false /* order of items not enforced */); 1133Assert.Equal(3, targetOutputs["Build"].Items.Length); 1134ObjectModelHelpers.AssertItemsMatch(expectedItemOutputs, targetOutputs["Build"].Items, false /* order of items not enforced */); 1199Assert.Equal(2, targetOutputs["Build"].Items.Length); 1200ObjectModelHelpers.AssertItemsMatch(expectedItemOutputs, targetOutputs["Build"].Items, false /* order of items not enforced */); 1809Assert.Equal(5, targetOutputs["Build"].Items.Length); 1810Assert.Equal("|a", targetOutputs["Build"].Items[0].ItemSpec); 1811Assert.Equal("A|b", targetOutputs["Build"].Items[1].ItemSpec); 1812Assert.Equal("B|c", targetOutputs["Build"].Items[2].ItemSpec); 1813Assert.Equal("C|d", targetOutputs["Build"].Items[3].ItemSpec); 1814Assert.Equal("D|", targetOutputs["Build"].Items[4].ItemSpec);
BackEnd\RequestedProjectState_Tests.cs (1)
84clone.ItemFilters["item2"].Count.Should().NotBe(items["item2"].Count);
BackEnd\ResultsCache_Tests.cs (4)
438var copiedBuildResult = resultsCache2.ResultsDictionary[configId]; 439var initialBuildResult = resultsCache1.ResultsDictionary[configId]; 448var copiedTargetResult = copiedBuildResult.ResultsByTarget[targetKey]; 449var initialTargetResult = initialBuildResult.ResultsByTarget[targetKey];
BackEnd\SdkResolverService_Tests.cs (1)
407result.PropertiesToAdd["PropertyFromSdkResolver"].ShouldBe("ValueFromSdkResolver");
BackEnd\SdkResultOutOfProc_Tests.cs (2)
185TargetResult targetresult = result.ResultsByTarget["GetCurrentProcessId"]; 197TargetResult targetresult = result.ResultsByTarget["GetResolverResults"];
BackEnd\TargetBuilder_Tests.cs (14)
778Assert.False(result.ResultsByTarget["Build"].AfterTargetsHaveFailed); 805Assert.False(result.ResultsByTarget["Build"].AfterTargetsHaveFailed); 835Assert.False(result.ResultsByTarget["Build"].AfterTargetsHaveFailed); 879Assert.False(result.ResultsByTarget["PostBuild"].AfterTargetsHaveFailed); 906Assert.False(result.ResultsByTarget["Build"].AfterTargetsHaveFailed); 933Assert.False(result.ResultsByTarget["Build;Me"].AfterTargetsHaveFailed); 965Assert.False(result.ResultsByTarget["Build"].AfterTargetsHaveFailed); 985result.ResultsByTarget["Build"].ResultCode.ShouldBe(TargetResultCode.Success); 986result.ResultsByTarget["Build"].AfterTargetsHaveFailed.ShouldBe(true); 1010result.ResultsByTarget["Build"].ResultCode.ShouldBe(TargetResultCode.Success); 1011result.ResultsByTarget["Build"].AfterTargetsHaveFailed.ShouldBe(true); 1029result.ResultsByTarget["Build"].ResultCode.ShouldBe(TargetResultCode.Success); 1030result.ResultsByTarget["Build"].AfterTargetsHaveFailed.ShouldBe(false); 1251Assert.False(result.ResultsByTarget["Build"].AfterTargetsHaveFailed);
BackEnd\TargetEntry_Tests.cs (3)
887Assert.Equal(TargetResultCode.Success, result.ResultsByTarget["Build"].ResultCode); 1031TargetEntry entry = new TargetEntry(requestEntry, this, new TargetSpecification(targetName, project.Targets[targetName].Location), lookup, null, TargetBuiltReason.None, _host, null, false); 1047TargetEntry entry = new TargetEntry(requestEntry, this, new TargetSpecification(target, project.Targets[target].Location), baseEntry.Lookup, baseEntry, TargetBuiltReason.None, _host, null, false);
BackEnd\TargetUpToDateChecker_Tests.cs (1)
614TargetUpToDateChecker analyzer = new TargetUpToDateChecker(p, p.Targets["Build"], _mockHost, BuildEventContext.Invalid);
BackEnd\TaskExecutionHost_Tests.cs (1)
1268ProjectTaskInstance taskInstance = project.Targets["foo"].Tasks.First();
BackEnd\TaskHost_Tests.cs (1)
106TaskItem mockItemInCache = _mockRequestCallback.BuildResultsToReturn[0].ResultsByTarget["Build"].Items[0] as TaskItem;
BackEnd\TaskRegistry_Tests.cs (37)
117List<TaskRegistry.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(taskElement.TaskName, null)]; 157List<TaskRegistry.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(taskElement.TaskName, null)]; 201List<TaskRegistry.RegisteredTaskRecord> singletonBucket = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(elementList[1].TaskName, null)]; 210List<TaskRegistry.RegisteredTaskRecord> duplicateBucket = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(elementList[0].TaskName, null)]; 264List<TaskRegistry.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(taskElement.TaskName, null)]; 1143List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(expandedtaskName, null)]; 1198List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity(expandedtaskName, null)]; 1227List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Hello", null)]; 1279List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)]; 1315List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)]; 1324TaskPropertyInfo parameterInfo = inlineTaskRecord.UsingTaskParameters[defaultParameter.Name]; 1331parameterInfo = inlineTaskRecord.UsingTaskParameters[filledOutAttributesParameter.Name]; 1351Assert.True(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"].PropertyType.Equals(typeof(String))); 1366Assert.True(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"].PropertyType.Equals(typeof(String))); 1576Assert.False(((TaskPropertyInfo)registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"]).Output); 1591Assert.False(((TaskPropertyInfo)registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"]).Output); 1623Assert.False(((TaskPropertyInfo)registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"]).Required); 1638Assert.False(((TaskPropertyInfo)registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"]).Required); 1688List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)]; 1701TaskPropertyInfo parameterInfo = inlineTaskRecord.UsingTaskParameters[filledOutAttributesParameter.Name]; 1737List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)]; 1761List<TaskRegistry.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)]; 1780Assert.False(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.TaskBodyEvaluated.Equals(body)); 1798Assert.False(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.TaskBodyEvaluated.Equals(expandedBody)); 1824Assert.False(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.TaskBodyEvaluated); 1836Assert.True(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.TaskBodyEvaluated); 1848Assert.True(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.TaskBodyEvaluated); 2019Assert.Equal(expectedRuntime, record.TaskFactoryParameters[XMakeAttributes.runtime]); 2024Assert.Equal(expectedArchitecture, record.TaskFactoryParameters[XMakeAttributes.architecture]); 2128Assert.True(registry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"].PropertyType.Equals(paramType));
Construction\SolutionProjectGenerator_Tests.cs (7)
80instances[0].Targets["Build"].AfterTargets.ShouldBe(string.Empty); 1676Assert.Contains("'$(Configuration)' == 'Release'", msbuildProject.Targets["Build"].Condition); 1677Assert.Contains("'$(Configuration)' == 'Debug'", msbuildProject.Targets["Build"].Condition); 2549Assert.Single(projectInstance.Targets["MyTarget"].Children); 2551ProjectTaskInstance task = Assert.IsType<ProjectTaskInstance>(projectInstance.Targets["MyTarget"].Children[0]); 2610projectInstance.Targets["MyTarget"].Children 2615projectInstance.Targets["MyTarget"].BeforeTargets.ShouldBe("DynamicTraversalTarget");
Definition\ItemDefinitionGroup_Tests.cs (9)
45Assert.True(ContainsMetadata(p.ItemDefinitions["Compile"].Metadata, "First", "1st")); 46Assert.True(ContainsMetadata(p.ItemDefinitions["Compile"].Metadata, "Second", "2nd")); 73Assert.True(ContainsMetadata(p.ItemDefinitions["Compile"].Metadata, "First", "1st")); 74Assert.True(ContainsMetadata(p.ItemDefinitions["Compile"].Metadata, "Second", "2nd")); 75Assert.True(ContainsMetadata(p.ItemDefinitions["Link"].Metadata, "Third", "3rd")); 76Assert.True(ContainsMetadata(p.ItemDefinitions["Link"].Metadata, "Fourth", "4th")); 600itemdefs.Add(pi.ItemDefinitions["ItemA"]); 636itemdefs.Add(pi.ItemDefinitions["ItemA"]); 678itemdefs.Add(pi.ItemDefinitions["ItemA"]);
Definition\Toolset_Tests.cs (9)
124Assert.Equal(t.Properties[key].Name, t2.Properties[key].Name); 125Assert.Equal(t.Properties[key].EvaluatedValue, t2.Properties[key].EvaluatedValue); 132SubToolset subToolset1 = t.SubToolsets[key]; 142Assert.Equal(subToolset1.Properties[subToolsetPropertyKey].Name, subToolset2.Properties[subToolsetPropertyKey].Name); 143Assert.Equal(subToolset1.Properties[subToolsetPropertyKey].EvaluatedValue, subToolset2.Properties[subToolsetPropertyKey].EvaluatedValue);
Evaluation\Evaluator_Tests.cs (29)
1464Assert.Equal("3", (Helpers.GetFirst(instance.Targets["t"].Tasks)).GetParameter("Text")); 1562ProjectMetadata metadatum = project.ItemDefinitions["i"].GetMetadata("m"); 1921Assert.Null(project.ItemDefinitions["i"].GetMetadata("m").Predecessor); 3278Assert.Equal("Baz", project.GlobalProperties["Foo"]); 3310Assert.Equal("Baz", project.GlobalProperties["Foo"]); 3312Assert.Equal("Foo", project.GlobalProperties["Goo"]); 3318Assert.Equal("Baz", project.GlobalProperties["Foo"]); 3320Assert.Equal("Foo", project.GlobalProperties["Goo"]); 3351Assert.Equal("Baz", project.GlobalProperties["Foo"]); 4867propertyInitialValueMap["Prop"].PropertySource.ShouldBe("Xml"); 4868propertyInitialValueMap["Prop"].PropertyValue.ShouldBe(string.Empty); 4871propertyInitialValueMap["EnvVar"].PropertySource.ShouldBe("Xml"); 4872propertyInitialValueMap["EnvVar"].PropertyValue.ShouldBe("It's also Defined!"); 4875propertyInitialValueMap["DEFINED_ENVIRONMENT_VARIABLE"].PropertySource.ShouldBe("EnvironmentVariable"); 4876propertyInitialValueMap["DEFINED_ENVIRONMENT_VARIABLE"].PropertyValue.ShouldBe("It's Defined!"); 4879propertyInitialValueMap["NotEnvVarRead"].PropertySource.ShouldBe("Xml"); 4880propertyInitialValueMap["NotEnvVarRead"].PropertyValue.ShouldBe("Overwritten!"); 4883propertyInitialValueMap["Prop2"].PropertySource.ShouldBe("Xml"); 4884propertyInitialValueMap["Prop2"].PropertyValue.ShouldBe("Value1"); 4987propertyInitialValueMap["Prop"].PropertySource.ShouldBe("Xml"); 4988propertyInitialValueMap["Prop"].PropertyValue.ShouldBe(string.Empty); 4991propertyInitialValueMap["EnvVar"].PropertySource.ShouldBe("Xml"); 4992propertyInitialValueMap["EnvVar"].PropertyValue.ShouldBe("It's also Defined!"); 4995propertyInitialValueMap["DEFINED_ENVIRONMENT_VARIABLE"].PropertySource.ShouldBe("EnvironmentVariable"); 4996propertyInitialValueMap["DEFINED_ENVIRONMENT_VARIABLE"].PropertyValue.ShouldBe("It's Defined!"); 4999propertyInitialValueMap["NotEnvVarRead"].PropertySource.ShouldBe("Xml"); 5000propertyInitialValueMap["NotEnvVarRead"].PropertyValue.ShouldBe("Overwritten!"); 5003propertyInitialValueMap["Prop2"].PropertySource.ShouldBe("Xml"); 5004propertyInitialValueMap["Prop2"].PropertyValue.ShouldBe("Value1");
Evaluation\ToolsetConfigurationNet5_Tests.cs (7)
43toolsetProperties["MSBuildSDKsPath"].ShouldNotBeNullOrEmpty(); 44toolsetProperties["RoslynTargetsPath"].ShouldNotBeNullOrEmpty(); 70toolsetProperties["MSBuildSDKsPath"].ShouldNotBeNullOrEmpty(); 71toolsetProperties["RoslynTargetsPath"].ShouldNotBeNullOrEmpty(); 76toolsetProperties["VCTargetsPath"].ShouldNotBeNullOrEmpty(); 77toolsetProperties["MSBuildToolsRoot"].ShouldNotBeNullOrEmpty(); 78toolsetProperties["MSBuildExtensionsPath"].ShouldNotBeNullOrEmpty();
Graph\GetCompatiblePlatformGraph_Tests.cs (9)
100GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 101GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 143GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 182GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 183GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 211GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 239GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 266GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 294GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86");
Graph\GraphLoadedFromSolution_tests.cs (2)
718return node.ProjectInstance.GlobalProperties["Configuration"]; 723return node.ProjectInstance.GlobalProperties["Platform"];
Graph\GraphTestingUtilities.cs (1)
60string expectedPropertiesMetadata = $"{InnerBuildPropertyName}={innerBuild.ProjectInstance.GlobalProperties[InnerBuildPropertyName]}";
Graph\ProjectGraph_Tests.cs (24)
432GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["A"].ShouldBe("B"); 540GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ProjectInstance.GlobalProperties["FoO"].ShouldBe("bar"); 545GetFirstNodeWithProjectNumber(graph, 4).ProjectReferences.First().ProjectInstance.GlobalProperties["FoO"].ShouldBe("BAR"); 612entryPointNode1.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 613entryPointNode2.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 620entryPointNode1.ProjectReferences.First().ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 621entryPointNode2.ProjectReferences.First().ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 651entryPointNode1.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 652entryPointNode2.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 869project1Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 870project1Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 875project2Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 876project2Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); 881project3Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 882project3Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); 894project5Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 895project5Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("Win32"); 900project6Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 901project6Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 908project8Node.ProjectInstance.GlobalProperties["Configuration"].ShouldBe("Debug"); 909project8Node.ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 2220var innerBuild1WithReferenceToInnerBuild2 = outerBuild1.ProjectReferences.FirstOrDefault(n => n.ProjectType == ProjectInterpretation.ProjectType.InnerBuild && n.ProjectInstance.GlobalProperties[InnerBuildPropertyName] == "a"); 2229innerBuild2.ProjectInstance.GlobalProperties[InnerBuildPropertyName].ShouldBe("a"); 2351projectGraph.ProjectNodes.First().ProjectInstance.GlobalProperties[PropertyNames.IsGraphBuild].ShouldBe("xyz");
Graph\ResultCacheBasedBuilds_Tests.cs (7)
140result.ResultsByTarget["Build"].Items.Length.ShouldBe(1); 141result.ResultsByTarget["Build"].Items.First() 160result.ResultsByTarget["Build"].Items.ShouldBeEmpty(); 172resultFromCachedBuild.ResultsByTarget["Build"].Items.Length.ShouldBe(1); 173resultFromCachedBuild.ResultsByTarget["Build"].Items.First().ItemSpec.ShouldBe("1"); 363rootNodeBuildResult.ResultsByTarget["Build"].Items.Select(i => i.ItemSpec).ToArray().ShouldBe(expectedOutput[rootNode]); 482var actualOutput = result.ResultsByTarget["Build"].Items.Select(i => i.ItemSpec).ToArray();
Instance\ProjectInstance_Internal_Tests.cs (11)
74project.TaskRegistry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("t0", null)][0].TaskFactoryAssemblyLoadInfo.AssemblyFile.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), "af0")); 75project.TaskRegistry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("t1", null)][0].TaskFactoryAssemblyLoadInfo.AssemblyFile.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), "af1a")); 76project.TaskRegistry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("t1", null)][1].TaskFactoryAssemblyLoadInfo.AssemblyName.ShouldBe("an1"); 77project.TaskRegistry.TaskRegistrations[new TaskRegistry.RegisteredTaskIdentity("t2", null)][0].TaskFactoryAssemblyLoadInfo.AssemblyName.ShouldBe("an2"); 174ProjectPropertyGroupTaskInstance propertyGroup = (ProjectPropertyGroupTaskInstance)(p.Targets["t"].Children[0]); 212ProjectItemGroupTaskInstance itemGroup = (ProjectItemGroupTaskInstance)(p.Targets["t"].Children[0]); 474first.Targets["t"].ShouldBeSameAs(second.Targets["t"]); 476var firstTasks = first.Targets["t"]; 477var secondTasks = second.Targets["t"]; 790projectInstance.Targets["b"].ShouldBe(targetInstance);
Instance\TaskItem_Tests.cs (2)
199metadata["a"].EvaluatedValue.ShouldBe("override"); 200metadata["b"].EvaluatedValue.ShouldBe("base");
ProjectCache\ProjectCacheTests.cs (1)
857var proxyTargetResult = buildResult.ResultsByTarget["ProxyBuild"];
Microsoft.Build.Framework (2)
LoggerException.cs (2)
126errorCode = state[nameof(errorCode)]; 127helpKeyword = state[nameof(helpKeyword)];
Microsoft.Build.Tasks.Core (2)
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (2)
537IEnumerable<string> references = taskInfo.References.Union(DefaultReferences[String.Empty]); 542references = references.Union(DefaultReferences[taskInfo.CodeLanguage]);
Microsoft.Build.Tasks.UnitTests (17)
CreateItem_Tests.cs (1)
218result.ResultsByTarget["Repro"].Items[0].GetMetadata("RecursiveDir").ShouldBe("Subdir" + Path.DirectorySeparatorChar);
GetSDKReference_Tests.cs (7)
285readInfo.DirectoryToFileList["fourth"].Count.ShouldBe(3); 286readInfo.DirectoryToFileList["fourth"][1].ShouldBe("2"); 287readInfo.DirectoryToFileList["third"][0].ShouldBe("a"); 290readInfo.PathToReferenceMetadata["first"].FusionName.ShouldBe("dat"); 291readInfo.PathToReferenceMetadata["first"].IsManagedWinmd.ShouldBeFalse(); 292readInfo.PathToReferenceMetadata["first"].IsWinMD.ShouldBeTrue(); 293readInfo.PathToReferenceMetadata["second"].ImageRuntime.ShouldBe("inf2");
ResolveSDKReference_Tests.cs (9)
3820TargetResult result = targetResults["GetResolvedSDKReferences"]; 3829result = targetResults["SDKRedistOutputGroup"]; 3963TargetResult result = targetResults["GetResolvedSDKReferences"]; 3972result = targetResults["SDKRedistOutputGroup"]; 4072TargetResult result = targetResults["GetResolvedSDKReferences"]; 4081result = targetResults["SDKRedistOutputGroup"]; 4169TargetResult result = targetResults["GetResolvedSDKReferences"]; 4180result = targetResults["SDKRedistOutputGroup"]; 4339TargetResult result = targetResults["GetResolvedSDKReferences"];
Microsoft.Build.UnitTests.Shared (1)
MockEngine.cs (1)
167message += $" Property '{key}' = '{properties[key]}'{Environment.NewLine}";
Microsoft.Build.Utilities.UnitTests (18)
ToolLocationHelper_Tests.cs (11)
714var toolsPath32 = ProjectCollection.GlobalProjectCollection.GetToolset(ObjectModelHelpers.MSBuildDefaultToolsVersion).Properties["MSBuildToolsPath32"]; 3004sdks["MyAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "3.0", "ExtensionSDKs", "MyAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3006sdks["AnotherAssembly, Version=1.0"].ShouldBe(Path.Combine(_fakeStructureRoot, "MyPlatform", "4.0", "ExtensionSDKs", "AnotherAssembly", "1.0") + Path.DirectorySeparatorChar, StringCompareShould.IgnoreCase); 3367sdkManifest.AppxLocations["AppX-Debug-x86"].ShouldBe(".\\AppX\\Debug\\x86\\Microsoft.MySDK.x86.Debug.1.0.appx"); 3368sdkManifest.AppxLocations["AppX-Debug-x64"].ShouldBe(".\\AppX\\Debug\\x64\\Microsoft.MySDK.x64.Debug.1.0.appx"); 3369sdkManifest.AppxLocations["AppX-Debug-ARM"].ShouldBe(".\\AppX\\Debug\\ARM\\Microsoft.MySDK.ARM.Debug.1.0.appx"); 3371sdkManifest.AppxLocations["AppX-Retail-x86"].ShouldBe(".\\AppX\\Retail\\x86\\Microsoft.MySDK.x86.1.0.appx"); 3372sdkManifest.AppxLocations["AppX-Retail-x64"].ShouldBe(".\\AppX\\Retail\\x64\\Microsoft.MySDK.x64.1.0.appx"); 3373sdkManifest.AppxLocations["AppX-Retail-ARM"].ShouldBe(".\\AppX\\Retail\\ARM\\Microsoft.MySDK.ARM.1.0.appx"); 3382sdkManifest.FrameworkIdentities["FrameworkIdentity-Debug"].ShouldBe("Name=MySDK.10.Debug, MinVersion=1.0.0.0"); 3383sdkManifest.FrameworkIdentities["FrameworkIdentity-Retail"].ShouldBe("Name=MySDK.10, MinVersion=1.0.0.0");
ToolTask_Tests.cs (7)
555startInfo.Environment["a"].ShouldBe("b"); 556startInfo.Environment["c"].ShouldBe("d"); 557startInfo.Environment[userVarName].ShouldBe("x"); 558startInfo.Environment["path"].ShouldBe(String.Empty); 564startInfo.Environment["programfiles"], 581task.StartInfo.Environment["a"].ShouldBe("b=c"); 642Assert.True(task.StartInfo.Environment["PATH"].Length > 0);
Microsoft.CodeAnalysis.CSharp (1)
Compilation\SyntaxAndDeclarationManager.cs (1)
461var lazyRoot = declMap[tree];
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
ExtractMethod\ExtractMethodBase.cs (1)
168var validator = new CSharpExtractMethodService.CSharpSelectionValidator(semanticDocument, textSpanOverride ?? namedSpans["b"].Single(), localFunction: false);
Intents\IntentTestsBase.cs (1)
109var priorSelection = testDocument.AnnotatedSpans["priorSelection"].Single();
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Rename\CSharpRenameRewriterLanguageService.cs (6)
814conflicts.AddRange(visitor.ConflictingTokens.Select(t => reverseMappedLocations[t.GetLocation()])); 828conflicts.AddRange(visitor.ConflictingTokens.Select(t => reverseMappedLocations[t.GetLocation()])); 838conflicts.AddRange(visitor.ConflictingTokens.Select(t => reverseMappedLocations[t.GetLocation()])); 842conflicts.AddRange(DeclarationConflictHelpers.GetMembersWithConflictingSignatures((IMethodSymbol)renamedSymbol, trimOptionalParameters: false).Select(t => reverseMappedLocations[t])); 886conflicts.Add(reverseMappedLocations[usingDirective.Alias.Name.GetLocation()]); 900conflicts.Add(reverseMappedLocations[typeParameter.Identifier.GetLocation()]);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (7)
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (1)
48var cursorSpan = testDocument.AnnotatedSpans["Cursor"].Single();
Structure\AbstractSyntaxStructureProviderTests.cs (4)
89Assert.True(spans.ContainsKey(textSpanName) && spans[textSpanName].Length == 1, $"Test did not specify '{textSpanName}' span."); 90Assert.True(spans.ContainsKey(hintSpanName) && spans[hintSpanName].Length == 1, $"Test did not specify '{hintSpanName}' span."); 92var textSpan = spans[textSpanName][0]; 93var hintSpan = spans[hintSpanName][0];
Workspaces\EditorTestWorkspace.cs (2)
413var matchingSpan = documentWithSpan.AnnotatedSpans[spanName].Single(); 463foreach (var markupSpan in markupSpans[key])
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (1)
897var annotatedSpans = Workspace.Documents.Single().AnnotatedSpans[key];
Snippets\RoslynLSPSnippetConvertTests.cs (1)
491var stringSpan = placeholderDictionary[""].First();
Microsoft.CodeAnalysis.Features (2)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingIncrementalAnalyzerProviderMetadata.cs (2)
15: this(name: (string)data[nameof(Name)], 16workspaceKinds: (IReadOnlyList<string>)data[nameof(WorkspaceKinds)])
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
LspServices\LspServiceMetadataView.cs (7)
30var typeName = (string)metadata[nameof(AbstractExportLspServiceAttribute.TypeName)]; 31var assemblyName = (string)metadata[nameof(AbstractExportLspServiceAttribute.AssemblyName)]; 32var codeBase = (string?)metadata[nameof(AbstractExportLspServiceAttribute.CodeBase)]; 35var interfaceNames = (string[])metadata[nameof(AbstractExportLspServiceAttribute.InterfaceNames)]; 38ServerKind = (WellKnownLspServerKinds)metadata[nameof(AbstractExportLspServiceAttribute.ServerKind)]; 39IsStateless = (bool)metadata[nameof(AbstractExportLspServiceAttribute.IsStateless)]; 41var methodHandlerData = (string[]?)metadata[nameof(AbstractExportLspServiceAttribute.MethodHandlerData)];
Microsoft.CodeAnalysis.UnitTests (10)
Collections\ImmutableDictionaryBuilderTestBase.cs (8)
28Assert.Equal(5, builder["five"]); 29Assert.Equal(6, builder["six"]); 65Assert.Equal(5, builder["five"]); 67Assert.Equal(5, builder["five"]); 71Assert.Equal(50, builder["five"]); 74Assert.Throws<KeyNotFoundException>(() => builder["foo"]); 93Assert.Equal(6, builder["six"]); 103Assert.Equal(6, builder["six"]);
Collections\ImmutableDictionaryTestBase.cs (2)
160Assert.Throws<KeyNotFoundException>(() => dictionary["a"]); 161Assert.Equal(3, dictionary["c"]);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
CodeCleanup\CodeCleanupTests.cs (2)
377await VerifyRange(codeWithoutMarker, [], namedSpans["b"], transformer, language); 385await VerifyRange(codeWithoutMarker, [transformer], namedSpans["b"], transformer, language);
Microsoft.Data.Analysis (1)
GroupBy.cs (1)
299ICollection<long> values = _keyToRowIndicesMap[key];
Microsoft.Data.Analysis.Interactive (1)
TabularDataResourceExtensions.cs (1)
31return dictionary[fieldName];
Microsoft.DotNet.AsmDiff (1)
MefHelpers.cs (1)
47var subsetOfConstraints = contract.MetadataConstraints.Where(c => Metadata.ContainsKey(c.Key)).ToDictionary(c => c.Key, c => Metadata[c.Key]);
Microsoft.DotNet.Open.Api.Tools.Tests (1)
OpenApiTestBase.cs (1)
137var result = _results[url];
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
Modeler\ServiceClientModelFactory.cs (2)
197paginated = operation.Extensions["x-ms-paginated"] as PaginatedOpenApiExtension; 244TypeReference type = ResolveType(body.Content["application/json"].Schema);
Microsoft.Extensions.AI.Abstractions.Tests (1)
ChatCompletion\ChatMessageTests.cs (1)
340Assert.Equal("argument", functionCallContent.Arguments["parameter"]?.ToString());
Microsoft.Extensions.ApiDescription.Client.Tests (11)
GetCurrentOpenApiReferenceTest.cs (1)
51orderedMetadata.Add(key, metadata[key]);
GetOpenApiReferenceMetadataTest.cs (9)
60orderedMetadata.Add(key, metadata[key]); 118orderedMetadata.Add(key, metadata[key]); 176orderedMetadata.Add(key, metadata[key]); 234orderedMetadata.Add(key, metadata[key]); 384orderedMetadata.Add(key, metadata[key]); 447orderedMetadata.Add(key, metadata[key]); 545orderedMetadata.Add(key, metadata[key]); 557orderedMetadata.Add(key, metadata[key]); 569orderedMetadata.Add(key, metadata[key]);
MetadataSerializerTest.cs (1)
133orderedMetadata.Add(key, metadata[key]);
Microsoft.Extensions.Http.Polly.Tests (2)
HttpRequestMessageExtensionsTest.cs (2)
74var actual = request.Properties[HttpRequestMessageExtensions.PolicyExecutionContextKey]; 99var actual = request.Properties[HttpRequestMessageExtensions.PolicyExecutionContextKey];
Microsoft.Extensions.Http.Resilience.Tests (2)
Resilience\RequestMessageSnapshotTests.cs (2)
86cloned.Properties["A"].Should().Be("A"); 87cloned.Properties["B"].Should().Be("B");
Microsoft.ML.AutoML (5)
EstimatorExtensions\EstimatorExtensionCatalog.cs (1)
51var extType = _namesToExtensionTypes[estimatorName];
TrainerExtensions\TrainerExtensionCatalog.cs (2)
54return _extensionTypesToTrainerNames[trainerExtension.GetType()]; 59var trainerExtensionType = _trainerNamesToExtensionTypes[trainerName];
TrainerExtensions\TrainerExtensionUtil.cs (2)
212columnInfo.LabelColumnName = props[LabelColumn] as string; 230var treeProps = ((CustomProperty)props[LightGbmBoosterPropName]).Properties;
Microsoft.ML.CodeGenerator (6)
CodeGenerator\CSharp\CodeGenerator.cs (1)
108currentNode = (PipelineNode)currentNode.Properties["BinaryTrainer"];
CodeGenerator\CSharp\TrainerGeneratorBase.cs (1)
114_arguments.Add(_hasAdvancedSettings ? kv.Key : NamedParameters[kv.Key], value);
CodeGenerator\CSharp\TrainerGenerators.cs (2)
566var trainerGenerator = TrainerGeneratorFactory.GetInstance((PipelineNode)_node.Properties["BinaryTrainer"]); 572sb.Append(_node.Properties["LabelColumnName"]);
Utils.cs (2)
279dataKind = columnMapping[column.Name].ColumnType; 280columnName = columnMapping[column.Name].ColumnName;
Microsoft.ML.NugetPackageVersionUpdater (1)
Program.cs (1)
70var latestVersion = latestPackageVersions[packageName];
Microsoft.ML.OnnxTransformer (6)
OnnxUtils.cs (6)
317if (!CheckOnnxShapeCompatibility(shapeDictionary[name].ToList(), meta.Dimensions.ToList())) 318throw Contracts.ExceptParamValue(shapeDictionary[name], nameof(shapeDictionary), 319"The specified shape " + string.Join(",", shapeDictionary[name]) + 326if (shapeDictionary[name].All(value => value > 0)) 327dataViewType = new VectorDataViewType(vectorType.ItemType, shapeDictionary[name]); 332info = new OnnxVariableInfo(name, shapeDictionary[name].ToList(), meta.ElementType, dataViewType, caster);
Microsoft.ML.OnnxTransformerTest (7)
OnnxTransformTests.cs (7)
764Assert.Equal(dataPoints[i].Input[0], dictionary["A"]); 765Assert.Equal(dataPoints[i].Input[1], dictionary["B"]); 766Assert.Equal(dataPoints[i].Input[2], dictionary["C"]); 779Assert.Equal(dataPoints[i].Input[0], dictionary["A"]); 780Assert.Equal(dataPoints[i].Input[1], dictionary["B"]); 781Assert.Equal(dataPoints[i].Input[2], dictionary["C"]); 870Assert.Equal(pair.Value, transformedDataPoints[i].Output[pair.Key + 1]);
Microsoft.ML.Tests (1)
OnnxSequenceTypeWithAttributesTest.cs (1)
69Assert.Equal(onnxOut[keys[i]], input.Input[i]);
Microsoft.VisualStudio.LanguageServices (2)
Options\ExportVisualStudioStorageReadFallbackAttribute.cs (1)
36=> ConfigName = (string)data[nameof(ExportVisualStudioStorageReadFallbackAttribute.ConfigName)];
ProjectSystem\VisualStudioProjectFactory.cs (1)
114? (string)solutionContext.SharedProperties[SolutionSessionIdPropertyName]
Mvc.Api.Analyzers.Test (2)
ActualApiResponseMetadataFactoryTest.cs (2)
332AnalyzerAssert.DiagnosticLocation(testSource.MarkerLocations["MM1"], metadata.ReturnOperation.Syntax.GetLocation()); 337AnalyzerAssert.DiagnosticLocation(testSource.MarkerLocations["MM2"], metadata.ReturnOperation.Syntax.GetLocation());
PresentationCore (4)
System\Windows\Media\CultureSpecificStringDictionary.cs (2)
213get { return _innerDictionary[key]; } 248return _innerDictionary[language];
System\Windows\Media\GlyphsSerializer.cs (2)
176double fontAdvance = _sideways ? _glyphTypeface.AdvanceHeights[fontIndex] : _glyphTypeface.AdvanceWidths[fontIndex];
PresentationFramework (11)
MS\Internal\Annotations\Anchoring\DataIdProcessor.cs (1)
188string id = locatorPart.NameValuePairs[ValueAttributeName];
MS\Internal\Annotations\Anchoring\FixedPageProcessor.cs (1)
177string pageNumberString = locatorPart.NameValuePairs[ValueAttributeName];
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (2)
302string stringCount = locatorPart.NameValuePairs["Count"]; 496string segmentValue = locatorPart.NameValuePairs[TextSelectionProcessor.SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)];
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (3)
200string stringCount = locatorPart.NameValuePairs[CountAttribute]; 356string stringCount = locatorPart.NameValuePairs[CountAttribute]; 437ReadOnlySpan<char> segmentString = locatorPart.NameValuePairs[SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)].AsSpan();
System\Windows\Documents\DocumentSequence.cs (1)
345GetPageAsyncRequest asyncRequest = _asyncOps[userState];
System\Windows\Documents\FixedSOMPageConstructor.cs (1)
444double advFont = typeFace.AdvanceWidths[glyphRun.GlyphIndices[glyphIndex]] * glyphRun.FontRenderingEmSize;
System\Windows\Documents\Glyphs.cs (2)
442double advance = sideways ? glyphTypeface.AdvanceHeights[glyphIndex] : glyphTypeface.AdvanceWidths[glyphIndex];
PresentationUI (14)
MS\Internal\Documents\DigitalSignatureProvider.cs (1)
450signatureDefinitionMap[xpsDigitalSignature.Id.Value];
MS\Internal\Documents\DocumentSignatureManager.cs (5)
703DigitalSignature digSig = _digSigSigResources[signatureResources.Value]; 731DigitalSignature digSig = _digSigSigResources[signatureResources]; 765DigitalSignature digSig = _digSigSigResources[signatureResources]; 806DigitalSignature digSig = _digSigSigResources[signatureResources]; 1101certificatePriorityStatus = _certificateStatusTable[digitalSignature.Certificate];
MS\Internal\Documents\RightsManagementManager.cs (3)
558RightsManagementUser user = _userMap[defaultAccount]; 573RightsManagementUser user = _userMap[accountName]; 1107RightsManagementLicense existingLicense = allRights[newLicense.LicensedUser];
MS\Internal\Documents\RightsManagementProvider.cs (4)
520grantDictionary[user].Add(grant); 543grantDictionary[owner].Add(ownerGrant); 553ConvertGrantList(user, grantDictionary[user]); 835_rmUseLicense = _rightsDictionary[_user];
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
232RightsManagementLicense license = grantDictionary[user];
ServerComparison.TestSites (1)
OneTransformPerRequest.cs (1)
24if (context.Items["Transformed"] != null)
SocialWeather (4)
PersistentConnectionLifeTimeManager.cs (3)
46var formatter = _formatterResolver.GetFormatter<T>((string)connection.Items["format"]); 71var groups = (HashSet<string>)connection.Items["groups"]; 80var groups = (HashSet<string>)connection.Items["groups"];
SocialWeatherConnectionHandler.cs (1)
33(string)connection.Items["format"]);
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\Hosting\CompositionServices.cs (1)
325var list = dictionary[key] as MetadataList;
System.Composition.Hosting (1)
System\Composition\Hosting\Core\CycleBreakingMetadataDictionary.cs (1)
67return ActualMetadata[key];
System.Composition.TypedParts (2)
System\Composition\Hosting\SinglePartExportDescriptorProvider.cs (1)
30var subsetOfConstraints = contract.MetadataConstraints.Where(c => Metadata.ContainsKey(c.Key)).ToDictionary(c => c.Key, c => Metadata[c.Key]);
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (1)
89var subsettedConstraints = contract.MetadataConstraints.Where(c => export.Metadata.ContainsKey(c.Key)).ToDictionary(c => c.Key, c => export.Metadata[c.Key]);
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (2)
53public TValue this[TKey key] => m_dictionary[key]; 67get => m_dictionary[key];
System.Private.Windows.Core (6)
System\Private\Windows\BinaryFormat\Deserializer\ArrayUpdater.cs (2)
19object value = objects[ValueId]; 20Array array = (Array)objects[ObjectId];
System\Private\Windows\BinaryFormat\Deserializer\FieldValueUpdater.cs (2)
20object newValue = objects[ValueId]; 21_field.SetValue(objects[ObjectId], newValue);
System\Private\Windows\BinaryFormat\Deserializer\PendingSerializationInfo.cs (1)
31object @object = objects[ObjectId];
System\Private\Windows\BinaryFormat\Deserializer\SerializationInfoValueUpdater.cs (1)
23object newValue = objects[ValueId];
System.Resources.Extensions (6)
System\Resources\Extensions\BinaryFormat\Deserializer\ArrayUpdater.cs (2)
20object value = objects[ValueId]; 21Array array = (Array)objects[ObjectId];
System\Resources\Extensions\BinaryFormat\Deserializer\FieldValueUpdater.cs (2)
21object newValue = objects[ValueId]; 22_field.SetValue(objects[ObjectId], newValue);
System\Resources\Extensions\BinaryFormat\Deserializer\PendingSerializationInfo.cs (1)
33object @object = objects[ObjectId];
System\Resources\Extensions\BinaryFormat\Deserializer\SerializationInfoValueUpdater.cs (1)
23object newValue = objects[ValueId];
System.Xaml (1)
System\Xaml\MS\Impl\XmlNsInfo.cs (1)
445dict[key] = new ReadOnlyCollection<string>(dict[key]);
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
77arguments = $"run --no-build --urls \"{environmentVariables["ASPNETCORE_URLS"]}\"";
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
77arguments = $"run --no-build --urls \"{environmentVariables["ASPNETCORE_URLS"]}\"";
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
77arguments = $"run --no-build --urls \"{environmentVariables["ASPNETCORE_URLS"]}\"";
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
77arguments = $"run --no-build --urls \"{environmentVariables["ASPNETCORE_URLS"]}\"";
Templates.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
77arguments = $"run --no-build --urls \"{environmentVariables["ASPNETCORE_URLS"]}\"";