public Network.Host GetRandomHost() { String FileContents = File.Reader.ReadAll(InitialHostsFile); String[] AllHosts = Util.StringUtils.SplitNewLines(FileContents); if (Generator == null) { Generator = new Util.SimpleRandom(); } String SelectedHost = Util.StringUtils.PickRandom(AllHosts, Generator); return(new Network.Host(SelectedHost)); }
public InitialHosts(String File, Util.IRandomGenerator Random) { InitialHostsFile = File; Generator = Random; }