C# Client : Strongly Typed Report Result

26 views
Skip to first unread message

Ecevit SARAÇ

unread,
Aug 22, 2014, 7:17:27 AM8/22/14
to adwor...@googlegroups.com
Hello,

We want to serialize the XML result from the report service to a class that maps to reports fields. So that we can consume the result of the report as a  strongly typed object and we will have the ability to see the properties via intellisense.

What we need is, C# POCO classes that are mapped to report XML files, so that we can serialize to objects instantly. We tried to create the classes, we used the Visual Studio feature "Paste XML as Classes" which you just copy XML content and you paste it to C# file with this option and voila it creates C# classes according to the XML you copied. But the problem is, sometimes attribute types are not matched with the result XML in runtime, because the XML file you created the classes may have a fields with value 1 (int) and the runtime result may be 2.5 (double) so the attribute in classes are created as int but in runtime service returns double. So we need to fix all that manually which is not a developer's way of doing things.

So do Google provide C# POCO classes for reports services XML results or anyone found any other way of consuming the service results with strongly typed classes.

Thanks a lot.

Anash P. Oommen (AdWords API Team)

unread,
Aug 22, 2014, 2:21:38 PM8/22/14
to adwor...@googlegroups.com
Hi,

This is on our roadmap, and we plan to support this in all our client libraries. I don't have a timeline yet, but could you kindly open an issue at https://github.com/googleads/googleads-dotnet-lib/issues so we can follow up and make sure it is addressed?

Cheers,
Anash P. Oommen,
AdWords API Advisor.
Reply all
Reply to author
Forward
0 new messages