mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-22 09:17:47 +00:00
move FeedEngine to its own class
This commit is contained in:
23
Core/FeedEngine.cs
Normal file
23
Core/FeedEngine.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using LiveGameFeed.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using RecurrentTasks;
|
||||
|
||||
namespace LiveGameFeed.Core
|
||||
{
|
||||
public class FeedEngine : IRunnable
|
||||
{
|
||||
private ILogger logger;
|
||||
|
||||
public FeedEngine(ILogger<FeedEngine> logger)
|
||||
{
|
||||
this.logger = logger;
|
||||
}
|
||||
public void Run(TaskRunStatus taskRunStatus)
|
||||
{
|
||||
var msg = string.Format("Run at: {0}", DateTimeOffset.Now);
|
||||
logger.LogDebug(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using LiveGameFeed.Models;
|
||||
|
||||
namespace LiveGameFeed.Core
|
||||
{
|
||||
public class FeedGenarator
|
||||
{
|
||||
public static Feed UpdateScore(Match match) {
|
||||
Feed feed = new Feed();
|
||||
feed.MatchId = match.Id;
|
||||
|
||||
if(match.Type == MatchTypeEnums.Football)
|
||||
{
|
||||
|
||||
}
|
||||
else if (match.Type == MatchTypeEnums.Basketball)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return feed;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user