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 CoCInformer(CoCAPI parent) { this._parent = parent; this._ismono = stCore.stRuntime.isRunTime(); this._imgdir = Path.Combine( this._parent.RootPath, this._parent._assetspath, "images" ); }
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)); }
public CoCMediaDownload(dynamic ccl, string basepath, CoCAPI parent) { this._ccl = ccl; this._parent = parent; this._basepath = basepath; if (string.IsNullOrWhiteSpace(this._basepath)) { throw new ArgumentNullException("Base Path"); } if (this._ccl == null) { throw new ArgumentNullException("Curl instance"); } if (this._parent == null) { throw new ArgumentNullException("Parent instance"); } }
public CoCRrd(CoCAPI parent, int period = 0) { this._parent = parent; this._startTime = CoCRrdUtil.getUnixTimeStamp(DateTime.Now); this._periodTime = period; if (!Directory.Exists(CoCRrdUtil.getRrdDirImgPath(this._parent._rootpath, this._parent._assetspath))) { try { Directory.CreateDirectory(CoCRrdUtil.getRrdDirImgPath(this._parent._rootpath, this._parent._assetspath)); } catch (Exception e) { if (this._parent.isLogEnable) { this._parent._ilog.LogError(e.Message); } throw e; } } }
public override object Invoke(object[] args) { return(CoCAPI.GetFlagUrl(args[0] as string, ((args[1] != null) ? (((Int64)args[1] == 1) ? true : false) : false))); }
public override object Invoke(object[] args) { return(CoCAPI.GetBadgeUrl(args[0] as string)); }