/// <summary> /// Add a command to this node. The node must not have been sealed yet. /// </summary> /// <param name="command">The node command to add.</param> public void AddCommand(INodeCommand command) { if (isSealed) throw new InvalidOperationException("Unable to add a command to a GraphNode that has been sealed"); commands.Add(command); }
public ModelNodeCommandWrapper(IViewModelServiceProvider serviceProvider, INodeCommand nodeCommand, GraphNodePath nodePath, Index index) : base(serviceProvider) { if (nodeCommand == null) throw new ArgumentNullException(nameof(nodeCommand)); NodePath = nodePath; Index = index; NodeCommand = nodeCommand; }
public ModelNodeCommandWrapper(IViewModelServiceProvider serviceProvider, INodeCommand nodeCommand, GraphNodePath nodePath, IEnumerable<IDirtiable> dirtiables) : base(serviceProvider, dirtiables) { if (nodeCommand == null) throw new ArgumentNullException(nameof(nodeCommand)); NodePath = nodePath; NodeCommand = nodeCommand; Service = serviceProvider.Get<ObservableViewModelService>(); }
/// <summary> /// Remove a command from this node. The node must not have been sealed yet. /// </summary> /// <param name="command">The node command to remove.</param> public void RemoveCommand(INodeCommand command) { if (isSealed) { throw new InvalidOperationException("Unable to remove a command from a GraphNode that has been sealed"); } commands.Remove(command); }
/// <summary> /// Add a command to this node. The node must not have been sealed yet. /// </summary> /// <param name="command">The node command to add.</param> public void AddCommand(INodeCommand command) { if (isSealed) { throw new InvalidOperationException("Unable to add a command to a GraphNode that has been sealed"); } commands.Add(command); }
/// <summary> /// Node specific commands that are handled here by the <see cref="NodeConfigurator"/> /// </summary> /// <param name="msg"></param> private void HandleCommand(INodeCommand msg) { switch (msg) { default: _logger.Warning("Received unknown command:{MessageType} - ID:{MessageId}", msg.GetType(), msg.Id); break; } }
/// <summary> /// Remove a command from this node. The node must not have been sealed yet. /// </summary> /// <param name="command">The node command to remove.</param> public void RemoveCommand(INodeCommand command) { if (isSealed) { throw new InvalidOperationException("Unable to add a child to a ModelNode that has been sealed"); } commands.Remove(command); }
public VirtualNodeCommandWrapper(IViewModelServiceProvider serviceProvider, INodeCommand nodeCommand, IGraphNode node, Index index) : base(serviceProvider) { if (nodeCommand == null) throw new ArgumentNullException(nameof(nodeCommand)); if (node == null) throw new ArgumentNullException(nameof(node)); this.node = node; this.index = index; NodeCommand = nodeCommand; Service = serviceProvider.Get<ObservableViewModelService>(); }
public ModelNodeCommandWrapper(IViewModelServiceProvider serviceProvider, INodeCommand nodeCommand, GraphNodePath nodePath) : base(serviceProvider) { if (nodeCommand == null) { throw new ArgumentNullException(nameof(nodeCommand)); } NodePath = nodePath; NodeCommand = nodeCommand; Service = serviceProvider.Get <ObservableViewModelService>(); }
public ModelNodeCommandWrapper(IViewModelServiceProvider serviceProvider, INodeCommand nodeCommand, GraphNodePath nodePath, Index index) : base(serviceProvider) { if (nodeCommand == null) { throw new ArgumentNullException(nameof(nodeCommand)); } NodePath = nodePath; Index = index; NodeCommand = nodeCommand; }
public ModelNodeCommandWrapper(IViewModelServiceProvider serviceProvider, INodeCommand nodeCommand, string observableNodePath, ObservableViewModel owner, ModelNodePath nodePath, IEnumerable<IDirtiableViewModel> dirtiables) : base(serviceProvider, dirtiables) { if (nodeCommand == null) throw new ArgumentNullException(nameof(nodeCommand)); if (owner == null) throw new ArgumentNullException(nameof(owner)); NodePath = nodePath; // Note: the owner should not be stored in the command because we want it to be garbage collectable Identifier = owner.Identifier; ModelContainer = owner.ModelContainer; NodeCommand = nodeCommand; Service = serviceProvider.Get<ObservableViewModelService>(); ObservableNodePath = observableNodePath; }
public VirtualNodeCommandWrapper(IViewModelServiceProvider serviceProvider, INodeCommand nodeCommand, IContentNode node, Index index) : base(serviceProvider) { if (nodeCommand == null) { throw new ArgumentNullException(nameof(nodeCommand)); } if (node == null) { throw new ArgumentNullException(nameof(node)); } this.node = node; this.index = index; NodeCommand = nodeCommand; Service = serviceProvider.Get <GraphViewModelService>(); }
public ModelNodeCommandWrapper(IViewModelServiceProvider serviceProvider, INodeCommand nodeCommand, string observableNodePath, ObservableViewModelIdentifier identifier, ModelNodePath nodePath, ModelContainer modelContainer, IEnumerable <IDirtiableViewModel> dirtiables) : base(serviceProvider, dirtiables) { if (nodeCommand == null) { throw new ArgumentNullException("nodeCommand"); } if (modelContainer == null) { throw new ArgumentNullException("modelContainer"); } this.identifier = identifier; this.nodePath = nodePath; this.modelContainer = modelContainer; this.nodeCommand = nodeCommand; service = serviceProvider.Get <ObservableViewModelService>(); ObservableNodePath = observableNodePath; }
public ModelNodeCommandWrapper(IViewModelServiceProvider serviceProvider, INodeCommand nodeCommand, string observableNodePath, ObservableViewModel owner, ModelNodePath nodePath, IEnumerable <IDirtiableViewModel> dirtiables) : base(serviceProvider, dirtiables) { if (nodeCommand == null) { throw new ArgumentNullException(nameof(nodeCommand)); } if (owner == null) { throw new ArgumentNullException(nameof(owner)); } NodePath = nodePath; // Note: the owner should not be stored in the command because we want it to be garbage collectable Identifier = owner.Identifier; ModelContainer = owner.ModelContainer; NodeCommand = nodeCommand; Service = serviceProvider.Get <ObservableViewModelService>(); ObservableNodePath = observableNodePath; }
/// <summary> /// Remove a command from this node. The node must not have been sealed yet. /// </summary> /// <param name="command">The node command to remove.</param> public void RemoveCommand(INodeCommand command) { if (isSealed) throw new InvalidOperationException("Unable to remove a command from a GraphNode that has been sealed"); commands.Remove(command); }
/// <summary> /// Remove a command from this node. The node must not have been sealed yet. /// </summary> /// <param name="command">The node command to remove.</param> public void RemoveCommand(INodeCommand command) { if (isSealed) throw new InvalidOperationException("Unable to add a child to a ModelNode that has been sealed"); commands.Remove(command); }