private IEnumerable <object> GetLabels(ViaContext context) { var labels = context.Labels; if (labels.IsNullOrWhiteSpace()) { return(default);
private Layouts GetLayouts(ViaContext context) { return(new Layouts { Labels = this.GetLabels(context), Keymap = this.GetKeymap(context), }); }
private Lighting GetLighting(ViaContext context) { if (Enum.TryParse <Lighting>(context.Lighting, out var lighting)) { return(lighting); } return(Lighting.none); }
private ViaModel GetViaModel(ViaContext context) { var name = context.Name; var vendorId = context.VendorId; var productId = context.ProductId; return(new ViaModel { Name = name, VenderId = vendorId, ProductId = productId, Lighting = this.GetLighting(context), Matrix = this.GetMatrix(context), Layouts = this.GetLayouts(context), }); }