Exemple #1
0
        public static List <IDebugItemResult> GetInputDebugItems(Activity act = null)
        {
            ErrorResultTO   errors;
            var             comiler = DataListFactory.CreateDataListCompiler();
            var             result  = ScenarioContext.Current.Get <IDSFDataObject>("result");
            IBinaryDataList dl      = comiler.FetchBinaryDataList(result.DataListID, out errors);

            try
            {
                DsfActivityAbstract <string> dsfActivityAbstractString = act as DsfActivityAbstract <string>;
                if (dsfActivityAbstractString != null)
                {
                    return(DebugItemResults(dsfActivityAbstractString, dl));
                }
                DsfActivityAbstract <bool> dsfActivityAbstractBool = act as DsfActivityAbstract <bool>;
                if (dsfActivityAbstractBool != null)
                {
                    return(DebugItemResults(dsfActivityAbstractBool, dl));
                }
                var activity = ScenarioContext.Current.Get <DsfActivityAbstract <string> >("activity");
                return(DebugItemResults(activity, dl));
            }
            catch
            {
                var activity = ScenarioContext.Current.Get <DsfActivityAbstract <bool> >("activity");
                return(activity.GetDebugInputs(dl)
                       .SelectMany(r => r.ResultsList)
                       .ToList());
            }
        }
        public List <IDebugItemResult> GetInputDebugItems(Activity act, IExecutionEnvironment env)
        {
            var result = scenarioContext.Get <IDSFDataObject>("result");

            try
            {
                var multipleFilesActivity = act as DsfAbstractMultipleFilesActivity;
                if (multipleFilesActivity != null)
                {
                    return(DebugItemResults(multipleFilesActivity, result.Environment));
                }

                DsfActivityAbstract <string> dsfActivityAbstractString = act as DsfActivityAbstract <string>;
                if (dsfActivityAbstractString != null)
                {
                    return(DebugItemResults(dsfActivityAbstractString, result.Environment));
                }

                DsfActivityAbstract <bool> dsfActivityAbstractBool = act as DsfActivityAbstract <bool>;
                if (dsfActivityAbstractBool != null)
                {
                    return(DebugItemResults(dsfActivityAbstractBool, result.Environment));
                }

                var activity = scenarioContext.Get <DsfActivityAbstract <string> >("activity");
                return(DebugItemResults(activity, env));
            }
            catch
            {
                var activity = scenarioContext.Get <DsfActivityAbstract <bool> >("activity");
                return(activity.GetDebugInputs(result.Environment, 0)
                       .SelectMany(r => r.ResultsList)
                       .ToList());
            }
        }
Exemple #3
0
        List <IDebugItemResult> DebugItemResults <T>(DsfActivityAbstract <T> dsfActivityAbstractString, IExecutionEnvironment dl)
        {
            var debugInputs = dsfActivityAbstractString.GetDebugInputs(dl, 0);

            return(debugInputs
                   .SelectMany(r => r.ResultsList)
                   .ToList());
        }
        public void ThenTheDebugInputsAs(Table table)
        {
            var containsInnerActivity = scenarioContext.ContainsKey("innerActivity");
            var containsKey           = scenarioContext.ContainsKey("activity");

            if (containsInnerActivity)
            {
                DsfNativeActivity <string> selectAndAppltTool;
                scenarioContext.TryGetValue("innerActivity", out selectAndAppltTool);
                var result = scenarioContext.Get <IDSFDataObject>("result");
                if (!result.Environment.HasErrors())
                {
                    var inputDebugItems = GetInputDebugItems(selectAndAppltTool, result.Environment);
                    ThenTheDebugInputsAs(table, inputDebugItems);
                }
            }
            else if (containsKey)
            {
                object baseAct;
                scenarioContext.TryGetValue("activity", out baseAct);
                var stringAct             = baseAct as DsfFlowNodeActivity <string>;
                var boolAct               = baseAct as DsfFlowNodeActivity <bool>;
                var multipleFilesActivity = baseAct as DsfAbstractMultipleFilesActivity;
                if (stringAct != null)
                {
                    DsfActivityAbstract <string> dsfActivityAbstract = containsKey ? scenarioContext.Get <DsfActivityAbstract <string> >("activity") : null;
                    var result = scenarioContext.Get <IDSFDataObject>("result");
                    if (!result.Environment.HasErrors())
                    {
                        var inputDebugItems = GetInputDebugItems(dsfActivityAbstract, result.Environment);
                        ThenTheDebugInputsAs(table, inputDebugItems);
                    }
                }
                else if (boolAct != null)
                {
                    DsfActivityAbstract <bool> dsfActivityAbstract = containsKey ? scenarioContext.Get <DsfActivityAbstract <bool> >("activity") : null;
                    var result = scenarioContext.Get <IDSFDataObject>("result");
                    if (!result.Environment.HasErrors())
                    {
                        var inputDebugItems = GetInputDebugItems(dsfActivityAbstract, result.Environment);
                        ThenTheDebugInputsAs(table, inputDebugItems);
                    }
                }
                else if (multipleFilesActivity != null)
                {
                    DsfAbstractMultipleFilesActivity dsfActivityAbstract = containsKey ? scenarioContext.Get <DsfAbstractMultipleFilesActivity>("activity") : null;
                    var result = scenarioContext.Get <IDSFDataObject>("result");
                    if (!result.Environment.HasErrors())
                    {
                        var inputDebugItems = GetInputDebugItems(dsfActivityAbstract, result.Environment);
                        ThenTheDebugInputsAs(table, inputDebugItems);
                    }
                }
            }
        }
Exemple #5
0
        List <DebugItem> DebugItemResults <T>(DsfActivityAbstract <T> dsfActivityAbstractString, IExecutionEnvironment dl)
        {
            var debugInputs = dsfActivityAbstractString.GetDebugInputs(dl, 0);

            return(debugInputs.ToList());
        }
Exemple #6
0
 static List <IDebugItemResult> DebugItemResults <T>(DsfActivityAbstract <T> dsfActivityAbstractString, IBinaryDataList dl)
 {
     return(dsfActivityAbstractString.GetDebugInputs(dl)
            .SelectMany(r => r.ResultsList)
            .ToList());
 }