public async Task ValidateGenerateActivationLinkAsync(ActivationLinkAction activationLinkAction) { if (!await CanGenerateActivationLinkAsync(activationLinkAction)) { throw buildException(); } }
public async Task <string> GenerateLink(User provider, ActivationLinkAction activationLinkAction) { return(await getTokenedLinkAsync(provider, writer => { writer.Write((byte)activationLinkAction); return Task.CompletedTask; })); }
public ActivationLinkArguments(User provider, ActivationLinkAction action) { Provider = provider ?? throw new ArgumentNullException(nameof(provider)); Action = action; }
public async Task <bool> CanGenerateActivationLinkAsync(ActivationLinkAction activationLinkAction) { return(await CanAccessAdminPanelAsync()); }