コード例 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static void tryDetectAppServer(String paramString) throws Exception
        public static void tryDetectAppServer(string paramString)
        {
            if (!paramString.StartsWith("http://", StringComparison.Ordinal) && !paramString.StartsWith("https://", StringComparison.Ordinal))
            {
                paramString = "http://" + paramString;
            }
            string     str1       = paramString + "/ces/info/serverInfo.action";
            Properties properties = HTTPUtil.getPropertiesURL(str1, null, null);
            string     str2       = (string)properties.get("appserver.name");

            if (string.ReferenceEquals(str2, null))
            {
                throw new IllegalStateException("appserver is not defined in zdb.properties, possibly server is not updated");
            }
            if (str2.Equals("tomee"))
            {
                appServer = 2;
            }
            else if (str2.Equals("jboss"))
            {
                appServer = 1;
            }
            else
            {
                throw new IllegalStateException("invalid appserver: " + str2);
            }
            EJB_PORT   = int.Parse((string)properties.get("appserver.ejbPort"));
            JMS_PORT   = int.Parse((string)properties.get("appserver.jmsPort"));
            s_instance = null;
        }
コード例 #2
0
ファイル: GGDEUtil.cs プロジェクト: radtek/CostOSInTheCloud
        public static string rateForCode(string paramString1, string paramString2, string paramString3, string paramString4)
        {
            string str1 = GGDE_GET_TIMOLOGIA_URL + "&work=" + paramString2 + "&year=" + paramString3 + "&quarter1=" + paramString4 + "&code=" + paramString1 + "&allartha=0";
            string str2 = HTTPUtil.getURL(str1, null, null);

            str2 = StringUtils.textBetween(str2, "<td width=\"73\" align=\"right\" bgcolor=\"#99CCCC\" class=\"input\">", "&#8364;");
            return((str2.Length > 50) ? null : str2);
        }
コード例 #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void findUsingWipMania() throws Exception
        private void findUsingWipMania()
        {
            if (string.ReferenceEquals(this.ip, null))
            {
                this.ip = "";
            }
            string str1 = "http://api.wipmania.com/" + this.ip + "?" + "in.gr";
            string str2 = HTTPUtil.getURL(str1, null, null);

            if (!this.ip.Equals(""))
            {
                this.countryCode = str2;
            }
            else
            {
                this.countryCode = str2.Split("<br>", true)[1];
            }
            if (string.ReferenceEquals(this.countryCode, null) || this.countryCode.Equals("XX") || this.countryCode.Equals(""))
            {
                throw new Exception();
            }
        }