コード例 #1
0
 public async Task ValidateGenerateActivationLinkAsync(ActivationLinkAction activationLinkAction)
 {
     if (!await CanGenerateActivationLinkAsync(activationLinkAction))
     {
         throw buildException();
     }
 }
コード例 #2
0
        public async Task <string> GenerateLink(User provider, ActivationLinkAction activationLinkAction)
        {
            return(await getTokenedLinkAsync(provider, writer =>
            {
                writer.Write((byte)activationLinkAction);

                return Task.CompletedTask;
            }));
        }
コード例 #3
0
 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());
 }