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

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

            // Not Check ProcessTaskId, because generated Guid

            // Check for same value

            return(((ProcessTaskName == null && other.ProcessTaskName == null) || (ProcessTaskName != null && other.ProcessTaskName != null && ProcessTaskName.Equals(other.ProcessTaskName))) &&
                   ((ProcessTaskOwner == null && other.ProcessTaskOwner == null) || (ProcessTaskOwner != null && other.ProcessTaskOwner != null && ProcessTaskOwner.Equals(other.ProcessTaskOwner))) &&
                   ((ParentTaskId == null && other.ParentTaskId == null) || (ParentTaskId != null && other.ParentTaskId != null && ParentTaskId.Equals(other.ParentTaskId))) &&
                   ((ProcessKey == null && other.ProcessKey == null) || (ProcessKey != null && other.ProcessKey != null && ProcessKey.Equals(other.ProcessKey))) &&
                   ((ProcessInstanceId == null && other.ProcessInstanceId == null) || (ProcessInstanceId != null && other.ProcessInstanceId != null && ProcessInstanceId.Equals(other.ProcessInstanceId))) &&
                   ((ProcessItemDefinitionId == null && other.ProcessItemDefinitionId == null) || (ProcessItemDefinitionId != null && other.ProcessItemDefinitionId != null && ProcessItemDefinitionId.Equals(other.ProcessItemDefinitionId))) &&
                   SuspensionState.Equals(other.SuspensionState));
        }
Beispiel #2
0
 public void Delete(ProcessTask item)
 {
     this.ThrowIfDisposed(_disposed);
     item.ThrowIfNull();
     Entities.Remove(item);
     SaveChanges();
     Cache.Remove(item.ProcessTaskId.ToString());
 }
Beispiel #3
0
 public void Update(ProcessTask item)
 {
     this.ThrowIfDisposed(_disposed);
     item.ThrowIfNull();
     Entities.Update(item);
     SaveChanges();
     Cache.Set(item.ProcessTaskId.ToString(), item);
 }