本文整理汇总了C#中State.ExecuteAsync方法的典型用法代码示例。如果您正苦于以下问题:C# State.ExecuteAsync方法的具体用法?C# State.ExecuteAsync怎么用?C# State.ExecuteAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类State
的用法示例。
在下文中一共展示了State.ExecuteAsync方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FailToCollateData
public async Task<State> FailToCollateData(State redressReview)
{
var collateData = redressReview.Transitions.FirstOrDefault(t => t.Name.Equals("Collate Data"));
return await redressReview.ExecuteAsync(collateData, true);
}
示例2: GetRemediationWorkflow
private async Task<List<State>> GetRemediationWorkflow()
{
var remediationWorkflow = new State(100, "Remediation Workflow", StateType.Root);
var communication = new Communication()
{
Id = 200,
Name = "Communication"
};
var letterSent = new LetterSent()
{
Id = 210,
Name = "Letter Sent"
};
var responseReceived = new ResponseReceived()
{
Id = 220,
Name = "Response Received"
};
var collateData = new CollateData()
{
Id = 300,
Name = "Collate Data"
};
var adjustmentDecision = new AdjustmentDecision()
{
Id = 400,
Name = "Adjustment Decision",
Type = StateType.Auto
};
var adjustment = new Adjustment()
{
Id = 500,
Name = "Adjustment"
};
var autoTransitionToRedressReview = new AutoTransitionToRedressReview()
{
Id = 600,
Name = "Auto Transition Redress Review",
Type = StateType.Auto
};
var redressReview = new RedressReview()
{
Id = 700,
Name = "Redress Review"
};
var payment = new Payment()
{
Id = 800,
Name = "Payment"
};
redressReview
.AddTransition(payment, true)
.AddTransition(collateData)
.AddDependency(communication, true)
.AddDependency(autoTransitionToRedressReview, true);
autoTransitionToRedressReview
.AddDependant(redressReview)
.AddTransition(redressReview, true);
adjustment
.AddTransition(autoTransitionToRedressReview, true);
adjustmentDecision
.AddTransition(adjustment)
.AddTransition(autoTransitionToRedressReview);
collateData
.AddTransition(adjustmentDecision, true);
letterSent
.AddTransition(responseReceived, true);
communication
.AddSubState(letterSent, true)
.AddSubState(responseReceived)
.AddDependant(redressReview)
.AddTransition(redressReview, true);
remediationWorkflow
.AddSubState(communication, true)
.AddSubState(collateData, true)
.AddSubState(adjustmentDecision)
.AddSubState(adjustment, completionRequired: false)
.AddSubState(autoTransitionToRedressReview)
.AddSubState(redressReview)
.AddSubState(payment);
await remediationWorkflow.ExecuteAsync(StateExecutionType.Initialise);
//.........这里部分代码省略.........
示例3: CompleteStateAsync
public async Task<State> CompleteStateAsync(State state)
{
return await state.ExecuteAsync(StateExecutionType.Complete);
}