Beispiel #1
0
        public override void LoadOptions(string path, IIo io)
        {
            _siteOptions = new MixchSiteOptions();
            try
            {
                var s = io.ReadFile(path);

                _siteOptions.Deserialize(s);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                _logger.LogException(ex, "", $"path={path}");
            }
        }
        public CommentProvider(ICommentOptions options, MixchSiteOptions siteOptions, ILogger logger, IUserStoreManager userStoreManager)
        {
            _options          = options;
            _siteOptions      = siteOptions;
            _logger           = logger;
            _userStoreManager = userStoreManager;
            _dataSource       = new DataSource();

            _keepaliveTimer.Interval  = 1000;
            _keepaliveTimer.Elapsed  += _KeepaliveTimer_Elapsed;
            _keepaliveTimer.AutoReset = true;

            _poipoiStockTimer.Interval  = 1000;
            _poipoiStockTimer.Elapsed  += _PoipoiStockTimer_Elapsed;
            _poipoiStockTimer.AutoReset = true;

            CanConnect    = true;
            CanDisconnect = false;
        }
 internal MixchOptionsViewModel(MixchSiteOptions siteOptions)
 {
     _origin  = siteOptions;
     _changed = siteOptions.Clone();
 }