Esempio n. 1
0
        /// <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")));
        }
Esempio n. 2
0
        //-------------------------------//

        //-------------------------------//

        /// <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;
        }
Esempio n. 3
0
 /// <summary>
 /// Construct an action.
 /// </summary>
 public ActionPop(Action action, Needle needle = null)
 {
     _action = new ActionRoll(action);
     Needle  = needle ?? ManagerUpdate.Control;
 }
Esempio n. 4
0
        //-------------------------------------------//

        /// <summary>
        /// Empty constructor.
        /// </summary>
        public ActionPop()
        {
            _action = new ActionRoll();
            Needle  = ManagerUpdate.Control;
        }