Class AzureConfidentialLedgerService
- Namespace
- NuvTools.Blockchain.Azure
- Assembly
- NuvTools.Blockchain.Azure.dll
Azure Confidential Ledger implementation of ILedgerService.
public class AzureConfidentialLedgerService : ILedgerService
- Inheritance
-
AzureConfidentialLedgerService
- Implements
- Inherited Members
Constructors
AzureConfidentialLedgerService(IOptions<BlockchainSection>)
Azure Confidential Ledger implementation of ILedgerService.
public AzureConfidentialLedgerService(IOptions<BlockchainSection> options)
Parameters
optionsIOptions<BlockchainSection>
Methods
ReadAsync<T>(string, string?, int, int, CancellationToken)
Reads an entry from the ledger.
public Task<LedgerEntry<T>?> ReadAsync<T>(string transactionId, string? collectionId = null, int maxRetries = 10, int delayMilliseconds = 500, CancellationToken cancellationToken = default) where T : class
Parameters
transactionIdstringThe transaction ID to read.
collectionIdstringOptional collection/sub-ledger identifier.
maxRetriesintMaximum retry attempts for pending entries.
delayMillisecondsintBase delay between retries in milliseconds.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<LedgerEntry<T>>
The ledger entry if found; otherwise, null.
Type Parameters
TThe type of the entry content.
WriteAsync<T>(T, string?, CancellationToken)
Writes an entry to the ledger.
public Task<string> WriteAsync<T>(T entry, string? collectionId = null, CancellationToken cancellationToken = default) where T : class
Parameters
entryTThe entry to write.
collectionIdstringOptional collection/sub-ledger identifier.
cancellationTokenCancellationTokenCancellation token.
Returns
Type Parameters
TThe type of the entry content.