Table of Contents

Class PatternBase

Namespace
TypedRest.CodeGeneration.Patterns
Assembly
TypedRest.CodeGeneration.dll

Common base class for IPatterns.

public abstract class PatternBase : IPattern
Inheritance
object
PatternBase
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

OperationType[]

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

item OpenApiPathItem

Returns

IEndpoint

TryGetEndpoint(PathTree, IPatternMatcher)

Generates an endpoint for the specified path tree, if it matches the pattern.

public IEndpoint? TryGetEndpoint(PathTree tree, IPatternMatcher patternMatcher)

Parameters

tree PathTree

The path tree to try to match against the pattern.

patternMatcher IPatternMatcher

The pattern matcher to use for matching child trees.

Returns

IEndpoint

The endpoint if the pattern matched; null otherwise.