コード例 #1
0
ファイル: Factory.cs プロジェクト: randyammar/storage
 /// <summary>
 /// Creates a new instance of CSV file storage
 /// </summary>
 /// <param name="factory"></param>
 /// <param name="rootDir"></param>
 public static ITableStorage CsvFiles(this ITableStorageFactory factory,
                                      DirectoryInfo rootDir)
 {
     return(new CsvFileTableStorageProvider(rootDir));
 }
コード例 #2
0
ファイル: Factory.cs プロジェクト: manimaranm7/storage
 /// <summary>
 /// Creates an instance of Azure Table Storage using account name and key.
 /// </summary>
 /// <param name="factory">Factory reference</param>
 /// <param name="credential">Credential structure cotnaining account name in username and account key in password.</param>
 /// <returns></returns>
 public static ITableStorage AzureTableStorage(this ITableStorageFactory factory,
                                               NetworkCredential credential)
 {
     return(new AzureTableStorageProvider(credential.UserName, credential.Password));
 }
コード例 #3
0
ファイル: Factory.cs プロジェクト: manimaranm7/storage
 /// <summary>
 /// Creates an instance of Azure Table Storage using account name and key.
 /// </summary>
 /// <param name="factory">Factory reference</param>
 /// <param name="accountName">Account name</param>
 /// <param name="storageKey">Account key</param>
 /// <returns></returns>
 public static ITableStorage AzureTableStorage(this ITableStorageFactory factory,
                                               string accountName,
                                               string storageKey)
 {
     return(new AzureTableStorageProvider(accountName, storageKey));
 }
コード例 #4
0
ファイル: Factory.cs プロジェクト: umfaruki/storage
 /// <summary>
 /// Creates an ESENT based table storage
 /// </summary>
 /// <param name="factory">Factory references</param>
 /// <param name="databasePath">Path to the database. If it doesn't exist it will be created.</param>
 /// <returns></returns>
 public static ITableStorage Esent(this ITableStorageFactory factory,
                                   string databasePath)
 {
     return(new EsentTableStorage(databasePath));
 }
コード例 #5
0
 /// <summary>
 /// Creates Microsoft SQL Server table provider.
 /// </summary>
 /// <param name="factory"></param>
 /// <param name="connectionString">Full connection string to the server.</param>
 /// <param name="config">Optional configuration</param>
 /// <returns></returns>
 public static ITableStorageProvider MssqlServer(this ITableStorageFactory factory, string connectionString,
                                                 SqlConfiguration config = null)
 {
     return(new MssqlTableStorageProvider(connectionString, config));
 }
コード例 #6
0
 public TableStorageReader(ITableStorageFactory tableStorageFactory)
 {
     _tableStorageFactory = tableStorageFactory ?? throw new ArgumentNullException(nameof(tableStorageFactory));
 }