public void GlueConfiguredByCodeAndMakeCall_Sync() { //This is an example of how to use Glue without pre-configured app container var app = new TestApplication() { Active = true }; var glue = new NFX.Glue.Implementation.GlueService(app); glue.Start(); try { using (var binding = new SyncBinding(glue, "sync")) { binding.Start(); var cl = new JokeContractClient(glue, TestServerSyncNode); cl.Headers.Add(new AuthenticationHeader(TestCredentials)); var result = cl.Echo("Gello A!"); Assert.IsTrue(result.StartsWith("Server echoed Gello A!")); } } finally { glue.WaitForCompleteStop(); } }
public void GlueConfiguredByCode() { //This is an example of how to use Glue without pre-configured app container var glue = new NFX.Glue.Implementation.GlueService(); glue.Start(); try { var binding = new SyncBinding(glue, "sync"); var cl = new JokeContractClient(glue, TestServerSyncNode); } finally { glue.WaitForCompleteStop(); } }
public void GlueConfiguredByCode_MPX() { //This is an example of how to use Glue without pre-configured app container var glue = new NFX.Glue.Implementation.GlueService(); glue.Start(); try { var binding = new MpxBinding(glue, "mpx"); var cl = new JokeContractClient(glue, TestServerMpxNode); } finally { glue.WaitForCompleteStop(); } }
public void GlueConfiguredByCodeAndMakeCall_Sync() { //This is an example of how to use Glue without pre-configured app container var app = new TestApplication(){ Active = true }; var glue = new NFX.Glue.Implementation.GlueService(app); glue.Start(); try { using(var binding = new SyncBinding(glue, "sync")) { binding.Start(); var cl = new JokeContractClient(glue, TestServerSyncNode); cl.Headers.Add( new AuthenticationHeader( TestCredentials ) ); var result = cl.Echo("Gello A!"); Assert.IsTrue(result.StartsWith("Server echoed Gello A!")); } } finally { glue.WaitForCompleteStop(); } }