-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathTileMaterialContent.cs
39 lines (34 loc) · 1.08 KB
/
TileMaterialContent.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
using Lynicon.Attributes;
using Lynicon.Collation;
using Lynicon.Models;
using Lynicon.Relations;
using Lynicon.Services;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace LyniconANC.Release.Models
{
public class TileMaterialContent : TilesPageBase
{
[Summary]
public string Title { get; set; }
public MinHtml Description { get; set; }
[ScaffoldColumn(false), JsonIgnore]
public LyniconSystem Lyn { private get; set; }
public TileMaterialContent()
{
InitialiseProperties();
}
public List<TileSummary> TilesOfMaterial()
{
// This is how to get the list of tiles with this material i.e. the
// TileContent items whose Material reference points to this TileMaterialContent instance.
return Reference.GetReferencesFrom<TileContent>(Lyn, this, "Material")
.Cast<TileSummary>()
.ToList();
}
}
}