Skip to content

Instantly share code, notes, and snippets.

@davybrion
Created September 10, 2012 19:49
Show Gist options
  • Save davybrion/3693369 to your computer and use it in GitHub Desktop.
Save davybrion/3693369 to your computer and use it in GitHub Desktop.
code snippets for "Consuming An Agatha Service From A Non-Agatha-Aware Client"
<behaviors>
<serviceBehaviors>
<behavior name="RequestProcessorBehavior">
<serviceMetadata httpGetEnabled="true"/>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
<serviceThrottling maxConcurrentCalls="500" maxConcurrentInstances="500"/>
</behavior>
</serviceBehaviors>
</behaviors>
using System;
using Sample.NonAgathaAwareClient.MyAgathaService;
namespace Sample.NonAgathaAwareClient
{
class Program
{
static void Main(string[] args)
{
using (var proxy = new MyAgathaService.WcfRequestProcessorClient())
{
var responses = proxy.ProcessRequests(new[] { new HelloWorldRequest() });
var helloWorldResponse = (HelloWorldResponse)responses[0];
Console.WriteLine(helloWorldResponse.Message);
Console.Read();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment