WCF技术内幕 第5章 (11)
EndpointAddress类型
EndpointAddress类型有两种功能:它可以方便地保护目标地址的信息,它是一种序列化WS-Addressing终结点到Message中的方式。
Message message = Message.CreateMessage(MessageVersion.Soap12WSAddressingAugust2004, "SomeAction"); Console.WriteLine(message.State.ToString()); //Created MessageBuffer messageBuffer = message.CreateBufferedCopy(Int32.MaxValue); //Copied Console.WriteLine(message.State.ToString()); Message newMessage = messageBuffer.CreateMessage(); Console.WriteLine(newMessage.State.ToString()); //Created