示例#1
0
        public void Dispose()
        {
            if (configHandle != null)
            {
                configHandle.Dispose();
                configHandle = null;
            }

            if (inputHandle != null)
            {
                inputHandle.Dispose();
                inputHandle = null;
            }

            if (context != null)
            {
                context.Dispose();
            }

            if (logWriter != null)
            {
                logWriter.Dispose();
                logWriter = null;
            }
        }
示例#2
0
        public void Dispose()
        {
            if (config != null)
            {
                config.Dispose();
                config = null;
            }

            if (inputData != null)
            {
                inputData.Dispose();
                inputData = null;
            }

            if (sqlContext != null)
            {
                sqlContext.Dispose();
            }

            if (logWriter != null)
            {
                logWriter.Dispose();
                logWriter = null;
            }

            if (outputTextWriter != null)
            {
                outputTextWriter.Dispose();
                outputTextWriter = null;
            }
        }
示例#3
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         SQLContext.Dispose();
     }
     base.Dispose(disposing);
 }
示例#4
0
        protected override void Dispose(bool disposing)
        {
            _sqlContext.Dispose();

            cbOfflineMode.CheckedChanged -= checkOfflineMode_CheckedChanged;
            bEditMetadata.Click          -= buttonEditMetadata_Click;
            bSaveToXML.Click             -= buttonSaveToXML_Click;
            bLoadFromXML.Click           -= buttonLoadFromXML_Click;

            if (disposing)
            {
                components?.Dispose();
            }

            base.Dispose(disposing);
        }
        private SQLExpressionItem ParseExpressionAccess(string expression)
        {
            SQLContext        accessSQLContext = new SQLContext();
            SQLExpressionItem accessExpression;

            try
            {
                // set up context class to use Access syntax
                accessSQLContext.SyntaxProvider = msAccessSyntaxProvider1;

                accessExpression = accessSQLContext.ParseExpression(expression);

                try
                {
                    // clone parsed expression in our default context
                    // this converts identifiers quotation, but leave the same constants notation
                    if (accessExpression != null)
                    {
                        return(accessExpression.Clone(queryBuilder1.SQLContext));
                    }
                    else
                    {
                        return(null);
                    }
                }
                finally
                {
                    if (accessExpression != null)
                    {
                        accessExpression.Dispose();
                    }
                }
            }
            finally
            {
                accessSQLContext.Dispose();
            }
        }
示例#6
0
 public void Dispose()
 {
     _dbContext.Dispose();
 }
示例#7
0
 public void Dispose()
 {
     _context.Dispose();
     GC.SuppressFinalize(this);
 }
 public void Dispose()
 {
     Db.Dispose();
 }
示例#9
0
 public virtual void Dispose()
 {
     _context.Dispose();
 }
示例#10
0
 public void Dispose()
 {
     _context.Dispose();
 }