// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; using System.Runtime.Serialization; using System.ServiceModel; namespace WCF.Common { [DataContract] public class Data { [DataMember] public int Iv { get; set; } [DataMember] public string Sv { get; set; } public Data() : this(0, "") { } public Data(int iv, string sv) { this.Iv = iv; this.Sv = sv; } } [ServiceContract] public interface ITest { [OperationContract] int Add(int a, int b); [OperationContract] String Dup(String s); [OperationContract] Data Process(Data d); [OperationContract] int GetCounter(); [OperationContract] void Noop(); } }