11.07.2015 Views

y - Net Developer

y - Net Developer

y - Net Developer

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

amrameshreddy.blog.com356 CHAPTER 11 ■ WORKING WITH DATAramrameshreddy.blog.comthe bindings and behaviors need to be set up correctly (for example, attempting to sign withoutproviding the correct credentials); otherwise, you will get an exception. Table 11-3summarizes the possible values of this property.Table 11-3. ProtectionLevel Property ValuesValueNoneSignEncyrptAndSignPerformanceDescriptionNo encryption or digital signature (this is also the default option)Digital signature onlyBoth digitally signs and encryptsSince every message header and body part is serialized independent of each other, the samenamespace will be repeatedly declared for each of the same. It is recommended you consolidatethese multiple headers and body parts into a single header or body part to reduce the sizeof the message on the wire and improve performance. For example, you can rewrite the originalListing 11-8 that showed QuickReturnStockQuote implemented as a message contract asshown in Listing 11-12.Listing 11-12. QuickReturnStockQuote Implemented for Optimal Performance[MessageContract]public class QuickReturnStockQuote{[MessageHeader(Name="TickerSymbol")]internal string Symbol;}[MessageHeader]internal string CompanyName;[MessageBodyMember]internal StockDetails StockInformation;[DataContract]public class StockDetails {[DataMember]internal decimal LastTrade;ramrameshreddyramrameshreddy[DataMember]internal decimal Change;[DataMember]internal decimal PreviousClose;

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

Saved successfully!

Ooh no, something went wrong!