Exemplo n.º 1
0
        public override string Execute(IList <string> parameters)
        {
            List <Node> nodes  = base.dbctx.Nodes;
            var         result = new StringBuilder();

            foreach (var node in nodes)
            {
                result.AppendLine(NodeService.AsString(node));
            }

            return(result.ToString());
        }
Exemplo n.º 2
0
        public override string Execute(IList <string> parameters)
        {
            int nodeId;

            try
            {
                nodeId = int.Parse(parameters[0]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse ShowNode command parameters.");
            }

            Node   node   = base.dbctx.Nodes[nodeId];
            string result = NodeService.AsString(node);

            return(result);
        }