internal virtual bool HasNextService() { if (NextName != null) { return(true); } if (Configs == null) { try { String fullName = PREFIX + Service.Name; if (Loader == null) { Configs = ClassLoader.GetSystemResources(fullName); } else { Configs = Loader.GetResources(fullName); } } catch (IOException x) { Fail(Service, "Error locating configuration files", x); } } while ((Pending == null) || !Pending.MoveNext()) { //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: if (!Configs.hasMoreElements()) { return(false); } //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: Pending = outerInstance.Parse(Service, Configs.nextElement()); } //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: NextName = Pending.next(); return(true); }