コード例 #1
0
ファイル: BulkTestsData.cs プロジェクト: HicServices/RDMP
        /// <summary>
        /// Deletes the rdmp metadata objects (but not the actual <see cref="BulkDataTable"/>)
        /// </summary>
        public void DeleteCatalogue()
        {
            var creds = (DataAccessCredentials)tableInfo.GetCredentialsIfExists(DataAccessContext.InternalDataProcessing);

            if (tableInfo.Exists())
            {
                tableInfo.DeleteInDatabase();
            }

            if (creds != null)
            {
                try
                {
                    creds.DeleteInDatabase();
                }
                catch (CredentialsInUseException e)
                {
                    Console.WriteLine("Ignored Potential Exception:" + e);
                }
            }

            if (catalogue.Exists())
            {
                catalogue.DeleteInDatabase();
            }
        }