Exemplo n.º 1
0
        public void InvokeBar()
        {
            ITestService ts = CreateChannel <ITestService> (
                delegate(Message input) {
                BodyWriter bw = new HandlerBodyWriter(
                    delegate(XmlDictionaryWriter writer) {
                    writer.WriteStartElement("BarResponse", "http://tempuri.org/");
                    writer.WriteElementString("DummyBarResponse", "http://tempuri.org/", "cecil");
                    writer.WriteEndElement();
                }
                    );
                return(Message.CreateMessage(input.Version, input.Headers.Action + "Response", bw));
            }
                );

            ts.Bar("il offre sa confiance et son amour");
        }