private string BuildDot() { var builder = StringBuilderCache.Acquire(); var sourceIdentifier = SourcePort != null ? SourceNode + ":" + SourcePort : SourceNode.ToString(); var targetIdentifier = TargetPort != null ? TargetNode + ":" + TargetPort : TargetNode.ToString(); builder.Append(sourceIdentifier) .Append(" -> ") .Append(targetIdentifier); if (EdgeAttributes.Any()) { const string indent = " "; builder.AppendLine(" ["); foreach (var edgeAttr in EdgeAttributes) { builder.Append(indent).AppendLine(edgeAttr.ToString()); } builder.Append(']'); } return(builder.GetStringAndRelease()); }
/// <summary> /// /// </summary> /// <returns></returns> public override string ToString() { return("(" + (SourceNode != null ? SourceNode.ToString() : "") + "," + (TargetNode != null ? TargetNode.ToString() : "") + ")"); }
public override string ToString() { StringBuilder __sb = new StringBuilder("TRelation("); bool __first = true; if (Neo4jID != null && __isset.Neo4jID) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Neo4jID: "); __sb.Append(Neo4jID); } if (AoKID != null && __isset.AoKID) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("AoKID: "); __sb.Append(AoKID); } if (Labels != null && __isset.Labels) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Labels: "); __sb.Append(Labels); } if (RelationType != null && __isset.RelationType) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("RelationType: "); __sb.Append(RelationType); } if (SourceNode != null && __isset.SourceNode) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("SourceNode: "); __sb.Append(SourceNode == null ? "<null>" : SourceNode.ToString()); } if (TargetNode != null && __isset.TargetNode) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("TargetNode: "); __sb.Append(TargetNode == null ? "<null>" : TargetNode.ToString()); } if (Properties != null && __isset.Properties) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Properties: "); __sb.Append(Properties); } if (__isset.AttentionLevel) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("AttentionLevel: "); __sb.Append(AttentionLevel); } if (TruthValue != null && __isset.TruthValue) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("TruthValue: "); __sb.Append(TruthValue); } __sb.Append(")"); return(__sb.ToString()); }