15.02.2015 Views

C# 4 and .NET 4

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

summary ❘ OC121<br />

{<br />

ProductId = 67,<br />

UnitPrice = 14,<br />

Quantity = 1<br />

}<br />

OrderLine[] orderLines = { line1, line2 };<br />

order.orderLines = orderLines;<br />

}<br />

var occ = new OrderControlClient();<br />

occ.NewOrder(order);<br />

summary<br />

This chapter discussed the rich features offered by Enterprise Services, such as automatic transactions,<br />

object pooling, queued components, <strong>and</strong> loosely coupled events.<br />

To create serviced components, you have to reference the assembly System.EnterpriseServices. The<br />

base class of all serviced components is ServicedComponent. In this class, the context makes it possible<br />

to intercept method calls. You can use attributes to specify the interception that will be used. You also<br />

learned how to configure an application <strong>and</strong> its components using attributes, as well as how to manage<br />

transactions <strong>and</strong> specify the transactional requirements of components by using the [Transaction]<br />

attribute. You’ve also seen how well Enterprise Services integrates with the new communication technology<br />

WCF, by creating a WCF façade.<br />

This chapter showed how to use Enterprise Services, a feature offered by the operating system. The<br />

next chapter gives information on how to use another feature from the operating system that is used for<br />

communication: message queuing.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!