コード例 #1
0
        public Task <IEnumerable <TModel> > ReadAsync <TModel>(ITableStorageSettings tableStorageSettings, Func <TableQuery <TModel>, TableQuery <TModel> > filter)
            where TModel : class, ITableEntity, new()
        {
            var reader = _tableStorageFactory.CreateReader <TModel>(tableStorageSettings);

            return(reader.ReadAsync(filter));
        }
コード例 #2
0
 public AzureTableStorageInitializer(ITableStorageSettings settings)
 {
     if (string.IsNullOrEmpty(settings?.ConnectionString))
     {
         throw new ArgumentNullException(nameof(settings));
     }
     _settings = settings;
 }
コード例 #3
0
 public IFilterableTableStorageReader <TModel> CreateReader <TModel>(ITableStorageSettings tableStorageSettings)
     where TModel : class, ITableEntity, new()
 {
     if (!_settings.AutoCreateMissingBindings)
     {
         throw new NotSupportedException("AutoCreateMissingBindings should be set to true.");
     }
     return(new FilterableTableStorageReader <TModel>(tableStorageSettings));
 }
コード例 #4
0
 public TableStorageRepository(ITableStorageSettings storageSettings)
     : base(storageSettings)
 {
 }
コード例 #5
0
 public AzureTableStorage(ITableStorageSettings config)
 {
     _configuration = config;
 }
コード例 #6
0
 public FilterableTableStorageReaderTest()
 {
     _settings = new CosmosDbLocalEmulatorSettings("FilterableTableStorageReaderTest");
     sut       = new FilterableTableStorageReader <MyTestModel>(_settings);
     _myTestModelRepository = new TableStorageRepository <MyTestModel>(_settings);
 }
コード例 #7
0
 public TableStorageRepositoryTest(string tableName = DefaultTableName)
 {
     Settings            = new CosmosDbLocalEmulatorSettings(tableName);
     RepositoryUnderTest = new TableStorageRepository <SomeTestEntity>(Settings);
 }
コード例 #8
0
 public async Task ChangeSettings(ITableStorageSettings settings)
 {
     CreateStorageAccountFromConnectionString(settings.ConnectionString);
     await CreateTableAsync(settings.TableName);
 }
コード例 #9
0
 public FilterableTableStorageReader(ITableStorageSettings storageSettings)
     : base(storageSettings)
 {
 }