In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to create WCF framework", the explanation content in the article is simple and clear, easy to learn and understand, please follow the idea of Xiaobian slowly in-depth, together to study and learn "how to create WCF framework"!
The WCF framework is an efficient. NET application framework. It mixes functional languages with object-oriented programming languages, and is uniquely suited to programming, algorithms, technology, and exploratory development, so it can be fun and attractive to use.
WCF framework custom collection types, if published as part of a service contract, must ensure the following:WCF framework must contain types marked with [Serializable] and [DataContract];WCF collection must contain type attributes marked with [DataMember], and, if attributes (Property), which must implement get and set;WCF collection types must use the [Serializable] and [CollectionDataContract] tags, as well as the [KnownType] tag to point to the subtype the collection contains; collection types must implement the IEnumerable interface; collection types expose collection items to clients using the IList tag [DataMember].
By default, the WCF framework has built-in support for collection types, meaning that you don't need to apply any attributes to apply collections to a data contract (contract), provided that the elements in the collection have DataContractAttribute attributes applied or are serializable types. In this case, the data contract names and namespaces depend on the names and namespaces of the types of elements contained in the collection, and they are not affected by the names and namespaces of the collection types themselves.
If the collection is applied to a data contract type, its name will be the field name, as defined below for Customer and serialized representation:
[DataContract] public class Customer { [DataMember] public List addresses = new List {"Beijing","ShangHai" }; [DataMember] public Dictionary telephones = new Dictionary { { 1, "010-82371234" }, { 2, "021-56781234" } }; } Beijing ShangHai 1 010-82371234 2 021-56781234 Thank you for reading, the above is "how to create a WCF framework" content, after learning this article, I believe we have a deeper understanding of how to create a WCF framework, the specific use of the situation also needs to be verified. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.