Пример #1
0
 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;
 }
Пример #4
0
 public async Task <bool> CanGenerateActivationLinkAsync(ActivationLinkAction activationLinkAction)
 {
     return(await CanAccessAdminPanelAsync());
 }