public List <AddSoftware> getInstalledSW() { lSoftware = new List <AddSoftware>(); if (oScan.bInitialScan) { oScan = new RZUpdate.RZScan(false, false); oScan.SWScan().Wait(); } return(oScan.InstalledSoftware); }
//private DateTime dLastTokenRefresh = new DateTime(); /// <summary> /// Initialize the RuckZuck Web-Service /// </summary> /// <param name="request"></param> private void _initRZ(Request request) { try { Properties.Settings.Default.Location = ""; Properties.Settings.Default.Save(); if (Properties.Settings.Default.Location.StartsWith("https:")) { RZRestAPI.sURL = Properties.Settings.Default.Location; } else { Properties.Settings.Default.Location = RZRestAPI.sURL; Properties.Settings.Default.Save(); } //_reAuthenticate(request); oScan = new RZUpdate.RZScan(false, false); //oScan.GetSWRepository().ConfigureAwait(false); //no need to load Repository on init oUpdate = new RZUpdate.RZUpdater(); /* * //Username and PW is not yet implemented * if (!string.IsNullOrEmpty(Properties.Settings.Default.Username)) * { * _AuthenticationToken = RZApi.AuthenticateUser(Properties.Settings.Default.Username, ToInsecureString(DecryptString(Properties.Settings.Default.Password))); * } * else * { * _AuthenticationToken = RZApi.AuthenticateUser("FreeRZ", GetTimeToken()); * } * * request.Debug("RZ Token: " + _AuthenticationToken); * * RZApi.SecuredWebServiceHeaderValue = new RZ.SecuredWebServiceHeader() { AuthenticatedToken = _AuthenticationToken }; * * dLastTokenRefresh = DateTime.Now;*/ } catch { } }