Share via


HostAttribute Constructors

Definition

Overloads

HostAttribute(String)

Initializes a new instance of the HostAttribute class.

HostAttribute(String[])

Initializes a new instance of the HostAttribute class.

HostAttribute(String)

Source:
HostAttribute.cs

Initializes a new instance of the HostAttribute class.

public:
 HostAttribute(System::String ^ host);
public HostAttribute (string host);
new Microsoft.AspNetCore.Routing.HostAttribute : string -> Microsoft.AspNetCore.Routing.HostAttribute
Public Sub New (host As String)

Parameters

host
String

The host used during routing. Host should be Unicode rather than punycode, and may have a port.

Applies to

HostAttribute(String[])

Source:
HostAttribute.cs

Initializes a new instance of the HostAttribute class.

public:
 HostAttribute(... cli::array <System::String ^> ^ hosts);
public HostAttribute (params string[] hosts);
new Microsoft.AspNetCore.Routing.HostAttribute : string[] -> Microsoft.AspNetCore.Routing.HostAttribute
Public Sub New (ParamArray hosts As String())

Parameters

hosts
String[]

The hosts used during routing. Hosts should be Unicode rather than punycode, and may have a port. An empty collection means any host will be accepted.

Applies to