Class DataTypeCodeGenerator
- Namespace
- CMS.FormEngine
- Assembly
- CMS.FormEngine.dll
Class representing implementation of generating code for single field data type FieldDataType.
public class DataTypeCodeGenerator
- Inheritance
-
objectDataTypeCodeGenerator
- Extension Methods
Constructors
DataTypeCodeGenerator(Func<FormFieldInfo, string>, Func<FormFieldInfo, string>, Func<FormFieldInfo, string>, Func<FormFieldInfo, IEnumerable<string>>, Func<FormFieldInfo, string>)
Creates instance of a DataTypeCodeGenerator class for single data type.
public DataTypeCodeGenerator(Func<FormFieldInfo, string> dataTypeNameRetriever, Func<FormFieldInfo, string> validationHelperMethodNameRetriever, Func<FormFieldInfo, string> defaultValueRetriever, Func<FormFieldInfo, IEnumerable<string>> usingsRetriever = null, Func<FormFieldInfo, string> summaryRetriever = null)
Parameters
dataTypeNameRetriever
Func<FormFieldInfo, string>Function retrieving default value of a given data type.
validationHelperMethodNameRetriever
Func<FormFieldInfo, string>Function retrieving name of method from ValidationHelper used for retrieving value of a given data type.
defaultValueRetriever
Func<FormFieldInfo, string>Function retrieving default value of a given data type.
usingsRetriever
Func<FormFieldInfo, IEnumerable<string>>Function retrieving a list of namespaces used in using statements.
summaryRetriever
Func<FormFieldInfo, string>Function retrieving text used in summary comment section.
Exceptions
- ArgumentNullException
Thrown when
dataTypeNameRetriever
orvalidationHelperMethodNameRetriever
ordefaultValueRetriever
arenull
.
Properties
DataTypeNameRetriever
Function retrieving generated data type name.
public Func<FormFieldInfo, string> DataTypeNameRetriever { get; }
Property Value
- Func<FormFieldInfo, string>
DefaultValueRetriever
Function retrieving default value of a given type.
public Func<FormFieldInfo, string> DefaultValueRetriever { get; }
Property Value
- Func<FormFieldInfo, string>
SummaryRetriever
Function retrieving text used in summary comment section.
public Func<FormFieldInfo, string> SummaryRetriever { get; }
Property Value
- Func<FormFieldInfo, string>
UsingsRetriever
Function retrieving a list of namespaces used in using statements.
public Func<FormFieldInfo, IEnumerable<string>> UsingsRetriever { get; }
Property Value
- Func<FormFieldInfo, IEnumerable<string>>
ValidationHelperMethodNameRetriever
Function retrieving name of method from ValidationHelper used for retrieving value of a given type.
public Func<FormFieldInfo, string> ValidationHelperMethodNameRetriever { get; }
Property Value
- Func<FormFieldInfo, string>