Class PatternBase
- Namespace
- TypedRest.CodeGeneration.Patterns
- Assembly
- TypedRest.CodeGeneration.dll
Common base class for IPatterns.
public abstract class PatternBase : IPattern
- Inheritance
-
objectPatternBase
- Implements
- Derived
Properties
RequiredOperations
A list of OperationTypes the root of the path tree must support in order for this pattern to be applicable.
protected abstract OperationType[] RequiredOperations { get; }
Property Value
Methods
BuildEndpoint(OpenApiPathItem)
Builds the endpoint using information from the item. null if the pattern does not match.
protected abstract IEndpoint? BuildEndpoint(OpenApiPathItem item)
Parameters
itemOpenApiPathItem
Returns
TryGetEndpoint(PathTree, IPatternMatcher)
Generates an endpoint for the specified path tree, if it matches the pattern.
public IEndpoint? TryGetEndpoint(PathTree tree, IPatternMatcher patternMatcher)
Parameters
treePathTreeThe path tree to try to match against the pattern.
patternMatcherIPatternMatcherThe pattern matcher to use for matching child trees.
Returns
- IEndpoint
The endpoint if the pattern matched;
nullotherwise.