Table of Contents

Class EndpointTree

Namespace
TypedRest.CodeGeneration.Endpoints
Assembly
TypedRest.CodeGeneration.dll

Helpers for walking a tree of IEndpoints the way code generators do.

public static class EndpointTree
Inheritance
object
EndpointTree

Methods

ElementKey(string)

The key used for the element endpoint of a collection or indexer with the key key.

public static string ElementKey(string key)

Parameters

key string

Returns

string

FindCollidingKeys(IEndpoint)

Walks the endpoint tree the way a generator's build pass will and returns the set of keys whose endpoints produce a custom type (i.e. have children) in more than one place.

public static HashSet<string> FindCollidingKeys(IEndpoint root)

Parameters

root IEndpoint

Returns

HashSet<string>

GetElement(IEndpoint)

Returns the element endpoint of a collection or indexer, or null for any other kind of endpoint.

public static IEndpoint? GetElement(IEndpoint endpoint)

Parameters

endpoint IEndpoint

Returns

IEndpoint