internal FpeEncryptedKeyCacheManager(IUbiqCredentials credentials, UbiqWebServices ubiqWebServices) { _cacheLock = false; _credentials = credentials; _ubiqWebServices = ubiqWebServices; _cache = new MemoryCache("fpeCache"); InitCache(); }
internal FpeTransactionManager(UbiqWebServices webServices) { _bills = new List <FpeTransactionRecord>(); _isFlushing = false; _isProcessingQueueLocked = false; _processingQueue = new List <FpeTransactionRecord>(); _webServices = webServices; }
public void Dispose() { if (_webServices != null) { // Perform a final bill processing for items that may not have been done by the async executor Task.Run(async() => { _isFlushing = true; _isProcessingQueueLocked = false; await ProcessCurrentBillsAsync(); _webServices.Dispose(); _webServices = null; }).ConfigureAwait(true).GetAwaiter().GetResult(); } }