Created
September 10, 2012 19:49
-
-
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"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<behaviors> | |
<serviceBehaviors> | |
<behavior name="RequestProcessorBehavior"> | |
<serviceMetadata httpGetEnabled="true"/> | |
<dataContractSerializer maxItemsInObjectGraph="2147483647"/> | |
<serviceThrottling maxConcurrentCalls="500" maxConcurrentInstances="500"/> | |
</behavior> | |
</serviceBehaviors> | |
</behaviors> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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