void PostExecute(IDSFDataObject dataObject, IEnumerable <string> toresultfields, bool hasErrors)
        {
            if (dataObject.IsDebugMode())
            {
                int i = 1;
                foreach (var field in toresultfields)
                {
                    if (!string.IsNullOrEmpty(field))
                    {
                        try
                        {
                            var res = new DebugEvalResult(dataObject.Environment.ToStar(field), "", dataObject.Environment);

                            if (!hasErrors)
                            {
                                AddDebugOutputItem(new DebugItemStaticDataParams("", "", i.ToString(CultureInfo.InvariantCulture)));
                            }
                            AddDebugOutputItem(res);
                        }
                        catch (Exception)
                        {
                            AddDebugOutputItem(new DebugItemStaticDataParams("", field, ""));
                            throw;
                        }
                    }
                    i++;
                }
            }
        }
        private string PersistSchedulePersistValue()
        {
            var debugEvalResult = new DebugEvalResult(PersistValue, "Persist Schedule Value", _dataObject.Environment, _update);

            AddDebugInputItem(debugEvalResult);
            var persistValue     = string.Empty;
            var debugItemResults = debugEvalResult.GetDebugItemResult();

            if (debugItemResults.Count > 0)
            {
                persistValue = debugItemResults[0].Value;
            }

            return(persistValue);
        }
Пример #3
0
        private string EvalSuspensionId()
        {
            var debugEvalResult = new DebugEvalResult(SuspensionId, nameof(SuspensionId), _dataObject.Environment, _update);

            AddDebugInputItem(debugEvalResult);
            var suspensionId = string.Empty;

            var debugItemResults = debugEvalResult.GetDebugItemResult();

            if (debugItemResults.Count > 0)
            {
                suspensionId = debugItemResults[0].Value;
            }

            return(suspensionId);
        }
        private void ExecuteToolAddDebugItems(IDSFDataObject dataObject, int update)
        {
            var resDebug = new DebugEvalResult(SqlQuery, "Query", dataObject.Environment, update);

            AddDebugInputItem(resDebug);
            if (DeclareVariables != null)
            {
                foreach (var item in DeclareVariables)
                {
                    if (!string.IsNullOrEmpty(item.Name))
                    {
                        var decVarDebug = new DebugEvalResult(item.Value, item.Name, dataObject.Environment, update);
                        AddDebugInputItem(decVarDebug);
                    }
                }
            }
        }
Пример #5
0
        void TryAddDebugOutputItem(IDSFDataObject dataObject, bool hasErrors, int update, int i, string field)
        {
            try
            {
                var res = new DebugEvalResult(dataObject.Environment.ToStar(field), "", dataObject.Environment, update);

                if (!hasErrors)
                {
                    AddDebugOutputItem(new DebugItemStaticDataParams("", "", i.ToString(CultureInfo.InvariantCulture)));
                }

                AddDebugOutputItem(res);
            }
            catch (Exception)
            {
                AddDebugOutputItem(new DebugItemStaticDataParams("", field, ""));
                throw;
            }
        }