ScrewTurn.Wiki.PermissionsManager.IsAlreadyPresent C# (CSharp) Method

IsAlreadyPresent() private method

Determines whether a subject is already in a list.
private IsAlreadyPresent ( string subject, SubjectType type, SubjectInfo allSubjects ) : bool
subject string The subject to test.
type SubjectType The type of the subject.
allSubjects SubjectInfo The subject list.
return bool
        private bool IsAlreadyPresent(string subject, SubjectType type, SubjectInfo[] allSubjects)
        {
            foreach(SubjectInfo current in allSubjects) {
                if(current.Type == type && current.Name == subject) {
                    return true;
                }
            }
            return false;
        }