示例#1
0
        // ===========================================================================
        // = Construction
        // ===========================================================================
        public GrouchDownloader(Settings inSettings)
        {
            _settings = inSettings;

            _clientFactory = () => new GrouchInternalUsenetClient(
                _settings.ServerHostName,
                _settings.ServerUserName,
                _settings.ServerPassword,
                _settings.ServerPort,
                _settings.ServerUseSsl);
        }
示例#2
0
文件: Server.cs 项目: jdbrock/slouch
        private void LoadSettings()
        {
            var serializer = new JsonSerializer();
            var settingsPath = GetSettingsPath();

            if (!File.Exists(settingsPath))
                _settings = new Settings();
            else
                using (var settingsFile = File.OpenRead(settingsPath))
                {
                    _settings = serializer.Deserialize<Settings>(new JsonTextReader(new StreamReader(settingsFile)));
                }
        }