HostString.MatchesAny(StringSegment, IList<StringSegment>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Matches the host portion of a host header value against a list of patterns. The host may be the encoded punycode or decoded unicode form so long as the pattern uses the same format.
public:
static bool MatchesAny(Microsoft::Extensions::Primitives::StringSegment value, System::Collections::Generic::IList<Microsoft::Extensions::Primitives::StringSegment> ^ patterns);
public static bool MatchesAny (Microsoft.Extensions.Primitives.StringSegment value, System.Collections.Generic.IList<Microsoft.Extensions.Primitives.StringSegment> patterns);
static member MatchesAny : Microsoft.Extensions.Primitives.StringSegment * System.Collections.Generic.IList<Microsoft.Extensions.Primitives.StringSegment> -> bool
Public Shared Function MatchesAny (value As StringSegment, patterns As IList(Of StringSegment)) As Boolean
Parameters
- value
- StringSegment
Host header value with or without a port.
- patterns
- IList<StringSegment>
A set of pattern to match, without ports.
Returns
true
if value
matches any of the patterns.
Remarks
The port on the given value is ignored. The patterns should not have ports. The patterns may be exact matches like "example.com", a top level wildcard "*" that matches all hosts, or a subdomain wildcard like "*.example.com" that matches "abc.example.com:443" but not "example.com:443". Matching is case insensitive.