Table of Contents

Class ContactMailSuppressionCollection

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

Addresses that opted out of contact mail, one document per address and category, default collection name ContactMailSuppression; kept for good.

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

Remarks

The unique index is what keeps one opt-out per address and category when two requests race, and what reads an address's opt-outs.

Constructors

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

Creates the collection under the configured name.

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

Parameters

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

Properties

CollectionName

public override string CollectionName { get; }

Property Value

string

Indices

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

Property Value

IEnumerable<CreateIndexModel<ContactMailSuppressionEntity>>