//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private UILanguage(boolean paramBoolean) throws Exception private UILanguage(bool paramBoolean) { if (paramBoolean) { return; } Stream inputStream = null; try { inputStream = ClassLoader.getSystemResource("lang.properties").openStream(); } catch (Exception) { File file = new File(NamingUtil.Instance.getSarPath("lang.properties")); inputStream = new FileStream(file, FileMode.Open, FileAccess.Read); } this.o_rb.load(inputStream); inputStream.Close(); this.o_keyComparator = new KeyComparator(this, null); string str1 = getString("enum.fueltype.diesel"); string str2 = getString("enum.fueltype.petrol"); string str3 = getString("enum.fueltype.electric"); string str4 = getString("enum.fueltype.other"); BothDBPreferences.Instance.setFuelPriceKeys(str1, str2, str4, str3); DBFieldFormatUtil.Locale = getString("language.iso639.1"); this.locale = new Locale(getString("language.iso639.1")); }
private IKeyValueEnumerator <Bytes, byte[]> Range(Bytes from, Bytes to, bool forward) { if (KeyComparator.Invoke(from.Get, to.Get) > 0) { log.LogWarning("Returning empty iterator for fetch with invalid key range: from > to. " + "This may be due to range arguments set in the wrong order, " + "or serdes that don't preserve ordering when lexicographically comparing the serialized bytes. " + "Note that the built-in numerical serdes do not follow this for negative numbers"); return(new EmptyKeyValueEnumerator <Bytes, byte[]>()); } CheckStateStoreOpen(); var rocksEnumerator = DbAdapter.Range(from, to, forward); var wrapped = new WrappedRocksRbKeyValueEnumerator(rocksEnumerator, openIterators.Remove); openIterators.Add(wrapped); return(wrapped); }