tailieunhanh - Introducing Windows Azure- P42

Introducing Windows Azure- P42: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 The Draw Shape Controller is another part of this system. The responsibility of this Windows-based application is to select a drawing shape type and publish a message with the type of PostData that contains a string description and the enumeration value for the selected drawing shape. The data contract PostData is defined in Listing 6-12 and implements the IComparable interface to allow the service application to check for selected drawing shape changes from the client drawing controller application. The implementation of this class is straightforward as Listing 6-16 shows. When a button is clicked a different drawing shape is selected and a new PostData object is created and sent out as part of the publishing message sent from the drawing controller to the shape-drawing application. The component that we use to create out the communication channel is the HybridPublishService we created in the last exercise. Listing 6-16. Implementation of ShapeController using System using using using using using using using using using namespace using using using public partial class FormController Form private IPublishEventService publishEventService null private HybridPublishService hybridPublishService null private string connectionStatus Disconnected public FormController InitializeComponent public FormController IPublishEventService publishEventService InitializeComponent publishEventService publishEventService string endpoint RelayEndpoint hybridPublishService new HybridPublishService endpoint 198 CHAPTER 6 AZURE .NET SERVICES SERVICE BUS IHybridConnectionStatus hybridConnectionStatus .