Skip to content

Pact Core Extensions CollectionExtensions NormalizeOrder T (System Collections Generic ICollection T System Linq Expressions Expression System Func T int int)

welshronaldo edited this page May 30, 2022 · 6 revisions

CollectionExtensions.NormalizeOrder<T>(ICollection<T>, Expression<Func<T,int>>, int) Method

Normalizes a specified order property value on a collection to be 1-based

public static void NormalizeOrder<T>(this System.Collections.Generic.ICollection<T> collection, System.Linq.Expressions.Expression<System.Func<T,int>> propSelector, int baseIndex=1);

Type parameters

T

Parameters

collection System.Collections.Generic.ICollection<T>
The collection containing the property to be normalized

propSelector System.Linq.Expressions.Expression<System.Func<T,System.Int32>>
A selection expression for the integer property being normalized

baseIndex System.Int32
The base number to normalize from

Clone this wiki locally