PageRenderTime 18ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/ExpressInteropBinding/WCFInteroperableServiceApplicationTemplate/Service.svc.cs

#
C# | 28 lines | 25 code | 2 blank | 1 comment | 3 complexity | cd9c58a5718964b0b8e2aa03aba4efd7 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3$if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
 4$endif$using System.Runtime.Serialization;
 5using System.ServiceModel;
 6using System.Text;
 7
 8// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service" in code, svc and config file together.
 9public class Service : IService
10{
11	public string GetData(int value)
12	{
13		return string.Format("You entered: {0}", value);
14	}
15
16	public CompositeType GetDataUsingDataContract(CompositeType composite)
17	{
18		if (composite == null)
19		{
20			throw new ArgumentNullException("composite");
21		}
22		if (composite.BoolValue)
23		{
24			composite.StringValue += "Suffix";
25		}
26		return composite;
27	}
28}