Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProfileInterest"/> class.
 /// </summary>
 /// <param name="profile">The profile.</param>
 /// <param name="interest">The interest.</param>
 /// <exception cref="System.ArgumentNullException">
 /// profile
 /// or
 /// interest
 /// </exception>
 public ProfileInterest(Profile profile, Interest interest)
 {
     if (profile == null)
         throw new ArgumentNullException("profile");
     if (interest == null)
         throw new ArgumentNullException("interest");
     Interest = interest;
     Profile = profile;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InterestGroupInterest"/> class.
 /// </summary>
 /// <param name="interestGroup">The interest group.</param>
 /// <param name="interest">The interest.</param>
 /// <exception cref="System.ArgumentNullException">
 /// interestGroup
 /// or
 /// interest
 /// </exception>
 public InterestGroupInterest(InterestGroup interestGroup, Interest interest)
 {
     if (interestGroup == null)
         throw new ArgumentNullException("interestGroup");
     if (interest == null)
         throw new ArgumentNullException("interest");
     InterestGroup = interestGroup;
     Interest = interest;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Adds the interest.
 /// </summary>
 /// <param name="interest">The interest.</param>
 /// <exception cref="System.ArgumentNullException">interest</exception>
 public void AddInterest(Interest interest)
 {
     if (interest == null)
         throw new ArgumentNullException("interest");
     if (!InterestGroupInterests.Any(i => i.Interest.Id.Equals(interest.Id)))
     {
         var groupInterest = new InterestGroupInterest(this, interest);
         InterestGroupInterests.Add(groupInterest);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Adds the interest.
 /// </summary>
 /// <param name="interest">The interest.</param>
 /// <exception cref="System.ArgumentNullException">interest</exception>
 public void AddInterest(Interest interest)
 {
     if (interest == null)
         throw new ArgumentNullException("interest");
     if (!ProfileInterests.Any(pi => pi.Interest.Id.Equals(interest.Id)))
     {
         var profileInterest = new ProfileInterest(this, interest);
         ProfileInterests.Add(profileInterest);
     }
 }