private void WarnUndefinedObjects(IEnumerable <ScriptObject> dbObjects)
 {
     foreach (var dbObject in dbObjects)
     {
         m_log.WriteWarning(string.Format("The object {0}.{1} could not be scripted, since the object type was not identifyable. Normally this means, that the object has been dropped in the meantime. If necessary delete the file manually.", dbObject.ObjectSchema, dbObject.ObjectName));
     }
 }
        public void Dispose()
        {
            if (!errorOccured)
                transaction.Commit();
            else
            {
                log.WriteWarning("Error occured when executing scripts, transaction will be rolled back");
                //Restore the executed scripts collection
                executedScriptsCollection.Clear();
                executedScriptsCollection.AddRange(executedScriptsListBeforeExecution);
            }

            transaction.Dispose();
        }
        public void Dispose()
        {
            if (!errorOccured)
            {
                transaction.Commit();
            }
            else
            {
                log.WriteWarning("Error occured when executing scripts, transaction will be rolled back");
                //Restore the executed scripts collection
            }

            transaction.Dispose();
        }
        public void Dispose()
        {
            if (!errorOccured)
            {
                log.WriteInformation("Success! No errors have occured when executing scripts, transaction will be rolled back");
            }
            else
            {
                log.WriteWarning("Error occured when executing scripts, transaction will be rolled back");
            }

            // Always rollback
            transaction?.Rollback();

            //Restore the executed scripts collection
            executedScriptsCollection.Clear();
            executedScriptsCollection.AddRange(executedScriptsListBeforeExecution);

            transaction?.Dispose();
        }