> ## 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.

# McpTaskStoreOptions

> Registration knobs for authenticated MCP task stores. Passed to `AddInMemoryMcpTaskStorePlus`, `WithTasksPlus`, and the Entity Framework equivalents.

## Definition

**Assembly:** CloudNimble.McpEssentials.Core.dll

**Namespace:** CloudNimble.McpEssentials.Core.Tasks

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreOptions
```

## Summary

Registration knobs for authenticated MCP task stores. Passed to
`AddInMemoryMcpTaskStorePlus`, `WithTasksPlus`,
and the Entity Framework equivalents.

## Constructors

### &#x20;.ctor

#### Syntax

```csharp theme={"dark"}
public McpTaskStoreOptions()
```

### &#x20;.ctor Inherited

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

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### &#x20;AutoSweep

Gets or sets whether the store pulses a throttled flush after create and on get.

#### Syntax

```csharp theme={"dark"}
public bool AutoSweep { get; set; }
```

#### Property Value

Type: `bool`
The default is [`true`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

#### Remarks

Set to [`false`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) and call `SweepExpiredAsync` from your own job
when you want to own the schedule. The public flush handle always runs a full pass.

### &#x20;DefaultPollIntervalMs

Gets or sets the default poll interval in milliseconds for new tasks.

#### Syntax

```csharp theme={"dark"}
public long DefaultPollIntervalMs { get; set; }
```

#### Property Value

Type: `long`
The default is 1000 milliseconds.

### &#x20;DefaultTimeToLive

Gets or sets the default time-to-live for new tasks, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for unlimited.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<System.TimeSpan> DefaultTimeToLive { get; set; }
```

#### Property Value

Type: `System.Nullable<System.TimeSpan>`

#### Remarks

When set to a positive value, the work window ends at `CreatedAt + TimeToLive` and
the row is discarded at `CreatedAt + 2×TimeToLive`, or sooner when a terminal get
serves it. A [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) or non-positive value keeps tasks until a terminal
get or until the store discards them.

### &#x20;ServeAndDrop

Gets or sets whether an owner get of a terminal snapshot serves it and then drops the row.

#### Syntax

```csharp theme={"dark"}
public bool ServeAndDrop { get; set; }
```

#### Property Value

Type: `bool`
The default is [`true`](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

### &#x20;SweepInterval

Gets or sets the minimum interval between automatic flush pulses.

#### Syntax

```csharp theme={"dark"}
public System.TimeSpan SweepInterval { get; set; }
```

#### Property Value

Type: `System.TimeSpan`
The default is 30 seconds. [Zero](https://learn.microsoft.com/dotnet/api/system.timespan.zero) skips the throttle.

## Methods

### &#x20;Apply

Builds options from *configure* and copies them onto *store*.
Does nothing when *configure* is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null).

#### Syntax

```csharp theme={"dark"}
public static void Apply(System.Action<CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreOptions> configure, CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase store)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `configure` | `System.Action<CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreOptions>?` | Optional callback that sets TTL, poll interval, and flush knobs. |
| `store` | `CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase` | The store to configure. |

#### Exceptions

| Exception | Description |
| - | - |
| `ArgumentNullException` | Thrown when *store* is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). |

### &#x20;ApplyTo Virtual

Copies these values onto *store*.

#### Syntax

```csharp theme={"dark"}
public virtual void ApplyTo(CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase store)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `store` | `CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase` | The store to configure. |

#### Exceptions

| Exception | Description |
| - | - |
| `ArgumentNullException` | Thrown when *store* is [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). |

### &#x20;Equals Inherited Virtual

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

#### Syntax

```csharp theme={"dark"}
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={"dark"}
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={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

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

#### Syntax

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

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

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

#### Syntax

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

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

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

#### Syntax

```csharp theme={"dark"}
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={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`


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