예제 #1
0
        public bool Equals(BpmnDefinition other)
        {
            // Check for null
            if (ReferenceEquals(other, null))
            {
                return(false);
            }

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

            // Not Check DeploymentId, because generated Guid

            // Check for same value
            return(((DeploymentId == null && other.DeploymentId == null) || (DeploymentId != null && other.DeploymentId != null && DeploymentId.Equals(other.DeploymentId))) &&
                   ((Name == null && other.Name == null) || (Name != null && other.Name != null && Name.Equals(other.Name))) &&
                   ((DefinitionKey == null && other.DefinitionKey == null) || (DefinitionKey != null && other.DefinitionKey != null && DefinitionKey.Equals(other.DefinitionKey))) &&
                   ((ProcessDefinitionDescription == null && other.ProcessDefinitionDescription == null) || (ProcessDefinitionDescription != null && other.ProcessDefinitionDescription != null && ProcessDefinitionDescription.Equals(other.ProcessDefinitionDescription))) &&
                   ((ProcessDefinitionDiagramResourceName == null && other.ProcessDefinitionDiagramResourceName == null) || (ProcessDefinitionDiagramResourceName != null && other.ProcessDefinitionDiagramResourceName != null && ProcessDefinitionDiagramResourceName.Equals(other.ProcessDefinitionDiagramResourceName))) &&
                   (ProcessDefinitionHasStartFormKey.Equals(other.ProcessDefinitionHasStartFormKey)) &&
                   (ProcessDefinitionHasGraphicalNotation.Equals(other.ProcessDefinitionHasGraphicalNotation)) &&
                   (IsSuspended.Equals(other.IsSuspended)) &&
                   ((TenantId == null && other.TenantId == null) || (TenantId != null && other.TenantId != null && TenantId.Equals(other.TenantId))));
        }
예제 #2
0
        /// <summary>
        /// Returns true if UpdateItem instances are equal
        /// </summary>
        /// <param name="input">Instance of UpdateItem to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(UpdateItem input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     MerchantSuppliedId == input.MerchantSuppliedId ||
                     MerchantSuppliedId != null &&
                     MerchantSuppliedId.Equals(input.MerchantSuppliedId)
                     ) &&
                 (
                     IsSuspended == input.IsSuspended ||
                     IsSuspended != null &&
                     IsSuspended.Equals(input.IsSuspended)
                 ) &&
                 (
                     Price == input.Price ||
                     Price != null &&
                     Price.Equals(input.Price)
                 ));
        }