> ## Documentation Index
> Fetch the complete documentation index at: https://ai.easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ODataMcpSession

> Per-endpoint MCP state: catalog, runtime, and optional CSDL cache.

## Definition

**Assembly:** Microsoft.OData.Mcp.Core.dll

**Namespace:** Microsoft.OData.Mcp.Core.Catalog

**Inheritance:** System.Object

## Syntax

```csharp theme={null}
Microsoft.OData.Mcp.Core.Catalog.ODataMcpSession
```

## Summary

Per-endpoint MCP state: catalog, runtime, and optional CSDL cache.

## Constructors

### &#x20;.ctor

Initializes a new instance of the [ODataMcpSession](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Catalog/ODataMcpSession.md) class.

#### Syntax

```csharp theme={null}
public ODataMcpSession(Microsoft.OData.Mcp.Core.Catalog.ODataMcpCatalog catalog, Microsoft.OData.Mcp.Core.Catalog.ODataToolRuntime runtime, string metadataXml)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `catalog` | `Microsoft.OData.Mcp.Core.Catalog.ODataMcpCatalog` | The catalog. |
| `runtime` | `Microsoft.OData.Mcp.Core.Catalog.ODataToolRuntime` | The runtime. |
| `metadataXml` | `string?` | The CSDL document for `$metadata` reads. |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public Object()
```

## Properties

### &#x20;Catalog

Gets the catalog.

#### Syntax

```csharp theme={null}
public Microsoft.OData.Mcp.Core.Catalog.ODataMcpCatalog Catalog { get; }
```

#### Property Value

Type: `Microsoft.OData.Mcp.Core.Catalog.ODataMcpCatalog`

### &#x20;MetadataXml

Gets the cached CSDL document, if any.

#### Syntax

```csharp theme={null}
public string MetadataXml { get; }
```

#### Property Value

Type: `string?`

### &#x20;Runtime

Gets the tool runtime.

#### Syntax

```csharp theme={null}
public Microsoft.OData.Mcp.Core.Catalog.ODataToolRuntime Runtime { get; }
```

#### Property Value

Type: `Microsoft.OData.Mcp.Core.Catalog.ODataToolRuntime`

## Methods

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={null}
public virtual string ToString()
```

#### Returns

Type: `string?`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.