Skip to content

Commit

Permalink
Doing some cleanup of all the Warnings that litter the build - Part 6 (
Browse files Browse the repository at this point in the history
…FritzAndFriends#190)

Co-authored-by: Jeffrey T. Fritz <csharpfritz@users.noreply.github.com>
  • Loading branch information
Stelzi79 and csharpfritz committed Sep 17, 2023
1 parent e3e30d4 commit 9046aeb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/TagzApp.Common/IMessagingService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.Extensions.Hosting;
using TagzApp.Common.Models;

namespace TagzApp.Web.Services;

Expand All @@ -12,8 +11,8 @@ public interface IMessagingService : IHostedService
Task<Content?> GetContentByIds(string provider, string providerId);

Task<IEnumerable<Content>> GetExistingContentForTag(string tag);

Task<IEnumerable<(Content, ModerationAction?)>> GetContentByTagForModeration(string tag);
// TODO: Needs checking if a non-nullable ModerationAction makes problems!
Task<IEnumerable<(Content, ModerationAction)>> GetContentByTagForModeration(string tag);

Task<IEnumerable<Content>> GetApprovedContentByTag(string tag);

Expand Down
7 changes: 4 additions & 3 deletions src/TagzApp.Common/InMemoryContentMessaging.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Concurrent;
using TagzApp.Common.Models;

namespace TagzApp.Common;

Expand Down Expand Up @@ -74,9 +73,11 @@ public void StartProviders(IEnumerable<ISocialMediaProvider> providers, Cancella
_ProviderTasks.Clear();
foreach (var providerItem in providers)
{
_ProviderTasks.Add(Task.Factory.StartNew(async (object state) =>
_ProviderTasks.Add(Task.Factory.StartNew(async (object? state) =>
{
var provider = (ISocialMediaProvider)state;
var provider = state as ISocialMediaProvider;
if (provider is null) return;
var lastQueryTime = DateTimeOffset.UtcNow.AddHours(-1);
Expand Down
4 changes: 1 addition & 3 deletions src/TagzApp.Web/Services/InMemoryMessagingService.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Microsoft.AspNetCore.SignalR;
using System.Collections.Concurrent;
using TagzApp.Common.Models;

using TagzApp.Communication;
using TagzApp.Web.Hubs;

namespace TagzApp.Web.Services;

Expand Down

0 comments on commit 9046aeb

Please sign in to comment.