yavsccli target

This commit is contained in:
Paul Schneider 2021-03-10 01:41:31 +00:00
commit f39d6c48c5
15 changed files with 85 additions and 107 deletions

View file

@ -8,15 +8,12 @@ namespace Yavsc.ViewComponents
{
public class CalendarViewComponent : ViewComponent
{
readonly ApplicationDbContext _dbContext;
readonly ICalendarManager _manager;
public CalendarViewComponent (
ApplicationDbContext dbContext,
ICalendarManager manager)
{
_manager = manager;
_dbContext = dbContext;
}
public async Task<IViewComponentResult> InvokeAsync (

View file

@ -11,7 +11,7 @@ namespace Yavsc.ViewComponents
public class CirclesControlViewComponent : ViewComponent
{
ApplicationDbContext dbContext;
private readonly ApplicationDbContext dbContext;
public CirclesControlViewComponent(ApplicationDbContext dbContext)
{
this.dbContext = dbContext;

View file

@ -6,11 +6,10 @@ namespace Yavsc.ViewComponents
{
public partial class CommentViewComponent : ViewComponent
{
IStringLocalizer<CommentViewComponent> localizer;
private readonly IStringLocalizer<CommentViewComponent> localizer;
public CommentViewComponent(IStringLocalizer<CommentViewComponent> localizer)
{
this.localizer = localizer;
this.localizer = localizer;
}
public IViewComponentResult Invoke(IIdentified<long> longCommentable)
{
@ -19,4 +18,4 @@ namespace Yavsc.ViewComponents
return View(longCommentable.GetType().Name, new Comment{ PostId = longCommentable.Id });
}
}
}
}

View file

@ -7,15 +7,11 @@ using Yavsc.Models;
namespace Yavsc.ViewComponents
{
public class TaggerViewComponent : ViewComponent
{
readonly ApplicationDbContext dbContext;
{
readonly IStringLocalizer<TaggerViewComponent> localizer;
public TaggerViewComponent(
ApplicationDbContext pdbContext,
IStringLocalizer<TaggerViewComponent> pLocalizer)
{
dbContext = pdbContext;
this.localizer = pLocalizer;
}
public IViewComponentResult Invoke(ITaggable<long> longTaggable)