Ejemplo n.º 1
0
 public Task <IEnumerable <CryptoData> > LoadCryptoRecords(long lastId = 0)
 {
     return(TryLoggedProcess(() =>
     {
         ICryptoStorage service = GetService <ICryptoStorage>();
         return service.RunCryptoIngestionReport(lastId);
     }));
 }
Ejemplo n.º 2
0
        public async Task SetupAsync(string location, ICryptoStorage cryptoStorage, byte[] key)
        {
            location.ThrowIfNullOrEmpty(nameof(location));
            cryptoStorage.ThrowIfNull(nameof(cryptoStorage));
            key.ThrowIfNull(nameof(key));

            Close();
            try
            {
                CurrentDatabase = databaseProvider.GetDatabase(location);
                await CurrentDatabase.SetupAsync(cryptoStorage, key).ConfigureAwait(false);
            }
            catch
            {
                CurrentDatabase = null;
                throw;
            }
        }
Ejemplo n.º 3
0
 internal static void Serialize(Stream destination, ICryptoStorage obj)
 {
     destination.ThrowIfNull(nameof(destination));
     obj.ThrowIfNull(nameof(obj));
     GenericSerializer.Serialize(destination, obj, TypeToEnumMappings, FormatExceptionMessage);
 }
Ejemplo n.º 4
0
 public CryptoDialog(ICryptoStorage storage, IMarket market)
 {
     this.store  = storage;
     this.market = market;
 }
Ejemplo n.º 5
0
 public MessagesController(ICryptoStorage storage, IMarket market)
 {
     this.store  = storage;
     this.market = market;
 }