Esempio n. 1
0
        public static string Build()
        {
            String connectionString = null;

            if (useLocal)
            {
                if (useLdapAuth)
                {
                    connectionString = ConnectionStringBuilderFactory.CreateDefaultLocalLdapAuth();
                }
                else
                {
                    connectionString = ConnectionStringBuilderFactory.CreateDefaultLocal();
                }
            }
            else
            {
                if (useLdapAuth)
                {
                    connectionString = ConnectionStringBuilderFactory.CreateDefaultRemoteLdapAuth(useAuthenticatedProxy);
                }
                else
                {
                    connectionString = ConnectionStringBuilderFactory.CreateDefaultRemote(useAuthenticatedProxy);
                }
            }

            AceQLConsole.WriteLine("connectionString: " + connectionString);
            return(connectionString);
        }
Esempio n. 2
0
        public static string Build()
        {
            String filePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\aceql.client.ini";
            PropFileReader propFileReader = new PropFileReader(filePath);

            useLocal = Boolean.Parse(propFileReader.getProperty("useLocal"));
            useLdapAuth = Boolean.Parse(propFileReader.getProperty("useLdapAuth"));
            typeAuthenticatedProxy = int.Parse(propFileReader.getProperty("typeAuthenticatedProxy"));

            AceQLConsole.WriteLine("useLocal              : " + useLocal);
            AceQLConsole.WriteLine("useLdapAuth           : " + useLdapAuth);
            AceQLConsole.WriteLine("typeAuthenticatedProxy: " + typeAuthenticatedProxy);
            AceQLConsole.WriteLine();

            String connectionString = null;

            if (useLocal)
            {
                if (useLdapAuth)
                {
                    connectionString = ConnectionStringBuilderFactory.CreateDefaultLocalLdapAuth();
                }
                else
                {
                    connectionString = ConnectionStringBuilderFactory.CreateDefaultLocal();
                }
            }
            else
            {
                if (useLdapAuth)
                {
                    connectionString = ConnectionStringBuilderFactory.CreateDefaultRemoteLdapAuth(typeAuthenticatedProxy);
                }
                else
                {
                    connectionString = ConnectionStringBuilderFactory.CreateDefaultRemote(typeAuthenticatedProxy);
                }
            }

            AceQLConsole.WriteLine("connectionString: " + connectionString);
            return connectionString;
        }