Ejemplo n.º 1
0
        public async Task <ITransitionExecutionResult> ExecuteTransition(StatedTestObject statedEntity)
        {
            await Task.Delay(0); // dummy to avoid await-warning CS1998

            if (false /* anything goes wrong */)
            {
                var failedResult = new TransitionFailed
                {
                    MessageKey = "errorMessageKey"
                };
                failedResult.AddMessageArg("key1", "value1")
                .AddMessageArg("key2", "value2");
                return(failedResult);
            }
            return(new TransitionSuccessful());
        }
Ejemplo n.º 2
0
 public void InitFailedTransitionResult(TransitionFailed result)
 {
     TransitionResult = result;
 }
Ejemplo n.º 3
0
 protected virtual void RaiseTransitionFailed(TransitionEventArgs args)
 {
     TransitionFailed?.Invoke(this, args);
 }