HostProviderBuilder Class

Represents the HostProviderBuilder type.

public static class HostProviderBuilder

Methods

NameDescription
Create(string, Func<Uri, string?>, bool, string?)Create a IHostProvider with delegate handler.

Create(string, Func<Uri, string?>, bool, string?)

HostProviderBuilder.cs

Create a IHostProvider with delegate handler.

public static IHostProvider Create(string host, Func<Uri, string?> handler, bool allowFullScreen = true, string? iframeClass = null)

Parameters

host string
Host that can be handled. Its subdomains are handled too.
handler Func<Uri, string?>
Handler that generate iframe url, if uri cannot be handled, it can return null.
allowFullScreen bool
Should the generated iframe has allowfullscreen attribute.
iframeClass string?
"class" attribute of generated iframe.

Returns

IHostProvider A IHostProvider with delegate handler.