LCOV - code coverage report
Current view: top level - Azure/Cqrs.Azure.BlobStorage/Repositories - TableStorageRepository.cs Hit Total Coverage
Test: doc-coverage.info Lines: 0 3 0.0 %
Date: 2017-07-26

          Line data    Source code
       1             : using System;
       2             : using Cqrs.DataStores;
       3             : using Cqrs.Repositories;
       4             : using Cqrs.Entities;
       5             : using Cqrs.Repositories.Queries;
       6             : 
       7             : namespace Cqrs.Azure.BlobStorage.Repositories
       8             : {
       9             :         public class TableStorageRepository<TQueryStrategy, TQueryBuilder, TData> : Repository<TQueryStrategy, TQueryBuilder, TData>
      10             :                 where TQueryStrategy : IQueryStrategy
      11             :                 where TQueryBuilder : QueryBuilder<TQueryStrategy, TData>
      12             :                 where TData : Entity, new()
      13           0 :         {
      14           0 :                 public TableStorageRepository(Func<IDataStore<TData>> createDataStoreFunction, TQueryBuilder queryBuilder)
      15             :                         : base(createDataStoreFunction, queryBuilder)
      16             :                 {
      17             :                 }
      18             : 
      19             :                 #region Overrides of Repository<TQueryStrategy,TQueryBuilder,TData>
      20             : 
      21           0 :                 public override TData Load(Guid rsn, bool throwExceptionOnMissingEntity = true)
      22             :                 {
      23             :                         using (IDataStore<TData> dataStore = CreateDataStoreFunction())
      24             :                         {
      25             :                                 try
      26             :                                 {
      27             :                                         return dataStore.GetByKeyAndRow(rsn);
      28             :                                 }
      29             :                                 catch (InvalidOperationException exception)
      30             :                                 {
      31             :                                         if (throwExceptionOnMissingEntity && exception.Message == "Sequence contains no elements")
      32             :                                                 throw;
      33             :                                 }
      34             : 
      35             :                                 return null;
      36             :                         }
      37             :                 }
      38             : 
      39             :                 #endregion
      40             :         }
      41             : }

Generated by: LCOV version 1.10