示例#1
0
        static private string getRegionServerAddress(string region)
        {
            string newRegionAddress = "";

            switch (region)
            {
            case "United States - West":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.usWestServer);
                break;

            case "United States - East":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.usEastServer);
                break;

            case "United Kingdom":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.ukServer);
                break;

            case "Ireland":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.irelandServer);
                break;

            case "Germany":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.germanyServer);
                break;

            case "Canada":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.canadaServer);
                break;

            case "Japan":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.japanServer);
                break;

            case "Australia":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.australiaServer);
                break;

            case "South Korea":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.southKoreaServer);
                break;

            case "Singapore":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.singaporeServer);
                break;

            case "India":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.indiaServer);
                break;

            case "Brazil":
                newRegionAddress = ConfirmedConstants.endPoint(ConfirmedConstants.brazilServer);
                break;

            default:
                break;
            }

            return(newRegionAddress);
        }
示例#2
0
        static public bool checkCertificateInstalled()
        {
            System.Security.Cryptography.X509Certificates.X509Store store = new System.Security.Cryptography.X509Certificates.X509Store(StoreName.My, StoreLocation.LocalMachine);
            store.Open(OpenFlags.ReadOnly);
            X509Certificate2Collection certs = store.Certificates.Find(X509FindType.FindByIssuerName, ConfirmedConstants.endPoint("www"), true);

            if (certs.Count > 0)
            {
                for (int i = 0; i < certs.Count; i++)
                {
                    if (certs[i].IssuerName.Name.ToString() == "CN=" + ConfirmedConstants.endPoint("www"))
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }