Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Routing Inheritance: System.Object

Syntax

Summary

Efficiently matches MCP routes to their corresponding OData endpoints.

Remarks

This matcher is optimized for startup-time registration and runtime lookups using frozen collections for maximum performance.

Constructors

.ctor

Initializes a new instance of the McpRouteMatcher class.

Syntax

Parameters

Exceptions

.ctor Inherited

Inherited from object

Syntax

Methods

BuildMcpUrl

Builds the MCP URL for a given OData route.

Syntax

Parameters

Returns

Type: string? The MCP URL, or null if the route is not found.

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetAllRoutes

Gets all registered routes.

Syntax

Returns

Type: System.Collections.Generic.IEnumerable<Microsoft.OData.Mcp.Core.Routing.McpRouteEntry> A collection of all registered route entries.

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?

TryGetRouteByODataPrefix

Gets a route entry by its OData prefix.

Syntax

Parameters

Returns

Type: bool True if the route was found; otherwise, false.

TryMatch

Attempts to match a request path to an MCP route.

Syntax

Parameters

Returns

Type: bool True if a route was matched; otherwise, false.