public virtual Task <bool> InitAsync() { if (_storage == null) { _storage = new MatchStorage <TMatch, TId>(MatchesSettingsFile); } return(Task.FromResult(NetworkConnectionTracker.IsNetworkConnected)); }
public virtual bool Init() { if (_storage == null) { _storage = new MatchStorage <TMatch, TId>(MatchesSettingsFile); } if (!NetworkConnectionTracker.IsNetworkConnected) { return(false); } return(true); }
public virtual bool Init() { if (_storage == null) { _storage = new MatchStorage <TMatch, TId>(MatchesSettingsFile); } if (!_inited) { // Use own thread to avoid delay during startup IThreadPool threadPool = ServiceRegistration.Get <IThreadPool>(false); if (threadPool != null) { threadPool.Add(ResumeDownloads, "ResumeDownloads", QueuePriority.Normal, ThreadPriority.BelowNormal); } _inited = true; } if (!NetworkConnectionTracker.IsNetworkConnected) { return(false); } return(true); }