public CoCNotify(CoCAPI api) { if ((api == null) || (api.GetType() != typeof(CoCAPI))) { throw new ArgumentNullException( string.Format( Properties.Resources.CoCInitError, typeof(CoCProcess).Name, 3 ) ); } this._lockRss = new object(); this._lockData = new object(); this._lockClient = new object(); this._parent = api; this._notifySseClient = new List <CoCNotifyHost>(); this._data = SqliteConvertExtension.MapToDataTable <CoCNotifyEntry>(); this._data.Locale = CultureInfo.InvariantCulture; this._EventRssHeader(); this._sseSetup = this._EventSseSetupString(); this._tm = new Timer(t => { this._EventSseSend(SendSseStreamAlive); }, null, 0, CoCNotify.timerRespawn); #if DEBUG_TestLoop Task.Factory.StartNew(() => { this.TestLoop(); }); #endif }
public CoCProcess(CoCAPI api) { if ((api == null) || (api.GetType() != typeof(CoCAPI))) { throw new ArgumentNullException( string.Format( Properties.Resources.CoCInitError, typeof(CoCProcess).Name, 2 ) ); } this._parent = api; this.InitHandleMap(); this._parent.dbMgr.RegisterFunction(typeof(WhereSeasonFunction)); }