24 instantiations of HostAttribute
Microsoft.AspNetCore.Routing (1)
Builder\RoutingEndpointConventionBuilderExtensions.cs (1)
32
endpointBuilder.Metadata.Add(new
HostAttribute
(hosts));
Microsoft.AspNetCore.Routing.Tests (22)
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 (19)
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>())),
204
CreateEndpoint("/", new
HostAttribute
("*.contoso.com:*")),
205
CreateEndpoint("/", new
HostAttribute
("*.sub.contoso.com:*")),
206
CreateEndpoint("/", new
HostAttribute
("www.contoso.com:*")),
207
CreateEndpoint("/", new
HostAttribute
("www.contoso.com:5000")),
208
CreateEndpoint("/", new
HostAttribute
("*:*")),
MetadataTest.cs (1)
42
var metadata = new
HostAttribute
("Host1", "Host2:80");
RoutingWebSite (1)
UseEndpointRoutingStartup.cs (1)
149
endpointBuilder.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)
27
var
hostMetadata = Assert.IsType<
HostAttribute
>(Assert.Single(endpointModel.Metadata));
MetadataTest.cs (1)
42
var
metadata = new HostAttribute("Host1", "Host2:80");