示例#1
0
            public void failedOperation(DbOperation operation)
            {
                if (operation is DbEntityOperation)
                {
                    DbEntityOperation dbEntityOperation = (DbEntityOperation)operation;
                    DbEntity          dbEntity          = dbEntityOperation.Entity;

                    bool failedOperationEntityInList = false;

                    IEnumerator <LockedExternalTask> it = tasks.GetEnumerator();
                    while (it.MoveNext())
                    {
                        LockedExternalTask resultTask = it.Current;
                        if (resultTask.Id.Equals(dbEntity.Id))
                        {
//JAVA TO C# CONVERTER TODO TASK: .NET enumerators are read-only:
                            it.remove();
                            failedOperationEntityInList = true;
                            break;
                        }
                    }

                    if (!failedOperationEntityInList)
                    {
                        throw LOG.concurrentUpdateDbEntityException(operation);
                    }
                }
            }