Example #1
0
        public async Task <bool> TestConnection(string subName)
        {
            DAL.DirtbagDAL dirtbag     = new DAL.DirtbagDAL();
            var            curSettings = await GetSettings(subName);

            return(await dirtbag.TestConnection(curSettings, subName));
        }
Example #2
0
 public async Task<bool> TestConnection(Models.DirtbagSettings newSettings, string subName ) {
     Models.DirtbagSettings curSettings = await GetSettings( subName );
     DAL.DirtbagDAL dirtbag = new DAL.DirtbagDAL();
     
     if( curSettings == null || curSettings.DirtbagUrl != newSettings.DirtbagUrl ) {
         //no current settings OR url changed, don't allow using saved password.
         return await dirtbag.TestConnection( newSettings, subName );
     }
     else if(string.IsNullOrWhiteSpace( newSettings.DirtbagPassword)) {
         //url did NOT change, and password wasn't updated
         return await dirtbag.TestConnection( curSettings.DirtbagUrl, newSettings.DirtbagUsername, curSettings.DirtbagPassword, subName );
     }
     else {
         return await dirtbag.TestConnection( newSettings, subName );
     }
 }
Example #3
0
        public async Task <bool> TestConnection(Models.DirtbagSettings newSettings, string subName)
        {
            Models.DirtbagSettings curSettings = await GetSettings(subName);

            DAL.DirtbagDAL dirtbag = new DAL.DirtbagDAL();

            if (curSettings == null || curSettings.DirtbagUrl != newSettings.DirtbagUrl)
            {
                //no current settings OR url changed, don't allow using saved password.
                return(await dirtbag.TestConnection(newSettings, subName));
            }
            else if (string.IsNullOrWhiteSpace(newSettings.DirtbagPassword))
            {
                //url did NOT change, and password wasn't updated
                return(await dirtbag.TestConnection(curSettings.DirtbagUrl, newSettings.DirtbagUsername, curSettings.DirtbagPassword, subName));
            }
            else
            {
                return(await dirtbag.TestConnection(newSettings, subName));
            }
        }
Example #4
0
 public async Task<bool> TestConnection(string subName ) {
     DAL.DirtbagDAL dirtbag = new DAL.DirtbagDAL();
     var curSettings = await GetSettings( subName );
     return await dirtbag.TestConnection( curSettings, subName );
 }