Beispiel #1
0
        }//end AddInterest(InterestIn)

        /// <summary>
        /// Removes a list of interests from the dictionary, for more details, see RemoveInterest
        /// </summary>
        /// <param name="InterestsIn"> the interest to search for </param>
        public void RemoveInterests(UserInterests InterestsIn)
        {
            for (int i = 0; i < InterestsIn.GetUserInterests().Count; i++)
            {
                RemoveInterest(InterestsIn.GetUserInterests()[i]);
            }
        }//end RemoveInterests(UserInterests)
Beispiel #2
0
        }//end Member(String, String, UserInterests, UserType)

        public Member(String NameIn, String ENumberIn, UserInterests InterestsIn, EventInterest InterestIn, Events EventsIn)// UserType TypeIn
        {
            this.Name      = NameIn;
            this.Email     = ENumberIn;
            this.Interests = new UserInterests(InterestsIn);
            //this.Type = TypeIn;
            this.EventList     = new Events(EventsIn);
            this.EventInterest = InterestIn;
        }//end Member(String, String, UserInterests, UserType)
Beispiel #3
0
        }//end GetHashCode()

        #region constructors
        public Member()
        {
            Name      = "";
            Email     = "@etsu.edu";                   //Probably gonna get rid of it
            Interests = new UserInterests();           //Replace this later, bad practice
            //Type = UserType.StudentUser;
            EventInterest = EventInterest.NotGoing;
            EventList     = new Events();
        }//end Member()
Beispiel #4
0
        }//end Member(String, String, UserInterests, UserType)

        public Member(Member MemberIn)
        {
            this.Name      = MemberIn.Name;
            this.Email     = MemberIn.Email;
            this.Interests = new UserInterests(MemberIn.Interests);
            //Type = MemberIn.Type;
            this.EventInterest = MemberIn.EventInterest;
            this.EventList     = new Events(MemberIn.GetEvents());
        }//end Member(Member)
Beispiel #5
0
        }//end GetKey(UserInterest)

        /// <summary>
        /// Given a value, returns all of the keys with that value
        /// </summary>
        /// <param name="ValueIn"> The integer value to search for </param>
        /// <returns> A UserInterests object that contains a list of all interests found with the passed count value </returns>
        public UserInterests GetKeys(int ValueIn)
        {
            UserInterests interests = new UserInterests();

            foreach (KeyValuePair <UserInterest, int> count in this.Interests)
            {
                if (count.Value == ValueIn)
                {
                    interests.Add(count.Key);
                }
            }
            return(interests);
        }//end GetKeys(int)
Beispiel #6
0
 public void GetInterests(UserInterests InterestsIn)
 {
     this.Interests = InterestsIn;
 }
Beispiel #7
0
 public UserInterests(UserInterests UserInterestsIn)
 {
     this.Interests = UserInterestsIn.CopyInterests();
 }