public void Accept(IGraphBuilder <IPipe> visitor) { visitor.GetOrAddNode(this, (Keys.Name, _name)); if (visitor.AddEdge(this, _next, (Keys.Name, "Next"))) { _next.Accept(visitor); } }
public override void Accept(IGraphBuilder <IBuilder> visitor) { var type = (_isAlternate ? "Alternate" : "Branch"); visitor.GetOrAddNode(this, (Keys.Name, $"{type}: {Name}")); visitor.AddEdge(this, _trueBranch, (Keys.Name, "True " + type)); visitor.AddEdge(this, _falseBranch, (Keys.Name, "False" + type)); _trueBranch.Accept(visitor); _falseBranch.Accept(visitor); }
public void Accept(IGraphBuilder <IPipe> visitor) { var name = _name ?? $"Transform ({nameof(IContext)}, {typeof(TIn).GetCSharpName()}) => ({nameof(IContext)}, {typeof(TOut).GetCSharpName()})"; visitor.GetOrAddNode(this, (Keys.Name, name)); if (visitor.AddEdge(this, _next, (Keys.Name, "Next"))) { _next.Accept(visitor); } }
public void Accept(IGraphBuilder <IPipe> visitor) { visitor.GetOrAddNode(this, (Keys.Name, _conditionDescription)); if (visitor.AddEdge(this, _trueBranch, (Keys.Name, "True"))) { _trueBranch.Accept(visitor); } if (visitor.AddEdge(this, _falseBranch, (Keys.Name, "False"))) { _falseBranch.Accept(visitor); } }
public void Accept(IGraphBuilder <IPipe> visitor) { visitor.GetOrAddNode(this , (Keys.Name, $"Trace activity '{_name}' ({_kind})") , ("DiagnosticsName", _name) , ("DiagnosticsKind", _kind) , ("DiagnosticsSource", $"{_source.Name} {_source.Version}")); if (visitor.AddEdge(this, _next, (Keys.Name, "Next"))) { _next.Accept(visitor); } }
public void Accept(IGraphBuilder <IPipe> visitor) { visitor.GetOrAddNode(this, (Keys.Name, _name)); var list = new List <IPipe>(_cases.Count + 1); foreach (var kv in _cases.OrderBy(kv => kv.Key)) { var target = kv.Value; visitor.AddEdge(this, target, (Keys.Name, $"Case '{kv.Key}':")); list.Add(target); } visitor.AddEdge(this, _defaultCase, (Keys.Name, $"Default:")); list.Add(_defaultCase); list.ForEach(p => p.Accept(visitor)); }
public void Accept(IGraphBuilder <IPipe> visitor) { var label = $"Remote Procedure Call ({typeof(TRequest).GetCSharpName()} request) => ({typeof(TResponse).GetCSharpName()} response)\nendpoint: {_options.EndPoint}"; visitor.GetOrAddNode(this, (Keys.Name, label)); if (visitor.AddEdge(this, _onResponse, (Keys.Name, "Response"))) { _onResponse.Accept(visitor); } if (_onException != null) { if (visitor.AddEdge(this, _onException, (Keys.Name, "Exception"))) { _onException.Accept(visitor); } } }
/// <summary> /// Override <see cref="Accept"/> so that the debugger tools /// can generate a pretty picture of the builder structure. /// See <see cref="IGraphBuilder{T}.AddEdge"/> and /// <see cref="IGraphBuilder{T}.GetOrAddNode"/> for more information. /// </summary> public virtual void Accept(IGraphBuilder <IBuilder> visitor) { visitor.GetOrAddNode(this, (Keys.Name, Name)); }
public void Accept(IGraphBuilder <IPipe> visitor) { visitor.GetOrAddNode(this, (Keys.Name, $"Print {typeof(T).GetCSharpName()} to console")); visitor.AddEdge(this, _next, (Keys.Name, "Next")); _next.Accept(visitor); }