private void WriteArray(object o, object choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc)
{
if (elements.Length == 0 && text == null)
{
return;
}
if (arrayTypeDesc.IsNullable && o == null)
{
return;
}
if (choice != null)
{
if (choiceSource == null || ((Array)choiceSource).Length < ((Array)o).Length)
{
throw CreateInvalidChoiceIdentifierValueException(choice.Mapping.TypeDesc.FullName, choice.MemberName);
}
}
WriteArrayItems(elements, text, choice, arrayTypeDesc, o);
}