-
Notifications
You must be signed in to change notification settings - Fork 28
/
TileController.cs
50 lines (42 loc) · 1.36 KB
/
TileController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using LyniconANC.Release.Models;
using Lynicon.Services;
namespace Lynicon.Test.Controllers
{
public class TileController : Controller
{
LyniconSystem lyn;
// Lynicon sets up a context within which CMS operations occur called LyniconSystem.
// This is constructor injected by asp.net core
public TileController(LyniconSystem lyn)
{
this.lyn = lyn;
}
public IActionResult Tile(TileContent data)
{
return View(data);
}
public IActionResult List(List<TileContent> data)
{
return null;
}
public IActionResult TileMaterial(TileMaterialContent data)
{
// property injection of the full LyniconSystem so that
// the model can fetch information about other content items
data.Lyn = lyn;
return View(data);
}
public IActionResult MaterialsLanding(MaterialsLandingContent data)
{
// property injection of the Collator used as the gateway for the data API so that
// the model can fetch information about other content items
data.Collator = lyn.Collator;
return View(data);
}
}
}