Ejemplo n.º 1
0
 /// <summary>Initializes a new instance of the <see cref="MemoryCacheLedgerService"/> class.</summary>
 /// <param name="memoryCache">The memory cache.</param>
 /// <param name="signingService">Ledger signing service</param>
 /// <param name="options">The options.</param>
 public MemoryCacheLedgerService(
     IMemoryCache memoryCache,
     ILedgerSigningService signingService,
     MemoryCacheEntryOptions options = null)
     : base(signingService)
 {
     _memoryCache = memoryCache;
     _options     = options ?? new MemoryCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromMinutes(1));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultLedgerService" /> class
 /// </summary>
 /// <param name="signingService"></param>
 public DefaultLedgerService(ILedgerSigningService signingService)
 {
     _signingService = signingService;
 }