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