Class EndpointGenerator
- Namespace
- TypedRest.CodeGeneration.CSharp.Endpoints
- Assembly
- TypedRest.CodeGeneration.CSharp.dll
public class EndpointGenerator : IEndpointGenerator
- Inheritance
-
objectEndpointGenerator
- Implements
Constructors
EndpointGenerator(INamingStrategy, BuilderRegistry)
public EndpointGenerator(INamingStrategy namingStrategy, BuilderRegistry builders)
Parameters
namingStrategyINamingStrategybuildersBuilderRegistry
Properties
Naming
public INamingStrategy Naming { get; }
Property Value
WithInterfaces
public bool WithInterfaces { get; set; }
Property Value
Methods
Generate(string, IEndpoint)
public (CSharpProperty property, IEnumerable<ICSharpType> types) Generate(string key, IEndpoint endpoint)
Parameters
Returns
Generate(EntryEndpoint)
public IEnumerable<ICSharpType> Generate(EntryEndpoint endpoint)
Parameters
endpointEntryEndpoint
Returns
GetCollisionPrefix(string)
Returns a disambiguating prefix for an endpoint with the given key, or null if no prefix is needed.
Currently returns the parent key when the same key produces a custom endpoint class in more than one place.
public string? GetCollisionPrefix(string key)
Parameters
keystring
Returns
PopParent()
Pops a key from the parent stack.
public void PopParent()
PushParent(string)
Pushes a key onto the parent stack. Builders call this around recursion into child endpoints so that GetCollisionPrefix(string) can return the current parent.
public void PushParent(string key)
Parameters
keystring