Beispiel #1
0
        //--------------------------------------------------------------
        /// <inheritdoc/>
        protected override void OnInitialize()
        {
            // Register NLogTarget, if available. (Used in OutputViewModel.)
            var nlogTarget = LogManager.Configuration.AllTargets.OfType<INLogTarget>().FirstOrDefault();
            if (nlogTarget != null)
                Editor.Services.Register(typeof(INLogTarget), null, nlogTarget);

            _output = new OutputViewModel(Editor);
            Editor.Services.Register(typeof(IOutputService), null, _output);
        }
 /// <inheritdoc/>
 protected override void OnUninitialize()
 {
     _output = null;
     Editor.Services.Unregister(typeof(IOutputService));
     Editor.Services.Unregister(typeof(INLogTarget));
 }
Beispiel #3
0
 /// <inheritdoc/>
 protected override void OnUninitialize()
 {
     _output = null;
     Editor.Services.Unregister(typeof(IOutputService));
     Editor.Services.Unregister(typeof(INLogTarget));
 }