/// <summary> /// Initializes a new instance of the <see cref="QuickLaunchViewModel"/> class. /// </summary> /// <param name="editor">The editor view model.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="editor"/> is <see langword="null"/>. /// </exception> public QuickLaunchViewModel(IEditorService editor) { if (editor == null) throw new ArgumentNullException(nameof(editor)); Editor = editor; _quickLaunchService = editor.Services.GetInstance<IQuickLaunchService>().ThrowIfMissing(); FindCommand = new DelegateCommand(Find, CanFind); ExecuteCommand = new DelegateCommand(Execute); CancelCommand = new DelegateCommand(Cancel); }
/// <summary> /// Initializes a new instance of the <see cref="QuickLaunchViewModel"/> class. /// </summary> /// <param name="editor">The editor view model.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="editor"/> is <see langword="null"/>. /// </exception> public QuickLaunchViewModel(IEditorService editor) { if (editor == null) { throw new ArgumentNullException(nameof(editor)); } Editor = editor; _quickLaunchService = editor.Services.GetInstance <IQuickLaunchService>().ThrowIfMissing(); FindCommand = new DelegateCommand(Find, CanFind); ExecuteCommand = new DelegateCommand(Execute); CancelCommand = new DelegateCommand(Cancel); }