Files
NScrapy/NScrapy.Infra/ConfigProvider/DefaultConfigProvider.cs
Elendil 46086ffaf9 ConfigProvider update
Create a ConifgProviderFactory so thay we can get ConfigProvider from a single point
Also enhenced the logic of refresh config, right now when zookeeper watcher dected the config is changed
NScrapy will update its context, and during that time, NScrapy will lock the access to the Connection of Redis
2018-07-04 23:31:44 +08:00

22 lines
632 B
C#

using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
namespace NScrapy.Infra.ConfigProvider
{
/// <summary>
/// Default Config provider is called by defualt by NScrapyContext or DownloaderContext
/// It will look for other ConfigProvider if they are defined in default config appsetting.json
/// </summary>
public class DefaultConfigProvider : IConfigProvider
{
public string GetConfigFilePath()
{
return ConfigProviderFactory.DEFAULTCONFIG;
}
}
}