public CronEventEntry(string Name, CronEventHandler handler, CronJob Cronjob, bool Unique, CronLimit limit) { // infer a name from the handler passed in (if one was not supplied) m_Name = (Name != null) ? Name : (handler != null && handler.Method != null && handler.Method.Name != null) ? handler.Method.Name : "Unknown"; m_Unique = Unique; m_Handler = handler; m_Cronjob = Cronjob; m_Limit = limit; }
public static void Register(string Name, CronEventHandler handler, string CronSpec, bool Unique, CronLimit limit) { lock (m_Handlers.SyncRoot) { m_Handlers.Add(new CronEventEntry(Name, handler, new CronJob(CronSpec), Unique, limit)); } }