예제 #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);
        }
예제 #2
0
 /// <inheritdoc/>
 protected override void OnUninitialize()
 {
     _output = null;
     Editor.Services.Unregister(typeof(IOutputService));
     Editor.Services.Unregister(typeof(INLogTarget));
 }
예제 #3
0
 /// <inheritdoc/>
 protected override void OnUninitialize()
 {
     _output = null;
     Editor.Services.Unregister(typeof(IOutputService));
     Editor.Services.Unregister(typeof(INLogTarget));
 }