public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType)
{
switch (targetType.BuiltinType) {
case BuiltinTypeSpec.Type.Object:
// Type it as string cast
enc.Encode (rc.Module.Compiler.BuiltinTypes.String);
goto case BuiltinTypeSpec.Type.String;
case BuiltinTypeSpec.Type.String:
case BuiltinTypeSpec.Type.Type:
enc.Encode (byte.MaxValue);
return;
default:
var ac = targetType as ArrayContainer;
if (ac != null && ac.Rank == 1 && !ac.Element.IsArray) {
enc.Encode (uint.MaxValue);
return;
}
break;
}
base.EncodeAttributeValue (rc, enc, targetType, parameterType);
}