/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
public TableStorageReader(ITableStorageFactory tableStorageFactory) { _tableStorageFactory = tableStorageFactory ?? throw new ArgumentNullException(nameof(tableStorageFactory)); }