8 references to GetRequiredMetadata
Microsoft.AspNetCore.Components.Endpoints (2)
RazorComponentEndpointInvoker.cs (2)
51
var rootComponent = endpoint.Metadata.
GetRequiredMetadata
<RootComponentMetadata>().Type;
52
var pageComponent = endpoint.Metadata.
GetRequiredMetadata
<ComponentTypeMetadata>().Type;
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
EndpointMetadataCollectionTests.cs (2)
78
var requiredMetadata = metadata.
GetRequiredMetadata
<string>();
90
Assert.Throws<InvalidOperationException>(() => metadata.
GetRequiredMetadata
<string>());
Microsoft.AspNetCore.Tests (4)
WebApplicationTests.cs (4)
2808
ep => Assert.Equal("/hello", ep.Metadata.
GetRequiredMetadata
<IRouteDiagnosticsMetadata>().Route));
2814
ep => Assert.Equal("/hello", ep.Metadata.
GetRequiredMetadata
<IRouteDiagnosticsMetadata>().Route));
2832
ep => Assert.Equal("/hello", ep.Metadata.
GetRequiredMetadata
<IRouteDiagnosticsMetadata>().Route));
2838
ep => Assert.Equal("/hello", ep.Metadata.
GetRequiredMetadata
<IRouteDiagnosticsMetadata>().Route));