Summary
Orders the input documents based on the specified key function.
- Assembly
- Wyam
.Core .dll - Namespace
- Wyam
.Core .Modules .Control - Interfaces
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Wyam.Common.Modules/IModule"
Type["OrderBy"]
class Type type-node
Syntax
public class OrderBy : IModule
Remarks
The ordered documents are output as the result of this module.
Constructors
Name | Summary |
---|---|
OrderBy |
Orders the input documents using the specified delegate to get the ordering key. |
Methods
Name | Value | Summary |
---|---|---|
Descending |
OrderBy |
Specifies whether the documents should be output in descending order (the default is ascending order).
If you use this method after called ThenBy, the descending ordering will apply to the secondary sort.
|
Execute |
IEnumerable |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
|
ThenBy |
OrderBy |
Orders the input documents using the specified delegate to get a secondary ordering key.
You can chain as many ThenBy calls together as needed.
|
WithComparer |
OrderBy |
Specifies a comparer to use for the ordering.
|
WithComparer |
OrderBy |
Specifies a typed comparer to use for the ordering. A conversion to the
comparer type will be attempted for all metadata values. If the conversion fails,
the values will be considered equivalent. Note that this will also have the effect
of treating different convertible types as being of the same type. For example,
if you have two keys, 1 and "1", and use a string-based comparison, the
documents will compare as equal.
|