コード例 #1
0
 /// <summary>
 /// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
 /// </summary>
 /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param>
 /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.</returns>
 public override bool Equals(object obj)
 {
     if (obj is Criteria2)
     {
         var c = (Criteria2)obj;
         if (!CreateDoc.Equals(c.CreateDoc))
         {
             return(false);
         }
         if (!DocID.Equals(c.DocID))
         {
             return(false);
         }
         if (!CreateFolder.Equals(c.CreateFolder))
         {
             return(false);
         }
         if (!FolderID.Equals(c.FolderID))
         {
             return(false);
         }
         if (!DocListFilteredCriteria.Equals(c.DocListFilteredCriteria))
         {
             return(false);
         }
         return(true);
     }
     return(false);
 }
コード例 #2
0
 /// <summary>
 /// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
 /// </summary>
 /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param>
 /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.</returns>
 public override bool Equals(object obj)
 {
     if (obj is Criteria1)
     {
         var c = (Criteria1)obj;
         if (!CreateDoc.Equals(c.CreateDoc))
         {
             return(false);
         }
         if (!DocID.Equals(c.DocID))
         {
             return(false);
         }
         return(true);
     }
     return(false);
 }
コード例 #3
0
 public Document Create(CreateDoc @event)
 {
     return(new Document(@event.DocumentId, @event.Owner, @event.Content));
 }
コード例 #4
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>An hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     return(string.Concat("Criteria1", CreateDoc.ToString(), DocID.ToString()).GetHashCode());
 }
コード例 #5
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>An hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     return(string.Concat("Criteria2", CreateDoc.ToString(), DocID.ToString(), CreateFolder.ToString(), FolderID.ToString(), DocListFilteredCriteria.ToString()).GetHashCode());
 }