private async Task <R1UserSession> GatherSessionInfo (R1UserSession savedNode = null) { var exePath = GetExePath(); var ssn = new R1UserSession(); ssn.nid = savedNode?.nid ?? 0; ssn.uid = savedNode?.uid ?? 0; ssn.vid = savedNode?.vid ?? 0; await AddProfileTo(ssn); //ssn.PublicIP = await GetPublicIP(); //ssn.MacAndPrivateIPs = GetMacAndPrivateIPs(); //ssn.ExeVersion = GetExeVersion(); //ssn.ExePath = exePath.Replace("\\", "/"); //ssn.WindowsAccount = Environment.UserName; //ssn.ComputerName = Environment.MachineName; //ssn.Workgroup = GetWorkgroup(); //ssn.LegacyCfgJson = _readLegacyCfg?.Invoke(); //ssn.Repo1CfgJson = Repo1Cfg.Read(ConfigKey); ssn.ExpectedCfg = Repo1Cfg.EXPECTED_KEY_IGNORE_ME; ssn.SessionKey = GetSessionKey(); ssn.FutureLicenseKey = GetFutureLicenseKey(); ssn.Description = NoExt(exePath) + " on " + ssn.Workgroup + "/" + ssn.ComputerName + "/" + ssn.WindowsAccount; return(ssn); }
private async Task <string> SendAndGetNewCfg(R1UserSession session) { var dict = await Update(session); return(dict.FieldValue("field_expectedcfg")); }