This project is read-only.

Example Usage

You can get a good idea of the usage from the sample project for the desktop.

LinqToStdf.StdfFile is the primary starting point. In the simplest scenario, just create a new one for the path and query over the results of GetRecords():
            var stdf = new StdfFile(path);

            //silly query
            var query = from r in stdf.GetRecords()
                        select r;

            Console.WriteLine("There were {0} records!", query.Count());

Use OfExactType to get only certain records
            var testTimes = from prr in stdf.GetRecords().OfExactType<Prr>()
                            let testTime = prr.TestTime
                            where testTime != null
                            select testTime.Value / 1000.0;

Use the extension methods to query the structure of the file:
            //Get PTR results from failing parts grouped by test number
            var results = from prr in stdf.GetRecords().OfExactType<Prr>()
                          where prr.Failed ?? false
                          from ptr in prr.GetChildRecords().OfExactType<Ptr>()
                          let result = ptr.Result
                          where result != null
                          group result.Value by ptr.TestNumber into g
                          select new { TestNumber = g.Key, Results = g };

Experiment! If you can't figure out how to do something, start a discussion in the "Discussions" tab above and get help.

Last edited May 24, 2008 at 6:45 AM by marklio, version 4

Comments

alfredbayona Nov 16 at 5:58 AM 
Hi marklio. I'm getting this error, System.NotSupportedException: 'Ldc<T> does not support T is System.DateTime.'. could you help me solve this? Thanks!