public void GlueConfiguredByCodeAndMakeCall_Sync() { //This is an example of how to use Glue without pre-configured app container using (var app = new TestApplication() { Active = true }) { var glue = new Azos.Glue.Implementation.GlueDaemon(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!"); Aver.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 using (var app = new TestApplication()) { var glue = new Azos.Glue.Implementation.GlueDaemon(app); glue.Start(); try { var binding = new SyncBinding(glue, "sync"); var cl = new JokeContractClient(glue, TestServerSyncNode); } finally { glue.WaitForCompleteStop(); } } }