[RelativityObjectField("C3B2943D-C9C2-4C92-A88D-115B3F9ED64D", (int)RdoFieldType.MultipleChoice, typeof(MultipleChoiceFieldChoices))]
public IList<MultipleChoiceFieldChoices> MultipleChoiceFieldChoices { get; set; }
[RelativityObjectField("CEDB347B-679D-44ED-93D3-0B3027C7E6F5", (int)RdoFieldType.SingleChoice, typeof(SingleChoiceFieldChoices))]
public SingleChoiceFieldChoices SingleChoice { get; set; }
We should have a RelativityChoiceField attribute that looks like this:
[RelativityChoiceField("C3B2943D-C9C2-4C92-A88D-115B3F9ED64D")]
public IList<MultipleChoiceFieldChoices> MultipleChoiceFieldChoices { get; set; }
[RelativityChoiceField("CEDB347B-679D-44ED-93D3-0B3027C7E6F5")]
public SingleChoiceFieldChoices SingleChoice { get; set; }
Whether it it single or multiple choice can be determined by checking whether the property type is an IEnumerable<>, and the choice type can be read from the property like we are doing in #41.
At a minimum, we could make it possible to do without the type parameter in RelativityObjectField.
Instead of code like
We should have a
RelativityChoiceField
attribute that looks like this:Whether it it single or multiple choice can be determined by checking whether the property type is an
IEnumerable<>
, and the choice type can be read from the property like we are doing in #41.At a minimum, we could make it possible to do without the type parameter in
RelativityObjectField
.