Querying a Binary DSC File Set

To read a DSC file set that contains binary data, use the FromDsc method, and a type parameter that matches the type that was originally used to save the data.

Here is an example of a LINQ to HPC query that reads a binary DSC file set that contains serialized integers. The query returns the largest integer in the file set.

var config = new HpcLinqConfiguration("MyHpcClusterHeadNode");
var context = new HpcLinqContext(config);
string intData = ...

var largestValue = context.FromDsc<int>(intData).Max();
Console.WriteLine("The largest value is {0}", largestValue);

noteNote
The Max method causes the query to be executed. You can use the MaxAsQuery method to delay the query's execution.



Show: