/// <summary>
 /// Initializes a new instance of the <see cref="AssetNodePresenterCommandWrapper"/> class.
 /// </summary>
 /// <param name="serviceProvider">The service provider of the view model.</param>
 /// <param name="nodePresenters">The <see cref="INodePresenter"/> instances on which to invoke the command.</param>
 /// <param name="command">The command to invoke.</param>
 public AssetNodePresenterCommandWrapper([NotNull] IViewModelServiceProvider serviceProvider, IReadOnlyCollection <INodePresenter> nodePresenters, INodePresenterCommand command)
     : base(serviceProvider, nodePresenters, command)
 {
 }
Exemplo n.º 2
0
 public void UnregisterNodePresenterCommand(INodePresenterCommand command) => ViewModelService.AvailableCommands.Remove(command);
Exemplo n.º 3
0
 protected override NodePresenterCommandWrapper ConstructCommandWrapper(INodePresenterCommand command)
 {
     return(new AssetNodePresenterCommandWrapper(ServiceProvider, base.NodePresenters, command));
 }
Exemplo n.º 4
0
 // TODO: provide a more solid API to avoid duplicates and name collision
 public void RegisterNodePresenterCommand(INodePresenterCommand command) => ViewModelService.AvailableCommands.Add(command);
 /// <summary>
 /// Initializes a new instance of the <see cref="NodePresenterCommandWrapper"/> class.
 /// </summary>
 /// <param name="serviceProvider">The service provider of the view model.</param>
 /// <param name="presenters">The <see cref="INodePresenter"/> instances on which to invoke the command.</param>
 /// <param name="command">The command to invoke.</param>
 public NodePresenterCommandWrapper([NotNull] IViewModelServiceProvider serviceProvider, [NotNull] IReadOnlyCollection <INodePresenter> presenters, [NotNull] INodePresenterCommand command)
     : base(serviceProvider)
 {
     this.presenters = presenters ?? throw new ArgumentNullException(nameof(presenters));
     Command         = command ?? throw new ArgumentNullException(nameof(command));
 }