コード例 #1
0
        public void DeleteDirector(string directorName)
        {
            queue.ChckAndAddToDirectorList(directorName);

            try
            {
                semaphore.WaitAsync();
                var indexToDelete = directors.FindIndex(dir => dir.Name.Equals(directorName));
                if (indexToDelete == -1)
                {
                    queue.RemoveDirectorFromQueue(directorName);
                    throw new DataBaseException("No se encontro el director solicitado");
                }
                directors.RemoveAt(indexToDelete);
            }
            finally
            {
                semaphore.Release();
                queue.RemoveDirectorFromQueue(directorName);
            }
        }
コード例 #2
0
 private void RemoveDirectorAndMovieFromQueue(string movieName, string dirName)
 {
     queue.RemoveMovieFromModifyQueue(movieName);
     queue.RemoveDirectorFromQueue(dirName);
 }