当前位置: 首页>>代码示例>>C#>>正文


C# Statements.FlowStep类代码示例

本文整理汇总了C#中System.Activities.Statements.FlowStep的典型用法代码示例。如果您正苦于以下问题:C# FlowStep类的具体用法?C# FlowStep怎么用?C# FlowStep使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FlowStep类属于System.Activities.Statements命名空间,在下文中一共展示了FlowStep类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DsfCalculateActivity_OnExecute_GetCurrentDateTime_ResultContainsMilliseconds

        public void DsfCalculateActivity_OnExecute_GetCurrentDateTime_ResultContainsMilliseconds()
        {
            TestStartNode = new FlowStep
            {
                Action = new DsfCalculateActivity { Expression = @"now()", Result = "[[result]]" }
            };

            CurrentDl = "<ADL><result></result></ADL>";
            TestData = "<root><ADL><result></result></ADL></root>";
            IDSFDataObject result = ExecuteProcess();
            string error;
            string entry;

            GetScalarValueFromEnvironment(result.Environment, "result", out entry, out error);

            // remove test datalist ;)

            DateTime res = DateTime.Parse(entry);

            if(res.Millisecond == 0)
            {
                Thread.Sleep(10);
                result = ExecuteProcess();
                GetScalarValueFromEnvironment(result.Environment, "result", out entry, out error);
                res = DateTime.Parse(entry);
                Assert.IsTrue(res.Millisecond != 0);
            }
            Assert.IsTrue(res.Millisecond != 0);
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:29,代码来源:CalculateActivityTest.cs

示例2: BuildDataList

        protected override void BuildDataList()
        {
            List<Tuple<string, string>> variableList;
            ScenarioContext.Current.TryGetValue("variableList", out variableList);

            if(variableList == null)
            {
                variableList = new List<Tuple<string, string>>();
                ScenarioContext.Current.Add("variableList", variableList);
            }

            variableList.Add(new Tuple<string, string>(ResultVariable, ""));
            BuildShapeAndTestData();

            var recordset = ScenarioContext.Current.Get<string>("recordset");
            var delete = new DsfDeleteRecordActivity
                {
                    RecordsetName = recordset,
                    Result = ResultVariable
                };

            TestStartNode = new FlowStep
                {
                    Action = delete
                };
            ScenarioContext.Current.Add("activity", delete);
        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:27,代码来源:DeleteSteps.cs

示例3: BuildDataList

        protected override void BuildDataList()
        {
            List<Tuple<string, string>> variableList;
            ScenarioContext.Current.TryGetValue("variableList", out variableList);

            if(variableList == null)
            {
                variableList = new List<Tuple<string, string>>();
                ScenarioContext.Current.Add("variableList", variableList);
            }

            variableList.Add(new Tuple<string, string>(ResultVariable, ""));
            BuildShapeAndTestData();

            var recordsetName = ScenarioContext.Current.Get<string>("recordset");
            var sortOrder = ScenarioContext.Current.Get<string>("sortOrder");
            var sortRecords = new DsfSortRecordsActivity
                {
                    SortField = recordsetName,
                    SelectedSort = sortOrder
                };

            TestStartNode = new FlowStep
                {
                    Action = sortRecords
                };
            ScenarioContext.Current.Add("activity", sortRecords);
        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:28,代码来源:SortSteps.cs

示例4: BuildDataList

        protected override void BuildDataList()
        {
            List<Tuple<string, string>> variableList;
            ScenarioContext.Current.TryGetValue("variableList", out variableList);

            if (variableList == null)
            {
                variableList = new List<Tuple<string, string>>();
                ScenarioContext.Current.Add("variableList", variableList);
            }

            variableList.Add(new Tuple<string, string>(ResultVariable, ""));
            BuildShapeAndTestData();

            string header;
            ScenarioContext.Current.TryGetValue("header", out header);
            string url;
            ScenarioContext.Current.TryGetValue("url", out url);
            string timeout;
            ScenarioContext.Current.TryGetValue("timeoutSeconds", out timeout);
            var webGet = new DsfWebGetRequestWithTimeoutActivity
                {
                    Result = ResultVariable,
                    Url = url ?? "",
                    Headers = header ?? "",
                    TimeoutSeconds = String.IsNullOrEmpty(timeout) ? 100 : int.Parse(timeout),
                    TimeOutText = String.IsNullOrEmpty(timeout) ? "" : timeout
                };

            TestStartNode = new FlowStep
                {
                    Action = webGet
                };
            ScenarioContext.Current.Add("activity", webGet);
        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:35,代码来源:WebRequestSteps.cs

示例5: BuildDataList

        protected override void BuildDataList()
        {
            BuildShapeAndTestData();


            var copy = new DsfPathCopy
            {
                InputPath = ScenarioContext.Current.Get<string>(CommonSteps.SourceHolder), 
                Username = ScenarioContext.Current.Get<string>(CommonSteps.SourceUsernameHolder),
                Password = ScenarioContext.Current.Get<string>(CommonSteps.SourcePasswordHolder), 
                OutputPath = ScenarioContext.Current.Get<string>(CommonSteps.DestinationHolder), 
                DestinationUsername = ScenarioContext.Current.Get<string>(CommonSteps.DestinationUsernameHolder), 
                DestinationPassword = ScenarioContext.Current.Get<string>(CommonSteps.DestinationPasswordHolder), 
                Overwrite = ScenarioContext.Current.Get<bool>(CommonSteps.OverwriteHolder), 
                Result = ScenarioContext.Current.Get<string>(CommonSteps.ResultVariableHolder),
                PrivateKeyFile = ScenarioContext.Current.Get<string>(CommonSteps.SourcePrivatePublicKeyFile),
                DestinationPrivateKeyFile = ScenarioContext.Current.Get<string>(CommonSteps.DestinationPrivateKeyFile)
            };
           
            TestStartNode = new FlowStep
            {
                Action = copy
            };

            ScenarioContext.Current.Add("activity", copy);
        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:26,代码来源:CopySteps.cs

示例6: BuildDataList

        protected override void BuildDataList()
        {
            List<Tuple<string, string>> variableList;
            ScenarioContext.Current.TryGetValue("variableList", out variableList);

            if(variableList == null)
            {
                variableList = new List<Tuple<string, string>>();
                ScenarioContext.Current.Add("variableList", variableList);
            }

            variableList.Add(new Tuple<string, string>(ResultVariable, ""));
            BuildShapeAndTestData();

            string formula;
            ScenarioContext.Current.TryGetValue("formula", out formula);

            var calculate = new DsfCalculateActivity
                {
                    Result = ResultVariable,
                    Expression = formula
                };

            TestStartNode = new FlowStep
                {
                    Action = calculate
                };
            ScenarioContext.Current.Add("activity", calculate);
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:29,代码来源:CalculateSteps.cs

示例7: BuildDataList

        protected override void BuildDataList()
        {
            List<Tuple<string, string>> variableList;
            ScenarioContext.Current.TryGetValue("variableList", out variableList);

            if(variableList == null)
            {
                variableList = new List<Tuple<string, string>>();
                ScenarioContext.Current.Add("variableList", variableList);
            }

            variableList.Add(new Tuple<string, string>(ResultVariable, ""));
            BuildShapeAndTestData();

            string inField;
            ScenarioContext.Current.TryGetValue("inField", out inField);
            string returnField;
            ScenarioContext.Current.TryGetValue("returnField", out returnField);
            string resultVariable;
            ScenarioContext.Current.TryGetValue("resultVariable", out resultVariable);

            var unique = new DsfUniqueActivity
                {
                    InFields = inField,
                    ResultFields = returnField,
                    Result = resultVariable
                };

            TestStartNode = new FlowStep
                {
                    Action = unique
                };
            ScenarioContext.Current.Add("activity", unique);
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:34,代码来源:UniqueSteps.cs

示例8: BuildDataList

        protected override void BuildDataList()
        {
            List<Tuple<string, string>> variableList;
            ScenarioContext.Current.TryGetValue("variableList", out variableList);

            if(variableList == null)
            {
                variableList = new List<Tuple<string, string>>();
                ScenarioContext.Current.Add("variableList", variableList);
            }

            variableList.Add(new Tuple<string, string>(ResultVariable, ""));
            BuildShapeAndTestData();

            string scriptToExecute;
            ScenarioContext.Current.TryGetValue("scriptToExecute", out scriptToExecute);
            enScriptType language;
            ScenarioContext.Current.TryGetValue("language", out language);

            var dsfScripting = new DsfScriptingActivity
                {
                    Script = scriptToExecute,
                    ScriptType = language,
                    Result = ResultVariable
                };

            TestStartNode = new FlowStep
                {
                    Action = dsfScripting
                };
            ScenarioContext.Current.Add("activity", dsfScripting);
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:32,代码来源:ScriptSteps.cs

示例9: BuildDataList

        protected override void BuildDataList()
        {
            BuildShapeAndTestData();

            string xmlData;
            ScenarioContext.Current.TryGetValue("xmlData", out xmlData);

            var xPath = new DsfXPathActivity
                {
                    SourceString = xmlData
                };

            TestStartNode = new FlowStep
                {
                    Action = xPath
                };

            List<Tuple<string, string>> xpathDtos;
            ScenarioContext.Current.TryGetValue("xpathDtos", out xpathDtos);

            int row = 1;
            foreach(var variable in xpathDtos)
            {
                xPath.ResultsCollection.Add(new XPathDTO(variable.Item1, variable.Item2, row, true));
                row++;
            }
            ScenarioContext.Current.Add("activity", xPath);
        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:28,代码来源:XPathSteps.cs

示例10: BuildDataList

        protected override void BuildDataList()
        {
            List<Tuple<string, string>> variableList;
            ScenarioContext.Current.TryGetValue("variableList", out variableList);

            if(variableList == null)
            {
                variableList = new List<Tuple<string, string>>();
                ScenarioContext.Current.Add("variableList", variableList);
            }

            variableList.Add(new Tuple<string, string>(ResultVariable, ""));
            BuildShapeAndTestData();

            string commandToExecute;
            ScenarioContext.Current.TryGetValue("commandToExecute", out commandToExecute);

            var commandLine = new DsfExecuteCommandLineActivity
                {
                    CommandFileName = commandToExecute,
                    CommandResult = ResultVariable,
                };

            TestStartNode = new FlowStep
                {
                    Action = commandLine
                };
            ScenarioContext.Current.Add("activity", commandLine);
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:29,代码来源:CommandSteps.cs

示例11: FieldSpecifiedSortForwards_Numeric_Expected_Recordset_Sorted_Top_To_Bottom

        public void FieldSpecifiedSortForwards_Numeric_Expected_Recordset_Sorted_Top_To_Bottom()
        {
            TestStartNode = new FlowStep
            {
                Action = new DsfSortRecordsActivity { SortField = "[[recset().Id]]", SelectedSort = "Forward" }

            };

            SetupArguments(
                            ActivityStrings.SortDataList_Shape
                          , ActivityStrings.SortDataList
                          , "[[recset().Id]]"
                          , "Forward"
                          );
            IDSFDataObject result = ExecuteProcess();
            List<string> expected = new List<string> { "1"
                                                     , "1"
                                                     , "2"
                                                     , "3"
                                                     , "4"
                                                     , "6"
                                                     , "7"
                                                     , "8"
                                                     , "9"
                                                     , "10" };
            string error;
            List<string> actual = RetrieveAllRecordSetFieldValues(result.Environment, "recset", "Id", out error);

            // remove test datalist ;)

            CollectionAssert.AreEqual(expected, actual, new ActivityUnitTests.Utils.StringComparer());
        }
开发者ID:ndubul,项目名称:Chillas,代码行数:32,代码来源:SortRecordsTest.cs

示例12: String_ForwardSort_String_Expected_RecordSetSortedAscending

        public void String_ForwardSort_String_Expected_RecordSetSortedAscending()
        {
            TestStartNode = new FlowStep
            {
                Action = new DsfSortRecordsActivity { SortField = "[[recset().Name]]", SelectedSort = "Forward" }

            };

            SetupArguments(
                            ActivityStrings.SortDataList_Shape
                          , ActivityStrings.SortDataList
                          , "[[recset().Name]]"
                          , "Forward"
                          );
            IDSFDataObject result = ExecuteProcess();
            List<string> expected = new List<string> { "A"
                                                     , "A"
                                                     , "A"
                                                     , "B"
                                                     , "C"
                                                     , "F"
                                                     , "F"
                                                     , "L"
                                                     , "Y"
                                                     , "Z" };
            string error;
            List<string> actual = RetrieveAllRecordSetFieldValues(result.Environment, "recset", "Name", out error);

            // remove test datalist ;)

            CollectionAssert.AreEqual(expected, actual, new ActivityUnitTests.Utils.StringComparer());
        }
开发者ID:ndubul,项目名称:Chillas,代码行数:32,代码来源:SortRecordsTest.cs

示例13: BuildDataList

        protected override void BuildDataList()
        {
            List<Tuple<string, string>> variableList;
            ScenarioContext.Current.TryGetValue("variableList", out variableList);

            if(variableList == null)
            {
                variableList = new List<Tuple<string, string>>();
                ScenarioContext.Current.Add("variableList", variableList);
            }

            variableList.Add(new Tuple<string, string>(ResultVariable, ""));
            BuildShapeAndTestData();

            var dataMerge = new DsfDataMergeActivity { Result = ResultVariable };

            List<Tuple<string, string, string, string, string>> mergeCollection;
            ScenarioContext.Current.TryGetValue("mergeCollection", out mergeCollection);

            int row = 1;
            foreach(var variable in mergeCollection)
            {
                dataMerge.MergeCollection.Add(new DataMergeDTO(variable.Item1, variable.Item2, variable.Item3, row,
                                                                variable.Item4, variable.Item5));
                row++;
            }

            TestStartNode = new FlowStep
                {
                    Action = dataMerge
                };

            ScenarioContext.Current.Add("activity", dataMerge);
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:34,代码来源:DataMergeSteps.cs

示例14: BuildDataList

        protected override void BuildDataList()
        {
            var variableList = ScenarioContext.Current.Get<List<Tuple<string, string>>>("variableList");
            variableList.Add(new Tuple<string, string>(ResultVariable, ""));

            BuildShapeAndTestData();
            var flowSwitch = new DsfFlowSwitchActivity
                {
                    ExpressionText =
                        string.Format(
                            "Dev2.Data.Decision.Dev2DataListDecisionHandler.Instance.FetchSwitchData(\"{0}\",AmbientDataList)",
                            variableList.First().Item1),
                      
                            
                };
            var sw = new FlowSwitch<string>();
            sw.Expression = flowSwitch;
            var multiAssign = new DsfMultiAssignActivity();
            int row = 1;
            foreach(var variable in variableList)
            {
                multiAssign.FieldsCollection.Add(new ActivityDTO(variable.Item1, variable.Item2, row, true));
                row++;
            }

            TestStartNode = new FlowStep
                {
                    Action = multiAssign,
                    Next = sw
                };

            ScenarioContext.Current.Add("activity", flowSwitch);
        }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:33,代码来源:SwitchSteps.cs

示例15: BuildDataList

        protected override void BuildDataList()
        {
            List<Tuple<string, string>> variableList;
            ScenarioContext.Current.TryGetValue("variableList", out variableList);

            if(variableList == null)
            {
                variableList = new List<Tuple<string, string>>();
                ScenarioContext.Current.Add("variableList", variableList);
            }

            variableList.Add(new Tuple<string, string>(ResultVariable, ""));

            string resultVariable;
            ScenarioContext.Current.TryGetValue("resultVariable", out resultVariable);

            BuildShapeAndTestData();

            string recordSetName;
            ScenarioContext.Current.TryGetValue("recordset", out recordSetName);
            
            var recordset = ScenarioContext.Current.Get<string>("recordset");

            var count = new DsfCountRecordsetActivity
                {
                    RecordsetName = recordset,
                    CountNumber = string.IsNullOrEmpty(resultVariable) ? ResultVariable : resultVariable
                };

            TestStartNode = new FlowStep
                {
                    Action = count
                };
            ScenarioContext.Current.Add("activity", count);
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:35,代码来源:CountSteps.cs


注:本文中的System.Activities.Statements.FlowStep类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。