Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.AspNetCore.dll Namespace: Microsoft.OData.Mcp.AspNetCore.Middleware Inheritance: System.Object

Syntax

Microsoft.OData.Mcp.AspNetCore.Middleware.ODataMcpMiddleware

Summary

Middleware that handles MCP requests for OData routes.

Constructors

.ctor

Initializes a new instance of the ODataMcpMiddleware class.

Syntax

public ODataMcpMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILogger<Microsoft.OData.Mcp.AspNetCore.Middleware.ODataMcpMiddleware> logger, Microsoft.OData.Mcp.Core.Routing.IMcpEndpointRegistry endpointRegistry, Microsoft.OData.Mcp.Core.Tools.IMcpToolFactory toolFactory, Microsoft.OData.Mcp.Core.ODataMcpOptions options)

Parameters

NameTypeDescription
nextMicrosoft.AspNetCore.Http.RequestDelegateThe next middleware in the pipeline.
loggerMicrosoft.Extensions.Logging.ILogger<Microsoft.OData.Mcp.AspNetCore.Middleware.ODataMcpMiddleware>The logger.
endpointRegistryMicrosoft.OData.Mcp.Core.Routing.IMcpEndpointRegistryThe MCP endpoint registry.
toolFactoryMicrosoft.OData.Mcp.Core.Tools.IMcpToolFactoryThe tool factory.
optionsMicrosoft.OData.Mcp.Core.ODataMcpOptionsThe MCP options.

.ctor Inherited

Inherited from object

Syntax

public Object()

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

InvokeAsync

Invokes the middleware.

Syntax

public System.Threading.Tasks.Task InvokeAsync(Microsoft.AspNetCore.Http.HttpContext context)

Parameters

NameTypeDescription
contextMicrosoft.AspNetCore.Http.HttpContextThe HTTP context.

Returns

Type: System.Threading.Tasks.Task A task representing the asynchronous operation.

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?