I am building a C# library wrapper for REST services (GeometryServer/buffer...). Using this library I can buffer points, lines and polygons and get valid json responses. I have gotten it to where I can pass in properly formatted geometries in json via POST.
However. When it comes to passing in non-simple geometries to the QUERY service I keep getting a "geometry parameter is invalid" response...
The Map Service query operation takes in a geometry object (as you can only specify one filter geometry at a time) and NOT an array of geometries (used for the Geometry service's buffer operation). For information on the Map Server's query operation look at http://help.arcgis.com/EN/arcgisserver/10.0/apis/rest/query.html for more information.
You should be able to use the Silverlight API, which has C# bindings for ArcGIS server's REST API, as much of this work has already been done for you. Its got a very rich client API, that you can use.