Beispiel #1
0
        public static bool IsValid(string value, Type type)
        {
            switch (type)
            {
            case Type.Organization:
                return(!OrganizationBlacklist.Contains(value));

            case Type.Repository:
                return(!RepositoryBlacklist.Contains(value));

            case Type.User:
                return(!UserBlacklist.Contains(value));
            }

            return(false);
        }
Beispiel #2
0
        public static void Add(string value, Type type)
        {
            switch (type)
            {
            case Type.Organization:
                OrganizationBlacklist.Add(value);
                IsOrganizationChanged = true;
                break;

            case Type.Repository:
                RepositoryBlacklist.Add(value);
                IsRepositoryChanged = true;
                break;

            case Type.User:
                UserBlacklist.Add(value);
                IsUserChanged = true;
                break;
            }

            Save();
        }