Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the generic version for all overloads of FormatStructure in ILinksExtensions for all link address types (not only for ulong) #334

Open
Konard opened this issue Mar 15, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@Konard
Copy link
Member

Konard commented Mar 15, 2022

public static string FormatStructure(this ILinks<ulong> links, ulong linkIndex, Func<Link<ulong>, bool> isElement, bool renderIndex = false, bool renderDebug = false)
{
var sb = new StringBuilder();
var visited = new HashSet<ulong>();
links.AppendStructure(sb, visited, linkIndex, isElement, (innerSb, link) => innerSb.Append(link.Index), renderIndex, renderDebug);
return sb.ToString();
}

public static string FormatStructure(this ILinks<ulong> links, ulong linkIndex, Func<Link<ulong>, bool> isElement, Action<StringBuilder, Link<ulong>> appendElement, bool renderIndex = false, bool renderDebug = false)
{
var sb = new StringBuilder();
var visited = new HashSet<ulong>();
links.AppendStructure(sb, visited, linkIndex, isElement, appendElement, renderIndex, renderDebug);
return sb.ToString();
}

@Konard Konard added the enhancement New feature or request label Mar 15, 2022
@Konard Konard changed the title Make the generic version for FormatStructure in ILinksExtensions for all link address types (not only for ulong) Make the generic version for all overloads of FormatStructure in ILinksExtensions for all link address types (not only for ulong) Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant