private async Task <string> CanConnectAsync(string error, Sources sources) { if ((sources == Sources.All || sources.HasFlag(Sources.File)) && !await FileProxy.CanConnectAsync()) { Logger.LogError("Cannot connect to Files"); return(error); } if ((sources == Sources.All || sources.HasFlag(Sources.Cache)) && !Cache.CanConnect()) { Logger.LogError("Cannot connect to Cache"); return(error); } return(string.Empty); }