Table of Contents

Class SupportAssistantUsageCollection

Namespace
Tharga.Team.MongoDB
Assembly
Tharga.Team.MongoDB.dll

The assistant's usage, one document per time it was asked. Default collection name SupportAssistantUsage.

public class SupportAssistantUsageCollection : DiskRepositoryCollectionBase<SupportAssistantUsageRecordEntity>, ISupportAssistantUsageCollection, IDiskRepositoryCollection<SupportAssistantUsageRecordEntity>, IDiskRepositoryCollection<SupportAssistantUsageRecordEntity, ObjectId>, IRepositoryCollection<SupportAssistantUsageRecordEntity, ObjectId>, IReadOnlyRepositoryCollection<SupportAssistantUsageRecordEntity, ObjectId>, IRepositoryCollection, IReadOnlyRepositoryCollection
Inheritance
RepositoryCollectionBase
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>
DiskRepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>
DiskRepositoryCollectionBase<SupportAssistantUsageRecordEntity>
SupportAssistantUsageCollection
Implements
IDiskRepositoryCollection<SupportAssistantUsageRecordEntity>
IDiskRepositoryCollection<SupportAssistantUsageRecordEntity, ObjectId>
IRepositoryCollection<SupportAssistantUsageRecordEntity, ObjectId>
IReadOnlyRepositoryCollection<SupportAssistantUsageRecordEntity, ObjectId>
IRepositoryCollection
IReadOnlyRepositoryCollection
Inherited Members
DiskRepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.GetCollection()
DiskRepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.DropCollectionAsync()
DiskRepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.GetDirtyAsync()
DiskRepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.GetFailedIndices()
DiskRepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.DropEmptyAsync(IMongoCollection<SupportAssistantUsageRecordEntity>)
DiskRepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.FetchSize
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>._mongoDbServiceFactory
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>._logger
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>._databaseContext
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>._mongoDbService
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.InitAsync(IMongoCollection<SupportAssistantUsageRecordEntity>)
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.ProtectedCollectionName
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.CollectionName
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.DatabasePart
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.ConfigurationName
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.AutoClean
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.CleanOnStartup
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.CreateCollectionStrategy
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.Indices
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.CoreIndices
RepositoryCollectionBase<SupportAssistantUsageRecordEntity, ObjectId>.Types
RepositoryCollectionBase.ConfigurationName
RepositoryCollectionBase.ActionEvent

Remarks

Totalled by the server, so a month of every team's answers is never read into the site to be added up. The period leads the index the totals use; the team has an index of its own for purging.

Constructors

SupportAssistantUsageCollection(IMongoDbServiceFactory, ILogger<SupportAssistantUsageCollection>, IOptions<ThargaTeamOptions>)

public SupportAssistantUsageCollection(IMongoDbServiceFactory mongoDbServiceFactory, ILogger<SupportAssistantUsageCollection> logger, IOptions<ThargaTeamOptions> options = null)

Parameters

mongoDbServiceFactory IMongoDbServiceFactory
logger ILogger<SupportAssistantUsageCollection>
options IOptions<ThargaTeamOptions>

Properties

CollectionName

public override string CollectionName { get; }

Property Value

string

Indices

public override IEnumerable<CreateIndexModel<SupportAssistantUsageRecordEntity>> Indices { get; }

Property Value

IEnumerable<CreateIndexModel<SupportAssistantUsageRecordEntity>>

Methods

TotalAsync(DateTime, DateTime, string, CancellationToken)

The usage in a period totalled per team, provider and model by the server; for one team when teamKey is given.

public Task<SupportAssistantUsageTotal[]> TotalAsync(DateTime from, DateTime to, string teamKey, CancellationToken cancellationToken = default)

Parameters

from DateTime
to DateTime
teamKey string
cancellationToken CancellationToken

Returns

Task<SupportAssistantUsageTotal[]>