mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 02:08:27 -04:00
vars and target-typed new
This commit is contained in:
@@ -72,7 +72,7 @@ public class FeedsService : INService
|
||||
.Reverse() // start from the oldest
|
||||
.ToList();
|
||||
|
||||
if (!_lastPosts.TryGetValue(kvp.Key, out DateTime lastFeedUpdate))
|
||||
if (!_lastPosts.TryGetValue(kvp.Key, out var lastFeedUpdate))
|
||||
{
|
||||
lastFeedUpdate = _lastPosts[kvp.Key] =
|
||||
items.Any() ? items[items.Count - 1].LastUpdate : DateTime.UtcNow;
|
||||
|
@@ -77,7 +77,7 @@ public class SearchesService : INService
|
||||
|
||||
public async Task<Stream> GetRipPictureAsync(string text, Uri imgUrl)
|
||||
{
|
||||
byte[] data = await _cache.GetOrAddCachedDataAsync($"nadeko_rip_{text}_{imgUrl}",
|
||||
var data = await _cache.GetOrAddCachedDataAsync($"nadeko_rip_{text}_{imgUrl}",
|
||||
GetRipPictureFactory,
|
||||
(text, imgUrl),
|
||||
TimeSpan.FromDays(1)).ConfigureAwait(false);
|
||||
@@ -388,7 +388,7 @@ public class SearchesService : INService
|
||||
return new MtgData[0];
|
||||
|
||||
var tasks = new List<Task<MtgData>>(cards.Length);
|
||||
for (int i = 0; i < cards.Length; i++)
|
||||
for (var i = 0; i < cards.Length; i++)
|
||||
{
|
||||
var card = cards[i];
|
||||
|
||||
|
Reference in New Issue
Block a user