With all the out-of-band technology releases we've had (ASP.NET AJAX, .NET 3.0), it's nice to reach a point where we can bring them all together.
As an example...
Create a new web site in Visual Studio 2008. This will have to be a website under IIS, unfortunately, for reasons I'll point out later. Once the web site is up, add a new item – a WCF service. The service contract can look like the following:
[ServiceContract(Namespace="http://OdeToCode.com/ws",
Name="ServerProcessInfo")]
public interface IServerProcessInfo
{
[OperationContract]
IEnumerable<ProcessInfo> GetRunningProcesses();
}
The data contract can look like so:
[DataContract]
public class ProcessInfo
{
[DataMember]
public string Name { get; set; }
[DataMember]
public long WorkingSet { get; set; }
}
Finally, the LINQish...