public Event(IEventTimer timer, string name = null, TimerEvent body = null, TimeSpan? interval = null, IConfigSectionNode config = null) : base(timer) { if ((timer as IEventTimerImplementation) == null) throw new TimeException(StringConsts.ARGUMENT_ERROR + "Event.ctor(timer=null | timer!=IEventTimerImplementation)"); m_Timer = timer; if (body!=null) Body += body; if (interval.HasValue) m_Interval = interval.Value; if (config!=null) { Configure(config); m_Name = config.AttrByName(Configuration.CONFIG_NAME_ATTR).Value; } if (name.IsNotNullOrWhiteSpace()) m_Name = name; if (m_Name.IsNullOrWhiteSpace()) m_Name = Guid.NewGuid().ToString(); ((IEventTimerImplementation)timer).__InternalRegisterEvent(this); }
public DeleteFilesJob( IEventTimer timer, string name = null, TimeSpan? interval = null, IConfigSectionNode config = null, FileSystem fs = null, FileSystemSessionConnectParams fsConnectParams = null, string fsRootPath = null ) : base(timer, name, null, interval, config, EventBodyAsyncModel.LongRunningAsyncTask) { if (fs!=null) m_FS = fs; if (fsConnectParams!=null) m_FSConnectParams = fsConnectParams; if (fsRootPath.IsNotNullOrWhiteSpace()) m_FSRootPath = fsRootPath; }
public Event(IEventTimer timer, string name = null, TimerEvent body = null, TimeSpan?interval = null, IConfigSectionNode config = null, EventBodyAsyncModel bodyAsyncModel = EventBodyAsyncModel.AsyncTask, bool enabled = true) : base(timer) { if ((timer as IEventTimerImplementation) == null) { throw new TimeException(StringConsts.ARGUMENT_ERROR + "Event.ctor(timer=null | timer!=IEventTimerImplementation)"); } m_Enabled = enabled; m_Timer = timer; if (body != null) { Body += body; } if (interval.HasValue) { m_Interval = interval.Value; } BodyAsyncModel = bodyAsyncModel; if (config != null) { Configure(config); m_Name = config.AttrByName(Configuration.CONFIG_NAME_ATTR).Value; } if (name.IsNotNullOrWhiteSpace()) { m_Name = name; } if (m_Name.IsNullOrWhiteSpace()) { m_Name = Guid.NewGuid().ToString(); } ((IEventTimerImplementation)timer).__InternalRegisterEvent(this); }
public DeleteFilesJob( IEventTimer timer, string name = null, TimeSpan?interval = null, IConfigSectionNode config = null, FileSystem fs = null, FileSystemSessionConnectParams fsConnectParams = null, string fsRootPath = null ) : base(timer, name, null, interval, config, EventBodyAsyncModel.LongRunningAsyncTask) { if (fs != null) { m_FS = fs; } if (fsConnectParams != null) { m_FSConnectParams = fsConnectParams; } if (fsRootPath.IsNotNullOrWhiteSpace()) { m_FSRootPath = fsRootPath; } }
public DeleteFilesJob(IEventTimer timer, IConfigSectionNode config) : this(timer, null, config : config) { }
public Event(IEventTimer timer, IConfigSectionNode config) : this(timer, null, null, null, config) { }
public Event(IEventTimer timer, IConfigSectionNode config) : this(timer, null, config: config) { }
public DeleteFilesJob(IEventTimer timer, IConfigSectionNode config) : this(timer, null, config: config) { }