75 implementations of
Microsoft.AspNetCore.Components (1)
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
263public object? this[string key]
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.cs (1)
232public StringValues this[string key] => _form[key];
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.AspNetCore.Http (1)
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 (2)
ModelBinding\ModelStateDictionary.cs (1)
171public ModelStateEntry? this[string key]
ModelBinding\Validation\ValidationStateDictionary.cs (1)
52ValidationStateEntry IReadOnlyDictionary<object, ValidationStateEntry>.this[object key] => this[key]!;
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
AttributeDictionary.cs (1)
22public string? this[string key]
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
98public TValue this[TKey key]
Microsoft.Build (3)
BackEnd\BuildManager\GlobalPropertiesLookup.cs (1)
57public string? this[string key] => ExtractEscapedValue(_backingProperties[key]);
Collections\ArrayDictionary.cs (1)
38public TValue this[TKey key]
ReadOnlyEmptyDictionary.cs (1)
166public V this[K key]
Microsoft.Build.Framework (3)
ImmutableSegmentedDictionary`2.cs (1)
118public TValue this[TKey key] => _dictionary[key];
ImmutableSegmentedDictionary`2+Builder.cs (1)
84public TValue this[TKey key]
SegmentedDictionary`2.cs (1)
179public TValue this[TKey key]
Microsoft.Build.Tasks.Core (1)
ReadOnlyEmptyDictionary.cs (1)
166public V this[K key]
Microsoft.Build.Utilities.Core (1)
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)
118public TValue this[TKey key] => _dictionary[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)
118public TValue this[TKey key] => _dictionary[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)
118public TValue this[TKey key] => _dictionary[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)
118public TValue this[TKey key] => _dictionary[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)
118public TValue this[TKey key] => _dictionary[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)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Extensions.AI.Abstractions (2)
AdditionalPropertiesDictionary{TValue}.cs (1)
64public TValue this[string key]
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Extensions.AI.Abstractions.Tests (1)
test\Shared\JsonSchemaExporter\TestTypes.cs (1)
1105public int this[string key] => key == nameof(BaseValue) ? BaseValue : throw new KeyNotFoundException();
Microsoft.Extensions.AI.AzureAIInference (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Extensions.AI.Ollama (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Extensions.Http.Diagnostics (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Gen.Logging.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Gen.Metrics.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Gen.MetricsReports.Unit.Tests (1)
src\Shared\EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Microsoft.Maui.Controls (1)
DragAndDrop\DataPackagePropertySetView.cs (1)
20 public object this[string key] => _dataPackagePropertySet[key];
MSBuild (1)
ReadOnlyEmptyDictionary.cs (1)
166public V this[K key]
Shared (1)
EmptyCollections\EmptyReadonlyDictionary.cs (1)
22public TValue this[TKey key] => throw new KeyNotFoundException();
Shared.Tests (1)
JsonSchemaExporter\TestTypes.cs (1)
1105public int this[string key] => key == nameof(BaseValue) ? BaseValue : throw new KeyNotFoundException();
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)
539TValue IReadOnlyDictionary<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)
242public TValue this[TKey key]
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (1)
176public TValue this[TKey key]
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (1)
185public TValue this[TKey key]
System.Formats.Nrbf (1)
System\Formats\Nrbf\RecordMap.cs (1)
22public SerializationRecord this[SerializationRecordId objectId] => _map[objectId];
System.Net.Http (2)
System\Net\Http\Headers\HttpHeadersNonValidated.cs (1)
42public HeaderStringValues this[string headerName]
System\Net\Http\HttpRequestOptions.cs (1)
19object? IReadOnlyDictionary<string, object?>.this[string key] => Options[key];
System.Net.WebSockets.Client (1)
System\Net\WebSockets\HttpResponseHeadersReadOnlyCollection.cs (1)
17public IEnumerable<string> this[string key] => _headers[key];
System.Private.CoreLib (2)
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)
53public TValue this[TKey key] => m_dictionary[key];
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
71public CoseHeaderValue this[CoseHeaderLabel key]
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\GroupCollection.cs (1)
40public Group this[string groupname] => _match._regex is null ?
663 references to
InMemory.FunctionalTests (21)
ConnectionMiddlewareTests.cs (1)
175Assert.Equal(typeof(InvalidOperationException).FullName, m.Tags[KestrelMetrics.ErrorTypeAttributeName]);
KestrelMetricsTests.cs (19)
97Assert.Equal("value!", (string)m.Tags["custom"]); 385Assert.Equal("value!", (string)m.Tags["custom"]); 752Assert.Equal("1.2", (string)m.Tags["tls.protocol.version"]); 760Assert.Equal("http", (string)measurement.Tags["network.protocol.name"]); 761Assert.Equal(httpVersion, (string)measurement.Tags["network.protocol.version"]); 912Assert.Equal(typeof(AuthenticationException).FullName, (string)m.Tags["error.type"]); 933Assert.Equal(networkTransport, (string)measurement.Tags["network.transport"]); 934Assert.Equal(localAddress, (string)measurement.Tags["server.address"]); 937Assert.Equal(localPort, (int)measurement.Tags["server.port"]); 945Assert.Equal(networkType, (string)measurement.Tags["network.type"]); 953Assert.Equal("http", (string)measurement.Tags["network.protocol.name"]); 954Assert.Equal(httpVersion, (string)measurement.Tags["network.protocol.version"]); 963Assert.Equal(tlsProtocolVersion, (string)measurement.Tags["tls.protocol.version"]); 971Assert.Equal(error, (string)measurement.Tags["error.type"]); 981throw new Exception($"Connection has unexpected error.type value: {measurement.Tags["error.type"]}", ex); 989Assert.Equal(networkTransport, (string)measurement.Tags["network.transport"]); 990Assert.Equal(localAddress, (string)measurement.Tags["server.address"]); 993Assert.Equal(localPort, (int)measurement.Tags["server.port"]); 1001Assert.Equal(networkType, (string)measurement.Tags["network.type"]);
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
19Equal(expectedReason, (string) tags[KestrelMetrics.ErrorTypeAttributeName]);
Interop.FunctionalTests (14)
Http2\Http2RequestTests.cs (7)
145Assert.Equal("http", (string)m.Tags["network.protocol.name"]); 146Assert.Equal("2", (string)m.Tags["network.protocol.version"]); 147Assert.Equal("tcp", (string)m.Tags["network.transport"]); 148Assert.Equal("ipv6", (string)m.Tags["network.type"]); 149Assert.Equal("::1", (string)m.Tags["server.address"]); 150Assert.Equal(host.GetPort(), (int)m.Tags["server.port"]); 151Assert.Equal("1.2", (string)m.Tags["tls.protocol.version"]);
Http3\Http3RequestTests.cs (7)
106Assert.Equal("ipv4", (string)m.Tags["network.type"]); 107Assert.Equal("http", (string)m.Tags["network.protocol.name"]); 108Assert.Equal("3", (string)m.Tags["network.protocol.version"]); 109Assert.Equal("udp", (string)m.Tags["network.transport"]); 110Assert.Equal("127.0.0.1", (string)m.Tags["server.address"]); 111Assert.Equal(host.GetPort(), (int)m.Tags["server.port"]); 112Assert.Equal("1.3", (string)m.Tags["tls.protocol.version"]);
Microsoft.AspNetCore.Authentication.Test (21)
AuthenticationMetricsTest.cs (21)
38Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 39Assert.Equal("success", (string)measurement.Tags["aspnetcore.authentication.result"]); 66Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 67Assert.Equal("failure", (string)measurement.Tags["aspnetcore.authentication.result"]); 68Assert.Equal("Microsoft.AspNetCore.Authentication.AuthenticationFailureException", (string)measurement.Tags["error.type"]); 94Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 95Assert.Equal("none", (string)measurement.Tags["aspnetcore.authentication.result"]); 123Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 124Assert.Equal("System.InvalidOperationException", (string)measurement.Tags["error.type"]); 148Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 175Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 176Assert.Equal("System.InvalidOperationException", (string)measurement.Tags["error.type"]); 199Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 226Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 227Assert.Equal("System.InvalidOperationException", (string)measurement.Tags["error.type"]); 250Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 277Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 278Assert.Equal("System.InvalidOperationException", (string)measurement.Tags["error.type"]); 301Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 328Assert.Equal("custom", (string)measurement.Tags["aspnetcore.authentication.scheme"]); 329Assert.Equal("System.InvalidOperationException", (string)measurement.Tags["error.type"]);
Microsoft.AspNetCore.Authorization.Test (15)
AuthorizationMetricsTest.cs (15)
33Assert.Equal("Basic", (string)measurement.Tags["aspnetcore.authorization.policy"]); 34Assert.Equal("success", (string)measurement.Tags["aspnetcore.authorization.result"]); 35Assert.True((bool)measurement.Tags["user.is_authenticated"]); 58Assert.Equal("Basic", (string)measurement.Tags["aspnetcore.authorization.policy"]); 59Assert.Equal("failure", (string)measurement.Tags["aspnetcore.authorization.result"]); 60Assert.False((bool)measurement.Tags["user.is_authenticated"]); 83Assert.Equal("UnknownPolicy", (string)measurement.Tags["aspnetcore.authorization.policy"]); 84Assert.Equal("System.InvalidOperationException", (string)measurement.Tags["error.type"]); 85Assert.False((bool)measurement.Tags["user.is_authenticated"]); 112Assert.Equal("success", (string)measurement.Tags["aspnetcore.authorization.result"]); 113Assert.False((bool)measurement.Tags["user.is_authenticated"]); 137Assert.Equal("failure", (string)measurement.Tags["aspnetcore.authorization.result"]); 138Assert.False((bool)measurement.Tags["user.is_authenticated"]); 166Assert.Equal("System.InvalidOperationException", (string)measurement.Tags["error.type"]); 167Assert.False((bool)measurement.Tags["user.is_authenticated"]);
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
RazorComponentResultTest.cs (3)
38Assert.Equal(123, result.Parameters["First"]); 47Assert.Equal(123, result.Parameters["Param1"]); 48Assert.Equal("Another", result.Parameters["Param2"]);
Microsoft.AspNetCore.Components.Web.Tests (2)
Forms\InputBaseTest.cs (2)
456Assert.Equal("true", component.AdditionalAttributes["aria-invalid"]); 490Assert.Equal("userSpecifiedValue", component.AdditionalAttributes["aria-invalid"]);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (5)
Logging\RequestHeadersEnricherTests.cs (5)
105Assert.Equal($"redacted:{RequestId}", enrichedState[NormalizedHeaderKey1].ToString()); 106Assert.Equal(TestValue, enrichedState[NormalizedHeaderKey4].ToString()); 135Assert.Equal($"REDACTED:{RequestId}", enrichedState[NormalizedHeaderKey1].ToString()); 161Assert.Equal(RequestId, enrichedState[NormalizedHeaderKey1].ToString()); 187Assert.Equal(RequestId, enrichedState[NormalizedHeaderKey1].ToString());
Microsoft.AspNetCore.Diagnostics.Tests (20)
DeveloperExceptionPageMiddlewareTest.cs (5)
617Assert.Equal(500, (int)m.Tags["http.response.status_code"]); 618Assert.Equal("System.Exception", (string)m.Tags["error.type"]); 627Assert.Equal(exceptionName, (string)measurement.Tags["error.type"]); 628Assert.Equal(result, measurement.Tags["aspnetcore.diagnostics.exception.result"].ToString()); 635Assert.Equal(handler, (string)measurement.Tags["aspnetcore.diagnostics.handler.type"]);
ExceptionHandlerMiddlewareTest.cs (9)
349Assert.Equal(500, (int)m.Tags["http.response.status_code"]); 350Assert.Equal("System.Exception", (string)m.Tags["error.type"]); 351Assert.Equal("/path", (string)m.Tags["http.route"]); 416Assert.Equal(500, (int)m.Tags["http.response.status_code"]); 417Assert.Equal("System.Exception", (string)m.Tags["error.type"]); 418Assert.Equal("/new", (string)m.Tags["http.route"]); 451Assert.Equal(exceptionName, (string)measurement.Tags["error.type"]); 452Assert.Equal(result, measurement.Tags["aspnetcore.diagnostics.exception.result"].ToString()); 459Assert.Equal(handler, (string)measurement.Tags["aspnetcore.diagnostics.handler.type"]);
ExceptionHandlerTest.cs (6)
1039Assert.Equal(404, (int)m.Tags["http.response.status_code"]); 1040Assert.Equal("System.Exception", (string)m.Tags["error.type"]); 1109Assert.Equal(500, (int)m.Tags["http.response.status_code"]); 1110Assert.Equal("System.Exception", (string)m.Tags["error.type"]); 1171Assert.Equal(404, (int)m.Tags["http.response.status_code"]); 1172Assert.Equal("System.Exception", (string)m.Tags["error.type"]);
Microsoft.AspNetCore.HeaderParsing.Tests (4)
HeaderParsingFeatureTests.cs (4)
153latest.Tags["aspnetcore.header_parsing.header.name"].Should().Be("Date"); 154latest.Tags["error.type"].Should().Be("Unable to parse date time offset value."); 211latest.Tags["aspnetcore.header_parsing.header.name"].Should().Be(HeaderNames.CacheControl); 212latest.Tags["aspnetcore.header_parsing.cache_access.type"].Should().Be("Hit");
Microsoft.AspNetCore.Hosting.Tests (29)
HostingApplicationDiagnosticsTests.cs (25)
264Assert.Equal("http", m.Tags["url.scheme"]); 265Assert.Equal("POST", m.Tags["http.request.method"]); 280Assert.Equal("http", m.Tags["url.scheme"]); 281Assert.Equal("POST", m.Tags["http.request.method"]); 286Assert.Equal("http", m.Tags["url.scheme"]); 287Assert.Equal("POST", m.Tags["http.request.method"]); 323Assert.Equal("http", m.Tags["url.scheme"]); 324Assert.Equal("POST", m.Tags["http.request.method"]); 339Assert.Equal("http", m.Tags["url.scheme"]); 340Assert.Equal("POST", m.Tags["http.request.method"]); 345Assert.Equal("http", m.Tags["url.scheme"]); 346Assert.Equal("POST", m.Tags["http.request.method"]); 352Assert.Equal("hello/{name}", m.Tags["http.route"]); 383Assert.Equal("http", m.Tags["url.scheme"]); 384Assert.Equal("POST", m.Tags["http.request.method"]); 399Assert.Equal("http", m.Tags["url.scheme"]); 400Assert.Equal("POST", m.Tags["http.request.method"]); 405Assert.Equal("http", m.Tags["url.scheme"]); 406Assert.Equal("POST", m.Tags["http.request.method"]); 438Assert.Equal("http", m.Tags["url.scheme"]); 439Assert.Equal("POST", m.Tags["http.request.method"]); 454Assert.Equal("http", m.Tags["url.scheme"]); 455Assert.Equal("POST", m.Tags["http.request.method"]); 460Assert.Equal("http", m.Tags["url.scheme"]); 461Assert.Equal("POST", m.Tags["http.request.method"]);
HostingMetricsTests.cs (4)
95Assert.Equal(httpVersion, (string)measurement.Tags["network.protocol.version"]); 96Assert.Equal(statusCode, (int)measurement.Tags["http.response.status_code"]); 103Assert.Equal(exceptionName, (string)measurement.Tags["error.type"]); 107Assert.True((bool)measurement.Tags["aspnetcore.request.is_unhandled"]);
Microsoft.AspNetCore.Http.Connections.Tests (3)
HttpConnectionDispatcherTests.cs (3)
1169Assert.Equal(transportType.ToString(), (string)measurement.Tags["signalr.transport"]); 1175Assert.Equal(status.ToString(), (string)measurement.Tags["signalr.connection.status"]); 1176Assert.Equal(transportType.ToString(), (string)measurement.Tags["signalr.transport"]);
Microsoft.AspNetCore.Mvc.Core.Test (18)
Routing\ActionEndpointDataSourceBaseTest.cs (5)
36Assert.Equal("Value", endpoint.RoutePattern.RequiredValues["Name"]); 100Assert.Equal("TestController", routePattern.RequiredValues["controller"]); 101Assert.Equal("TestAction", routePattern.RequiredValues["action"]); 122Assert.Equal("NewTestController", routePattern.RequiredValues["controller"]); 123Assert.Equal("NewTestAction", routePattern.RequiredValues["action"]);
Routing\ActionEndpointFactoryTest.cs (13)
150Assert.Equal("TestController", endpoint.RoutePattern.RequiredValues["controller"]); 151Assert.Equal("TestAction", endpoint.RoutePattern.RequiredValues["action"]); 152Assert.Equal("TestController", endpoint.RoutePattern.Defaults["controller"]); 185Assert.Equal("TESTACTION", endpoint.RoutePattern.Defaults["action"]); 187Assert.Equal("TestAction", endpoint.RoutePattern.RequiredValues["action"]); 233Assert.Equal("TestController", endpoint.RoutePattern.RequiredValues["controller"]); 234Assert.Equal("TestAction", endpoint.RoutePattern.RequiredValues["action"]); 251Assert.Equal("TestController", endpoint.RoutePattern.RequiredValues["controller"]); 252Assert.Equal("TestAction", endpoint.RoutePattern.RequiredValues["action"]); 348Assert.Equal("Index", matcherEndpoint.RoutePattern.RequiredValues["action"]); 349Assert.Equal("Home", matcherEndpoint.RoutePattern.RequiredValues["controller"]); 356Assert.Equal("Index", matcherEndpoint.RoutePattern.RequiredValues["action"]); 357Assert.Equal("Home", matcherEndpoint.RoutePattern.RequiredValues["controller"]);
Microsoft.AspNetCore.Mvc.RazorPages.Test (5)
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (5)
36Assert.Equal("Value", endpoint.RoutePattern.RequiredValues["Name"]); 100Assert.Equal("TestController", routePattern.RequiredValues["controller"]); 101Assert.Equal("TestAction", routePattern.RequiredValues["action"]); 122Assert.Equal("NewTestController", routePattern.RequiredValues["controller"]); 123Assert.Equal("NewTestAction", routePattern.RequiredValues["action"]);
Microsoft.AspNetCore.RateLimiting.Tests (4)
RateLimitingMetricsTests.cs (4)
58Assert.Equal("global_limiter", (string)m.Tags["aspnetcore.rate_limiting.result"]); 117Assert.Equal("acquired", (string)m.Tags["aspnetcore.rate_limiting.result"]); 238Assert.Equal("acquired", (string)m.Tags["aspnetcore.rate_limiting.result"]); 331Assert.Equal(expected, (T)tags[tagName]);
Microsoft.AspNetCore.Routing (2)
Template\TemplateBinder.cs (2)
227if (!RoutePartsEqual(ambientValue, _pattern.RequiredValues[key]) && 228!RoutePattern.IsRequiredValueAny(_pattern.RequiredValues[key]))
Microsoft.AspNetCore.Routing.Tests (4)
RoutingMetricsTests.cs (4)
139Assert.Equal("failure", (string)measurement.Tags["aspnetcore.routing.match_status"]); 145Assert.Equal("success", (string)measurement.Tags["aspnetcore.routing.match_status"]); 146Assert.Equal(route, (string)measurement.Tags["http.route"]); 147Assert.Equal(fallback, (bool)measurement.Tags["aspnetcore.routing.is_fallback"]);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
19Equal(expectedReason, (string) tags[KestrelMetrics.ErrorTypeAttributeName]);
Microsoft.Build (3)
BackEnd\BuildManager\BuildManager.cs (1)
2030var targetList = targetsPerNode[node];
Graph\GraphBuildResult.cs (1)
87public BuildResult this[ProjectGraphNode node] => ResultsByNode[node];
Graph\ProjectGraph.cs (1)
549: string.Join(", ", targetsPerNode[node]);
Microsoft.Build.BuildCheck.UnitTests (7)
TaskInvocationAnalysisDataTests.cs (7)
121data.Parameters["Text"].IsOutput.ShouldBe(false); 122data.Parameters["Text"].Value.ShouldBe("Hello"); 144data.Parameters["Paths"].IsOutput.ShouldBe(false); 145data.Parameters["Paths"].Value.ShouldBeAssignableTo(typeof(IList)); 146IList listValue = (IList)data.Parameters["Paths"].Value!; 152data.Parameters["CombinedPaths"].IsOutput.ShouldBe(true); 153data.Parameters["CombinedPaths"].Value.ShouldNotBeNull();
Microsoft.Build.Engine.OM.UnitTests (32)
Construction\SolutionFile_Tests.cs (32)
579Assert.Equal("Debug|AnyCPU", csharpProject.ProjectConfigurations["Debug|Any CPU"].FullName); 580Assert.True(csharpProject.ProjectConfigurations["Debug|Any CPU"].IncludeInBuild); 582Assert.Equal("Release|AnyCPU", csharpProject.ProjectConfigurations["Debug|Mixed Platforms"].FullName); 583Assert.True(csharpProject.ProjectConfigurations["Debug|Mixed Platforms"].IncludeInBuild); 585Assert.Equal("Debug|AnyCPU", csharpProject.ProjectConfigurations["Debug|Win32"].FullName); 586Assert.False(csharpProject.ProjectConfigurations["Debug|Win32"].IncludeInBuild); 588Assert.Equal("Release|AnyCPU", csharpProject.ProjectConfigurations["Release|Any CPU"].FullName); 589Assert.True(csharpProject.ProjectConfigurations["Release|Any CPU"].IncludeInBuild); 591Assert.Equal("Release|AnyCPU", csharpProject.ProjectConfigurations["Release|Mixed Platforms"].FullName); 592Assert.True(csharpProject.ProjectConfigurations["Release|Mixed Platforms"].IncludeInBuild); 594Assert.Equal("Release|AnyCPU", csharpProject.ProjectConfigurations["Release|Win32"].FullName); 595Assert.False(csharpProject.ProjectConfigurations["Release|Win32"].IncludeInBuild); 599Assert.Equal("Debug|Win32", vcProject.ProjectConfigurations["Debug|Any CPU"].FullName); 600Assert.False(vcProject.ProjectConfigurations["Debug|Any CPU"].IncludeInBuild); 602Assert.Equal("Debug|Win32", vcProject.ProjectConfigurations["Debug|Mixed Platforms"].FullName); 603Assert.True(vcProject.ProjectConfigurations["Debug|Mixed Platforms"].IncludeInBuild); 605Assert.Equal("Debug|Win32", vcProject.ProjectConfigurations["Debug|Win32"].FullName); 606Assert.True(vcProject.ProjectConfigurations["Debug|Win32"].IncludeInBuild); 608Assert.Equal("Release|Win32", vcProject.ProjectConfigurations["Release|Any CPU"].FullName); 609Assert.False(vcProject.ProjectConfigurations["Release|Any CPU"].IncludeInBuild); 611Assert.Equal("Release|Win32", vcProject.ProjectConfigurations["Release|Mixed Platforms"].FullName); 612Assert.True(vcProject.ProjectConfigurations["Release|Mixed Platforms"].IncludeInBuild); 614Assert.Equal("Release|Win32", vcProject.ProjectConfigurations["Release|Win32"].FullName); 615Assert.True(vcProject.ProjectConfigurations["Release|Win32"].IncludeInBuild); 664Assert.Equal("Debug|x86", winFormsApp1.ProjectConfigurations["Debug|Win32"].FullName); 665Assert.True(winFormsApp1.ProjectConfigurations["Debug|Win32"].IncludeInBuild); 667Assert.Equal("Release|x86", winFormsApp1.ProjectConfigurations["Release|Win32"].FullName); 668Assert.True(winFormsApp1.ProjectConfigurations["Debug|Win32"].IncludeInBuild); 672Assert.Equal("Debug|AnyCPU", classLibrary1.ProjectConfigurations["Debug|Any CPU"].FullName); 673Assert.False(classLibrary1.ProjectConfigurations["Debug|Any CPU"].IncludeInBuild); 675Assert.Equal("Release|AnyCPU", classLibrary1.ProjectConfigurations["Release|Any CPU"].FullName); 676Assert.False(classLibrary1.ProjectConfigurations["Release|Any CPU"].IncludeInBuild);
Microsoft.Build.Engine.UnitTests (130)
BackEnd\BuildManager_Tests.cs (4)
4213result.ResultsByNode[node1].OverallResult.ShouldBe(BuildResultCode.Success); 4217result.ResultsByNode[node2].OverallResult.ShouldBe(BuildResultCode.Success); 4298result.ResultsByNode[node1].OverallResult.ShouldBe(BuildResultCode.Failure); 4302result.ResultsByNode[node2].OverallResult.ShouldBe(BuildResultCode.Failure);
Construction\SolutionFile_OldParser_Tests.cs (48)
278ProjectInSolution project = solution.ProjectsByGuid["{AD0F3D02-9925-4D57-9DAF-E0A9D936ABDB}"]; 279ProjectInSolution project2 = solution.ProjectsByGuid["{CCCCCCCC-9925-4D57-9DAF-E0A9D936ABDB}"]; 332ProjectInSolution project1 = solution.ProjectsByGuid["{CCCCCCCC-9925-4D57-9DAF-E0A9D936ABDB}"]; 333ProjectInSolution project2 = solution.ProjectsByGuid["{DEA89696-F42B-4B58-B7EE-017FF40817D1}"]; 1893ProjectInSolution classLibraryProject = solution.ProjectsByGuid["{6185CC21-BE89-448A-B3C0-D1C27112E595}"]; 1894ProjectInSolution mainAppProject = solution.ProjectsByGuid["{A6F99D27-47B9-4EA4-BFC9-25157CBDC281}"]; 1895ProjectInSolution lowLevelProject = solution.ProjectsByGuid["{E8E75132-67E4-4D6F-9CAE-8DA4C883F419}"]; 1896ProjectInSolution highLevelProject = solution.ProjectsByGuid["{D2633E4D-46FF-4C4E-8340-4BC7CDF78615}"]; 1959ProjectInSolution csProject = solution.ProjectsByGuid["{6185CC21-BE89-448A-B3C0-D1C27112E595}"]; 1960ProjectInSolution vcProject = solution.ProjectsByGuid["{A6F99D27-47B9-4EA4-BFC9-25157CBDC281}"]; 1964csProject.ProjectConfigurations["Debug|Any CPU"].FullName.ShouldBe("Debug|AnyCPU"); 1965csProject.ProjectConfigurations["Debug|Any CPU"].IncludeInBuild.ShouldBeTrue(); 1967csProject.ProjectConfigurations["Debug|Mixed Platforms"].FullName.ShouldBe("Release|AnyCPU"); 1968csProject.ProjectConfigurations["Debug|Mixed Platforms"].IncludeInBuild.ShouldBeTrue(); 1970csProject.ProjectConfigurations["Debug|Win32"].FullName.ShouldBe("Debug|AnyCPU"); 1971csProject.ProjectConfigurations["Debug|Win32"].IncludeInBuild.ShouldBeFalse(); 1973csProject.ProjectConfigurations["Release|Any CPU"].FullName.ShouldBe("Release|AnyCPU"); 1974csProject.ProjectConfigurations["Release|Any CPU"].IncludeInBuild.ShouldBeTrue(); 1976csProject.ProjectConfigurations["Release|Mixed Platforms"].FullName.ShouldBe("Release|AnyCPU"); 1977csProject.ProjectConfigurations["Release|Mixed Platforms"].IncludeInBuild.ShouldBeTrue(); 1979csProject.ProjectConfigurations["Release|Win32"].FullName.ShouldBe("Release|AnyCPU"); 1980csProject.ProjectConfigurations["Release|Win32"].IncludeInBuild.ShouldBeFalse(); 1984vcProject.ProjectConfigurations["Debug|Any CPU"].FullName.ShouldBe("Debug|Win32"); 1985vcProject.ProjectConfigurations["Debug|Any CPU"].IncludeInBuild.ShouldBeFalse(); 1987vcProject.ProjectConfigurations["Debug|Mixed Platforms"].FullName.ShouldBe("Debug|Win32"); 1988vcProject.ProjectConfigurations["Debug|Mixed Platforms"].IncludeInBuild.ShouldBeTrue(); 1990vcProject.ProjectConfigurations["Debug|Win32"].FullName.ShouldBe("Debug|Win32"); 1991vcProject.ProjectConfigurations["Debug|Win32"].IncludeInBuild.ShouldBeTrue(); 1993vcProject.ProjectConfigurations["Release|Any CPU"].FullName.ShouldBe("Release|Win32"); 1994vcProject.ProjectConfigurations["Release|Any CPU"].IncludeInBuild.ShouldBeFalse(); 1996vcProject.ProjectConfigurations["Release|Mixed Platforms"].FullName.ShouldBe("Release|Win32"); 1997vcProject.ProjectConfigurations["Release|Mixed Platforms"].IncludeInBuild.ShouldBeTrue(); 1999vcProject.ProjectConfigurations["Release|Win32"].FullName.ShouldBe("Release|Win32"); 2000vcProject.ProjectConfigurations["Release|Win32"].IncludeInBuild.ShouldBeTrue(); 2044ProjectInSolution webProject = solution.ProjectsByGuid["{E8E75132-67E4-4D6F-9CAE-8DA4C883F418}"]; 2045ProjectInSolution exeProject = solution.ProjectsByGuid["{25FD9E7C-F37E-48E0-9A7C-607FE4AACCC0}"]; 2046ProjectInSolution missingWebProject = solution.ProjectsByGuid["{E8E75132-67E4-4D6F-9CAE-8DA4C883F419}"]; 2050webProject.ProjectConfigurations["Debug|.NET"].FullName.ShouldBe("Debug|.NET"); 2051webProject.ProjectConfigurations["Debug|.NET"].IncludeInBuild.ShouldBeTrue(); 2055exeProject.ProjectConfigurations["Debug|.NET"].FullName.ShouldBe("Debug"); 2056exeProject.ProjectConfigurations["Debug|.NET"].IncludeInBuild.ShouldBeFalse(); 2099ProjectInSolution project1 = solution.ProjectsByGuid["{FC2889D9-6050-4D2E-B022-979CCFEEAAAC}"]; 2100ProjectInSolution project2 = solution.ProjectsByGuid["{ED30D4A3-1214-410B-82BB-B61E5A9D05CA}"]; 2168ProjectInSolution project1 = solution.ProjectsByGuid["{FC2889D9-6050-4D2E-B022-979CCFEEAAAC}"]; 2169ProjectInSolution project2 = solution.ProjectsByGuid["{ED30D4A3-1214-410B-82BB-B61E5A9D05CA}"]; 2245ProjectInSolution project1 = solution.ProjectsByGuid["{6185CC21-BE89-448A-B3C0-D1C27112E595}"]; 2246ProjectInSolution project2 = solution.ProjectsByGuid["{FC2889D9-6050-4D2E-B022-979CCFEEAAAC}"]; 2247ProjectInSolution project3 = solution.ProjectsByGuid["{ED30D4A3-1214-410B-82BB-B61E5A9D05CA}"];
EvaluationProfiler_Tests.cs (1)
203var totalGlobLocation = result.ProfiledLocations[totalGlob];
Graph\ProjectGraph_Tests.cs (76)
929targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 930targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "B" }); 931targetLists[GetFirstNodeWithProjectNumber(projectGraph, 3)].ShouldBe(new[] { "B" }); 932targetLists[GetFirstNodeWithProjectNumber(projectGraph, 4)].ShouldBe(new[] { "C", "D" }); // From B => C and B => D 957targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 958targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "B", "X", "C" }); 959targetLists[GetFirstNodeWithProjectNumber(projectGraph, 3)].ShouldBe(new[] { "X", "Y", "Z" }); // Simplified from X, Y, X, Z 988targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 989targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "B" }); 990targetLists[GetFirstNodeWithProjectNumber(projectGraph, 3)].ShouldBe(new[] { "B" }); 991targetLists[GetFirstNodeWithProjectNumber(projectGraph, 4)].ShouldBe(new[] { "C" }); 992targetLists[GetFirstNodeWithProjectNumber(projectGraph, 5)].ShouldBe(new[] { "B", "C", "D" }); 993targetLists[GetFirstNodeWithProjectNumber(projectGraph, 6)].ShouldBe(new[] { "C", "D", "E" }); 1010targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 1011targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "B" }); 1028targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "Foo" }); 1029targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBeEmpty(); 1051targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBeEmpty(); 1052targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBeEmpty(); 1074targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 1075targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBeEmpty(); 1118targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 1119targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(NonOuterBuildTargets); 1159targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 1160targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(NonOuterBuildTargets); 1198targetLists[root].ShouldBe(new[] { "A" }); 1199targetLists[outerBuild].ShouldBe(OuterBuildTargets); 1203targetLists[innerBuild].ShouldBe(NonOuterBuildTargets); 1263targetLists[rootOuterBuild].ShouldBe(new[] { "A" }); 1267targetLists[innerBuild].ShouldBe(new[] { "D1", "A", "AOuter", "AInner" }); 1270targetLists[GetFirstNodeWithProjectNumber(graph, 2)].ShouldBe(new[] { "T2", "A", "AOuter", "AInner" }); 1272targetLists[nonRootOuterBuild].ShouldBe(new[] { "T3", "A", "AOuter" }); 1276targetLists[innerBuild].ShouldBe(new[] { "T3", "A", "AOuter", "AInner", "D3" }); 1370targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "A" }); 1371targetLists[GetFirstNodeWithProjectNumber(projectGraph, 4)].ShouldBe(NonOuterBuildTargets); 1372targetLists[GetFirstNodeWithProjectNumber(projectGraph, 5)].ShouldBe(NonOuterBuildTargets); 1377targetLists[GetOuterBuild(projectGraph, projectNumber)].ShouldBe(outerBuildTargets); 1381targetLists[innerBuild].ShouldBe(nonOuterBuildTargets); 1399targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 1400targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "B" }); 1422targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "Build" }); 1423targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "A", "Build" }); 1452targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "Build" }); 1453targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "A", "Build" }); 1454targetLists[GetFirstNodeWithProjectNumber(projectGraph, 3)].ShouldBe(new[] { "A", "X" }); 1455targetLists[GetFirstNodeWithProjectNumber(projectGraph, 4)].ShouldBe(new[] { "A", "Y" }); 1456targetLists[GetFirstNodeWithProjectNumber(projectGraph, 5)].ShouldBe(new[] { "A", "Build" }); 1457targetLists[GetFirstNodeWithProjectNumber(projectGraph, 6)].ShouldBe(new[] { "B", "Build" }); 1458targetLists[GetFirstNodeWithProjectNumber(projectGraph, 7)].ShouldBe(new[] { "C", "Z", "W" }); 1509targetLists[key: GetFirstNodeWithProjectNumber(graph: projectGraph, projectNum: 1)].ShouldBe(expected: new[] { "Build" }); 1510targetLists[key: GetFirstNodeWithProjectNumber(graph: projectGraph, projectNum: 2)].ShouldBe(expected: new[] { "Build" }); 1511targetLists[key: GetFirstNodeWithProjectNumber(graph: projectGraph, projectNum: 3)].ShouldBe(expected: new[] { "Build" }); 1512targetLists[key: GetFirstNodeWithProjectNumber(graph: projectGraph, projectNum: 4)].ShouldBe(expected: new[] { "Build" }); 1513targetLists[key: GetFirstNodeWithProjectNumber(graph: projectGraph, projectNum: 5)].ShouldBe(expected: new[] { "T51", "T2", "T53", "T54", "T3", "D51", "D52", "T4" }); 1553targetLists[key: GetFirstNodeWithProjectNumber(graph: graph, projectNum: 1)].ShouldBe(expected: new[] { "Build" }); 1554targetLists[key: GetFirstNodeWithProjectNumber(graph: graph, projectNum: 2)].ShouldBe(expected: new[] { "NonskippableTarget1", "NonskippableTarget2", "SkippableExistingTarget" }); 1603targetLists[key: GetFirstNodeWithProjectNumber(graph: graph, projectNum: 1)].ShouldBe(expected: new[] { "Build" }); 1604targetLists[key: GetFirstNodeWithProjectNumber(graph: graph, projectNum: 2)].ShouldBe(expected: new[] { "NonskippableTarget1", "SkippableExistingTarget" }); 1634targetLists[key: GetOuterBuild(graph, 2)].ShouldBe(expected: OuterBuildTargets.Prepend("A")); 1857var targets = string.Join(".*", targetsPerNode[node]); 2620targetLists[outerBuild1].ShouldBe(new[] { "Build" }); 2630targetLists[inner1].ShouldBe(new[] { "BuildForOuterBuild", "Build" }); 2634targetLists[outerBuild2].ShouldBe(new[] { "BuildForOuterBuild" }); 2642targetLists[inner2].ShouldBe(new[] { "BuildForOuterBuild", "Build", "1ATarget", "1BTarget" }); 2646targetLists[outerBuild3].ShouldBe(new[] { "BuildForOuterBuild" }); 2659targetLists[inner3] 2702targetLists[project1].ShouldBe(new[] { "SomeDefaultTarget1" }); 2703targetLists[project2].ShouldBe(new[] { "SomeDefaultTarget2" }); 2744targetLists[project1].ShouldBe(new[] { "SomeDefaultTarget1" }); 2745targetLists[project2].ShouldBe(new[] { "SomeDefaultTarget2", "SomeOtherTarget" }); 2799targetLists[GetOuterBuild(graph, 1)].ShouldBe(new[] { "Build" }); 2802targetLists[inner].ShouldBe(new[] { "Build" }); 2805targetLists[GetOuterBuild(graph, 2)].ShouldBe(new[] { "GetTargetFrameworks" }); 2809targetLists[inner].ShouldBe(new[] { "GetTargetFrameworks", "GetTargetPath", "GetNativeManifest", "GetTargetFrameworksWithPlatformForSingleTargetFramework" }); 2879targetLists[project1Node].ShouldBe(expectedProject1Targets); 2880targetLists[project2Node].ShouldBe(expectedProject2Targets);
ProjectCache\ProjectCacheTests.cs (1)
814AssertBuildResultForCacheHit(node.ProjectInstance.FullPath, projectPathToBuildResults[node], expectedCacheResponse);
Microsoft.CodeAnalysis (2)
Compilation\DeterministicKeyBuilder.cs (1)
528writer.Write(key, features[key]);
ReferenceManager\CommonReferenceManager.Binding.cs (1)
987var value = assemblyReferencesBySimpleName[identity.Name][0];
Microsoft.CodeAnalysis.CSharp (8)
BoundTree\BoundDecisionDag.cs (7)
127return p.Update(p.Evaluation, replacement[p.Next]); 129return p.Update(p.Test, replacement[p.WhenTrue], replacement[p.WhenFalse]); 131return p.Update(p.Bindings, p.WhenExpression, replacement[p.WhenTrue], (p.WhenFalse != null) ? replacement[p.WhenFalse] : null); 164return replacement[p.WhenTrue]; 166return replacement[p.WhenFalse];
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
667return replacement[evalNode.Next];
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (6)
CSharpCommandLineParserServiceTests.cs (6)
27Assert.Equal("true", options.Features["test"]); 34Assert.Equal("dog", options.Features["test"]); 41Assert.Equal("true", options.Features["test1"]); 42Assert.Equal("true", options.Features["test2"]); 49Assert.Equal("dog", options.Features["test1"]); 50Assert.Equal("cat", options.Features["test2"]);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeActions\CodeChangeProviderMetadataTests.cs (1)
181.Where(part => ((string[])part.Export.Metadata["Languages"]!).Contains(language));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (237)
SemanticTokens\SemanticTokensRangesTests.cs (12)
440, 0, 10, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '// Comment' 451, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 460, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 470, 6, 1, tokenTypeToIndex[ClassificationTypeNames.ClassName], (int)TokenModifiers.Static, // 'C' 480, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 490, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 570, 0, 10, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '// Comment' 581, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 590, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 600, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], (int)TokenModifiers.Static, // 'C' 610, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 620, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}'
SemanticTokens\SemanticTokensRangeTests.cs (225)
480, 0, 10, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '// Comment' 491, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 500, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 510, 6, 1, tokenTypeToIndex[ClassificationTypeNames.ClassName], (int)TokenModifiers.Static, // 'C' 520, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 530, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 610, 0, 10, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '// Comment' 621, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 630, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 640, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], (int)TokenModifiers.Static, // 'C' 650, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 660, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 13912, 0, 3, tokenTypeToIndex[ClassificationTypeNames.Keyword], 0, // 'var' 1400, 4, 1, tokenTypeToIndex[ClassificationTypeNames.LocalName], 0, // 'z' 1410, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 1420, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Number], 0, // '1' 1430, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ';' 14417, 3, 3, tokenTypeToIndex[ClassificationTypeNames.Keyword], 0, // 'var' 1450, 4, 1, tokenTypeToIndex[ClassificationTypeNames.LocalName], 0, // 'x' 1460, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 15412, 0, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 1550, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'z' 1560, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 1570, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Number], 0, // '1' 1580, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ';' 15917, 3, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 1600, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 1610, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 1931, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 1940, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 1950, 6, 1, tokenTypeToIndex[ClassificationTypeNames.ClassName], (int)TokenModifiers.Static, // 'C' 1960, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 1970, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 2051, 0, 6, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'static' 2060, 7, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2070, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], (int)TokenModifiers.Static, // 'C' 2080, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 2090, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 2430, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2440, 6, 1, tokenTypeToIndex[ClassificationTypeNames.ClassName], 0, // 'C' 2450, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 2460, 2, 6, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '/* one' 2472, 0, 3, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'two' 2481, 0, 8, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'three */' 2490, 9, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 2570, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 2580, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 2590, 2, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 2600, 2, 6, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // '/* one' 2612, 0, 3, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'two' 2621, 0, 8, tokenTypeToIndex[SemanticTokenTypes.Comment], 0, // 'three */' 2630, 9, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 3020, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 3030, 6, 1, tokenTypeToIndex[ClassificationTypeNames.ClassName], 0, // 'C' 3041, 0, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 3051, 4, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 3060, 5, 1, tokenTypeToIndex[ClassificationTypeNames.MethodName], 0, // 'M' 3070, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '(' 3080, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ')' 3091, 4, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 3101, 8, 3, tokenTypeToIndex[ClassificationTypeNames.Keyword], 0, // 'var' 3110, 4, 1, tokenTypeToIndex[ClassificationTypeNames.LocalName], 0, // 'x' 3120, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 3130, 2, 5, tokenTypeToIndex[ClassificationTypeNames.VerbatimStringLiteral], 0, // '@"one' 3141, 0, 4, tokenTypeToIndex[ClassificationTypeNames.VerbatimStringLiteral], 0, // 'two ' 3150, 4, 2, tokenTypeToIndex[ClassificationTypeNames.StringEscapeCharacter], 0, // '""' 3161, 0, 6, tokenTypeToIndex[ClassificationTypeNames.VerbatimStringLiteral], 0, // 'three"' 3170, 6, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ';' 3181, 4, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 3191, 0, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 3270, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 3280, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 3291, 0, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '{' 3301, 4, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 3310, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Method], 0, // 'M' 3320, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '(' 3330, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // ')' 3341, 4, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '{' 3351, 8, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 3360, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 3370, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 3380, 2, 5, tokenTypeToIndex[CustomLspSemanticTokenNames.StringVerbatim], 0, // '@"one' 3391, 0, 4, tokenTypeToIndex[CustomLspSemanticTokenNames.StringVerbatim], 0, // 'two ' 3400, 4, 2, tokenTypeToIndex[CustomLspSemanticTokenNames.StringEscapeCharacter], 0, // '""' 3411, 0, 6, tokenTypeToIndex[CustomLspSemanticTokenNames.StringVerbatim], 0, // 'three"' 3420, 6, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ';' 3431, 4, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 3441, 0, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '}' 3830, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 3840, 6, 6, tokenTypeToIndex[ClassificationTypeNames.NamespaceName], 0, // 'System' 3850, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 3860, 1, 4, tokenTypeToIndex[ClassificationTypeNames.NamespaceName], 0, // 'Text' 3870, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 3880, 1, 18, tokenTypeToIndex[ClassificationTypeNames.NamespaceName], 0, // 'RegularExpressions' 3890, 18, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ';' 3902, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 3910, 6, 1, tokenTypeToIndex[ClassificationTypeNames.ClassName], 0, // 'C' 3921, 0, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 3931, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 3940, 5, 1, tokenTypeToIndex[ClassificationTypeNames.MethodName], 0, // 'M' 3950, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '(' 3960, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ')' 3971, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 3981, 2, 3, tokenTypeToIndex[ClassificationTypeNames.Keyword], 0, // 'var' 3990, 4, 1, tokenTypeToIndex[ClassificationTypeNames.LocalName], 0, // 'x' 4000, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 4010, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 4020, 4, 5, tokenTypeToIndex[ClassificationTypeNames.ClassName], 0, // 'Regex' 4030, 5, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '(' 4040, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 4050, 1, 1, tokenTypeToIndex[ClassificationTypeNames.RegexGrouping], 0, // '(' 4060, 1, 3, tokenTypeToIndex[ClassificationTypeNames.RegexText], 0, // 'abc' 4070, 3, 1, tokenTypeToIndex[ClassificationTypeNames.RegexGrouping], 0, // ')' 4080, 1, 1, tokenTypeToIndex[ClassificationTypeNames.RegexQuantifier], 0, // '*' 4090, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 4100, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ')' 4110, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ';' 4121, 4, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // } 4131, 0, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // } 4210, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 4220, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'System' 4230, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 4240, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'Text' 4250, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 4260, 1, 18, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'RegularExpressions' 4270, 18, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // ';' 4282, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 4290, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 4301, 0, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '{' 4311, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 4320, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Method], 0, // 'M' 4330, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '(' 4340, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // ')' 4351, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '{' 4361, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 4370, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 4380, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 4390, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 4400, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'Regex' 4410, 5, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '(' 4420, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 4430, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.RegexGrouping], 0, // '(' 4440, 1, 3, tokenTypeToIndex[CustomLspSemanticTokenNames.RegexText], 0, // 'abc' 4450, 3, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.RegexGrouping], 0, // ')' 4460, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.RegexQuantifier], 0, // '*' 4470, 1, 1, tokenTypeToIndex[SemanticTokenTypes.String], 0, // '"' 4480, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // ')' 4490, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // ';' 4501, 4, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // } 4511, 0, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // } 4920, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 4930, 6, 6, tokenTypeToIndex[ClassificationTypeNames.NamespaceName], 0, // 'System' 4940, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 4950, 1, 4, tokenTypeToIndex[ClassificationTypeNames.NamespaceName], 0, // 'Text' 4960, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 4970, 1, 18, tokenTypeToIndex[ClassificationTypeNames.NamespaceName], 0, // 'RegularExpressions' 4980, 18, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ';' 4992, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 5000, 6, 1, tokenTypeToIndex[ClassificationTypeNames.ClassName], 0, // 'C' 5011, 0, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 5021, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 5030, 5, 1, tokenTypeToIndex[ClassificationTypeNames.MethodName], 0, // 'M' 5040, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '(' 5050, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ')' 5061, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '{' 5071, 2, 3, tokenTypeToIndex[ClassificationTypeNames.Keyword], 0, // 'var' 5080, 4, 1, tokenTypeToIndex[ClassificationTypeNames.LocalName], 0, // 'x' 5090, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 5100, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 5110, 4, 5, tokenTypeToIndex[ClassificationTypeNames.ClassName], 0, // 'Regex' 5120, 5, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // '(' 5130, 1, 2, tokenTypeToIndex[ClassificationTypeNames.VerbatimStringLiteral], 0, // '@"' 5140, 2, 1, tokenTypeToIndex[ClassificationTypeNames.RegexGrouping], 0, // '(' 5150, 1, 3, tokenTypeToIndex[ClassificationTypeNames.RegexText], 0, // 'abc' 5160, 3, 1, tokenTypeToIndex[ClassificationTypeNames.RegexGrouping], 0, // ')' 5170, 1, 1, tokenTypeToIndex[ClassificationTypeNames.RegexQuantifier], 0, // '*' 5180, 1, 1, tokenTypeToIndex[ClassificationTypeNames.VerbatimStringLiteral], 0, // ' ' 5190, 1, 9, tokenTypeToIndex[ClassificationTypeNames.RegexComment], 0, // '#comment' 5201, 0, 27, tokenTypeToIndex[ClassificationTypeNames.VerbatimStringLiteral], 0, // '"' 5210, 27, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ',' 5220, 2, 12, tokenTypeToIndex[ClassificationTypeNames.EnumName], 0, // 'RegexOptions' 5230, 12, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5240, 1, 23, tokenTypeToIndex[ClassificationTypeNames.EnumMemberName], 0, // 'IgnorePatternWhitespace' 5250, 23, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ')' 5260, 1, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // ';' 5271, 4, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // } 5281, 0, 1, tokenTypeToIndex[ClassificationTypeNames.Punctuation], 0, // } 5360, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'using' 5370, 6, 6, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'System' 5380, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5390, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'Text' 5400, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5410, 1, 18, tokenTypeToIndex[SemanticTokenTypes.Namespace], 0, // 'RegularExpressions' 5420, 18, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // ';' 5432, 0, 5, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'class' 5440, 6, 1, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'C' 5451, 0, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '{' 5461, 1, 4, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'void' 5470, 5, 1, tokenTypeToIndex[SemanticTokenTypes.Method], 0, // 'M' 5480, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '(' 5490, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // ')' 5501, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '{' 5511, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'var' 5520, 4, 1, tokenTypeToIndex[SemanticTokenTypes.Variable], 0, // 'x' 5530, 2, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '=' 5540, 2, 3, tokenTypeToIndex[SemanticTokenTypes.Keyword], 0, // 'new' 5550, 4, 5, tokenTypeToIndex[SemanticTokenTypes.Class], 0, // 'Regex' 5560, 5, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // '(' 5570, 1, 2, tokenTypeToIndex[CustomLspSemanticTokenNames.StringVerbatim], 0, // '@"' 5580, 2, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.RegexGrouping], 0, // '(' 5590, 1, 3, tokenTypeToIndex[CustomLspSemanticTokenNames.RegexText], 0, // 'abc' 5600, 3, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.RegexGrouping], 0, // ')' 5610, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.RegexQuantifier], 0, // '*' 5620, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.StringVerbatim], 0, // ' ' 5630, 1, 9, tokenTypeToIndex[CustomLspSemanticTokenNames.RegexComment], 0, // '#comment' 5641, 0, 27, tokenTypeToIndex[CustomLspSemanticTokenNames.StringVerbatim], 0, // '"' 5650, 27, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // ',' 5660, 2, 12, tokenTypeToIndex[SemanticTokenTypes.Enum], 0, // 'RegexOptions' 5670, 12, 1, tokenTypeToIndex[SemanticTokenTypes.Operator], 0, // '.' 5680, 1, 23, tokenTypeToIndex[SemanticTokenTypes.EnumMember], 0, // 'IgnorePatternWhitespace' 5690, 23, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // ')' 5700, 1, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // ';' 5711, 4, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // } 5721, 0, 1, tokenTypeToIndex[CustomLspSemanticTokenNames.Punctuation], 0, // } 592var tokenName = schema.TokenTypeMap[expectedClassificationName];
Microsoft.CodeAnalysis.UnitTests (9)
Collections\ImmutableDictionaryTestBase.cs (9)
50Assert.Equal(200, map["Microsoft"]); 75Assert.Equal(150, map["Microsoft"]); 76Assert.Equal(50, map["Corporation"]); 77Assert.Equal(90, map["Dogs"]); 85Assert.Equal(70, map["Microsoft"]); 86Assert.Equal(50, map["Corporation"]); 87Assert.Equal(90, map["Dogs"]); 94Assert.Equal(3, map["a"]); 95Assert.Equal(2, map["b"]);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\TryApplyChangesTests.cs (2)
133canApplyParseOptions: (_, newParseOptions) => newParseOptions.Features["Feature"] == "ExpectedValue"); 148canApplyParseOptions: (_, newParseOptions) => newParseOptions.Features["Feature"] == "ExpectedValue");
Microsoft.Data.Analysis.Tests (8)
ArrayComparer.cs (8)
144f1.Metadata.Keys.All(k => f2.Metadata.ContainsKey(k) && f1.Metadata[k] == f2.Metadata[k]) && 145f2.Metadata.Keys.All(k => f1.Metadata.ContainsKey(k) && f2.Metadata[k] == f1.Metadata[k]); 175s1.Metadata.Keys.All(k => s2.Metadata.ContainsKey(k) && s1.Metadata[k] == s2.Metadata[k]) && 176s2.Metadata.Keys.All(k => s1.Metadata.ContainsKey(k) && s2.Metadata[k] == s1.Metadata[k]);
Microsoft.DotNet.Build.Tasks.Packaging (3)
NuGetAssetResolver.cs (3)
224var packageAssets = allCompileItems[packageId]; 293var packageAssets = allRuntimeItems[packageId]; 310var packageAssets = allNativeItems[packageId];
Microsoft.DotNet.GenFacades (1)
SourceGenerator.cs (1)
75alias = _seedTypePreferences[type];
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (2)
TelemetryHealthChecksPublisherTests.cs (2)
142if (counter!.Tags["dotnet.health_check.name"]?.ToString() == healthy && 143counter!.Tags["dotnet.health_check.status"]?.ToString() == status)
Microsoft.Extensions.Resilience.Tests (5)
Resilience\ResilienceMetricsEnricherTests.cs (5)
43Tags["error.type"].Should().Be("desc"); 63Tags["request.dependency.name"].Should().Be("my-dep"); 64Tags["request.name"].Should().Be("my-req"); 75Tags["request.dependency.name"].Should().Be("my-dep"); 76Tags["request.name"].Should().Be("my-req");
Microsoft.Extensions.Telemetry.Tests (6)
Enrichment\ApplicationLogEnricherTests.cs (4)
84Assert.Equal(AppName, enrichedState[ApplicationEnricherTags.ApplicationName]); 93Assert.Equal(EnvironmentName, enrichedState[ApplicationEnricherTags.EnvironmentName]); 102Assert.Equal(BuildVersion, enrichedState[ApplicationEnricherTags.BuildVersion]); 111Assert.Equal(DeploymentRing, enrichedState[ApplicationEnricherTags.DeploymentRing]);
Enrichment\ProcessLogEnricherTests.cs (2)
63Assert.Equal(Thread.CurrentThread.ManagedThreadId.ToString(CultureInfo.InvariantCulture), enrichedState[ProcessEnricherTagNames.ThreadId]); 68Assert.Equal(_processId.ToString(CultureInfo.InvariantCulture), enrichedState[ProcessEnricherTagNames.ProcessId]);
Microsoft.ML.TensorFlow.Tests (1)
TensorflowTests.cs (1)
1749Assert.True(File.Exists(Path.Combine(Path.GetTempPath(), "MLNET", ImageClassificationTrainer.ModelFileName[options.Arch])));
Microsoft.ML.Tokenizers (4)
Model\CodeGenTokenizer.cs (2)
1476current[i] = (byte)byteToUnicodeEncoding.UnicodeToByte[span[i]]; 1522private static readonly char _transformedSpace = ByteToUnicodeEncoding.Instance.ByteToUnicode[' '];
Utils\BytePairEncoder.cs (2)
20return [(ranks[mergingBytes], 0, 1)]; 108result[i] = (ranks[mergingBytes.SliceStartEnd(startIndex, endIndex)], mappedStartIndex, indexMappingSpan[finalEndIndex] - mappedStartIndex);
Microsoft.ML.Tokenizers.Tests (3)
BpeTests.cs (1)
281Assert.Equal(encodingIds[i], bpe.Vocabulary[encoding[i].Value]);
EnglishRobertaTests.cs (1)
303Assert.Equal(encodingIds[i], robertaModel.Vocabulary[tokens[i]]);
LlamaTests.cs (1)
258Assert.Equal(ids[i], bpe.Vocabulary[tokens[i]]);
Microsoft.ML.TorchSharp (7)
NasBert\Modules\Embedding\LearnedPositionalEmbedding.cs (2)
64if (param.ContainsKey(IncrementalStateKey)) incrementalState = (bool)param[IncrementalStateKey]; 65if (param.ContainsKey(PositionKey)) positions = (torch.Tensor)param[PositionKey];
NasBert\Modules\Embedding\SinusoidalPositionalEmbedding.cs (2)
116if (param.ContainsKey(IncrementalStateKey)) incrementalState = (bool)param[IncrementalStateKey]; 117if (param.ContainsKey(TimeStepKey)) timeStep = (torch.Tensor)param[TimeStepKey];
NasBert\Modules\Layers\EncConvLayer.cs (1)
83if (param.ContainsKey(PaddingMaskKey)) selfAttentionPaddingMask = (torch.Tensor)param[PaddingMaskKey];
NasBert\Modules\Layers\SelfAttentionLayer.cs (2)
83selfAttentionMask = (torch.Tensor)param[AttentionMaskKey]; 84selfAttentionPaddingMask = (torch.Tensor)param[PaddingMaskKey];
Microsoft.ML.Vision (5)
ImageClassificationTrainer.cs (5)
571ModelFileName[_options.Arch]); 613var imageSize = ImagePreprocessingSize[_options.Arch]; 1165var evalGraph = LoadMetaGraph(Path.Combine(_resourcePath, ModelFileName[_options.Arch])); 1175var imageSize = ImagePreprocessingSize[_options.Arch]; 1328var modelFileName = ModelFileName[arch];
PresentationBuildTasks (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (1)
62char closingBracket = attributeList[openingBracket];
PresentationFramework (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (1)
62char closingBracket = attributeList[openingBracket];
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
19Equal(expectedReason, (string) tags[KestrelMetrics.ErrorTypeAttributeName]);
System.Private.Windows.Core (2)
System\Private\Windows\BinaryFormat\Deserializer\Deserializer.cs (2)
219SerializationRecord record = _recordMap[id]; 331if (_recordMap[completedId] is ClassRecord classRecord
System.Resources.Extensions (3)
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.cs (1)
92public SerializationRecord this[SerializationRecordId id] => RecordMap[id];
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (2)
224SerializationRecord record = _recordMap[id]; 336if (_recordMap[completedId] is ClassRecord classRecord
System.Xaml (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (1)
62char closingBracket = attributeList[openingBracket];
WinFormsControlsTest (1)
MainForm.cs (1)
27InitInfo info = buttonsInitInfo[item];