public bool Equals(ZeroToken other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            bool audEqual = Audiences.Count == other.Audiences.Count &&
                            Audiences.All(other.Audiences.Contains);
            bool claimsEqual = Claims.Count == other.Claims.Count &&
                               Claims.All(other.Claims.Contains);
            bool result = audEqual &&
                          string.Equals(Issuer, other.Issuer) &&
                          CreationTime.Equals(other.CreationTime) &&
                          Lifetime == other.Lifetime &&
                          string.Equals(Type, other.Type) &&
                          string.Equals(ClientId, other.ClientId) &&
                          AccessTokenType == other.AccessTokenType &&
                          claimsEqual &&
                          Version == other.Version;

            return(result);
        }
Пример #2
0
 public virtual bool Equals(EntryBase other)
 {
     return(Id == other.Id &&
            CreationTime.Equals(other.CreationTime) &&
            LastModified.Equals(other.LastModified) &&
            Title == other.Title &&
            Encrypted == other.Encrypted);
 }
Пример #3
0
 public bool Equals(Note other)
 {
     return(other != null &&
            Id == other.Id &&
            Title == other.Title &&
            Content == other.Content &&
            EqualityComparer <int?> .Default.Equals(CategoryId, other.CategoryId) &&
            EqualityComparer <string[]> .Default.Equals(Keywords, other.Keywords) &&
            CreationTime.Equals(other.CreationTime) &&
            ModificationTime.Equals(other.ModificationTime) &&
            UserId == other.UserId);
 }
 public bool Equals(DuplicateFileModel other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(LastWriteTime.Equals(other.LastWriteTime) && LastAccessTimeUtc.Equals(other.LastAccessTimeUtc) && LastAccessTime.Equals(other.LastAccessTime) && CreationTimeUtc.Equals(other.CreationTimeUtc) &&
            CreationTime.Equals(other.CreationTime) && LastWriteTimeUtc.Equals(other.LastWriteTimeUtc) && string.Equals(FullName, other.FullName) && string.Equals(Name, other.Name) && string.Equals(HashValue, other.HashValue) &&
            string.Equals(UniqueIdHashValue, other.UniqueIdHashValue) && IsMaster == other.IsMaster && Equals(DuplicateFiles, other.DuplicateFiles) && FileSize == other.FileSize);
 }
 public bool Equals(ImageReferenceElement other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(Directory, other.Directory) && string.Equals(FileName, other.FileName) && string.Equals(CompletePath, other.CompletePath) && Size == other.Size &&
            CreationTime.Equals(other.CreationTime) &&
            LastWriteTime.Equals(other.LastWriteTime) && LastAccessTime.Equals(other.LastAccessTime));
 }
 /// <summary>
 /// Equality method between two objects of the same type.
 /// Because the Equals method is strongly typed by generic constraints,
 /// it is not necessary to test for the correct object type.
 /// For safety we just want to match on business key value - in this case the fields
 /// that cannot be different between the two objects if they are supposedly equal.
 /// </summary>
 /// <param name="obj">The other object of this type that we are testing equality with</param>
 /// <returns></returns>
 public virtual bool Equals(GetDetailOutputDtoBase <TIdType> obj)
 {
     if (obj != null)
     {
         return(Id.Equals(obj.Id) && Culture.Equals(obj.Culture) &&
                DescriptionShort.Equals(obj.DescriptionShort) &&
                CreationTime.Equals(obj.CreationTime) &&
                CreatorUserName.Equals(obj.CreatorUserName) &&
                LastModifierUserName.Equals(obj.LastModifierUserName) &&
                LastModificationTime.Equals(obj.LastModificationTime)
                );
     }
     return(false);
 }
Пример #7
0
        /// <summary>
        /// Returns true if UserInfo instances are equal
        /// </summary>
        /// <param name="other">Instance of UserInfo to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(UserInfo other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Email == other.Email ||
                     Email != null &&
                     Email.Equals(other.Email)
                     ) &&
                 (
                     UserId == other.UserId ||
                     UserId != null &&
                     UserId.Equals(other.UserId)
                 ) &&
                 (
                     TimeZone == other.TimeZone ||
                     TimeZone != null &&
                     TimeZone.Equals(other.TimeZone)
                 ) &&
                 (
                     Activated == other.Activated ||
                     Activated != null &&
                     Activated.Equals(other.Activated)
                 ) &&
                 (
                     CreationTime == other.CreationTime ||
                     CreationTime != null &&
                     CreationTime.Equals(other.CreationTime)
                 ) &&
                 (
                     LastModifiedTime == other.LastModifiedTime ||
                     LastModifiedTime != null &&
                     LastModifiedTime.Equals(other.LastModifiedTime)
                 ) &&
                 (
                     LastLoginTime == other.LastLoginTime ||
                     LastLoginTime != null &&
                     LastLoginTime.Equals(other.LastLoginTime)
                 ));
        }
 /// <summary>
 /// Equality method between two objects of the same type.
 /// Because the Equals method is strongly typed by generic constraints,
 /// it is not necessary to test for the correct object type.
 /// For safety we just want to match on business key value - in this case the fields
 /// that cannot be different between the two objects if they are supposedly equal.
 /// </summary>
 /// <param name="obj">The other object of this type that we are testing equality with</param>
 /// <returns></returns>
 public virtual bool Equals(GetAllInputDtoBase <TIdType> obj)
 {
     if (obj != null)
     {
         return(Name.Equals(obj.Name) && Culture.Equals(obj.Culture) && TenantId.Equals(obj.TenantId) &&
                DescriptionShort.Equals(obj.DescriptionShort) &&
                DescriptionFull.Equals(obj.DescriptionFull) &&
                IsActive.Equals(obj.IsActive) &&
                CreationTime.Equals(obj.CreationTime) &&
                CreatorUserName.Equals(obj.CreatorUserName) &&
                LastModifierUserName.Equals(obj.LastModifierUserName) &&
                LastModificationTime.Equals(obj.LastModificationTime)
                );
     }
     return(false);
 }
Пример #9
0
 public bool Equals(Node other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(NodeRef, other.NodeRef) &&
            IsDeleted == other.IsDeleted &&
            CreationTime.Equals(other.CreationTime) &&
            ModificationTime.Equals(other.ModificationTime) &&
            DictionaryEqualityComparer.Equals(Properties, other.Properties));
 }
Пример #10
0
        public bool Equals(ZeroRefreshToken other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            bool result = CreationTime.Equals(other.CreationTime) &&
                          Lifetime == other.Lifetime &&
                          Equals(AccessToken, other.AccessToken) &&
                          Version == other.Version;

            return(result);
        }
 /// <summary>
 /// Equality method between two objects of the same type.
 /// Because the Equals method is strongly typed by generic constraints,
 /// it is not necessary to test for the correct object type.
 /// For safety we just want to match on business key value - in this case the fields
 /// that cannot be different between the two objects if they are supposedly equal.
 /// </summary>
 /// <param name="obj">The other object of this type that we are testing equality with</param>
 /// <returns></returns>
 public virtual bool Equals(GetAdminOutputDtoBase <TIdType> obj)
 {
     if (obj != null)
     {
         return(Id.Equals(obj.Id) && Culture.Equals(obj.Culture) &&
                TranslatedFromId.Equals(obj.TranslatedFromId) &&
                IsActive.Equals(obj.IsActive) &&
                IsDeleted.Equals(obj.IsDeleted) &&
                DescriptionFull.Equals(obj.DescriptionFull) &&
                CreationTime.Equals(obj.CreationTime) &&
                CreatorUserId.Equals(obj.CreatorUserId) &&
                CreatorUserName.Equals(obj.CreatorUserName) &&
                LastModifierUserId.Equals(obj.LastModifierUserId) &&
                LastModifierUserName.Equals(obj.LastModifierUserName) &&
                LastModificationTime.Equals(obj.LastModificationTime)
                );
     }
     return(false);
 }
Пример #12
0
        /// <inheritdoc/>
        public bool Equals(RestApiModel other)
        {
            if (other is null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                (Id == other.Id &&
                 Type == other.Type &&
                 Parent == other.Parent &&
                 Author == other.Author &&
                 Title == other.Title &&
                 Text == other.Text &&
                 Url == other.Url &&
                 HtmlContent == other.HtmlContent &&
                 Upvotes == other.Upvotes &&
                 Downvotes == other.Downvotes &&
                 MathF.Abs(VotesRatio - other.VotesRatio) < 0.001f &&
                 Views == other.Views &&
                 Clicks == other.Clicks &&
                 MathF.Abs(ClicksRatio - other.ClicksRatio) < 0.001f &&
                 NumberOfComments == other.NumberOfComments &&
                 CreationTime.Equals(other.CreationTime) &&
                 UpdateTime.Equals(other.UpdateTime) &&
                 ExpirationTime.Equals(other.ExpirationTime) &&
                 Flag1 == other.Flag1 &&
                 Flag2 == other.Flag2 &&
                 Flag3 == other.Flag3 &&
                 Flag4 == other.Flag4 &&
                 Flag5 == other.Flag5 &&
                 Optional1 == other.Optional1 &&
                 Optional2 == other.Optional2 &&
                 Optional3 == other.Optional3 &&
                 (Info == null && other.Info == null ||
                  Info?.Equals(other.Info) == true));
        }
Пример #13
0
 public bool Equals(JsonResponseModel?other)
 {
     if (other is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return
         (Id == other.Id &&
          Type == other.Type &&
          Count == other.Count &&
          CreationTime.Equals(other.CreationTime) &&
          UpdateTime.Equals(other.UpdateTime) &&
          ExpirationTime.Equals(other.ExpirationTime) &&
          PreviousPageId == other.PreviousPageId &&
          FollowingPageId == other.FollowingPageId &&
          ModelContainers?.Count == other.ModelContainers?.Count &&
          ModelContainers.Zip(other.ModelContainers).All(p => p.First.Equals(p.Second)));
 }
Пример #14
0
        /// <summary>
        /// Equality method between two objects of the same type.
        /// Because the Equals method is strongly typed by generic constraints,
        /// it is not necessary to test for the correct object type.
        /// </summary>
        /// <param name="obj">The other object of this type we are testing equality with</param>
        /// <returns>True if the objects are equal in value</returns>
        public virtual bool Equals(MetadataInformation obj)
        {
            // If parameter is null, return false.
            if (obj is null)
            {
                return(false);
            }

            // Optimization for a common success case.
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }

            // If run-time types are not exactly the same, return false.
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }

            // Return true if the fields match.
            // Note that the base class is not invoked because it is
            // System.Object, which defines Equals as reference equality.
            return
                (
                TenantId.Equals(obj.TenantId) &&
                CreatorUserId.Equals(obj.CreatorUserId) &&
                Name.Equals(obj.Name) &&
                DescriptionFull.Equals(obj.DescriptionFull) &&
                DescriptionShort.Equals(obj.DescriptionShort) &&
                LastModifierUserId.Equals(obj.LastModifierUserId) &&
                CreationTime.Equals(obj.CreationTime) &&
                LastModificationTime.Equals(obj.LastModificationTime) &&
                IsDeleted.Equals(obj.IsDeleted) &&
                IsActive.Equals(obj.IsActive)
                )
            ;
        }