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

          Line data    Source code
       1             : #region Copyright
       2             : // // -----------------------------------------------------------------------
       3             : // // <copyright company="cdmdotnet Limited">
       4             : // //   Copyright cdmdotnet Limited. All rights reserved.
       5             : // // </copyright>
       6             : // // -----------------------------------------------------------------------
       7             : #endregion
       8             : 
       9             : using System;
      10             : using System.Collections.Generic;
      11             : using Cqrs.Azure.BlobStorage.DataStores;
      12             : using Cqrs.DataStores;
      13             : using Cqrs.Entities;
      14             : 
      15             : namespace Cqrs.Azure.BlobStorage
      16             : {
      17             :         public static class BlobStorageStoreExtensions
      18           0 :         {
      19           0 :                 public static TData GetByName<TData>(this IDataStore<TData> datastore, string name)
      20             :                 {
      21             :                         var rawDatastore = (BlobStorageStore<TData>)datastore;
      22             :                         return rawDatastore.GetByName(name);
      23             :                 }
      24             : 
      25           0 :                 public static TData GetByName<TData>(this IDataStore<TData> datastore, Guid id)
      26             :                         where TData : Entity, new()
      27             :                 {
      28             :                         var rawDatastore = (BlobStorageStore<TData>)datastore;
      29             :                         return rawDatastore.GetByName(string.Format("{0}.json", rawDatastore.GenerateFileName(new TData { Rsn = id })));
      30             :                 }
      31             : 
      32           0 :                 public static IEnumerable<TData> GetByFolder<TData>(this IDataStore<TData> datastore, string folderName)
      33             :                 {
      34             :                         var rawDatastore = (BlobStorageStore<TData>)datastore;
      35             :                         return rawDatastore.GetByFolder(folderName);
      36             :                 }
      37             : 
      38           0 :                 public static IEnumerable<TData> GetByFolder<TData>(this IDataStore<TData> datastore)
      39             :                         where TData : Entity
      40             :                 {
      41             :                         var rawDatastore = (BlobStorageDataStore<TData>)datastore;
      42             :                         return rawDatastore.GetByFolder();
      43             :                 }
      44             :         }
      45             : }

Generated by: LCOV version 1.10