static void Main(string[] args) { ModeTracker modeTracker = new ModeTracker(); IPAddress address, masterAddress; int port, masterPort; // Set up configuration string inputLine = ""; foreach (string arg in args) inputLine += arg + " "; InputParser inputParser = new InputParser(inputLine); inputParser.ParseInput(); address = getIPAddress(); port = inputParser.Port; // If address was given if (inputParser.MasterAddress == null) { primaryMode = true; modeTracker.InitiatePrimary(address, port); } else { primaryMode = false; masterAddress = inputParser.MasterAddress; masterPort = inputParser.MasterPort; modeTracker.InitiateBackup(address, port, masterAddress, masterPort); } }
static void Main(string[] args) { ModeTracker modeTracker = new ModeTracker(); IPAddress address, masterAddress; int port, masterPort; // Set up configuration string inputLine = ""; foreach (string arg in args) { inputLine += arg + " "; } InputParser inputParser = new InputParser(inputLine); inputParser.ParseInput(); address = getIPAddress(); port = inputParser.Port; // If address was given if (inputParser.MasterAddress == null) { primaryMode = true; modeTracker.InitiatePrimary(address, port); } else { primaryMode = false; masterAddress = inputParser.MasterAddress; masterPort = inputParser.MasterPort; modeTracker.InitiateBackup(address, port, masterAddress, masterPort); } }