2012年11月22日
摘要: 例2-1:服务端的操作重载using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;namespace WCFServiceProgrammi... 阅读全文
posted @ 2012-11-22 17:28 逝者如斯(乎) 阅读(195) 评论(0) 推荐(0)
摘要: Example 3-1. The DataContractSerializerusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Xml;namespace WCFServiceProgramming{ public abstract class XmlObjectSerializer { public virtual object ReadObject(Stream stream); ... 阅读全文
posted @ 2012-11-22 17:27 逝者如斯(乎) 阅读(217) 评论(0) 推荐(0)
摘要: Example 4-1. The ServiceBehaviorAttribute used to configure instance context modeusing System;using System.Collections.Generic;using System.Linq;using System.Text;namespace WCFServiceProgramming{ public enum InstanceContextMode { PerCall, PerSession, Single } [Attrib... 阅读全文
posted @ 2012-11-22 17:26 逝者如斯(乎) 阅读(200) 评论(0) 推荐(0)
摘要: Example 5-1. Defining and configuring a callback contractusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.ServiceModel.Channels;using System.Diagnostics;using System.Runtime.Serialization;namespace WCFServiceProgramming.Library{ 阅读全文
posted @ 2012-11-22 17:25 逝者如斯(乎) 阅读(355) 评论(0) 推荐(0)
摘要: Example 6-1. The FaultException classusing System;using System.Runtime;using System.Runtime.Serialization;using System.Security;using System.ServiceModel.Channels;namespace System.ServiceModel{ [Serializable] //More attributes public class FaultException : CommunicationException { pu... 阅读全文
posted @ 2012-11-22 17:24 逝者如斯(乎) 阅读(196) 评论(0) 推荐(0)
摘要: Example 7-1. Explicit transaction managementusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.ServiceModel.Channels;using System.Diagnostics;using System.Runtime.Serialization;using System.ServiceModel.Dispatcher;using System.Ser 阅读全文
posted @ 2012-11-22 17:20 逝者如斯(乎) 阅读(232) 评论(0) 推荐(0)