本文整理汇总了C#中System.Activities.WorkflowApplication.ResumeUntilBookmark方法的典型用法代码示例。如果您正苦于以下问题:C# WorkflowApplication.ResumeUntilBookmark方法的具体用法?C# WorkflowApplication.ResumeUntilBookmark怎么用?C# WorkflowApplication.ResumeUntilBookmark使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Activities.WorkflowApplication
的用法示例。
在下文中一共展示了WorkflowApplication.ResumeUntilBookmark方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResumeUntilBookmarkShouldTimeoutOnBadName
public void ResumeUntilBookmarkShouldTimeoutOnBadName()
{
// Arrange
const string ExpectedBookmarkName1 = "Test1";
const string ExpectedBookmarkName2 = "Test2";
var workflowApplication =
new WorkflowApplication(
new Sequence
{
Activities =
{
new TestBookmark<int> { BookmarkName = ExpectedBookmarkName1 },
new TestBookmark<int> { BookmarkName = ExpectedBookmarkName2 },
}
});
workflowApplication.RunUntilBookmark(ExpectedBookmarkName1);
// Act / Assert
AssertHelper.Throws<TimeoutException>(
() =>
workflowApplication.ResumeUntilBookmark(ExpectedBookmarkName1, 1, TimeSpan.FromMilliseconds(100), "BAD"));
}
示例2: ResumeUntilBookmarkShouldResumeUntilIdleWithBookmarkNameAndTimeout
public void ResumeUntilBookmarkShouldResumeUntilIdleWithBookmarkNameAndTimeout()
{
// Arrange
const string ExpectedBookmarkName1 = "Test1";
const string ExpectedBookmarkName2 = "Test2";
var workflowApplication =
new WorkflowApplication(
new Sequence
{
Activities =
{
new TestBookmark<int> { BookmarkName = ExpectedBookmarkName1 },
new TestBookmark<int> { BookmarkName = ExpectedBookmarkName2 },
}
});
workflowApplication.RunUntilBookmark(ExpectedBookmarkName1);
// Act
var result = workflowApplication.ResumeUntilBookmark(
ExpectedBookmarkName1, 1, Constants.Timeout, ExpectedBookmarkName2);
// Assert
Assert.IsInstanceOfType(result, typeof(WorkflowIdleEpisodeResult));
Assert.AreEqual(ActivityInstanceState.Executing, result.State);
}