An IConversationStore that keeps the conversations in memory for the lifetime of the application. Registered by IServiceCollection) when no other store is registered.
Object
Namespace: Radzen
Assembly: Radzen.Blazor.dll
public class InMemoryConversationStore : IConversationStoreAn IConversationStore that keeps the conversations in memory for the lifetime of the application. Registered by IServiceCollection) when no other store is registered.
public InMemoryConversationStore()Gets or sets the age after which a conversation is removed when another one is saved. Default is 24 hours; null keeps them forever.
public TimeSpan? MaxAge { get; set; }
| Type | Description |
|---|---|
| TimeSpan? | Gets or sets the age after which a conversation is removed when another one is saved. Default is 24 hours; null keeps them forever. |
public Task DeleteAsync(string sessionId, Threading.CancellationToken cancellationToken)
| Type | Name | Description |
|---|---|---|
| string | sessionId | |
| Threading.CancellationToken | cancellationToken |
| Type | Description |
|---|---|
| Task |
public Task<IReadOnlyList<ConversationSession>> ListAsync(string userId, Threading.CancellationToken cancellationToken)
| Type | Name | Description |
|---|---|---|
| string | userId | |
| Threading.CancellationToken | cancellationToken |
| Type | Description |
|---|---|
| Task<IReadOnlyList<ConversationSession>> |
public Task<ConversationSession> LoadAsync(string sessionId, Threading.CancellationToken cancellationToken)
| Type | Name | Description |
|---|---|---|
| string | sessionId | |
| Threading.CancellationToken | cancellationToken |
| Type | Description |
|---|---|
| Task<ConversationSession> |
public Task SaveAsync(ConversationSession session, Threading.CancellationToken cancellationToken)
| Type | Name | Description |
|---|---|---|
| ConversationSession | session | |
| Threading.CancellationToken | cancellationToken |
| Type | Description |
|---|---|
| Task |