/// <summary> /// Loads the static data. /// </summary> public static async Task LoadAsync() { // Quit if the client has been shut down if (EveMonClient.Closed) { return; } // This is the time optimal loading order // (min order to follow : // skills before anything else, // properties before items, // items before blueprints, reprocessing and certificates, // certs before masteries) EveMonClient.Trace("Datafiles.Load - begin", printMethod: false); // Must always run first // It will have finished loading until static skills finish Task properties = TaskHelper.RunIOBoundTaskAsync(() => StaticProperties.Load()); // Must always run before items Task skills = TaskHelper.RunIOBoundTaskAsync(() => StaticSkills.Load()); await Task.WhenAll(skills, properties); // Must always run synchronously as blueprints, reprocessing and certificates depend on it await TaskHelper.RunIOBoundTaskAsync(() => StaticItems.Load()); // Must always run synchronously as masteries depend on it await TaskHelper.RunIOBoundTaskAsync(() => StaticCertificates.Load()); // Must always run synchronously as ID to name depends on it await TaskHelper.RunIOBoundTaskAsync(() => StaticGeography.Load()); // Non critical loadings as all dependencies have been loaded Task blueprints = TaskHelper.RunIOBoundTaskAsync(() => StaticBlueprints.Load()); Task reprocessing = TaskHelper.RunIOBoundTaskAsync(() => StaticReprocessing.Load()); await TaskHelper.RunIOBoundTaskAsync(() => StaticMasteries.Load()); EveMonClient.Trace("Datafiles.Load - done", printMethod: false); }