20 references to HostAttribute
Microsoft.AspNetCore.Routing (2)
Builder\RoutingEndpointConventionBuilderExtensions.cs (1)
32
endpointBuilder.Metadata.Add(new
HostAttribute
(hosts));
HostAttribute.cs (1)
24
public HostAttribute(string host) :
this
(new[] { host })
Microsoft.AspNetCore.Routing.Tests (17)
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (1)
110
builder.WithMetadata("test", new
HostAttribute
("www.example.com", "example.com"));
Matching\HostMatcherPolicyIntegrationTestBase.cs (1)
410
metadata.Add(new
HostAttribute
(hosts ?? Array.Empty<string>()));
Matching\HostMatcherPolicyTest.cs (14)
32
CreateEndpoint("/", new
HostAttribute
(Array.Empty<string>())),
50
CreateEndpoint("/", new
HostAttribute
(Array.Empty<string>())),
51
CreateEndpoint("/", new
HostAttribute
(new[] { "localhost", })),
69
CreateEndpoint("/", new
HostAttribute
(Array.Empty<string>())),
70
CreateEndpoint("/", new
HostAttribute
(new[] { "localhost", }), new DynamicEndpointMetadata()),
92
var endpoints = new[] { CreateEndpoint("/", new
HostAttribute
(new[] { host })), };
124
CreateEndpoint("/", new
HostAttribute
(Array.Empty<string>()), new DynamicEndpointMetadata()),
142
CreateEndpoint("/", new
HostAttribute
(Array.Empty<string>())),
143
CreateEndpoint("/", new
HostAttribute
(new[] { "localhost", }), new DynamicEndpointMetadata()),
161
CreateEndpoint("/", new
HostAttribute
(Array.Empty<string>())),
162
CreateEndpoint("/", new
HostAttribute
(new[] { "localhost", })),
184
var endpoints = new[] { CreateEndpoint("/", new
HostAttribute
(new[] { host }), new DynamicEndpointMetadata()), };
201
CreateEndpoint("/", new
HostAttribute
(new[] { "*:5000", "*:5001", })),
202
CreateEndpoint("/", new
HostAttribute
(Array.Empty<string>())),
MetadataTest.cs (1)
42
var metadata = new
HostAttribute
("Host1", "Host2:80");
RoutingWebSite (1)
UseEndpointRoutingStartup.cs (1)
149
endpointBuilder.Metadata.Add(new
HostAttribute
(hosts));