本文整理汇总了C#中WorkflowExecutionContext类的典型用法代码示例。如果您正苦于以下问题:C# WorkflowExecutionContext类的具体用法?C# WorkflowExecutionContext怎么用?C# WorkflowExecutionContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WorkflowExecutionContext类属于命名空间,在下文中一共展示了WorkflowExecutionContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveBadMarking
public NextActivityKey SaveBadMarking(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
return TryParseBlankMarking(CommonActivity.LastReadedValue, out _badMarking)
? BpcNextActivityKeys.Yes
: BpcNextActivityKeys.No;
}
示例2: Mock
public NextActivityKey Mock(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
_logger.LogInfo(Message.Common_Information, parameters.GetParamValue("Text", "-"));
context.Sleep(TimeSpan.FromMilliseconds(500));
return context.DefaultNextActivityKey;
}
示例3: NotCanceledCandidatesMoreThenMinRequired
public NextActivityKey NotCanceledCandidatesMoreThenMinRequired(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
var notCanceledCandidateCount = Election.Candidates.Count(cand => !cand.Disabled);
return notCanceledCandidateCount > MinRequiredNotCanceledCandidates
? BpcNextActivityKeys.Yes : BpcNextActivityKeys.No;
}
示例4: SetDateTime
public NextActivityKey SetDateTime(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
var utcDateTime = _date.AddHours(_time.Hour).AddMinutes(_time.Minute).ToUniversalTime();
_syncManager.SetSystemTime(utcDateTime);
return context.DefaultNextActivityKey;
}
示例5: CheckControlRelations
public NextActivityKey CheckControlRelations(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
if (!_electionManager.NeedExecuteCheckExpressions)
return BpcNextActivityKeys.Yes;
return Election.IsControlRelationsSatisfied() ? BpcNextActivityKeys.Yes : BpcNextActivityKeys.No;
}
示例6: IsSecondScannerAlreadyConnected
public NextActivityKey IsSecondScannerAlreadyConnected(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
return _syncManager.IsRemoteScannerConnected
? BpcNextActivityKeys.Yes
: BpcNextActivityKeys.No;
}
示例7: CheckSerialNumbersEquals
public NextActivityKey CheckSerialNumbersEquals(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
return _syncManager.LocalScannerSerialNumber == _syncManager.RemoteScannerSerialNumber
? BpcNextActivityKeys.Yes
: BpcNextActivityKeys.No;
}
示例8: IsMasterScanner
public NextActivityKey IsMasterScanner(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
return _syncManager.ScannerRole == ScannerRole.Master
? BpcNextActivityKeys.Yes
: BpcNextActivityKeys.No;
}
示例9: IsVotingModeResults
public NextActivityKey IsVotingModeResults(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
return _electionManager.CurrentVotingMode == VotingMode.Results
? BpcNextActivityKeys.Yes
: BpcNextActivityKeys.No;
}
示例10: ApplyConfig
public NextActivityKey ApplyConfig(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
return _configManager.ApplyConfig()
? BpcNextActivityKeys.Yes
: BpcNextActivityKeys.No;
}
示例11: GetNextDiagnosticsError
public NextActivityKey GetNextDiagnosticsError(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
if (!_diagnosticsErrorsEnumerator.MoveNext())
return BpcNextActivityKeys.No;
return new NextActivityKey(_diagnosticsErrorsEnumerator.Current.ToString());
}
示例12: IsElectionDayNowInStateSd
public NextActivityKey IsElectionDayNowInStateSd(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
return IsIsElectionDayOrExtra(_electionManager.IsElectionDay())
? BpcNextActivityKeys.Yes
: BpcNextActivityKeys.No;
}
示例13: HasCanceledCandidates
public NextActivityKey HasCanceledCandidates(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
var election = _electionManager.SourceData.Elections[ElectionIndex];
var canceledCandidatesCount = election.Candidates.Count(cand => cand.Disabled);
return canceledCandidatesCount == 0 ? BpcNextActivityKeys.No : BpcNextActivityKeys.Yes;
}
示例14: IsStampControlEnabled
public NextActivityKey IsStampControlEnabled(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
return _recognitionManager.StampControlEnabled
? BpcNextActivityKeys.Yes
: BpcNextActivityKeys.No;
}
示例15: SaveVotingResultProtocol
public NextActivityKey SaveVotingResultProtocol(
WorkflowExecutionContext context, ActivityParameterDictionary parameters)
{
return _votingResultManager.SaveVotingResultProtocol()
? BpcNextActivityKeys.Yes
: BpcNextActivityKeys.No;
}