In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you "WCF how to customize the collection", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "WCF how to customize the collection" this article.
Using WSE (Web Service Enhancements) can provide security guarantee for ASMX. The .NET Remoting has rich extension capabilities to create custom channels, formatters, and agents. Enterprise Service (COM+) provides support for transactions, including distributed transactions, for failure recovery. MSMQ can support asynchronous calls, offline connections, breakpoint connections and other functions, using message queuing to support message delivery between applications. From a functional point of view, WCF integrates the advantages of existing technologies such as ASMX, .net Remoting, Enterprise Service, WSE and MSMQ. It provides a unified framework model for building secure and reliable distributed service-oriented systems, which makes it easier for software developers to develop distributed applications.
The collection element class is defined as follows:
Public enum FileType {TXT,DOC,HTML,OTHER} [DataContract] public class Document {private string masked filename; private string masked filename; private FileType masked fileType; [DataMember] public string LocalPath {get {return masked localPath;} set {m_localPath = value;}} [DataMember] public string FileName {get {return filename;} set {m_fileName = value }} [DataMember] public FileType FileType {get {return masked fileType;} set {m_fileType = value;}
The WCF custom collection DocumentList implements the IList interface:
/ / which attribute should be applied here? Public class DocumentList:IList {private IList m_list = null; public DocumentList () {m_list = new List ();} # region IList Members public int IndexOf (Document item) {return m_list.IndexOf (item);} public void Insert (int index, Document item) {m_list.Insert (index,item);} public void RemoveAt (int index) {m_list.RemoveAt (index) } public Document this [int index] {get {return mlist [index];} set {mlist [index] = value;} # endregion # region ICollection Members public void Add (Document item) {m_list.Add (item);} public void Clear () {m_list.Clear ();} public bool Contains (Document item) {return m_list.Contains (item) } public void CopyTo (Document [] array, int arrayIndex) {m_list.CopyTo (array,arrayIndex);} public int Count {get {return masked list.Count;}} public bool IsReadOnly {get {return masked list.IsReadOnly;}} public bool Remove (Document item) {return m_list.Remove (item);} # endregion # region IEnumerable Members public IEnumerator GetEnumerator () {return m_list.GetEnumerator () } # endregion # region IEnumerable Members IEnumerator IEnumerable.GetEnumerator () {return ((IEnumerable) m_list). GetEnumerator ();} # endregion} these are all the contents of the article "how to customize collections in WCF". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.