private void CompileEdgeEndPoint(StringBuilder builder, IDotElement endPoint) { if (endPoint is DotString leftEdgeString) { builder.Append($"{leftEdgeString.Value}"); } else if (endPoint is DotNode leftEdgeNode) { builder.Append($"{leftEdgeNode.Identifier}"); } else { throw new DotException($"Endpoint of an edge can't be of type: {endPoint.GetType()}"); } }
private void CompileEdgeEndPoint(StringBuilder builder, IDotElement endPoint, bool formatStrings) { if (endPoint is DotString leftEdgeString) { builder.Append(SurroundStringWithQuotes(leftEdgeString.Value, formatStrings)); } else if (endPoint is DotNode leftEdgeNode) { builder.Append(SurroundStringWithQuotes(leftEdgeNode.Identifier, formatStrings)); } else { throw new DotException($"Endpoint of an edge can't be of type: {endPoint.GetType()}"); } }