We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b7c069 commit c4298a3Copy full SHA for c4298a3
1 file changed
Diagram.Core/Elements/IndicatorDiagramElement.cs
@@ -230,7 +230,14 @@ IDiagramElementParam createParam(Type propType)
230
propType == typeof(DateTimeOffset) ||
231
propType.IsEnum)
232
{
233
- parameters.Add(createParam(propType));
+ // keep property type as nullable if it is
234
+ var param = createParam(propertyInfo.PropertyType);
235
+
236
+ // copy all restrictions
237
+ param.Attributes.AddRange(propertyInfo.Attributes.OfType<ValidationAttribute>());
238
+ param.Attributes.AddRange(propertyInfo.Attributes.OfType<ItemsSourceAttribute>());
239
240
+ parameters.Add(param);
241
}
242
else if (propType.Is<IIndicator>())
243
0 commit comments