Commit 485cc2d3 authored by Clint Mourlevat's avatar Clint Mourlevat

Adding IAsk/Ask for putting vanity asking

parent bcc8f416
......@@ -14,16 +14,19 @@ using Newtonsoft.Json;
using QRCoder;
using Stratis.Bitcoin.Networks;
using Stratis.Guru.Models;
using Stratis.Guru.Modules;
namespace Stratis.Guru.Controllers
{
public class HomeController : Controller
{
private readonly IMemoryCache _memoryCache;
private IAsk _ask;
public HomeController(IMemoryCache memoryCache)
public HomeController(IMemoryCache memoryCache, IAsk ask)
{
_memoryCache = memoryCache;
_ask = ask;
}
public IActionResult Index()
......
using System.Collections.Generic;
using Stratis.Guru.Models;
namespace Stratis.Guru.Modules
{
public class Ask : IAsk
{
public Queue<Vanity> VanityAsking = new Queue<Vanity>();
}
}
\ No newline at end of file
namespace Stratis.Guru.Modules
{
public interface IAsk
{
}
}
\ No newline at end of file
......@@ -13,6 +13,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Stratis.Guru.Modules;
using Stratis.Guru.Services;
namespace Stratis.Guru
......@@ -41,6 +42,8 @@ namespace Stratis.Guru
services.AddMemoryCache();
services.AddTransient<IAsk, Ask>();
services.AddHostedService<TickerService>();
services.AddHostedService<VanityService>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment