コード例 #1
0
ファイル: Period.cs プロジェクト: StevenThuriot/Saber
 /// <summary>
 /// Determines whether the specified <see cref="T:Saber.Domain.Period"/> is equal to the current <see cref="T:Saber.Domain.Period"/>.
 /// </summary>
 /// <returns>
 /// true if the specified <see cref="T:Saber.Domain.Period"/> is equal to the current <see cref="T:Saber.Domain.Period"/>; otherwise, false.
 /// </returns>
 /// <param name="other">The <see cref="T:Saber.Domain.Period"/> to compare with the current <see cref="T:Saber.Domain.Period"/>. 
 ///                 </param><exception cref="T:System.NullReferenceException">The <paramref name="other"/> parameter is null.
 ///                 </exception><filterpriority>2</filterpriority>
 public bool Equals(Period other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.StartDate.Equals(StartDate) && other.EndDate.Equals(EndDate);
 }
コード例 #2
0
ファイル: GuardTest.cs プロジェクト: StevenThuriot/Saber
 public void NotNull_TestPassingSomethingOtherThanNull()
 {
     var period = new Period(DateTime.Now, DateTime.Now.AddDays(1));
     Guard.NotNull(new StringBuilder(), "Test", new object(), 1, period, DateTime.Now);
 }