Пример #1
0
 public LinkManager(ShawnConfiguration config,
                    IWebHostEnvironment env,
                    ILogger <LinkManager> logger,
                    IMemoryCache cache)
 {
     _connectionString = config.Storage.ConnectionString;
     _account          = CloudStorageAccount.Parse(_connectionString);
     _tableClient      = _account.CreateCloudTableClient();
     _table            = _tableClient.GetTableReference("links");
     _env    = env;
     _logger = logger;
     _cache  = cache;
     _tableRequestOptions = new TableRequestOptions()
     {
         ConsistencyLevel = ConsistencyLevel.Eventual
     };
 }
Пример #2
0
 public Startup(IConfiguration config, IHostEnvironment env)
 {
     _config = new ShawnConfiguration(config);
     _env    = env;
 }