コード例 #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;
 }
コード例 #2
0
 /// <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;
 }
コード例 #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);
     }
 }
コード例 #4
0
ファイル: ProfileExt.cs プロジェクト: rickeygalloway/Test
 /// <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);
     }
 }