Documentation
Table of Contents

Class InMemorySpecialistStore

Namespace
IntentSharp.Specialist
Assembly
IntentSharp.Specialist.dll

The default ISpecialistStore: everything in memory, for the life of the process. Thread-safe. Intent names are compared ignoring case.

public sealed class InMemorySpecialistStore : ISpecialistStore
Inheritance
object
InMemorySpecialistStore
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Extension Methods

Constructors

InMemorySpecialistStore()

Creates an empty store.

Methods

CountRequestsAsync(string, DateTimeOffset, CancellationToken)

The number of requests recorded for the intent at or after since.

GetFitReportAsync(string, string, CancellationToken)

The fit report recorded for the intent and request hash, or null.

GetHeldAsync(string, CancellationToken)

The held record of the intent, or null. The default answers null.

GetOfferAsync(string, string, CancellationToken)

The offer recorded for the intent and request hash, or null.

GetTicketAsync(string, string, CancellationToken)

The ticket recorded for the intent and request hash, or null.

ListHeldAsync(CancellationToken)

Every held record, one per intent, in no set order. The default answers none.

RecordRequestAsync(string, DateTimeOffset, CancellationToken)

Records that a request was sent for the intent at at.

RemoveAsync(string, string, CancellationToken)

Forgets the ticket, the offer and the fit report recorded for the intent and request hash. The request times stay.

RemoveHeldAsync(string, CancellationToken)

Forgets the held record of the intent. The default does nothing.

SaveFitReportAsync(string, FitReport, CancellationToken)

Records the verdict on the offer of a request, under its RequestHash.

SaveHeldAsync(HeldSpecialist, CancellationToken)

Keeps the held record of the specialist put in use for an intent, replacing the one held for that intent before. The default keeps nothing, so a store that does not implement the held members never recalls a specialist.

SaveOfferAsync(string, string, SpecialistOffer, CancellationToken)

Records the offer received for a request.

SaveTicketAsync(string, SpecialistTicket, CancellationToken)

Records the ticket of a request, under its request hash.