I'm just getting my feet wet with the Unity / C# API. One of the first things I noticed is the extremely verbose syntax to hydrate a request object:
new DeviceAuthenticationRequest() .SetDeviceId(deviceId) .SetDeviceModel(deviceModel) .SetDeviceName(deviceName) .SetDeviceOS(deviceOS) .SetDeviceType(deviceType) .SetDisplayName(displayName) .SetOperatingSystem(operatingSystem) .SetSegments(segments)
It looks like there are no properties on the object for these fields, and you are required to use these methods to hydrate the object. Have you considered adding properties so we can use object initializers? It's a more terse syntax that would make a nice alternative, and has some other perks like a filtered auto-complete so you know when the object is fully hydrated without scanning through a big list of Setters:
Ken Mason
I'm just getting my feet wet with the Unity / C# API. One of the first things I noticed is the extremely verbose syntax to hydrate a request object:
It looks like there are no properties on the object for these fields, and you are required to use these methods to hydrate the object. Have you considered adding properties so we can use object initializers? It's a more terse syntax that would make a nice alternative, and has some other perks like a filtered auto-complete so you know when the object is fully hydrated without scanning through a big list of Setters: