public static Tag CreateInput(InputTypes type, PropertyInfo propertyInfo, object value = null) { if (propertyInfo.HasCustomAttributeOfType <TemplateAttribute>(out TemplateAttribute attribute)) { InputProvider.CreateFromTemplate(attribute, value); } return(InputTag.OfType(type, value) .SetAttribute("name", propertyInfo.Name)); }
public override Tag CreateInput(PropertyInfo propertyInfo, object data = null) { if (propertyInfo.HasCustomAttributeOfType <TemplateAttribute>(out TemplateAttribute templateAttribute)) { return(CreateFromTemplate(templateAttribute, data)); } return(InputTag.OfType(InputTypes.Number, data)); }
public static InputTag OfType(string type, object value = null) { Args.ThrowIf(type == null, "type can't be null"); InputTag input = new InputTag("input", new { type = type }); if (value != null) { input.SetAttribute("value", value.ToString()); } input.SelfClosing = true; return(input); }
public static Tag CreateInput(string type, string name, object value = null) { return(InputTag.OfType(type, value) .SetAttribute("name", name)); }
public override Tag CreateInput(object data = null) { return(InputTag.OfType(InputTypes.Password).SetAttribute("name", PropertyName)); }