Closed buldrinie closed 5 years ago
The generic Tuple object doesn't retain property names during serialization:
I will create a structure for ObjectType. This Type has an int for the id and a description that is the value of a resource enumeration. Below are the enumeration keys for the "JCI AV" description:
objectTypeEnumSet.avClass=JCI AV 00508.00165=JCI AV
Given the id=165, and knowing the EnumSet is 508=objectTypeEnumSet, it is possible to map 165=avClass. It would then be possible to provide the translated strings for ObjectType description.
My question is what values should ObjectType hold?
I don't think the member number (165) is very useful to the user unless they wanted to make a external call to the server, even then they cannot get the localized string from the server.
The Id is important, because consumers can use it to filter Network Devices types. In general I would put in the object the enumeration key as it is, then will be up to the user to translate it using our localization services. so far, also for other responses we never provided automatic translations (could be an enhancement of release 1). I don't think we can translate the descriptions since our resx files are associated only with enums.
I implemented automatic translation of enumerations in #36. This week I implemented a way to translate command en-US titles such as "Reset Field Device" to other cultures such as it-IT: "Reset Dispositivo di Campo". Here are my test times:
Good, so we'll put the translated strings also here to be consistent across the methods.
Addressed in #51.
Response object is expected to have Id and Description named properties. I suggest to create a structured object to be used as response type.