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

# PostgreSqlStoredMcpTask

> One `McpTasks` row. Maps to [StoredMcpTask](/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/StoredMcpTask) at the store boundary and adds [PostgreSqlStor...

## Definition

**Assembly:** CloudNimble.McpEssentials.PostgreSQL.dll

**Namespace:** CloudNimble.McpEssentials.PostgreSQL.Tasks

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.McpEssentials.PostgreSQL.Tasks.PostgreSqlStoredMcpTask
```

## Summary

One `McpTasks` row. Maps to [StoredMcpTask](https://si.easyaf.dev/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/StoredMcpTask.md) at the store boundary
and adds [PostgreSqlStoredMcpTask.RowVersion](https://si.easyaf.dev/mcpessentials/api-reference/CloudNimble/McpEssentials/PostgreSQL/Tasks/PostgreSqlStoredMcpTask.md#rowversion) for compare-and-swap.

## Constructors

### &#x20;.ctor

#### Syntax

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

### &#x20;.ctor Inherited

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

#### Syntax

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

## Properties

### &#x20;CreatedAt

Gets or sets when the task was created, UTC.

#### Syntax

```csharp theme={"dark"}
public System.DateTimeOffset CreatedAt { get; set; }
```

#### Property Value

Type: `System.DateTimeOffset?`

### &#x20;DiscardAfter

Gets or sets when the row should be discarded.

#### Syntax

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

#### Property Value

Type: `System.Nullable<System.DateTimeOffset?>?`

### &#x20;ErrorJson

Gets or sets the JSON-RPC error as JSON.

#### Syntax

```csharp theme={"dark"}
public string ErrorJson { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;ExpiresAt

Gets or sets the work-window end.

#### Syntax

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

#### Property Value

Type: `System.Nullable<System.DateTimeOffset?>?`

### &#x20;InputRequestsJson

Gets or sets the outstanding input-request map as JSON.

#### Syntax

```csharp theme={"dark"}
public string InputRequestsJson { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;LastUpdatedAt

Gets or sets when the task last changed, UTC.

#### Syntax

```csharp theme={"dark"}
public System.DateTimeOffset LastUpdatedAt { get; set; }
```

#### Property Value

Type: `System.DateTimeOffset?`

### &#x20;OwnerUserId

Gets or sets the user recorded when the task was created.

#### Syntax

```csharp theme={"dark"}
public string OwnerUserId { get; set; }
```

#### Property Value

Type: `string`

### &#x20;PollIntervalMs

Gets or sets the client poll interval in milliseconds.

#### Syntax

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

#### Property Value

Type: `System.Nullable<long>?`

### &#x20;ResultJson

Gets or sets the terminal result as JSON.

#### Syntax

```csharp theme={"dark"}
public string ResultJson { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;RowVersion

Gets or sets the compare-and-swap token. Incremented on every write.

#### Syntax

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

#### Property Value

Type: `long`

### &#x20;Status

Gets or sets the protocol status (enum name).

#### Syntax

```csharp theme={"dark"}
public ModelContextProtocol.Extensions.Tasks.McpTaskStatus Status { get; set; }
```

#### Property Value

Type: `ModelContextProtocol.Extensions.Tasks.McpTaskStatus?`

### &#x20;StatusMessage

Gets or sets an optional status message.

#### Syntax

```csharp theme={"dark"}
public string StatusMessage { get; set; }
```

#### Property Value

Type: `string?`

### &#x20;TaskId

Gets or sets the opaque task identifier.

#### Syntax

```csharp theme={"dark"}
public string TaskId { get; set; }
```

#### Property Value

Type: `string`

### &#x20;TimeToLive

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

#### Syntax

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

#### Property Value

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

## Methods

### &#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;From

Copies *stored* into a row. [PostgreSqlStoredMcpTask.RowVersion](https://si.easyaf.dev/mcpessentials/api-reference/CloudNimble/McpEssentials/PostgreSQL/Tasks/PostgreSqlStoredMcpTask.md#rowversion) stays at 1
for inserts; callers bump it on update.

#### Syntax

```csharp theme={"dark"}
public static CloudNimble.McpEssentials.PostgreSQL.Tasks.PostgreSqlStoredMcpTask From(CloudNimble.McpEssentials.Core.Tasks.StoredMcpTask stored)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `stored` | `CloudNimble.McpEssentials.Core.Tasks.StoredMcpTask` | The in-memory snapshot. |

#### Returns

Type: `CloudNimble.McpEssentials.PostgreSQL.Tasks.PostgreSqlStoredMcpTask`
A row with the same engine fields.

#### Exceptions

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

### &#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;ToStored Virtual

Builds a [StoredMcpTask](https://si.easyaf.dev/mcpessentials/api-reference/CloudNimble/McpEssentials/Core/Tasks/StoredMcpTask.md) from this row.

#### Syntax

```csharp theme={"dark"}
public virtual CloudNimble.McpEssentials.Core.Tasks.StoredMcpTask ToStored()
```

#### Returns

Type: `CloudNimble.McpEssentials.Core.Tasks.StoredMcpTask`
A snapshot the Core `Try*` methods can mutate.

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