Exemple #1
0
        public void StopNode(BlockchainNode node, ResponseHandler.DispatherCallback dispatherCallback)
        {
            ActionRequest action = new ActionRequest(ActionType.StopNode);

            action.FullNodeName = node.NodeEndpoint.FullNodeName;

            actionQueue.Enqueue(action);
        }
Exemple #2
0
        public void GitPull(BlockchainNode node, ResponseHandler.DispatherCallback dispatherCallback)
        {
            ActionRequest action = new ActionRequest(ActionType.GitPull);

            action.FullNodeName = node.NodeEndpoint.FullNodeName;

            action.Parameters.Add(ActionParameters.WorkingDirectory, Path.Combine(node.NodeConfig.CodeDirectory, node.NodeConfig.ProjectDirectory));

            actionQueue.Enqueue(action);
        }
Exemple #3
0
        public void StartNode(BlockchainNode node, ResponseHandler.DispatherCallback dispatherCallback)
        {
            ActionRequest action = new ActionRequest(ActionType.StartNode);

            action.DispatherResponseReceived += dispatherCallback;

            action.FullNodeName = node.NodeEndpoint.FullNodeName;

            action.Parameters.Add(ActionParameters.CompilerSwitches, node.NodeConfig.CompilerSwitches);
            action.Parameters.Add(ActionParameters.RuntimeSwitches, node.NodeConfig.StartupSwitches);
            action.Parameters.Add(ActionParameters.Network, node.NodeEndpoint.Network.ToString());
            action.Parameters.Add(ActionParameters.DataDir, node.NodeConfig.DataDir);
            action.Parameters.Add(ActionParameters.WorkingDirectory, Path.Combine(node.NodeConfig.CodeDirectory, node.NodeConfig.ProjectDirectory));

            actionQueue.Enqueue(action);
        }
Exemple #4
0
        public void RemoveResource(BlockchainNode node, NodeResourceType resourceType, ResponseHandler.DispatherCallback dispatherCallback)
        {
            ActionRequest action = new ActionRequest(ActionType.DeleteFile);

            action.FullNodeName = node.NodeEndpoint.FullNodeName;
            NodeResource nodeResource = NodeResourceLocator.NodeResources[resourceType];

            action.Parameters.Add(ActionParameters.Path, ClientConfigReader.Evaluate(nodeResource.ResourceLocation, node.NodeConfig));
            actionQueue.Enqueue(action);
        }