Beispiel #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")));
        }
Beispiel #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;
        }