public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (FilePath != null ? FilePath.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsExecutable.GetHashCode();
         hashCode = (hashCode * 397) ^ IsZipped.GetHashCode();
         hashCode = (hashCode * 397) ^ (BlobKey != null ? HashCodeHelper.GetHashCode(BlobKey) : 0);
         return(hashCode);
     }
 }
Esempio n. 2
0
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hash = (Key != null) ? Key.GetHashCode() : 0;
         // Suitable nullity checks etc, of course :)
         hash = (DefinitionKey != null) ? hash * 17 + DefinitionKey.GetHashCode() : hash;
         hash = (Id != null) ? hash * 17 + Id.GetHashCode() : hash;
         hash = (Name != null) ? hash * 17 + Name.GetHashCode() : hash;
         hash = hash * 17 + IsExecutable.GetHashCode();
         hash = hash * 17 + IsClosed.GetHashCode();
         return(hash);
     }
 }
Esempio n. 3
0
        public bool Equals(BpmnProcess other)
        {
            // Check for null
            if (ReferenceEquals(other, null))
            {
                return(false);
            }

            // Check for same reference
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            // Not Check Key, because generated Guid

            // Check for same value
            return(((DefinitionKey == null && other.DefinitionKey == null) || (DefinitionKey != null && other.DefinitionKey != null && DefinitionKey.Equals(other.DefinitionKey))) &&
                   ((Id == null && other.Id == null) || (Id != null && other.Id != null && Id.Equals(other.Id))) &&
                   ((Name == null && other.Name == null) || (Name != null && other.Name != null && Name.Equals(other.Name))) &&
                   (IsExecutable.Equals(other.IsExecutable)) &&
                   (IsClosed.Equals(other.IsClosed)));
        }