@@ -43,6 +43,7 @@ protected FormField()
4343 /// <param name="bounds">bounds (required).</param>
4444 /// <param name="isRequired">Gets or sets a value indicating whether is required..</param>
4545 /// <param name="value">Gets or sets the value..</param>
46+ [ Obsolete ( "Name is deprecated, please use Id instead" ) ]
4647 public FormField ( string name = default , FieldType type = default , int pageNumber = default , Rectangle bounds = default , bool isRequired = default , string value = default , FontFamily font = FontFamily . Helvetica , int fontSize = default , string fontHexColor = default , bool isBoldFont = default , bool isItalicFont = default , bool isUnderLineFont = default , int lineHeight = default , int characterLimit = default )
4748 {
4849
@@ -83,6 +84,61 @@ public FormField(string name = default, FieldType type = default, int pageNumber
8384 this . FontSize = fontSize ;
8485 }
8586
87+ /// <summary>
88+ /// Initializes a new instance of the <see cref="FormField" /> class.
89+ /// </summary>
90+ /// <param name="type">fieldType (required).</param>
91+ /// <param name="pageNumber">Gets or sets the page number. (required).</param>
92+ /// <param name="bounds">bounds (required).</param>
93+ /// <param name="isRequired">Gets or sets a value indicating whether is required..</param>
94+ /// <param name="value">Gets or sets the value..</param>
95+ /// <param name="font">Gets or sets the font.</param>
96+ /// <param name="fontSize">Gets or sets the fontSize.</param>
97+ /// <param name="fontHexColor">Gets or sets the fontHexColor.</param>
98+ /// <param name="isBoldFont">Gets or sets the isBoldFont.</param>
99+ /// <param name="isItalicFont">Gets or sets the isItalicFont.</param>
100+ /// <param name="isUnderLineFont">Gets or sets the isUnderLineFont.</param>
101+ /// <param name="lineHeight">Gets or sets the lineHeight.</param>
102+ /// <param name="characterLimit">Gets or sets the characterLimit.</param>
103+ /// <param name="id">Gets or sets the id.</param>
104+ public FormField ( FieldType type = default , int pageNumber = default , Rectangle bounds = default , bool isRequired = default , string value = default , FontFamily font = FontFamily . Helvetica , int fontSize = default , string fontHexColor = default , bool isBoldFont = default , bool isItalicFont = default , bool isUnderLineFont = default , int lineHeight = default , int characterLimit = default , string id = default )
105+ {
106+ // to ensure "fieldType" is required (not null)
107+ if ( type == null )
108+ {
109+ throw new InvalidDataException ( ApiValidationMessages . FieldTypeRequired ) ;
110+ }
111+
112+ this . m_type = type ;
113+
114+ // to ensure "pageNumber" is required (not null)
115+ if ( pageNumber == null )
116+ {
117+ throw new InvalidDataException ( ApiValidationMessages . PageNumberRquired ) ;
118+ }
119+
120+ this . PageNumber = pageNumber ;
121+
122+ // to ensure "bounds" is required (not null)
123+ if ( bounds == null )
124+ {
125+ throw new InvalidDataException ( ApiValidationMessages . BoundsRequired ) ;
126+ }
127+
128+ this . Bounds = bounds ;
129+ this . Value = value ;
130+ this . IsRequired = isRequired ;
131+ this . FontHexColor = fontHexColor ;
132+ this . IsBoldFont = isBoldFont ;
133+ this . IsItalicFont = isItalicFont ;
134+ this . IsUnderLineFont = isUnderLineFont ;
135+ this . LineHeight = lineHeight ;
136+ this . CharacterLimit = characterLimit ;
137+ this . Font = font ;
138+ this . FontSize = fontSize ;
139+ this . Id = id ;
140+ }
141+
86142 /// <summary>
87143 /// Gets the form field type.
88144 /// </summary>
@@ -93,6 +149,12 @@ public virtual FieldType Type
93149 set { m_type = value ; }
94150 }
95151
152+ /// <summary>
153+ /// Gets or Sets id in form field.
154+ /// </summary>
155+ [ DataMember ( Name = "id" , EmitDefaultValue = true ) ]
156+ public string Id { get ; set ; }
157+
96158 /// <summary>
97159 /// Gets or Sets font name for the content in form field.
98160 /// </summary>
@@ -110,6 +172,7 @@ public virtual FieldType Type
110172 /// Gets or sets the form field name.
111173 /// </summary>
112174 /// <value>Gets or sets the name.</value>
175+ [ Obsolete ( "Name is deprecated, please use Id instead" ) ]
113176 [ DataMember ( Name = "name" , EmitDefaultValue = true ) ]
114177 public string Name { get ; set ; }
115178
0 commit comments