public List <Option> GetArchetypePrevalues(LeBlenderValue leBlenderValue, string alias) { List <Option> options = new List <Option>(); ArchetypeModel archetypeModel; try { archetypeModel = leBlenderValue.GetValue <ArchetypeModel>(alias); if (archetypeModel != null) { var query = archetypeModel.Fieldsets.Where(f => !f.Disabled).Select(f => new Option() { Name = f.GetValue("value") }); if (query.Any()) { options = query.ToList(); } } return(options); } catch (Exception) { return(options); } }
public InfoBoxViewModel(LeBlenderValue x) { Heading = x.GetValue <string>("heading"); Content = x.GetValue <IHtmlString>("rte"); Position = x.GetValue <InfoBoxPosition>("factboxPosition"); }