tailieunhanh - Introducing Windows Azure- P40

Introducing Windows Azure- P40:The cloud platform is getting more and more attractive to the computing world. Today, service-oriented architecture (SOA) and aspect-oriented programming (AOP) techniques are widely used in enterprise solutions. A question an IT management team or a software development team may ask is, what is the next trend going to be? Cloud computing seems to be the right answer. | CHAPTER 6 AZURE .NET SERVICES SERVICE BUS status is initially set to relay binding and will be automatically switched to direct binding a few seconds after the connection has been established. Listing 6-8. Implementation ofConsole Application Instantiates a Connection Starting with Relay Service using System using using using using namespace using class Program static void Main string args PublishEventService service new PublishEventService string endpoint RelayEndpoint HybridPublishService hybridPublishService new HybridPublishService endpoint Relay connection has been established----- 0 IHybridConnectionStatus hybridConnectionStatus IHybridConnectionStatus new EventHandler HybridConnectionStateChangedArgs hybridConnectionStatus ConnectionStateChanged Press Enter to exit publishing---- 0 string input while input PostData postData new PostData 0 1 input as IPublishEventService .PostMessage postData 188 CHAPTER 6 AZURE .NET SERVICES SERVICE BUS input static private void hybridConnectionStatus ConnectionStateChanged object sender HybridConnectionStateChangedArgs args Connection has been switched from relay to direct connection 0 The screenshot of Figure 6-7 caught at the breakpoint from Visual Studio shows that the connection type is relayed when the connection is established. Figure 6-8 shows that the connection has been automatically switched to direct a few seconds later and that a .