Table of Contents

Class AppAdOptions

Namespace
VpnHood.AppLib.App.Services.Ads
Assembly
VpnHood.AppLib.App.dll

Provides how the app loads and shows its ads (AdOptions).

public class AppAdOptions
Inheritance
AppAdOptions
Inherited Members

Properties

AllowedPrivateDnsProviders

Gets or sets the private DNS providers that do not count as an ad blocker (RejectAdBlocker), or null, and then none counts as one.

public string[]? AllowedPrivateDnsProviders { get; set; }

Property Value

string[]

ConsentProvider

Gets or sets the ad network's consent, or null where no network asks for one: its form comes before an ad's timed load, never with a preload, and the privacy settings lead back to it.

public IAdConsentProvider? ConsentProvider { get; set; }

Property Value

IAdConsentProvider

ExtendByRewardedAdThreshold

Gets or sets the time a session must have left, more than this, for a rewarded ad to extend it. The default is five minutes.

public TimeSpan ExtendByRewardedAdThreshold { get; set; }

Property Value

TimeSpan

LoadAdPostDelay

Gets or sets how long the app waits after it loads an ad, or finds one loaded, before it goes on. The default is none.

public TimeSpan LoadAdPostDelay { get; set; }

Property Value

TimeSpan

LoadAdTimeout

Gets or sets how long each network may take to load an interstitial before the next is tried; where none loads, the connect goes on without it, as long as a window is there to show it in and the ad-blocker check (RejectAdBlocker) does not fail it. The default is 30 seconds.

public TimeSpan LoadAdTimeout { get; set; }

Property Value

TimeSpan

Remarks

A rewarded ad has no limit of the app's, as the person asked to watch it. While a debugger is attached, DebuggerTimeout takes its place where it is set.

PreloadAd

Gets or sets a value indicating whether the app loads the next connect's interstitial ahead of it, when a window opens while the VPN is idle; a preload brings no consent form, and waits for the person's answer to one. The default is false.

public bool PreloadAd { get; set; }

Property Value

bool

RejectAdBlocker

Gets or sets a value indicating whether an ad that fails while the device's private DNS names a provider not in AllowedPrivateDnsProviders fails as an ad blocker's, even where the ad was not required. The default is false.

public bool RejectAdBlocker { get; set; }

Property Value

bool

ShowAdPostDelay

Gets or sets how long the app waits after an ad closes before it tells the VPN service the ad was shown; the state reads as connected for the last three seconds of it. The default is three seconds.

public TimeSpan ShowAdPostDelay { get; set; }

Property Value

TimeSpan