Пример #1
0
        private static void RestoreMetadataWorker(object dataAdapterObj)
        {
            if (dataAdapterObj == null)
            {
                throw new ArgumentNullException("dataAdapterObj");
            }

            ILogProvider logger = null;

            try
            {
                BlobDataAdapter dataAdapter = (BlobDataAdapter)dataAdapterObj;
                logger = dataAdapter.Logger;

                RestoreBlobMetadataAdapter restoreMetadataAdapter = new RestoreBlobMetadataAdapter(dataAdapter);
                restoreMetadataAdapter.Restore();
            }
            catch (Exception ex)
            {
                if (logger != null)
                {
                    logger.WriteFormatMessage("Не удалось выполнить процедуру восстановления метаданных. Текст ошибки: {0}", ex);
                }
            }
        }
        public RestoreBlobMetadataAdapter(BlobDataAdapter dataAdapter)
        {
            if (dataAdapter == null)
            {
                throw new ArgumentNullException("dataAdapter");
            }

            this.DataAdapter = dataAdapter;
        }
Пример #3
0
        public BlobContainer(BlobDataAdapter dataAdapter, IBlobContainerMetadata metadata)
        {
            if (dataAdapter == null)
            {
                throw new ArgumentNullException("dataAdapter");
            }

            if (metadata == null)
            {
                throw new ArgumentNullException("metadata");
            }

            this.DataAdapter = dataAdapter;
            this.Metadata    = metadata;
        }
Пример #4
0
 static BlobDataAdapter()
 {
     //TODO DM DATA.BLOB --- move to storage installer
     //обновление схемы адаптера метаданных по конфигурации
     BlobDataAdapter.InitSchema();
 }