24 instantiations of HostAttribute
Microsoft.AspNetCore.Routing (1)
Builder\RoutingEndpointConventionBuilderExtensions.cs (1)
32endpointBuilder.Metadata.Add(new HostAttribute(hosts));
Microsoft.AspNetCore.Routing.Tests (22)
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (1)
110builder.WithMetadata("test", new HostAttribute("www.example.com", "example.com"));
Matching\HostMatcherPolicyIntegrationTestBase.cs (1)
410metadata.Add(new HostAttribute(hosts ?? Array.Empty<string>()));
Matching\HostMatcherPolicyTest.cs (19)
32CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 50CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 51CreateEndpoint("/", new HostAttribute(new[] { "localhost", })), 69CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 70CreateEndpoint("/", new HostAttribute(new[] { "localhost", }), new DynamicEndpointMetadata()), 92var endpoints = new[] { CreateEndpoint("/", new HostAttribute(new[] { host })), }; 124CreateEndpoint("/", new HostAttribute(Array.Empty<string>()), new DynamicEndpointMetadata()), 142CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 143CreateEndpoint("/", new HostAttribute(new[] { "localhost", }), new DynamicEndpointMetadata()), 161CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 162CreateEndpoint("/", new HostAttribute(new[] { "localhost", })), 184var endpoints = new[] { CreateEndpoint("/", new HostAttribute(new[] { host }), new DynamicEndpointMetadata()), }; 201CreateEndpoint("/", new HostAttribute(new[] { "*:5000", "*:5001", })), 202CreateEndpoint("/", new HostAttribute(Array.Empty<string>())), 204CreateEndpoint("/", new HostAttribute("*.contoso.com:*")), 205CreateEndpoint("/", new HostAttribute("*.sub.contoso.com:*")), 206CreateEndpoint("/", new HostAttribute("www.contoso.com:*")), 207CreateEndpoint("/", new HostAttribute("www.contoso.com:5000")), 208CreateEndpoint("/", new HostAttribute("*:*")),
MetadataTest.cs (1)
42var metadata = new HostAttribute("Host1", "Host2:80");
RoutingWebSite (1)
UseEndpointRoutingStartup.cs (1)
149endpointBuilder.Metadata.Add(new HostAttribute(hosts));
5 references to HostAttribute
Microsoft.AspNetCore.Routing (2)
HostAttribute.cs (2)
18/// Initializes a new instance of the <see cref="HostAttribute" /> class. 30/// Initializes a new instance of the <see cref="HostAttribute" /> class.
Microsoft.AspNetCore.Routing.Tests (3)
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (2)
27var hostMetadata = Assert.IsType<HostAttribute>(Assert.Single(endpointModel.Metadata));
MetadataTest.cs (1)
42var metadata = new HostAttribute("Host1", "Host2:80");