I have a FormDialog that has LUIS entities bound to the state.
public abstract class AbstractFormDialog
{
[Optional]
public string Entity1;
[Optional]
public string Entity2;
[Optional]
public string Entity3;
[Optional]
public string Entity4;
[Optional]
public string Entity5;
}
In a subclass of AbstractFormDialog, I want to be able to say that some of these entities are required, so that "no preference" is not an option. Something like
public abstract class FormDialog1 : AbstractFormDialog
{
[Required]
public string Entity1;
[Required]
public string Entity2;
}
Does anyone know if this is possible? Of course I could make all attributes required in the base class, and then in every class which extends it, list which entities are actually optional. This design is bad though, because if a new Entity were to be added every subclass would need to be updated.
AbstractFormDialogtype to read the data, then there's probably nothing you can do. If it gets the attributes based on the instance, then you could make your fields properties instead and override it. Other than that, you could see if whatever checks the attributes also checks theTypeDescriptorstackoverflow.com/questions/12143650/… - TyCobb