Пример #1
0
        protected async Task <ICollection <Guid> > GetAllManagedMediaItemAspectTypes()
        {
            while (true)
            {
                try
                {
                    await Activated.WaitAsync();

                    return(_mediaBrowsingCallback.GetAllManagedMediaItemAspectTypes());
                }
                catch (DisconnectedException)
                {
                    ServiceRegistration.Get <ILogger>().Info("ImporterWorker.{0}.{1}: MediaLibrary disconnected. Requesting suspension...", ParentImportJobController, _blockName);
                    ParentImportJobController.ParentImporterWorker.RequestAction(new ImporterWorkerAction(ImporterWorkerAction.ActionType.Suspend)).Wait();
                }
            }
        }