/// <summary> /// call the appropriate mapping action for a CLSType array /// </summary> private object CallActionForDNArray(ref Type clsType, ref AttributeExtCollection modifiedAttributes, AttributeExtCollection allAttributes, MappingAction action) { // distinguish the different cases here Attribute idlMappingAttr = modifiedAttributes.GetHighestOrderAttribute(); if (idlMappingAttr is IdlSequenceAttribute) { modifiedAttributes = modifiedAttributes.RemoveAttribute(idlMappingAttr); int bound = (int) ((IdlSequenceAttribute)idlMappingAttr).Bound; return action.MapToIdlSequence(clsType, bound, allAttributes, modifiedAttributes); } else if (idlMappingAttr is IdlArrayAttribute) { IdlArrayAttribute arrayAttr = (IdlArrayAttribute)idlMappingAttr; modifiedAttributes = modifiedAttributes.RemoveAttribute(idlMappingAttr); int[] dimensions = DetermineIdlArrayDimensions(clsType, arrayAttr, ref modifiedAttributes); return action.MapToIdlArray(clsType, dimensions, allAttributes, modifiedAttributes); } else { Type boxed = GetBoxedArrayType(clsType); Type needsBoxingFrom = clsType; clsType = boxed; // transform return action.MapToIdlBoxedValueType(boxed, needsBoxingFrom); } }