public override TResult Deciding(TContext context) { var convertedContext = (TContext)context; var processedContext = Transform(convertedContext); return((TResult)_nextDecision.Deciding(processedContext)); }
public object Deciding(object context) { if (_first.IsSatisfied(context)) { return(_first.Deciding(context)); } if (_second.IsSatisfied(context)) { return(_second.Deciding(context)); } throw new InvalidOperationException("decision tree cannot handle."); }
public IMessageProcessor Dispatching(KernelContext wechatContext) { var decisionResult = _dicisionTree.Deciding(wechatContext); return((IMessageProcessor)decisionResult); }