This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy



Download 21,46 Mb.
Pdf ko'rish
bet1688/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   1684   1685   1686   1687   1688   1689   1690   1691   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

Understanding WCF Contracts

The notion of a contract is the key to building a WCF service. While not mandatory, the vast majority

of your WCF applications will begin by defining a set of .NET interface types that are used to repre-

sent the set of members a given WCF type will support. Specifically, interfaces that represent a WCF

contract are termed 

service contracts. The classes (or structures) that implement them are termed

service types.

WCF service contracts are adorned with various attributes, the most common of which are

defined in the System.ServiceModel namespace. When the members of a service contract contain

only simple data types (such as numerical data, Booleans, and string data) you can build a com-

plete WCF service using nothing more than the [ServiceContract] and [OperationContract]

attributes. 

However, if your members expose custom types, you will need to make use of types in the

System.Runtime.Serialization namespace (see Figure 25-5) of the System.Runtime.Serialization.

dll assembly. Here you will find additional attributes (such as [DataMember] and [DataContract]) to

fine-tune the process of defining your interface types. 

Strictly speaking, you are not required to use CLR interfaces to define a WCF contract. Many of

these same attributes can be applied on public members of a public class (or structure). However,

given the many benefits of interface-based programming (polymorphism, elegant versioning, etc.),

it is safe to consider using CLR interfaces to describe a WCF contract as a best practice.

C H A P T E R   2 5  


Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   1684   1685   1686   1687   1688   1689   1690   1691   ...   1830




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish