public void Invoke(SimChainContext ctx) { try { this.Node(ctx); if (this.m_NextNode != null) { this.m_NextNode.Invoke(ctx); } } catch (Exception ex) { var errMsg = string.Format("{0}:{1}", this.GetType().Name, ex.Message); ctx.SetValue(ERROR_KEY, errMsg); Console.Write(errMsg); } }
protected abstract void Node(SimChainContext ctx);
void IChainNode.Node(SimChainContext ctx) { this.Node(ctx); }