public static async Task DestructGlobals() { await LocalUtils.SaveSettings(); downloads.PauseAll(); client.Dispose(); noRedirectClient.Dispose(); }
public static async Task InitGlobals() { everything = await LocalUtils.ReadSettings(); client.DefaultRequestHeaders.TryAppendWithoutValidation("User-Agent", Constants.GUANJIA_AGENT); noRedirectClient.DefaultRequestHeaders.TryAppendWithoutValidation("User-Agent", Constants.GUANJIA_AGENT); downloads.InitTasks().ContinueWith((task) => { downloads.ResumeAll(); }); }