Update() public method

public Update ( UpdateMode mode, bool background = false ) : System.Threading.Tasks.Task
mode UpdateMode
background bool
return System.Threading.Tasks.Task
Ejemplo n.º 1
0
        private async Task ScanDefferedAsync() {
            BackgroundLoading = true;
            Pinged = 0;

            await Task.Run(() => {
                KunosApiProvider.TryToGetLanList(async i => {
                    try {
                        var entry = new ServerEntry(this, i, true);
                        InnerWrappersList.Add(new AcItemWrapper(this, entry));
                        if (entry.Status == ServerStatus.Unloaded) {
                            await entry.Update(ServerEntry.UpdateMode.Lite); // BUG: Wait?
                        }
                        Pinged++;
                    } catch (Exception e) {
                        Logging.Warning("Cannot create ServerEntry: " + e);
                    }
                });
            });

            BackgroundLoading = false;
        }