コード例 #1
0
        public static VerificationKey GenerateVerificationKey(ulong guildid, ulong userid, long forumuserid, VerificationKeyScope keyscope)
        {
            var vkey = new VerificationKey(GenerateKey(), keyscope, forumuserid, userid, guildid);

            _verificationKeys.Add(vkey);
            return(vkey);
        }
コード例 #2
0
 public bool Equals(VerificationKey other, bool ignoreKey)
 => (ignoreKey || string.Equals(Key, other.Key)) &&
 KeyScope == other.KeyScope &&
 ForumUserId == other.ForumUserId &&
 DiscordUserId == other.DiscordUserId &&
 GuildId == other.GuildId;
コード例 #3
0
 protected bool Equals(VerificationKey other)
 => Equals(other, false);
コード例 #4
0
 public static bool HasVerificationKey(VerificationKey key, bool ignoreKey = false)
 => _verificationKeys.Any(vkey => vkey.Equals(key, ignoreKey));