20 references to HostAttribute
Microsoft.AspNetCore.Routing (2)
Builder\RoutingEndpointConventionBuilderExtensions.cs (1)
32endpointBuilder.Metadata.Add(new HostAttribute(hosts));
HostAttribute.cs (1)
24public HostAttribute(string host) : this(new[] { host })
Microsoft.AspNetCore.Routing.Tests (17)
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 (14)
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>())),
MetadataTest.cs (1)
42var metadata = new HostAttribute("Host1", "Host2:80");
RoutingWebSite (1)
UseEndpointRoutingStartup.cs (1)
149endpointBuilder.Metadata.Add(new HostAttribute(hosts));