Exemple #1
0
        /// <summary>
        /// Initialize a V1Instance to communicate with an installation of VersionOne at a given URL.
        /// </summary>
        /// <param name="applicationPath">Location of the VersionOne application. Ex: http://server/versionone/</param>
        /// <param name="username">VersionOne member's username to authenticate with.  If using Integrated Authentication, must be in "user@domain" format.</param>
        /// <param name="password">VersioonOne member's password to authenticate with</param>
        /// <param name="integratedAuth">True to use Integrated Authentication</param>
        public V1Instance(string applicationPath, string username, string password, bool integratedAuth)
        {
            if (!applicationPath.EndsWith("/"))
            {
                applicationPath += "/";
            }

            apiClientInternals = new ApiClientInternals(applicationPath, username, password, integratedAuth, null);
            wrapperManager     = new WrapperManager(this);
        }
Exemple #2
0
        /// <summary>
        /// Initialize a V1Instance that uses OAuth2 to authenticate to the backend server.
        /// </summary>
        /// <param name="applicationPath"></param>
        /// <param name="oauth2storage"></param>
        public V1Instance(string applicationPath, OAuth2Client.IStorage oauth2storage)
        {
            if (!applicationPath.EndsWith("/"))
            {
                applicationPath += "/";
            }

            apiClientInternals = new ApiClientInternals(applicationPath, oauth2storage, null);
            wrapperManager     = new WrapperManager(this);
        }
Exemple #3
0
        /// <summary>
        /// Initialize a V1Instance that uses OAuth2 to authenticate to the backend server and communicates via a proxy
        /// </summary>
        /// <param name="applicationPath"></param>
        /// <param name="oauth2storage"></param>
        /// <param name="proxySettings"></param>
        public V1Instance(string applicationPath, OAuth2Client.IStorage oauth2storage, ProxySettings proxySettings)
        {
            if (!applicationPath.EndsWith("/"))
            {
                applicationPath += "/";
            }
            ProxyProvider proxyProvider = null;

            if (proxySettings != null)
            {
                proxyProvider = new ProxyProvider(proxySettings.Path, proxySettings.Username, proxySettings.Password, proxySettings.Domain);
            }


            apiClientInternals = new ApiClientInternals(applicationPath, oauth2storage, proxyProvider);
            wrapperManager     = new WrapperManager(this);
        }