Skip to main content

Definition

Assembly: CloudNimble.McpEssentials.Core.dll Namespace: CloudNimble.McpEssentials.Core.Tasks Inheritance: CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Summary

McpTaskStoreBase for engines that fan resolved input over a native notification channel (Redis pub/sub, Postgres NOTIFY, NATS). Subclasses implement publish, subscribe, and unsubscribe. This type skips this process’s own echo and raises McpTaskStoreBase.InputResponseReceived for remote payloads.

Remarks

Call EnsureSubscription from request-path core methods. After a successful local resolve, call CancellationToken). Providers without a native channel (EF Core, Cosmos v1) keep using optional IMcpTaskInputSignalBus.

Constructors

.ctor Inherited

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Initializes a new instance of the McpTaskStoreBase class.

Syntax

Parameters

Exceptions

.ctor Inherited

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Initializes a new instance of the McpTaskStoreBase class that always uses userId.

Syntax

Parameters

.ctor Inherited

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Initializes a new instance of the McpTaskStoreBase class that resolves the user from a ClaimsPrincipal.

Syntax

Parameters

Exceptions

.ctor Inherited

Inherited from object

Syntax

Properties

AutoSweep Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Gets or sets whether the store pulses a throttled flush after create and on get.

Syntax

Property Value

Type: bool The default is true.

Remarks

Set to false and call CancellationToken) from your own job when you want to own the schedule. The public flush handle always runs a full pass.

DefaultPollIntervalMs Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Gets or sets the default poll interval in milliseconds for new tasks.

Syntax

Property Value

Type: long The default is 1000 milliseconds.

DefaultTimeToLive Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Gets or sets the default time-to-live for new tasks, or null for unlimited.

Syntax

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 (stamped as StoredMcpTask.DiscardAfter), or sooner when a terminal GetTaskAsync serves it. A null or non-positive value keeps tasks until a terminal get or until the store discards them.

GetCurrentUserId Inherited

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Gets the callback used by the IMcpTaskStore methods to resolve the current user.

Syntax

Property Value

Type: System.Func<string?>

LastSweepTicks Inherited

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Gets or sets the UTC ticks of the last automatic flush pulse. Tests reset this to race the throttle.

Syntax

Property Value

Type: long

ServeAndDrop Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Gets or sets whether an owner get of a terminal snapshot serves it and then drops the row.

Syntax

Property Value

Type: bool The default is true.

SweepInterval Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Gets or sets the minimum interval between automatic flush pulses.

Syntax

Property Value

Type: System.TimeSpan The default is 30 seconds. Zero skips the throttle.

Methods

CreateTaskAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<ModelContextProtocol.Extensions.Tasks.McpTaskInfo>

CreateTaskAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<ModelContextProtocol.Extensions.Tasks.McpTaskInfo>

CreateTaskCoreAsync Inherited Abstract

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Creates a task owned by userId.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<ModelContextProtocol.Extensions.Tasks.McpTaskInfo>

Dispose Virtual

Syntax

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetTaskAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<ModelContextProtocol.Extensions.Tasks.McpTaskInfo?>

GetTaskAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<ModelContextProtocol.Extensions.Tasks.McpTaskInfo?>

GetTaskCoreAsync Inherited Abstract

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Returns the task when userId owns it; otherwise null.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<ModelContextProtocol.Extensions.Tasks.McpTaskInfo?>

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

GetUserId Inherited

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Resolves a stable user identifier from principal.

Syntax

Parameters

Returns

Type: string? The first non-whitespace claim in SDK session-identity order, or null when the principal is missing or unauthenticated.

Remarks

Claim lookup matches the MCP C# SDK session identity order: NameIdentifier, sub, Upn, Name, then Name. The principal must be authenticated.

GetUtcNow Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Returns the current UTC timestamp used for create, update, expiry, and sweep.

Syntax

Returns

Type: System.DateTimeOffset

IsOwnedBy Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Returns whether ownerUserId is the same user as currentUserId.

Syntax

Parameters

Returns

Type: bool

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

NewTaskId Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Generates a unique task identifier.

Syntax

Returns

Type: string A 32-character hex id.

NormalizeTimeToLive Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Returns a positive TTL, or null when tasks should be retained until discarded.

Syntax

Parameters

Returns

Type: System.Nullable<System.TimeSpan>

OnInputResponseReceived Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Raises McpTaskStoreBase.InputResponseReceived for a resolved input.

Syntax

Parameters

PulseSweepAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Pulses a throttled flush when McpTaskStoreBase.AutoSweep is on.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task A completed task when auto-sweep is off or the interval has not elapsed.

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

RequireUserId Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Returns the current user identifier, throwing when none is authenticated.

Syntax

Returns

Type: string

Exceptions

RequireUserId Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Returns the user identifier from user, throwing when the principal is missing or unauthenticated.

Syntax

Parameters

Returns

Type: string

Exceptions

ResolveInputRequestsAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

ResolveInputRequestsAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

ResolveInputRequestsCoreAsync Inherited Abstract

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Resolves input requests when userId owns the task.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

SetCancelledAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<bool>

SetCancelledAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<bool>

SetCancelledCoreAsync Inherited Abstract

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Cancels the task when userId owns it and it is not terminal.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task<bool>

SetCompletedAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

SetCompletedCoreAsync Inherited Abstract

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Completes the task. Skips the live-user check.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

SetFailedAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

SetFailedCoreAsync Inherited Abstract

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Fails the task. Skips the live-user check.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

SetInputRequestsAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

SetInputRequestsCoreAsync Inherited Abstract

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Merges input requests onto the task. Skips the live-user check.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

ShouldDiscard Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Returns whether task should be discarded at now.

Syntax

Parameters

Returns

Type: bool The default is DateTimeOffset) (compares StoredMcpTask.DiscardAfter). Override for per-row Get and mutate. Set-based drains (EF ExecuteDelete) use the stamp; override CancellationToken) when bulk criteria must differ.

SweepExpiredAsync Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task

SweepExpiredCoreAsync Inherited Abstract

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Deletes rows that have passed their discard time.

Syntax

Parameters

Returns

Type: System.Threading.Tasks.Task A task that completes when the pass finishes.

Exceptions

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?

TryClaimSweep Inherited Virtual

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase
Claims the automatic-flush interval so only one pulse walks at a time.

Syntax

Parameters

Returns

Type: bool true when this caller should run the pass. A McpTaskStoreBase.SweepInterval of Zero always claims.

Events

InputResponseReceived Inherited

Inherited from CloudNimble.McpEssentials.Core.Tasks.McpTaskStoreBase

Syntax

  • CloudNimble.McpEssentials.Core.Tasks.IMcpTaskStorePlus
  • ModelContextProtocol.Extensions.Tasks.IMcpTaskStore
  • System.IDisposable