Ejemplo n.º 1
0
        // DONE
        protected override bool UpdateBindPortCommand(int oldPort, int newPort)
        {
            const string MASK          = "-a {0}";
            var          oldApiBindStr = String.Format(MASK, oldPort);
            var          newApiBindStr = String.Format(MASK, newPort);

            if (LastCommandLine != null && LastCommandLine.Contains(oldApiBindStr))
            {
                LastCommandLine = LastCommandLine.Replace(oldApiBindStr, newApiBindStr);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
        protected bool UpdateBindPortCommand_ccminer_cpuminer(int oldPort, int newPort)
        {
            // --api-bind=
            const string MASK          = "--api-bind={0}";
            var          oldApiBindStr = String.Format(MASK, oldPort);
            var          newApiBindStr = String.Format(MASK, newPort);

            if (LastCommandLine != null && LastCommandLine.Contains(oldApiBindStr))
            {
                LastCommandLine = LastCommandLine.Replace(oldApiBindStr, newApiBindStr);
                return(true);
            }
            return(false);
        }