public static async Task FetchRandomHintS() { try { StringBuilder stringBuilder = new StringBuilder(); ObjectHolder.HintList = new CgApiHintList(); await ObjectHolder.HintList.Fetch(); List <CgApiHint> .Enumerator var_2 = ObjectHolder.HintList.get_Items().GetEnumerator(); try { while (var_2.MoveNext()) { CgApiHint var_3_A5 = var_2.Current; object var_4_B1 = var_3_A5.get_Description().get_DefaultString(); object var_5_BE = var_3_A5.get_Description().get_DefaultString(); object var_6_CB = var_3_A5.get_Description().get_DefaultString(); object var_7_D8 = var_3_A5.get_Description().get_DefaultString(); object var_8_E5 = var_3_A5.get_Description().get_DefaultString(); object var_9_F2 = var_3_A5.get_Description().get_DefaultString(); object var_10_FF = var_3_A5.get_Description().get_DefaultString(); object var_11_10C = var_3_A5.get_Description().get_DefaultString(); object var_12_114 = var_3_A5.get_Profile(); if (var_3_A5.get_Description().get_Strings().ContainsKey("de")) { var_4_B1 = var_3_A5.get_Description().get_Strings()["de"]; } if (var_3_A5.get_Description().get_Strings().ContainsKey("en")) { var_5_BE = var_3_A5.get_Description().get_Strings()["en"]; } if (var_3_A5.get_Description().get_Strings().ContainsKey("es")) { var_6_CB = var_3_A5.get_Description().get_Strings()["es"]; } if (var_3_A5.get_Description().get_Strings().ContainsKey("fr")) { var_7_D8 = var_3_A5.get_Description().get_Strings()["fr"]; } if (var_3_A5.get_Description().get_Strings().ContainsKey("it")) { var_8_E5 = var_3_A5.get_Description().get_Strings()["it"]; } if (var_3_A5.get_Description().get_Strings().ContainsKey("pl")) { var_9_F2 = var_3_A5.get_Description().get_Strings()["pl"]; } if (var_3_A5.get_Description().get_Strings().ContainsKey("ro")) { var_11_10C = var_3_A5.get_Description().get_Strings()["ro"]; } if (var_3_A5.get_Description().get_Strings().ContainsKey("ru")) { var_10_FF = var_3_A5.get_Description().get_Strings()["ru"]; } stringBuilder.AppendLine(string.Format("{0};{1};{2};{3};{4};{5};{6};{7};{8};{9}", new object[] { var_3_A5.get_Id(), var_4_B1, var_5_BE, var_6_CB, var_7_D8, var_8_E5, var_9_F2, var_11_10C, var_10_FF, var_12_114 })); } } finally { int num; if (num < 0) { var_2.Dispose(); } } File.WriteAllText(Path.Combine(HelperFunctions.GetUserDataAppPath("CyberGhost", true), "hint"), CgApiHelper.Base64Encode(stringBuilder.ToString())); stringBuilder = null; } catch (Exception var_14_336) { HelperFunctions.DebugLine(string.Format("CgiApiHelper::{0} COULD NOT FETCH RANDOM HINT {1}", MethodBase.GetCurrentMethod().Name, var_14_336.Message)); } }
public static async Task FetchProgramList() { try { StringBuilder stringBuilder = new StringBuilder(); ObjectHolder.ProgramList = new CgApiProgramList(); await ObjectHolder.ProgramList.Fetch(); List <CgApiProgram> .Enumerator var_2 = ObjectHolder.ProgramList.get_Items().GetEnumerator(); try { while (var_2.MoveNext()) { CgApiProgram expr_A2 = var_2.Current; stringBuilder.AppendLine(string.Format("{0};{1};{2}", expr_A2.get_Id().ToString(), expr_A2.get_ExeName(), expr_A2.get_RegName())); } } finally { int num; if (num < 0) { var_2.Dispose(); } } File.WriteAllText(Path.Combine(HelperFunctions.GetUserDataAppPath("CyberGhost", true), "programs"), CgApiHelper.Base64Encode(stringBuilder.ToString())); stringBuilder = null; } catch (Exception var_8_130) { HelperFunctions.DebugLine(string.Format("CgApiHelper::{0} COULD NOT FETCH PROGRAM {1}", MethodBase.GetCurrentMethod().Name, var_8_130.Message)); } }