Exemplo n.º 1
0
        public void FetchTheData()
        {
            Logger _logger = LogManager.GetLogger("Bowerbird.Import");

            _configSettings = ConfigSettings.Singleton();

            _pathToWebResource = string.Format(
                "{0}/{1}",
                _configSettings.GetUriToSite(),
                _configSettings.GetFileName()
                );

            _pathToLocalResource = string.Format(
                "{0}\\{1}",
                _configSettings.GetEnvironmentRootPath(),
                _configSettings.GetFileName()
                );

            if (File.Exists(_pathToLocalResource))
            {
                File.Delete(_pathToLocalResource);
            }

            using (_wc = new WebClient())
            {
                _wc.DownloadFile(_pathToWebResource, _pathToLocalResource);
            }
        }
Exemplo n.º 2
0
 public static ConfigSettings Singleton()
 {
     return _singleton ?? (_singleton = new ConfigSettings());
 }