示例#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 CalculationEngine(InputParameter inputParam, Action <string> logDelegate)
        {
            logWriter = new LogWriter(inputParam.LogFolder, "log.txt");

            logWriter.Add(logDelegate);

            context = new SQLContext(logWriter.Write);

            configHandle = new ConfigHandle(inputParam.ConfigExcelFilePath, logWriter.Write);

            inputHandle = new InputHandle(inputParam.InputExcelFilePath, logWriter.Write);
        }