public MainWindowViewModel(INotificationBox notificationBoxProvider)
        {
            var baseHost = new BaseHost();

            // ReSharper disable LocalizableElement
            baseHost.ApplicationName = @"Agent";

            this.IconSource          = ServerViewControlViewModel.GreenIcon;
            this.host                = new AgentHost();
            this.ServiceDataReceiver = new ServiceDataReceiver();

            // ReSharper restore LocalizableElement
            LogManager.ConfigureLogging(baseHost);
            this.notificationBoxProvider = notificationBoxProvider;
            this.Title = Resources.AgentApplicationTitle;

            this.serverViewViewModel = new ServerViewControlViewModel(notificationBoxProvider, this);
        }
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        private void Dispose(bool disposing)
        {
            // Check to see if Dispose has already been called.
            if (!this.disposed)
            {
                // If disposing equals true, dispose all managed
                // and unmanaged resources.
                if (disposing)
                {
                    this.host.Dispose();
                    this.host = null;
                }

                this.serverViewViewModel.Dispose();

                // Call the appropriate methods to clean up
                // unmanaged resources here.
                // If disposing is false,
                // only the following code is executed.
            }

            this.disposed = true;
        }