in src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java [649:681]
protected void generateLooseUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
String propertyName = property.getSimpleName();
String type = property.getType().getSimpleName();
if (type.equals("boolean")) {
out.println(" info." + propertyName + " = dataIn.ReadBoolean();");
} else if (type.equals("byte")) {
out.println(" info." + propertyName + " = dataIn.ReadByte();");
} else if (type.equals("char")) {
out.println(" info." + propertyName + " = dataIn.ReadChar();");
} else if (type.equals("short")) {
out.println(" info." + propertyName + " = dataIn.ReadInt16();");
} else if (type.equals("int")) {
out.println(" info." + propertyName + " = dataIn.ReadInt32();");
} else if (type.equals("long")) {
out.println(" info." + propertyName + " = LooseUnmarshalLong(wireFormat, dataIn);");
} else if (type.equals("String")) {
out.println(" info." + propertyName + " = LooseUnmarshalString(dataIn);");
} else if (type.equals("byte[]") || type.equals("ByteSequence")) {
if (size != null) {
out.println(" info." + propertyName + " = ReadBytes(dataIn, " + size.asInt() + ");");
} else {
out.println(" info." + propertyName + " = ReadBytes(dataIn, dataIn.ReadBoolean());");
}
} else if (isThrowable(property.getType())) {
out.println(" info." + propertyName + " = LooseUnmarshalBrokerError(wireFormat, dataIn);");
} else if (isCachedProperty(property)) {
out.println(" info." + propertyName + " = (" + type + ") LooseUnmarshalCachedObject(wireFormat, dataIn);");
} else {
out.println(" info." + propertyName + " = (" + type + ") LooseUnmarshalNestedObject(wireFormat, dataIn);");
}
}