/// <summary> /// Start the resource manager. /// </summary> protected override void Setup(Node configuration) { _toRemove = new ActionRoll <string, int>(TryRemoveFile); _removeSequence = new ActionSequence(ManagerUpdate.Iterant); // add action to save configuration on start //Configuration config = LoadConfig(Fs.Combine(AppDomain.CurrentDomain.BaseDirectory, ".Efz")); //ManagerUpdate.OnStart.AddOnDone(() => config.Save()); ManagerUpdate.OnStart.AddOnDone(() => SaveNode(configuration.Parent, Fs.Combine(AppDomain.CurrentDomain.BaseDirectory, ".Efz"))); }
//-------------------------------// //-------------------------------// /// <summary> /// On setup of the log manager. /// </summary> protected override void Start() { _sequence = new ActionSequence(ManagerUpdate.Polling); _roll = new ActionRoll <ILogEvent>(WriteLog); Log.OnLog += OnLog; }
/// <summary> /// Construct an action. /// </summary> public ActionPop(Action action, Needle needle = null) { _action = new ActionRoll(action); Needle = needle ?? ManagerUpdate.Control; }
//-------------------------------------------// /// <summary> /// Empty constructor. /// </summary> public ActionPop() { _action = new ActionRoll(); Needle = ManagerUpdate.Control; }