C3/Src/WebController/Backend/Models/GatewayViewModel.cs

21 lines
537 B
C#
Raw Normal View History

2019-09-02 10:28:14 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace MWR.C3.WebController.Models
{
public class GatewayViewModel : AgentViewModel
{
public ICollection<RelayViewModel> Relays { get; set; }
public ICollection<Connector> Connectors { get; set; }
public GatewayViewModel(Gateway g): base(g, g.Build?.Name)
{
Connectors = g.Connectors;
Relays = g.Relays?.Select(r => new RelayViewModel(r)).ToList();
}
}
}