Archives
-
LINQ to Objects in Depth (7) Custom Query Methods
After discussing the query methods provided by .NET, this part demonstrates how to define custom query methods:
-
LINQ to Objects in Depth (6) Interactive Extensions (Ix)
Besides the built-in query methods (standard query operators) provided by System.Linq.Enumerable, Microsoft also provides additional query methods through the System.Interactive NuGet package (aka Interactive Extensions (Ix) library), which has a System.Linq.EnumerableEx type with the following query methods:
-
LINQ to Objects in Depth (5) Query Methods Implementation
Understanding of internals of query methods is very helpful for using them accurately and effectively, and is also helpful for defining custom query methods, which is discussed later in this chapter. Just like the usage discussion part, here query methods are still categorized by returned type, but in a different order:
-
LINQ to Objects in Depth (4) Deferred Execution, Lazy Evaluation and Eager Evaluation
As fore mentioned, when a generator method (method contains yield statement and returns IEnumerable<T>) is compiled to a pure function, which constructs a generator and return it to caller. So at runtime, when a generator method is called, the values in output sequence is not pulled or evaluated. This is called deferred execution.
-
LINQ to Objects in Depth (3) Generator
After understanding how to use LINQ to Objects, starting from this part, the implementation of query methods is discussed. Most LINQ to Object query methods are implemented with iteration pattern and generators.
-
LINQ to Objects in Depth (2) Query Methods (Operators) and Query Expressions
This part discusses the usages of built-in LINQ to Objects query methods and query expressions. As fore mentioned, these query methods (also called standard query operators) are provided in System.Linq.Enumerable type, most of which are IEnumerable<T> extension methods. They can be categorized by return type:
-
LINQ to Objects in Depth (1) Local Sequential Query
LINQ to Objects queries sequences of .NET objects in local memory of current .NET application or service. Its data source and the queries are represented by IEnumerable<T>.