protected TemplateBaseAttribute ProcessTemplate(JToken template, TemplateBaseAttribute attribute) { if (template["Patterns"] != null) { attribute.Patterns = template["Patterns"].ToObject <string[]>(); } attribute.AllowDefault = ProcessEnum <BoolDefault>(template, "AllowDefault"); attribute.ChoiceCase = ProcessEnum <CaseNormalization>(template, "ChoiceCase"); attribute.ChoiceFormat = (string)template["ChoiceFormat"]; attribute.ChoiceLastSeparator = (string)template["ChoiceLastSeparator"]; attribute.ChoiceParens = ProcessEnum <BoolDefault>(template, "ChoiceParens"); attribute.ChoiceSeparator = (string)template["ChoiceSeparator"]; attribute.ChoiceStyle = ProcessEnum <ChoiceStyleOptions>(template, "ChoiceStyle"); attribute.Feedback = ProcessEnum <FeedbackOptions>(template, "Feedback"); attribute.FieldCase = ProcessEnum <CaseNormalization>(template, "FieldCase"); attribute.LastSeparator = (string)template["LastSeparator"]; attribute.Separator = (string)template["Separator"]; attribute.ValueCase = ProcessEnum <CaseNormalization>(template, "ValueCase"); return(attribute); }
public PromptAttribute(TemplateBaseAttribute other) : base(other) { }