Пример #1
0
 public CommandResult ProcessCommand(InsertScopeNodesCommand command)
 {
     using (InsertScopeNodesCommandReader reader = new InsertScopeNodesCommandReader(command))
     {
         ScopeNodeInsert scopeNodeInsert = reader.ReadScopeNodeInsert();
         ScopeTreeNode scopeTreeNode = ScopeTreeNode.CreateScopeTreeNode(scopeNodeInsert.NodeData);
         scopeTreeNode.SetActionData(scopeNodeInsert.Actions);
         if (scopeNodeInsert.ParentScopeNodeId == -1)
         {
             this.tvNavigator.Nodes.Insert(scopeNodeInsert.InsertionIndex, scopeTreeNode);
         }
         else
         {
             ScopeTreeNode parentNode = this.nodeTable[scopeNodeInsert.ParentScopeNodeId];
             parentNode.Nodes.Insert(scopeNodeInsert.InsertionIndex, scopeTreeNode);
         }
         this.nodeTable.Add(scopeNodeInsert.NodeData.Id, scopeTreeNode);
     }
     return null;
 }
 public InsertScopeNodesCommandReader(InsertScopeNodesCommand source)
 {
     this._source = source;
     this._strings = new BinaryReader(new MemoryStream(this._source.Get_strings()));
 }