C# Class Raven.Database.Plugins.AbstractReadTrigger

Inheritance: IRequiresDocumentDatabaseInitialization
Exibir arquivo Open project: nhsevidence/ravendb

Public Methods

Method Description
AllowRead ( string key, RavenJObject metadata, ReadOperation operation, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : Raven.Database.Plugins.ReadVetoResult

Ask the trigger whatever the document should be read by the user.

The document and metadata instances SHOULD NOT be modified.

Initialize ( ) : void
Initialize ( DocumentDatabase database ) : void
OnRead ( string key, RavenJObject document, RavenJObject metadata, ReadOperation operation, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : void

Allow the trigger the option of modifying the document and metadata instances before the user can see them.

The modified values are transient, and are NOT saved to the database.

Method Details

AllowRead() public method

Ask the trigger whatever the document should be read by the user.
The document and metadata instances SHOULD NOT be modified.
public AllowRead ( string key, RavenJObject metadata, ReadOperation operation, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : Raven.Database.Plugins.ReadVetoResult
key string The key of the read document - can be null if reading a projection
metadata RavenJObject The document metadata
operation ReadOperation Whatever the operation is a load or a query
transactionInformation Raven.Abstractions.Data.TransactionInformation The transaction information, if any
return Raven.Database.Plugins.ReadVetoResult

Initialize() public method

public Initialize ( ) : void
return void

Initialize() public method

public Initialize ( DocumentDatabase database ) : void
database DocumentDatabase
return void

OnRead() public method

Allow the trigger the option of modifying the document and metadata instances before the user can see them.
The modified values are transient, and are NOT saved to the database.
public OnRead ( string key, RavenJObject document, RavenJObject metadata, ReadOperation operation, Raven.Abstractions.Data.TransactionInformation transactionInformation ) : void
key string The key of the read document - can be null if reading a projection
document RavenJObject The document being read
metadata RavenJObject The document metadata
operation ReadOperation Whatever the operation is a load or a query
transactionInformation Raven.Abstractions.Data.TransactionInformation The transaction information, if any
return void