Ejemplo n.º 1
0
 private object CallActionForDNString(ref Type clsType, ref AttributeExtCollection modifiedAttributes, MappingAction action) {
     bool useWide = UseWideOk(ref modifiedAttributes);
     if (MapStringAsValueType(ref modifiedAttributes)) {    // distinguish between mapping as IDL primitive or as IDL boxed value
         if (useWide) {
             return action.MapToIdlWString(clsType);
         } else {
             return action.MapToIdlString(clsType);
         }
     } else {
         // as WStringValue / StringValue
         if (useWide) {
             Type boxed = ReflectionHelper.WStringValueType;
             clsType = boxed; // transform
             return action.MapToWStringValue(boxed);
         } else {
             Type boxed = ReflectionHelper.StringValueType;
             clsType = boxed; // transform
             return action.MapToStringValue(boxed);
         }
     }
 }