NagOptions
Options for SponsorkitClient.Nag.
Options for SponsorkitClient.Nag.
namespace Sponsorkit;
public sealed class NagOptionsConstructors#
| Member | Description |
|---|---|
NagOptions(string) | Creates nag options. |
NagOptions(string)#
public NagOptions(string id)Creates nag options.
Parameters
idstring: A stable id for this nag, for example your app's name. Run counters are kept per id.
Properties#
| Member | Description |
|---|---|
Id | The nag id. |
Every | The nag is due once the app has run this many times since it was last shown. |
OrEvery | The nag is also due once this much time has passed since it was last shown (never before the first Shown()). |
Id#
public string Id { get; }The nag id.
Type: string
Every#
public int Every { get; set; } = 10;The nag is due once the app has run this many times since it was last shown. Default 10.
Type: int · Default: 10
OrEvery#
public TimeSpan? OrEvery { get; set; }The nag is also due once this much time has passed since it was last shown (never before the first Shown()).
Type: TimeSpan?
Methods#
| Member | Description |
|---|---|
ParseDuration(string) | Parses an ISO-8601 duration such as P7D or PT12H. |
ParseDuration(string)#
public static TimeSpan ParseDuration(string isoDuration)Parses an ISO-8601 duration such as P7D or PT12H.
Parameters
isoDurationstring: The duration.
Returns TimeSpan: The duration as a TimeSpan.
Exceptions
SponsorkitError:invalid_configwhen the value is not an ISO-8601 duration.